ETH Price: $1,988.07 (-0.50%)

Contract

0x581F86Da293A1D5Cd087a10E7227a75d2d2201A8

Overview

ETH Balance

Linea Mainnet LogoLinea Mainnet LogoLinea Mainnet Logo0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

Please try again later

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CrosschainAccountLinea

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
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;
}

interface IMessageService {
  function sender() 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 CrosschainAccountLinea {
    IMessageService public messageService;
    address l1Owner;

    constructor(address _l1Owner, address _messageService) {
        messageService = IMessageService(_messageService);
        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 not from the Messager
        require(msg.sender == address(messageService),"Sender is the message service");
        // 2. The call MUST come from the L1 Messenger
        require(messageService.sender() == address(l1Owner), "Sender is not the _l1Owner");
        // 2. Make the external call
        (bool success, bytes memory res) = target.call(data);
        require(success, string(abi.encode("XChain call failed:", res)));
    }
}

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_l1Owner","type":"address"},{"internalType":"address","name":"_messageService","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"},{"inputs":[],"name":"messageService","outputs":[{"internalType":"contract IMessageService","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b506040516106ce3803806106ce8339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506105ee806100e06000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80636fadcf721461003b5780638dae45dd14610116575b600080fd5b6101146004803603604081101561005157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561008e57600080fd5b8201836020820111156100a057600080fd5b803590602001918460018302840111640100000000831117156100c257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061014a565b005b61011e610594565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461020b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f53656e64657220697320746865206d657373616765207365727669636500000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166367e404ce6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102aa57600080fd5b505afa1580156102be573d6000803e3d6000fd5b505050506040513d60208110156102d457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461036e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f53656e646572206973206e6f7420746865205f6c314f776e657200000000000081525060200191505060405180910390fd5b6000808373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106103bc5780518252602082019150602081019050602083039250610399565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461041e576040519150601f19603f3d011682016040523d82523d6000602084013e610423565b606091505b50915091508181604051602001808060200180602001838103835260138152602001807f58436861696e2063616c6c206661696c65643a00000000000000000000000000815250602001838103825284818151815260200191508051906020019080838360005b838110156104a557808201518184015260208101905061048a565b50505050905090810190601f1680156104d25780820380516001836020036101000a031916815260200191505b5093505050506040516020818303038152906040529061058d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610552578082015181840152602081019050610537565b50505050905090810190601f16801561057f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5050505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fea2646970667358221220cdd21fb7d4ca1a1cb5207d1934378ca7bd3c5a1f1fd4efa3de24f2b4446d87a864736f6c634300070600330000000000000000000000001a9c8182c09f50c8318d769245bea52c32be35bc000000000000000000000000508ca82df566dcd1b0de8296e70a96332cd644ec

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100365760003560e01c80636fadcf721461003b5780638dae45dd14610116575b600080fd5b6101146004803603604081101561005157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561008e57600080fd5b8201836020820111156100a057600080fd5b803590602001918460018302840111640100000000831117156100c257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061014a565b005b61011e610594565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461020b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f53656e64657220697320746865206d657373616765207365727669636500000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166367e404ce6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102aa57600080fd5b505afa1580156102be573d6000803e3d6000fd5b505050506040513d60208110156102d457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461036e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f53656e646572206973206e6f7420746865205f6c314f776e657200000000000081525060200191505060405180910390fd5b6000808373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106103bc5780518252602082019150602081019050602083039250610399565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461041e576040519150601f19603f3d011682016040523d82523d6000602084013e610423565b606091505b50915091508181604051602001808060200180602001838103835260138152602001807f58436861696e2063616c6c206661696c65643a00000000000000000000000000815250602001838103825284818151815260200191508051906020019080838360005b838110156104a557808201518184015260208101905061048a565b50505050905090810190601f1680156104d25780820380516001836020036101000a031916815260200191505b5093505050506040516020818303038152906040529061058d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610552578082015181840152602081019050610537565b50505050905090810190601f16801561057f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5050505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fea2646970667358221220cdd21fb7d4ca1a1cb5207d1934378ca7bd3c5a1f1fd4efa3de24f2b4446d87a864736f6c63430007060033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000001a9c8182c09f50c8318d769245bea52c32be35bc000000000000000000000000508ca82df566dcd1b0de8296e70a96332cd644ec

-----Decoded View---------------
Arg [0] : _l1Owner (address): 0x1a9C8182C09F50C8318d769245beA52c32BE35BC
Arg [1] : _messageService (address): 0x508Ca82Df566dCD1B0DE8296e70a96332cD644ec

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000001a9c8182c09f50c8318d769245bea52c32be35bc
Arg [1] : 000000000000000000000000508ca82df566dcd1b0de8296e70a96332cd644ec


Block Transaction Gas Used Reward
view all blocks sequenced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.