Source Code
Overview
ETH Balance
More Info
ContractCreator
Multichain Info
N/A
Latest 25 from a total of 2,427 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
Amount
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Sent Local Root ... | 16668359 | 2 days ago | IN | 0 ETH | 0.00001312 | ||||
| Sent Local Root ... | 16667370 | 2 days ago | IN | 0 ETH | 0.00001309 | ||||
| Sent Local Root ... | 16665866 | 2 days ago | IN | 0 ETH | 0.00001317 | ||||
| Sent Local Root ... | 16664544 | 2 days ago | IN | 0 ETH | 0.00001305 | ||||
| Sent Local Root ... | 16663247 | 2 days ago | IN | 0 ETH | 0.00001317 | ||||
| Sent Local Root ... | 16662858 | 2 days ago | IN | 0 ETH | 0.00001312 | ||||
| Sent Local Root ... | 16661656 | 2 days ago | IN | 0 ETH | 0.0000132 | ||||
| Sent Local Root ... | 16659758 | 2 days ago | IN | 0 ETH | 0.00001317 | ||||
| Sent Local Root ... | 16658111 | 2 days ago | IN | 0 ETH | 0.00001324 | ||||
| Sent Local Root ... | 16657395 | 2 days ago | IN | 0 ETH | 0.00001317 | ||||
| Sent Local Root ... | 16656490 | 2 days ago | IN | 0 ETH | 0.000013 | ||||
| Sent Local Root ... | 16655052 | 2 days ago | IN | 0 ETH | 0.00001308 | ||||
| Sent Local Root ... | 16653837 | 2 days ago | IN | 0 ETH | 0.00001302 | ||||
| Sent Local Root ... | 16652545 | 2 days ago | IN | 0 ETH | 0.0000131 | ||||
| Sent Local Root ... | 16652427 | 2 days ago | IN | 0 ETH | 0.00001309 | ||||
| Sent Local Root ... | 16650682 | 2 days ago | IN | 0 ETH | 0.00001315 | ||||
| Sent Local Root ... | 16649171 | 2 days ago | IN | 0 ETH | 0.00001314 | ||||
| Sent Local Root ... | 16647367 | 3 days ago | IN | 0 ETH | 0.0000132 | ||||
| Sent Local Root ... | 16646350 | 3 days ago | IN | 0 ETH | 0.00001309 | ||||
| Sent Local Root ... | 16644867 | 3 days ago | IN | 0 ETH | 0.00001315 | ||||
| Sent Local Root ... | 16643731 | 3 days ago | IN | 0 ETH | 0.00001309 | ||||
| Sent Local Root ... | 16642038 | 3 days ago | IN | 0 ETH | 0.00001318 | ||||
| Sent Local Root ... | 16641613 | 3 days ago | IN | 0 ETH | 0.00001315 | ||||
| Sent Local Root ... | 16640693 | 3 days ago | IN | 0 ETH | 0.00001322 | ||||
| Sent Local Root ... | 16638166 | 3 days ago | IN | 0 ETH | 0.00001317 |
Latest 25 internal transactions (View All)
| Parent Transaction Hash | Block | From | To | Amount | ||
|---|---|---|---|---|---|---|
| 16668425 | 2 days ago | 0 ETH | ||||
| 16668425 | 2 days ago | 0 ETH | ||||
| 16668425 | 2 days ago | 0 ETH | ||||
| 16668359 | 2 days ago | 0 ETH | ||||
| 16668359 | 2 days ago | 0 ETH | ||||
| 16668132 | 2 days ago | 0 ETH | ||||
| 16668132 | 2 days ago | 0 ETH | ||||
| 16668132 | 2 days ago | 0 ETH | ||||
| 16667872 | 2 days ago | 0 ETH | ||||
| 16667872 | 2 days ago | 0 ETH | ||||
| 16667872 | 2 days ago | 0 ETH | ||||
| 16667619 | 2 days ago | 0 ETH | ||||
| 16667619 | 2 days ago | 0 ETH | ||||
| 16667619 | 2 days ago | 0 ETH | ||||
| 16667619 | 2 days ago | 0 ETH | ||||
| 16667619 | 2 days ago | 0 ETH | ||||
| 16667619 | 2 days ago | 0 ETH | ||||
| 16667370 | 2 days ago | 0 ETH | ||||
| 16667370 | 2 days ago | 0 ETH | ||||
| 16667345 | 2 days ago | 0 ETH | ||||
| 16667345 | 2 days ago | 0 ETH | ||||
| 16667345 | 2 days ago | 0 ETH | ||||
| 16667066 | 2 days ago | 0 ETH | ||||
| 16667066 | 2 days ago | 0 ETH | ||||
| 16667066 | 2 days ago | 0 ETH |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x8E73DB0a...85d029BE8 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
L2ScrollBridgeAdapter
Compiler Version
v0.8.29+commit.ab55807c
Optimization Enabled:
Yes with 1000 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.29;
import {IL2ScrollMessenger} from "@scroll-tech/contracts/L2/IL2ScrollMessenger.sol";
import {IGigaRootProvider, IGigaRootRecipient, ILocalRootRecipient, ILocalRootProvider} from "../interfaces/IRootMessengers.sol";
import {IL2BridgeAdapter} from "../interfaces/IL2BridgeAdapter.sol";
contract L2ScrollBridgeAdapter is
IL2BridgeAdapter,
IGigaRootProvider,
ILocalRootRecipient
{
uint256 public gigaRoot;
// TODO erhm so scroll probably dropped L1SLOAD
// address L1_SLOAD_ADDRESS = 0x0000000000000000000000000000000000000101;
// uint256 gigaRootL1Slot = 0;
address l1ScrollBridgeAdapter;
address l2ScrollMessenger;
address l2WarpToad; // L2 warptoad
event SentLocalRootToL1(uint256 indexed localRoot);
event NewGigaRoot(uint256 indexed gigaRoot);
constructor(
address _l2ScrollMessenger,
address _l1ScrollBridgeAdapter,
address _l2WarpToad
) {
l1ScrollBridgeAdapter = _l1ScrollBridgeAdapter;
l2ScrollMessenger = _l2ScrollMessenger;
l2WarpToad = _l2WarpToad;
}
// extra for the contracts that want it.
// receiveGigaRoot (called by the L2ScrollBridge) will send it to L2Warptoad already
function sendGigaRoot(address _gigaRootRecipient) public payable {
IGigaRootRecipient(_gigaRootRecipient).receiveGigaRoot(gigaRoot);
}
function sentLocalRootToL1() public {
(uint256 _l2Root, uint256 _l2BlockNumber) = ILocalRootProvider(
l2WarpToad
).getLocalRootAndBlock();
// sendMessage is able to execute any function by encoding the abi using the encodeWithSignature function
//IScrollMessenger(l2ScrollMessenger).sendMessage{value: msg.value}(
uint256 gasLimit = 2000000;
IL2ScrollMessenger(l2ScrollMessenger).sendMessage{value: 0}( // can this be 0?? or can we pay for some relayer?? check docs!
l1ScrollBridgeAdapter, // TODO send to a L1Adapter first
0,
abi.encodeWithSignature("getNewRootFromL2(uint256,uint256)",_l2Root,_l2BlockNumber),
gasLimit,
msg.sender
);
emit SentLocalRootToL1(_l2Root);
}
function sentLocalRootToL1(uint256 _gasLimit) public {
(uint256 _l2Root, uint256 _l2BlockNumber) = ILocalRootProvider(
l2WarpToad
).getLocalRootAndBlock();
// sendMessage is able to execute any function by encoding the abi using the encodeWithSignature function
//IScrollMessenger(l2ScrollMessenger).sendMessage{value: msg.value}(
IL2ScrollMessenger(l2ScrollMessenger).sendMessage{value: 0}( // can this be 0?? or can we pay for some relayer?? check docs!
l1ScrollBridgeAdapter, // TODO send to a L1Adapter first
0,
abi.encodeWithSignature("getNewRootFromL2(uint256,uint256)",_l2Root,_l2BlockNumber),
_gasLimit,
msg.sender
);
emit SentLocalRootToL1(_l2Root);
}
function receiveGigaRoot(uint256 _gigaRoot) public payable {
require(msg.sender == l2ScrollMessenger,"function not called by l1ScrollMessenger");
require(l1ScrollBridgeAdapter == IL2ScrollMessenger(l2ScrollMessenger).xDomainMessageSender(),"contract messaging from L1 is not the L1ScrollBridgeAdapter");
gigaRoot = _gigaRoot;
sendGigaRoot(l2WarpToad);
emit NewGigaRoot(_gigaRoot);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {IScrollMessenger} from "../libraries/IScrollMessenger.sol";
interface IL2ScrollMessenger is IScrollMessenger {
/**********
* Events *
**********/
/// @notice Emitted when the maximum number of times each message can fail in L2 is updated.
/// @param oldMaxFailedExecutionTimes The old maximum number of times each message can fail in L2.
/// @param newMaxFailedExecutionTimes The new maximum number of times each message can fail in L2.
event UpdateMaxFailedExecutionTimes(uint256 oldMaxFailedExecutionTimes, uint256 newMaxFailedExecutionTimes);
/*****************************
* Public Mutating Functions *
*****************************/
/// @notice execute L1 => L2 message
/// @dev Make sure this is only called by privileged accounts.
/// @param from The address of the sender of the message.
/// @param to The address of the recipient of the message.
/// @param value The msg.value passed to the message call.
/// @param nonce The nonce of the message to avoid replay attack.
/// @param message The content of the message.
function relayMessage(
address from,
address to,
uint256 value,
uint256 nonce,
bytes calldata message
) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
interface IScrollMessenger {
/**********
* Events *
**********/
/// @notice Emitted when a cross domain message is sent.
/// @param sender The address of the sender who initiates the message.
/// @param target The address of target contract to call.
/// @param value The amount of value passed to the target contract.
/// @param messageNonce The nonce of the message.
/// @param gasLimit The optional gas limit passed to L1 or L2.
/// @param message The calldata passed to the target contract.
event SentMessage(
address indexed sender,
address indexed target,
uint256 value,
uint256 messageNonce,
uint256 gasLimit,
bytes message
);
/// @notice Emitted when a cross domain message is relayed successfully.
/// @param messageHash The hash of the message.
event RelayedMessage(bytes32 indexed messageHash);
/// @notice Emitted when a cross domain message is failed to relay.
/// @param messageHash The hash of the message.
event FailedRelayedMessage(bytes32 indexed messageHash);
/**********
* Errors *
**********/
/// @dev Thrown when the given address is `address(0)`.
error ErrorZeroAddress();
/*************************
* Public View Functions *
*************************/
/// @notice Return the sender of a cross domain message.
function xDomainMessageSender() external view returns (address);
/*****************************
* Public Mutating Functions *
*****************************/
/// @notice Send cross chain message from L1 to L2 or L2 to L1.
/// @param target The address of account who receive the message.
/// @param value The amount of ether passed when call target contract.
/// @param message The content of the message.
/// @param gasLimit Gas limit required to complete the message relay on corresponding chain.
function sendMessage(
address target,
uint256 value,
bytes calldata message,
uint256 gasLimit
) external payable;
/// @notice Send cross chain message from L1 to L2 or L2 to L1.
/// @param target The address of account who receive the message.
/// @param value The amount of ether passed when call target contract.
/// @param message The content of the message.
/// @param gasLimit Gas limit required to complete the message relay on corresponding chain.
/// @param refundAddress The address of account who will receive the refunded fee.
function sendMessage(
address target,
uint256 value,
bytes calldata message,
uint256 gasLimit,
address refundAddress
) external payable;
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.29;
interface IL2BridgeAdapter {
//TODO
// gigaRoot is emitted as a bytes32 here because thats how it's recovered on the
// L2 side of this rootBridgeAdapter. Key and index are also used to
// retrieve this newGigaRoot on L2
//event ReceivedNewL2Root(uint256 newL2Root, uint256 l2Block);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.29;
interface IGigaRootProvider {
function sendGigaRoot(address _gigaRootRecipient) external payable;
function gigaRoot() external returns(uint256);
}
interface IGigaRootRecipient {
function receiveGigaRoot(uint256 _gigaRoot) payable external;
//function receiveGigaRoot(uint256 _gigaRoot, uint256 _gasLimit) payable external;
}
interface ILocalRootProvider {
function getLocalRootAndBlock() external returns (uint256, uint256);
}
interface ILocalRootRecipient {
//only gigaBridge does this
//function updateGigaRoot(address[] memory _localRootProvider) external;
}{
"optimizer": {
"enabled": true,
"runs": 1000
},
"evmVersion": "cancun",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract ABI
API[{"inputs":[{"internalType":"address","name":"_l2ScrollMessenger","type":"address"},{"internalType":"address","name":"_l1ScrollBridgeAdapter","type":"address"},{"internalType":"address","name":"_l2WarpToad","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"gigaRoot","type":"uint256"}],"name":"NewGigaRoot","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"localRoot","type":"uint256"}],"name":"SentLocalRootToL1","type":"event"},{"inputs":[],"name":"gigaRoot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gigaRoot","type":"uint256"}],"name":"receiveGigaRoot","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_gigaRootRecipient","type":"address"}],"name":"sendGigaRoot","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gasLimit","type":"uint256"}],"name":"sentLocalRootToL1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sentLocalRootToL1","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
0x6080604052348015600e575f5ffd5b506040516107c23803806107c2833981016040819052602b916084565b600180546001600160a01b03199081166001600160a01b03948516179091556002805482169484169490941790935560038054909316911617905560bd565b80516001600160a01b0381168114607f575f5ffd5b919050565b5f5f5f606084860312156095575f5ffd5b609c84606a565b925060a860208501606a565b915060b460408501606a565b90509250925092565b6106f8806100ca5f395ff3fe608060405260043610610058575f3560e01c80633df6effa116100415780633df6effa14610097578063ab0f4748146100aa578063e6f9ed0d146100c9575f5ffd5b806327e74ca31461005c57806329c50fa914610071575b5f5ffd5b61006f61006a3660046105d2565b6100dd565b005b34801561007c575f5ffd5b506100855f5481565b60405190815260200160405180910390f35b61006f6100a5366004610600565b61029f565b3480156100b5575f5ffd5b5061006f6100c43660046105d2565b610313565b3480156100d4575f5ffd5b5061006f610470565b6002546001600160a01b031633146101625760405162461bcd60e51b815260206004820152602860248201527f66756e6374696f6e206e6f742063616c6c6564206279206c315363726f6c6c4d60448201527f657373656e67657200000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60025f9054906101000a90046001600160a01b03166001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b2573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101d69190610622565b6001546001600160a01b039081169116146102595760405162461bcd60e51b815260206004820152603b60248201527f636f6e7472616374206d6573736167696e672066726f6d204c31206973206e6f60448201527f7420746865204c315363726f6c6c4272696467654164617074657200000000006064820152608401610159565b5f819055600354610272906001600160a01b031661029f565b60405181907fd65331a373ddf7ebeecf120656bb7dae84cf462b334afeb99662ef16bc2f3a52905f90a250565b5f546040517f27e74ca300000000000000000000000000000000000000000000000000000000815260048101919091526001600160a01b038216906327e74ca3906024015f604051808303815f87803b1580156102fa575f5ffd5b505af115801561030c573d5f5f3e3d5ffd5b5050505050565b6003546040805163572ac17d60e11b815281515f9384936001600160a01b039091169263ae5582fa9260048083019392829003018187875af115801561035b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061037f919061063d565b6002546001546040805160248101869052604480820186905282518083039091018152606490910182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663010bb87160e01b1790529051635f7b157760e01b81529496509294506001600160a01b0391821693635f7b1577935f936104139316918491908a90339060040161065f565b5f604051808303818588803b15801561042a575f5ffd5b505af115801561043c573d5f5f3e3d5ffd5b50506040518593507ff95af4c293cd9374d065f17ae088bd210637f4c1bf6eb1a262d3575194695d8692505f9150a2505050565b6003546040805163572ac17d60e11b815281515f9384936001600160a01b039091169263ae5582fa9260048083019392829003018187875af11580156104b8573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104dc919061063d565b6002546001546040805160248101869052604480820186905282518083039091018152606490910182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663010bb87160e01b1790529051635f7b157760e01b8152949650929450621e8480936001600160a01b0392831693635f7b1577935f936105759391169184918890339060040161065f565b5f604051808303818588803b15801561058c575f5ffd5b505af115801561059e573d5f5f3e3d5ffd5b50506040518693507ff95af4c293cd9374d065f17ae088bd210637f4c1bf6eb1a262d3575194695d8692505f9150a2505050565b5f602082840312156105e2575f5ffd5b5035919050565b6001600160a01b03811681146105fd575f5ffd5b50565b5f60208284031215610610575f5ffd5b813561061b816105e9565b9392505050565b5f60208284031215610632575f5ffd5b815161061b816105e9565b5f5f6040838503121561064e575f5ffd5b505080516020909101519092909150565b6001600160a01b038616815284602082015260a060408201525f84518060a0840152806020870160c085015e5f60c0828501015260c0601f19601f8301168401019150508360608301526001600160a01b0383166080830152969550505050505056fea2646970667358221220bb6b1171eda7fb07a9b3fdb6ba0e241b8eaaf239649de336a07c3d314e6489e964736f6c634300081d0033000000000000000000000000ba50f5340fb9f3bd074bd638c9be13ecb36e603d00000000000000000000000058dc3f54239f26ff424523745b6303e0370355a8000000000000000000000000eebc8d07d54a4da01daf41c41acf3597ef11cf93
Deployed Bytecode
0x608060405260043610610058575f3560e01c80633df6effa116100415780633df6effa14610097578063ab0f4748146100aa578063e6f9ed0d146100c9575f5ffd5b806327e74ca31461005c57806329c50fa914610071575b5f5ffd5b61006f61006a3660046105d2565b6100dd565b005b34801561007c575f5ffd5b506100855f5481565b60405190815260200160405180910390f35b61006f6100a5366004610600565b61029f565b3480156100b5575f5ffd5b5061006f6100c43660046105d2565b610313565b3480156100d4575f5ffd5b5061006f610470565b6002546001600160a01b031633146101625760405162461bcd60e51b815260206004820152602860248201527f66756e6374696f6e206e6f742063616c6c6564206279206c315363726f6c6c4d60448201527f657373656e67657200000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60025f9054906101000a90046001600160a01b03166001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b2573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101d69190610622565b6001546001600160a01b039081169116146102595760405162461bcd60e51b815260206004820152603b60248201527f636f6e7472616374206d6573736167696e672066726f6d204c31206973206e6f60448201527f7420746865204c315363726f6c6c4272696467654164617074657200000000006064820152608401610159565b5f819055600354610272906001600160a01b031661029f565b60405181907fd65331a373ddf7ebeecf120656bb7dae84cf462b334afeb99662ef16bc2f3a52905f90a250565b5f546040517f27e74ca300000000000000000000000000000000000000000000000000000000815260048101919091526001600160a01b038216906327e74ca3906024015f604051808303815f87803b1580156102fa575f5ffd5b505af115801561030c573d5f5f3e3d5ffd5b5050505050565b6003546040805163572ac17d60e11b815281515f9384936001600160a01b039091169263ae5582fa9260048083019392829003018187875af115801561035b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061037f919061063d565b6002546001546040805160248101869052604480820186905282518083039091018152606490910182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663010bb87160e01b1790529051635f7b157760e01b81529496509294506001600160a01b0391821693635f7b1577935f936104139316918491908a90339060040161065f565b5f604051808303818588803b15801561042a575f5ffd5b505af115801561043c573d5f5f3e3d5ffd5b50506040518593507ff95af4c293cd9374d065f17ae088bd210637f4c1bf6eb1a262d3575194695d8692505f9150a2505050565b6003546040805163572ac17d60e11b815281515f9384936001600160a01b039091169263ae5582fa9260048083019392829003018187875af11580156104b8573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104dc919061063d565b6002546001546040805160248101869052604480820186905282518083039091018152606490910182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663010bb87160e01b1790529051635f7b157760e01b8152949650929450621e8480936001600160a01b0392831693635f7b1577935f936105759391169184918890339060040161065f565b5f604051808303818588803b15801561058c575f5ffd5b505af115801561059e573d5f5f3e3d5ffd5b50506040518693507ff95af4c293cd9374d065f17ae088bd210637f4c1bf6eb1a262d3575194695d8692505f9150a2505050565b5f602082840312156105e2575f5ffd5b5035919050565b6001600160a01b03811681146105fd575f5ffd5b50565b5f60208284031215610610575f5ffd5b813561061b816105e9565b9392505050565b5f60208284031215610632575f5ffd5b815161061b816105e9565b5f5f6040838503121561064e575f5ffd5b505080516020909101519092909150565b6001600160a01b038616815284602082015260a060408201525f84518060a0840152806020870160c085015e5f60c0828501015260c0601f19601f8301168401019150508360608301526001600160a01b0383166080830152969550505050505056fea2646970667358221220bb6b1171eda7fb07a9b3fdb6ba0e241b8eaaf239649de336a07c3d314e6489e964736f6c634300081d0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.