Source Code
Overview
MNT Balance
MNT Value
$0.00
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xa683c660...5f9A25785 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
CrossChainAccount
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity 0.7.6;
interface Messenger {
function sendMessage(address _target, bytes memory _message, uint32 _gasLimit) external;
function relayMessage(
address _target,
address _sender,
bytes memory _message,
uint256 _messageNonce
) external;
function xDomainMessageSender() external view returns (address);
}
// L2 Contract which receives messages from a specific L1 address and transparently
// forwards them to the destination.
//
// Any other L2 contract which uses this contract's address as a privileged position,
// can be considered to be owned by the `l1Owner`
contract CrossChainAccount {
Messenger messenger;
address l1Owner;
constructor(Messenger _messenger, address _l1Owner) {
messenger = _messenger;
l1Owner = _l1Owner;
}
// `forward` `calls` the `target` with `data`,
// can only be called by the `messenger`
// can only be called if `tx.l1MessageSender == l1Owner`
function forward(address target, bytes memory data) external {
// 1. The call MUST come from the L1 Messenger
require(msg.sender == address(messenger), "Sender is not the messenger");
// 2. The L1 Messenger's caller MUST be the L1 Owner
require(messenger.xDomainMessageSender() == l1Owner, "L1Sender is not the L1Owner");
// 3. Make the external call
(bool success, bytes memory res) = target.call(data);
require(success, string(abi.encode("XChain call failed:", res)));
}
}{
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract Messenger","name":"_messenger","type":"address"},{"internalType":"address","name":"_l1Owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"forward","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
0x608060405234801561001057600080fd5b5060405161066b38038061066b8339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505061058b806100e06000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80636fadcf7214610030575b600080fd5b6101096004803603604081101561004657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561008357600080fd5b82018360208201111561009557600080fd5b803590602001918460018302840111640100000000831117156100b757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061010b565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f53656e646572206973206e6f7420746865206d657373656e676572000000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b815260040160206040518083038186803b15801561026b57600080fd5b505afa15801561027f573d6000803e3d6000fd5b505050506040513d602081101561029557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461032f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4c3153656e646572206973206e6f7420746865204c314f776e6572000000000081525060200191505060405180910390fd5b6000808373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061037d578051825260208201915060208101905060208303925061035a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146103df576040519150601f19603f3d011682016040523d82523d6000602084013e6103e4565b606091505b50915091508181604051602001808060200180602001838103835260138152602001807f58436861696e2063616c6c206661696c65643a00000000000000000000000000815250602001838103825284818151815260200191508051906020019080838360005b8381101561046657808201518184015260208101905061044b565b50505050905090810190601f1680156104935780820380516001836020036101000a031916815260200191505b5093505050506040516020818303038152906040529061054e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156105135780820151818401526020810190506104f8565b50505050905090810190601f1680156105405780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050505056fea2646970667358221220fbd617df5c8348ffa143213ee5191b7ab0bd09edc5b80154fa63ca342d44e58064736f6c6343000706003300000000000000000000000042000000000000000000000000000000000000070000000000000000000000001a9c8182c09f50c8318d769245bea52c32be35bc
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80636fadcf7214610030575b600080fd5b6101096004803603604081101561004657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561008357600080fd5b82018360208201111561009557600080fd5b803590602001918460018302840111640100000000831117156100b757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061010b565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f53656e646572206973206e6f7420746865206d657373656e676572000000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b815260040160206040518083038186803b15801561026b57600080fd5b505afa15801561027f573d6000803e3d6000fd5b505050506040513d602081101561029557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461032f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4c3153656e646572206973206e6f7420746865204c314f776e6572000000000081525060200191505060405180910390fd5b6000808373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b6020831061037d578051825260208201915060208101905060208303925061035a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146103df576040519150601f19603f3d011682016040523d82523d6000602084013e6103e4565b606091505b50915091508181604051602001808060200180602001838103835260138152602001807f58436861696e2063616c6c206661696c65643a00000000000000000000000000815250602001838103825284818151815260200191508051906020019080838360005b8381101561046657808201518184015260208101905061044b565b50505050905090810190601f1680156104935780820380516001836020036101000a031916815260200191505b5093505050506040516020818303038152906040529061054e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156105135780820151818401526020810190506104f8565b50505050905090810190601f1680156105405780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050505056fea2646970667358221220fbd617df5c8348ffa143213ee5191b7ab0bd09edc5b80154fa63ca342d44e58064736f6c63430007060033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in MNT
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.