ETH Price: $1,893.11 (-2.30%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Receive Message140711222022-01-24 22:49:591146 days ago1643064599IN
0xa492d359...7B890b094
0 ETH0.04483323153.88049077
Receive Message140141172022-01-16 3:37:091155 days ago1642304229IN
0xa492d359...7B890b094
0 ETH0.0266442389.84159718
Receive Message139903572022-01-12 11:10:461159 days ago1641985846IN
0xa492d359...7B890b094
0 ETH0.04421386117.42516713
Receive Message139381532022-01-04 9:17:121167 days ago1641287832IN
0xa492d359...7B890b094
0 ETH0.0286758276.36784568
Receive Message139123962021-12-31 9:41:281171 days ago1640943688IN
0xa492d359...7B890b094
0 ETH0.0294736678.27499439
Receive Message138852482021-12-27 4:57:421175 days ago1640581062IN
0xa492d359...7B890b094
0 ETH0.0173316258.46863675
Receive Message138699322021-12-24 20:07:171177 days ago1640376437IN
0xa492d359...7B890b094
0 ETH0.03035434102.38968326
Receive Message138637062021-12-23 20:56:451178 days ago1640293005IN
0xa492d359...7B890b094
0 ETH0.0302853780.58284661
Receive Message138566082021-12-22 18:31:531179 days ago1640197913IN
0xa492d359...7B890b094
0 ETH0.03361139113.71758041
Receive Message138500132021-12-21 17:58:401180 days ago1640109520IN
0xa492d359...7B890b094
0 ETH0.0241997464.84651488
Receive Message138356672021-12-19 12:46:511183 days ago1639918011IN
0xa492d359...7B890b094
0 ETH0.0192572851.45235945
Receive Message138126212021-12-15 23:09:531186 days ago1639609793IN
0xa492d359...7B890b094
0 ETH0.0293872478.20207574
Receive Message137964472021-12-13 11:09:201189 days ago1639393760IN
0xa492d359...7B890b094
0 ETH0.0175787246.85411991
Receive Message137896602021-12-12 10:09:091190 days ago1639303749IN
0xa492d359...7B890b094
0 ETH0.0141327147.6159914
Receive Message137838512021-12-11 12:28:371191 days ago1639225717IN
0xa492d359...7B890b094
0 ETH0.0198577952.94268416
Receive Message137705822021-12-09 10:43:181193 days ago1639046598IN
0xa492d359...7B890b094
0 ETH0.0270633472.23517431
Receive Message137653942021-12-08 14:48:081194 days ago1638974888IN
0xa492d359...7B890b094
0 ETH0.0225623877.32880925
Receive Message137597492021-12-07 17:07:371194 days ago1638896857IN
0xa492d359...7B890b094
0 ETH0.0226075860.36287736
Receive Message137569812021-12-07 6:18:091195 days ago1638857889IN
0xa492d359...7B890b094
0 ETH0.0214729372.73611896
Receive Message137538832021-12-06 18:33:301195 days ago1638815610IN
0xa492d359...7B890b094
0 ETH0.03597546108.70723062
Receive Message137535352021-12-06 17:13:181195 days ago1638810798IN
0xa492d359...7B890b094
0 ETH0.03899251115.32255519
Receive Message137444522021-12-05 6:23:201197 days ago1638685400IN
0xa492d359...7B890b094
0 ETH0.0221811260.06912782
Receive Message137408502021-12-04 16:33:021197 days ago1638635582IN
0xa492d359...7B890b094
0 ETH0.03184911108.08437104
Receive Message137302312021-12-02 23:35:011199 days ago1638488101IN
0xa492d359...7B890b094
0 ETH0.0256185468.5829408
Receive Message137256142021-12-02 5:46:371200 days ago1638423997IN
0xa492d359...7B890b094
0 ETH0.0214167371.88537582
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PolygonMessengerWrapper

Compiler Version
v0.7.3+commit.9bfce1f6

Optimization Enabled:
Yes with 50000 runs

Other Settings:
default evmVersion
File 1 of 7 : PolygonMessengerWrapper.sol
// SPDX-License-Identifier: MIT
// @unsupported: ovm

pragma solidity 0.7.3;
pragma experimental ABIEncoderV2;

import "../polygon/tunnel/FxBaseRootTunnel.sol";
import "./MessengerWrapper.sol";

/**
 * @dev A MessengerWrapper for Polygon - https://docs.matic.network/docs
 * @notice Deployed on layer-1
 */

contract PolygonMessengerWrapper is FxBaseRootTunnel, MessengerWrapper {

    constructor(
        address _l1BridgeAddress,
        address _checkpointManager,
        address _fxRoot,
        address _fxChildTunnel
    )
        public
        MessengerWrapper(_l1BridgeAddress)
        FxBaseRootTunnel(_checkpointManager, _fxRoot)
    {
        setFxChildTunnel(_fxChildTunnel);
    }

    /** 
     * @dev Sends a message to the l2MessengerProxy from layer-1
     * @param _calldata The data that l2MessengerProxy will be called with
     * @notice The msg.sender is sent to the L2_PolygonMessengerProxy and checked there.
     */
    function sendCrossDomainMessage(bytes memory _calldata) public override {
        _sendMessageToChild(
            abi.encode(msg.sender, _calldata)
        );
    }

    function verifySender(address l1BridgeCaller, bytes memory /*_data*/) public view override {
        require(l1BridgeCaller == address(this), "L1_PLGN_WPR: Caller must be this contract");
    }

    function _processMessageFromChild(bytes memory message) internal override {
        (bool success,) = l1BridgeAddress.call(message);
        require(success, "L1_PLGN_WPR: Call to L1 Bridge failed");
    }
}

File 2 of 7 : FxBaseRootTunnel.sol
// SPDX-License-Identifier: MIT
// @unsupported: ovm
pragma solidity 0.7.3;


import {RLPReader} from "../lib/RLPReader.sol";
import {MerklePatriciaProof} from "../lib/MerklePatriciaProof.sol";
import {Merkle} from "../lib/Merkle.sol";


interface IFxStateSender {
    function sendMessageToChild(address _receiver, bytes calldata _data) external;
}

contract ICheckpointManager {
    struct HeaderBlock {
        bytes32 root;
        uint256 start;
        uint256 end;
        uint256 createdAt;
        address proposer;
    }

    /**
     * @notice mapping of checkpoint header numbers to block details
     * @dev These checkpoints are submited by plasma contracts
     */
    mapping(uint256 => HeaderBlock) public headerBlocks;
}

abstract contract FxBaseRootTunnel {
    using RLPReader for bytes;
    using RLPReader for RLPReader.RLPItem;
    using Merkle for bytes32;

    // keccak256(MessageSent(bytes))
    bytes32 public constant SEND_MESSAGE_EVENT_SIG = 0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036;

    // state sender contract
    IFxStateSender public fxRoot;
    // root chain manager
    ICheckpointManager public checkpointManager;
    // child tunnel contract which receives and sends messages 
    address public fxChildTunnel;

    // storage to avoid duplicate exits
    mapping(bytes32 => bool) public processedExits;

    constructor(address _checkpointManager, address _fxRoot) {
        checkpointManager = ICheckpointManager(_checkpointManager);
        fxRoot = IFxStateSender(_fxRoot);
    }

    // set fxChildTunnel if not set already
    function setFxChildTunnel(address _fxChildTunnel) public {
        require(fxChildTunnel == address(0x0), "FxBaseRootTunnel: CHILD_TUNNEL_ALREADY_SET");
        fxChildTunnel = _fxChildTunnel;
    }

    /**
     * @notice Send bytes message to Child Tunnel
     * @param message bytes message that will be sent to Child Tunnel
     * some message examples -
     *   abi.encode(tokenId);
     *   abi.encode(tokenId, tokenMetadata);
     *   abi.encode(messageType, messageData);
     */
    function _sendMessageToChild(bytes memory message) internal {
        fxRoot.sendMessageToChild(fxChildTunnel, message);
    }

    function _validateAndExtractMessage(bytes memory inputData) internal returns (bytes memory) {
        RLPReader.RLPItem[] memory inputDataRLPList = inputData
            .toRlpItem()
            .toList();

        // checking if exit has already been processed
        // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex)
        bytes32 exitHash = keccak256(
            abi.encodePacked(
                inputDataRLPList[2].toUint(), // blockNumber
                // first 2 nibbles are dropped while generating nibble array
                // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only)
                // so converting to nibble array and then hashing it
                MerklePatriciaProof._getNibbleArray(inputDataRLPList[8].toBytes()), // branchMask
                inputDataRLPList[9].toUint() // receiptLogIndex
            )
        );
        require(
            processedExits[exitHash] == false,
            "FxRootTunnel: EXIT_ALREADY_PROCESSED"
        );
        processedExits[exitHash] = true;

        RLPReader.RLPItem[] memory receiptRLPList = inputDataRLPList[6]
            .toBytes()
            .toRlpItem()
            .toList();
        RLPReader.RLPItem memory logRLP = receiptRLPList[3]
            .toList()[
                inputDataRLPList[9].toUint() // receiptLogIndex
            ];

        RLPReader.RLPItem[] memory logRLPList = logRLP.toList();
        
        // check child tunnel
        require(fxChildTunnel == RLPReader.toAddress(logRLPList[0]), "FxRootTunnel: INVALID_FX_CHILD_TUNNEL");

        // verify receipt inclusion
        require(
            MerklePatriciaProof.verify(
                inputDataRLPList[6].toBytes(), // receipt
                inputDataRLPList[8].toBytes(), // branchMask
                inputDataRLPList[7].toBytes(), // receiptProof
                bytes32(inputDataRLPList[5].toUint()) // receiptRoot
            ),
            "FxRootTunnel: INVALID_RECEIPT_PROOF"
        );

        // verify checkpoint inclusion
        _checkBlockMembershipInCheckpoint(
            inputDataRLPList[2].toUint(), // blockNumber
            inputDataRLPList[3].toUint(), // blockTime
            bytes32(inputDataRLPList[4].toUint()), // txRoot
            bytes32(inputDataRLPList[5].toUint()), // receiptRoot
            inputDataRLPList[0].toUint(), // headerNumber
            inputDataRLPList[1].toBytes() // blockProof
        );

        RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics

        require(
            bytes32(logTopicRLPList[0].toUint()) == SEND_MESSAGE_EVENT_SIG, // topic0 is event sig
            "FxRootTunnel: INVALID_SIGNATURE"
        );

        // received message data
        bytes memory receivedData = logRLPList[2].toBytes();
        (bytes memory message) = abi.decode(receivedData, (bytes)); // event decodes params again, so decoding bytes to get message
        return message;
    }

    function _checkBlockMembershipInCheckpoint(
        uint256 blockNumber,
        uint256 blockTime,
        bytes32 txRoot,
        bytes32 receiptRoot,
        uint256 headerNumber,
        bytes memory blockProof
    ) private view returns (uint256) {
        (
            bytes32 headerRoot,
            uint256 startBlock,
            ,
            uint256 createdAt,

        ) = checkpointManager.headerBlocks(headerNumber);

        require(
            keccak256(
                abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot)
            )
                .checkMembership(
                blockNumber-startBlock,
                headerRoot,
                blockProof
            ),
            "FxRootTunnel: INVALID_HEADER"
        );
        return createdAt;
    }

    /**
     * @notice receive message from  L2 to L1, validated by proof
     * @dev This function verifies if the transaction actually happened on child chain
     *
     * @param inputData RLP encoded data of the reference tx containing following list of fields
     *  0 - headerNumber - Checkpoint header block number containing the reference tx
     *  1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root
     *  2 - blockNumber - Block number containing the reference tx on child chain
     *  3 - blockTime - Reference tx block time
     *  4 - txRoot - Transactions root of block
     *  5 - receiptRoot - Receipts root of block
     *  6 - receipt - Receipt of the reference transaction
     *  7 - receiptProof - Merkle proof of the reference receipt
     *  8 - branchMask - 32 bits denoting the path of receipt in merkle tree
     *  9 - receiptLogIndex - Log Index to read from the receipt
     */
    function receiveMessage(bytes memory inputData) public virtual {
        bytes memory message = _validateAndExtractMessage(inputData);
        _processMessageFromChild(message);
    }

    /**
     * @notice Process message received from Child Tunnel
     * @dev function needs to be implemented to handle message as per requirement
     * This is called by onStateReceive function.
     * Since it is called via a system call, any event will not be emitted during its execution.
     * @param message bytes message that was sent from Child Tunnel
     */
    function _processMessageFromChild(bytes memory message) virtual internal;
}

File 3 of 7 : MessengerWrapper.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.12 <0.8.0;
pragma experimental ABIEncoderV2;

import "../interfaces/IMessengerWrapper.sol";

abstract contract MessengerWrapper is IMessengerWrapper {
    address public immutable l1BridgeAddress;

    constructor(address _l1BridgeAddress) internal {
        l1BridgeAddress = _l1BridgeAddress;
    }

    modifier onlyL1Bridge {
        require(msg.sender == l1BridgeAddress, "MW: Sender must be the L1 Bridge");
        _;
    }
}

File 4 of 7 : RLPReader.sol
// SPDX-License-Identifier: MIT
// @unsupported: ovm
pragma solidity 0.7.3;

library RLPReader {
    uint8 constant STRING_SHORT_START = 0x80;
    uint8 constant STRING_LONG_START = 0xb8;
    uint8 constant LIST_SHORT_START = 0xc0;
    uint8 constant LIST_LONG_START = 0xf8;
    uint8 constant WORD_SIZE = 32;

    struct RLPItem {
        uint256 len;
        uint256 memPtr;
    }

    /*
     * @param item RLP encoded bytes
     */
    function toRlpItem(bytes memory item)
        internal
        pure
        returns (RLPItem memory)
    {
        require(item.length > 0, "RLPReader: INVALID_BYTES_LENGTH");
        uint256 memPtr;
        assembly {
            memPtr := add(item, 0x20)
        }

        return RLPItem(item.length, memPtr);
    }

    /*
     * @param item RLP encoded list in bytes
     */
    function toList(RLPItem memory item)
        internal
        pure
        returns (RLPItem[] memory)
    {
        require(isList(item), "RLPReader: ITEM_NOT_LIST");

        uint256 items = numItems(item);
        RLPItem[] memory result = new RLPItem[](items);
        uint256 listLength = _itemLength(item.memPtr);
        require(listLength == item.len, "RLPReader: LIST_DECODED_LENGTH_MISMATCH");

        uint256 memPtr = item.memPtr + _payloadOffset(item.memPtr);
        uint256 dataLen;
        for (uint256 i = 0; i < items; i++) {
            dataLen = _itemLength(memPtr);
            result[i] = RLPItem(dataLen, memPtr);
            memPtr = memPtr + dataLen;
        }

        return result;
    }

    // @return indicator whether encoded payload is a list. negate this function call for isData.
    function isList(RLPItem memory item) internal pure returns (bool) {
        uint8 byte0;
        uint256 memPtr = item.memPtr;
        assembly {
            byte0 := byte(0, mload(memPtr))
        }

        if (byte0 < LIST_SHORT_START) return false;
        return true;
    }

    /** RLPItem conversions into data types **/

    // @returns raw rlp encoding in bytes
    function toRlpBytes(RLPItem memory item)
        internal
        pure
        returns (bytes memory)
    {
        bytes memory result = new bytes(item.len);

        uint256 ptr;
        assembly {
            ptr := add(0x20, result)
        }

        copy(item.memPtr, ptr, item.len);
        return result;
    }

    function toAddress(RLPItem memory item) internal pure returns (address) {
        require(!isList(item), "RLPReader: DECODING_LIST_AS_ADDRESS");
        // 1 byte for the length prefix
        require(item.len == 21, "RLPReader: INVALID_ADDRESS_LENGTH");

        return address(toUint(item));
    }

    function toUint(RLPItem memory item) internal pure returns (uint256) {
        require(!isList(item), "RLPReader: DECODING_LIST_AS_UINT");
        require(item.len <= 33, "RLPReader: INVALID_UINT_LENGTH");

        uint256 itemLength = _itemLength(item.memPtr);
        require(itemLength == item.len, "RLPReader: UINT_DECODED_LENGTH_MISMATCH");

        uint256 offset = _payloadOffset(item.memPtr);
        uint256 len = item.len - offset;
        uint256 result;
        uint256 memPtr = item.memPtr + offset;
        assembly {
            result := mload(memPtr)

            // shfit to the correct location if neccesary
            if lt(len, 32) {
                result := div(result, exp(256, sub(32, len)))
            }
        }

        return result;
    }

    // enforces 32 byte length
    function toUintStrict(RLPItem memory item) internal pure returns (uint256) {
        uint256 itemLength = _itemLength(item.memPtr);
        require(itemLength == item.len, "RLPReader: UINT_STRICT_DECODED_LENGTH_MISMATCH");
        // one byte prefix
        require(item.len == 33, "RLPReader: INVALID_UINT_STRICT_LENGTH");

        uint256 result;
        uint256 memPtr = item.memPtr + 1;
        assembly {
            result := mload(memPtr)
        }

        return result;
    }

    function toBytes(RLPItem memory item) internal pure returns (bytes memory) {
        uint256 listLength = _itemLength(item.memPtr);
        require(listLength == item.len, "RLPReader: BYTES_DECODED_LENGTH_MISMATCH");
        uint256 offset = _payloadOffset(item.memPtr);

        uint256 len = item.len - offset; // data length
        bytes memory result = new bytes(len);

        uint256 destPtr;
        assembly {
            destPtr := add(0x20, result)
        }

        copy(item.memPtr + offset, destPtr, len);
        return result;
    }

    /*
     * Private Helpers
     */

    // @return number of payload items inside an encoded list.
    function numItems(RLPItem memory item) private pure returns (uint256) {
        // add `isList` check if `item` is expected to be passsed without a check from calling function
        // require(isList(item), "RLPReader: NUM_ITEMS_NOT_LIST");

        uint256 count = 0;
        uint256 currPtr = item.memPtr + _payloadOffset(item.memPtr);
        uint256 endPtr = item.memPtr + item.len;
        while (currPtr < endPtr) {
            currPtr = currPtr + _itemLength(currPtr); // skip over an item
            require(currPtr <= endPtr, "RLPReader: NUM_ITEMS_DECODED_LENGTH_MISMATCH");
            count++;
        }

        return count;
    }

    // @return entire rlp item byte length
    function _itemLength(uint256 memPtr) private pure returns (uint256) {
        uint256 itemLen;
        uint256 byte0;
        assembly {
            byte0 := byte(0, mload(memPtr))
        }

        if (byte0 < STRING_SHORT_START) itemLen = 1;
        else if (byte0 < STRING_LONG_START)
            itemLen = byte0 - STRING_SHORT_START + 1;
        else if (byte0 < LIST_SHORT_START) {
            assembly {
                let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is
                memPtr := add(memPtr, 1) // skip over the first byte

                /* 32 byte word size */
                let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len
                itemLen := add(dataLen, add(byteLen, 1))
            }
        } else if (byte0 < LIST_LONG_START) {
            itemLen = byte0 - LIST_SHORT_START + 1;
        } else {
            assembly {
                let byteLen := sub(byte0, 0xf7)
                memPtr := add(memPtr, 1)

                let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length
                itemLen := add(dataLen, add(byteLen, 1))
            }
        }

        return itemLen;
    }

    // @return number of bytes until the data
    function _payloadOffset(uint256 memPtr) private pure returns (uint256) {
        uint256 byte0;
        assembly {
            byte0 := byte(0, mload(memPtr))
        }

        if (byte0 < STRING_SHORT_START) return 0;
        else if (
            byte0 < STRING_LONG_START ||
            (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)
        ) return 1;
        else if (byte0 < LIST_SHORT_START)
            // being explicit
            return byte0 - (STRING_LONG_START - 1) + 1;
        else return byte0 - (LIST_LONG_START - 1) + 1;
    }

    /*
     * @param src Pointer to source
     * @param dest Pointer to destination
     * @param len Amount of memory to copy from the source
     */
    function copy(
        uint256 src,
        uint256 dest,
        uint256 len
    ) private pure {
        if (len == 0) return;

        // copy as many word sizes as possible
        for (; len >= WORD_SIZE; len -= WORD_SIZE) {
            assembly {
                mstore(dest, mload(src))
            }

            src += WORD_SIZE;
            dest += WORD_SIZE;
        }

        // left over bytes. Mask is used to remove unwanted bytes from the word
        uint256 mask = 256**(WORD_SIZE - len) - 1;
        assembly {
            let srcpart := and(mload(src), not(mask)) // zero out src
            let destpart := and(mload(dest), mask) // retrieve the bytes
            mstore(dest, or(destpart, srcpart))
        }
    }
}

File 5 of 7 : MerklePatriciaProof.sol
// SPDX-License-Identifier: MIT
// @unsupported: ovm
pragma solidity 0.7.3;

import {RLPReader} from "./RLPReader.sol";

library MerklePatriciaProof {
    /*
     * @dev Verifies a merkle patricia proof.
     * @param value The terminating value in the trie.
     * @param encodedPath The path in the trie leading to value.
     * @param rlpParentNodes The rlp encoded stack of nodes.
     * @param root The root hash of the trie.
     * @return The boolean validity of the proof.
     */
    function verify(
        bytes memory value,
        bytes memory encodedPath,
        bytes memory rlpParentNodes,
        bytes32 root
    ) internal pure returns (bool) {
        RLPReader.RLPItem memory item = RLPReader.toRlpItem(rlpParentNodes);
        RLPReader.RLPItem[] memory parentNodes = RLPReader.toList(item);

        bytes memory currentNode;
        RLPReader.RLPItem[] memory currentNodeList;

        bytes32 nodeKey = root;
        uint256 pathPtr = 0;

        bytes memory path = _getNibbleArray(encodedPath);
        if (path.length == 0) {
            return false;
        }

        for (uint256 i = 0; i < parentNodes.length; i++) {
            if (pathPtr > path.length) {
                return false;
            }

            currentNode = RLPReader.toRlpBytes(parentNodes[i]);
            if (nodeKey != keccak256(currentNode)) {
                return false;
            }
            currentNodeList = RLPReader.toList(parentNodes[i]);

            if (currentNodeList.length == 17) {
                if (pathPtr == path.length) {
                    if (
                        keccak256(RLPReader.toBytes(currentNodeList[16])) ==
                        keccak256(value)
                    ) {
                        return true;
                    } else {
                        return false;
                    }
                }

                uint8 nextPathNibble = uint8(path[pathPtr]);
                if (nextPathNibble > 16) {
                    return false;
                }
                nodeKey = bytes32(
                    RLPReader.toUintStrict(currentNodeList[nextPathNibble])
                );
                pathPtr += 1;
            } else if (currentNodeList.length == 2) {
                uint256 traversed = _nibblesToTraverse(
                    RLPReader.toBytes(currentNodeList[0]),
                    path,
                    pathPtr
                );
                if (pathPtr + traversed == path.length) {
                    //leaf node
                    if (
                        keccak256(RLPReader.toBytes(currentNodeList[1])) ==
                        keccak256(value)
                    ) {
                        return true;
                    } else {
                        return false;
                    }
                }

                //extension node
                if (traversed == 0) {
                    return false;
                }

                pathPtr += traversed;
                nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[1]));
            } else {
                return false;
            }
        }
    }

    function _nibblesToTraverse(
        bytes memory encodedPartialPath,
        bytes memory path,
        uint256 pathPtr
    ) private pure returns (uint256) {
        uint256 len = 0;
        // encodedPartialPath has elements that are each two hex characters (1 byte), but partialPath
        // and slicedPath have elements that are each one hex character (1 nibble)
        bytes memory partialPath = _getNibbleArray(encodedPartialPath);
        bytes memory slicedPath = new bytes(partialPath.length);

        // pathPtr counts nibbles in path
        // partialPath.length is a number of nibbles
        for (uint256 i = pathPtr; i < pathPtr + partialPath.length; i++) {
            bytes1 pathNibble = path[i];
            slicedPath[i - pathPtr] = pathNibble;
        }

        if (keccak256(partialPath) == keccak256(slicedPath)) {
            len = partialPath.length;
        } else {
            len = 0;
        }
        return len;
    }

    // bytes b must be hp encoded
    function _getNibbleArray(bytes memory b)
        internal
        pure
        returns (bytes memory)
    {
        bytes memory nibbles = "";
        if (b.length > 0) {
            uint8 offset;
            uint8 hpNibble = uint8(_getNthNibbleOfBytes(0, b));
            if (hpNibble == 1 || hpNibble == 3) {
                nibbles = new bytes(b.length * 2 - 1);
                bytes1 oddNibble = _getNthNibbleOfBytes(1, b);
                nibbles[0] = oddNibble;
                offset = 1;
            } else {
                nibbles = new bytes(b.length * 2 - 2);
                offset = 0;
            }

            for (uint256 i = offset; i < nibbles.length; i++) {
                nibbles[i] = _getNthNibbleOfBytes(i - offset + 2, b);
            }
        }
        return nibbles;
    }

    function _getNthNibbleOfBytes(uint256 n, bytes memory str)
        private
        pure
        returns (bytes1)
    {
        return
            bytes1(
                n % 2 == 0 ? uint8(str[n / 2]) / 0x10 : uint8(str[n / 2]) % 0x10
            );
    }
}

File 6 of 7 : Merkle.sol
// SPDX-License-Identifier: MIT
// @unsupported: ovm
pragma solidity 0.7.3;

library Merkle {
    function checkMembership(
        bytes32 leaf,
        uint256 index,
        bytes32 rootHash,
        bytes memory proof
    ) internal pure returns (bool) {
        require(proof.length % 32 == 0, "Invalid proof length");
        uint256 proofHeight = proof.length / 32;
        // Proof of size n means, height of the tree is n+1.
        // In a tree of height n+1, max #leafs possible is 2 ^ n
        require(index < 2 ** proofHeight, "Leaf index is too big");

        bytes32 proofElement;
        bytes32 computedHash = leaf;
        for (uint256 i = 32; i <= proof.length; i += 32) {
            assembly {
                proofElement := mload(add(proof, i))
            }

            if (index % 2 == 0) {
                computedHash = keccak256(
                    abi.encodePacked(computedHash, proofElement)
                );
            } else {
                computedHash = keccak256(
                    abi.encodePacked(proofElement, computedHash)
                );
            }

            index = index / 2;
        }
        return computedHash == rootHash;
    }
}

File 7 of 7 : IMessengerWrapper.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.12 <0.8.0;
pragma experimental ABIEncoderV2;

interface IMessengerWrapper {
    function sendCrossDomainMessage(bytes memory _calldata) external;
    function verifySender(address l1BridgeCaller, bytes memory _data) external;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 50000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_l1BridgeAddress","type":"address"},{"internalType":"address","name":"_checkpointManager","type":"address"},{"internalType":"address","name":"_fxRoot","type":"address"},{"internalType":"address","name":"_fxChildTunnel","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"SEND_MESSAGE_EVENT_SIG","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"checkpointManager","outputs":[{"internalType":"contract ICheckpointManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fxChildTunnel","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fxRoot","outputs":[{"internalType":"contract IFxStateSender","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1BridgeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"processedExits","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"inputData","type":"bytes"}],"name":"receiveMessage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_calldata","type":"bytes"}],"name":"sendCrossDomainMessage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fxChildTunnel","type":"address"}],"name":"setFxChildTunnel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"l1BridgeCaller","type":"address"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"verifySender","outputs":[],"stateMutability":"view","type":"function"}]

60a06040523480156200001157600080fd5b506040516200246c3803806200246c8339810160408190526200003491620000ff565b600180546001600160a01b038086166001600160a01b03199283161790925560008054928516929091169190911790556001600160601b0319606085901b1660805262000081816200008b565b50505050620001a5565b6002546001600160a01b031615620000c05760405162461bcd60e51b8152600401620000b7906200015b565b60405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b80516001600160a01b0381168114620000fa57600080fd5b919050565b6000806000806080858703121562000115578384fd5b6200012085620000e2565b93506200013060208601620000e2565b92506200014060408601620000e2565b91506200015060608601620000e2565b905092959194509250565b6020808252602a908201527f467842617365526f6f7454756e6e656c3a204348494c445f54554e4e454c5f4160408201526913149150511657d4d15560b21b606082015260800190565b60805160601c6122a4620001c8600039806101cf52806107bd52506122a46000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c806399178dd811610076578063c0857ba01161005b578063c0857ba014610159578063de9b771f14610161578063f953cec714610169576100be565b806399178dd814610133578063aea4e49e14610146576100be565b80635ab2a558116100a75780635ab2a558146100f6578063607f2d421461010b578063972c49281461012b576100be565b80630e387de6146100c3578063419cb550146100e1575b600080fd5b6100cb61017c565b6040516100d89190611ae3565b60405180910390f35b6100f46100ef366004611926565b6101a0565b005b6100fe6101cd565b6040516100d89190611a88565b61011e6101193660046118c2565b6101f1565b6040516100d89190611ad8565b6100fe610206565b6100f4610141366004611874565b610222565b6100f4610154366004611851565b61027e565b6100fe610315565b6100fe610331565b6100f4610177366004611926565b61034d565b7f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03681565b6101ca33826040516020016101b6929190611aa9565b604051602081830303815290604052610363565b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b60036020526000908152604090205460ff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff8216301461027a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611c38565b60405180910390fd5b5050565b60025473ffffffffffffffffffffffffffffffffffffffff16156102ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611b7e565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6060610358826103f4565b905061027a816107b9565b6000546002546040517fb472047700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283169263b4720477926103bf929116908590600401611aa9565b600060405180830381600087803b1580156103d957600080fd5b505af11580156103ed573d6000803e3d6000fd5b5050505050565b6060806104086104038461087d565b6108dd565b905060006104298260028151811061041c57fe5b6020026020010151610a3f565b61044e6104498460088151811061043c57fe5b6020026020010151610b4c565b610c11565b61045e8460098151811061041c57fe5b60405160200161047093929190611a40565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff16156104f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611c95565b600081815260036020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055815160609061054a9061040390610545908690600690811061043c57fe5b61087d565b90506105546117e4565b6105718260038151811061056457fe5b60200260200101516108dd565b6105818560098151811061041c57fe5b8151811061058b57fe5b6020026020010151905060606105a0826108dd565b90506105bf816000815181106105b257fe5b6020026020010151610db5565b60025473ffffffffffffffffffffffffffffffffffffffff908116911614610613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102719061200d565b61065b6106268660068151811061043c57fe5b6106368760088151811061043c57fe5b6106468860078151811061043c57fe5b6106568960058151811061041c57fe5b610e3b565b610691576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611bdb565b6106ff6106a48660028151811061041c57fe5b6106b48760038151811061041c57fe5b6106c48860048151811061041c57fe5b60001b6106d78960058151811061041c57fe5b60001b6106ea8a60008151811061041c57fe5b6106fa8b60018151811061043c57fe5b611082565b5060606107128260018151811061056457fe5b90507f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03660001b6107488260008151811061041c57fe5b1461077f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611f42565b60606107918360028151811061043c57fe5b90506060818060200190518101906107a99190611959565b985050505050505050505b919050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16826040516108009190611a24565b6000604051808303816000865af19150503d806000811461083d576040519150601f19603f3d011682016040523d82523d6000602084013e610842565b606091505b505090508061027a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611ee5565b6108856117e4565b60008251116108c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611cf2565b506040805180820190915281518152602082810190820152919050565b60606108e8826111c1565b61091e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610271906120c7565b6000610929836111ed565b905060608167ffffffffffffffff8111801561094457600080fd5b5060405190808252806020026020018201604052801561097e57816020015b61096b6117e4565b8152602001906001900390816109635790505b50905060006109908560200151611274565b855190915081146109cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611fb0565b60006109dc8660200151611349565b60208701510190506000805b85811015610a33576109f983611274565b9150604051806040016040528083815260200184815250858281518110610a1c57fe5b6020908102919091010152918101916001016109e8565b50929695505050505050565b6000610a4a826111c1565b15610a81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611b49565b815160211015610abd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611f79565b6000610acc8360200151611274565b83519091508114610b09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610271906120fe565b6000610b188460200151611349565b84516020808701518301805193945091849003929190831015610b4257826020036101000a820491505b5095945050505050565b60606000610b5d8360200151611274565b83519091508114610b9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611d29565b6000610ba98460200151611349565b845190915081900360608167ffffffffffffffff81118015610bca57600080fd5b506040519080825280601f01601f191660200182016040528015610bf5576020820181803683370190505b5090506000816020019050610b428488602001510182856113e8565b60408051602081019091526000815281516060919015610daf57600080610c3960008661146f565b60f81c90506001811480610c5057508060ff166003145b15610cf757600185516002020367ffffffffffffffff81118015610c7357600080fd5b506040519080825280601f01601f191660200182016040528015610c9e576020820181803683370190505b5092506000610cae60018761146f565b90508084600081518110610cbe57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506001925050610d48565b600285516002020367ffffffffffffffff81118015610d1557600080fd5b506040519080825280601f01601f191660200182016040528015610d40576020820181803683370190505b509250600091505b60ff82165b8351811015610dab57610d688360ff1682036002018761146f565b848281518110610d7457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600101610d4d565b5050505b92915050565b6000610dc0826111c1565b15610df7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611de3565b8151601514610e32576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102719061215b565b610daf82610a3f565b6000610e456117e4565b610e4e8461087d565b90506060610e5b826108dd565b905060608085600082610e6d8b610c11565b9050805160001415610e8957600097505050505050505061107a565b60005b8651811015611071578151831115610eaf5760009850505050505050505061107a565b610ecb878281518110610ebe57fe5b60200260200101516114cc565b955085805190602001208414610eec5760009850505050505050505061107a565b610efb87828151811061056457fe5b9450845160111415610fb8578151831415610f57578c80519060200120610f288660108151811061043c57fe5b805190602001201415610f465760019850505050505050505061107a565b60009850505050505050505061107a565b6000828481518110610f6557fe5b016020015160f81c90506010811115610f8a576000995050505050505050505061107a565b610fa9868260ff1681518110610f9c57fe5b6020026020010151611533565b94505060019290920191611069565b845160021415610f46576000610fde610fd78760008151811061043c57fe5b84866115c8565b905082518185011415611034578d805190602001206110038760018151811061043c57fe5b805190602001201415611022576001995050505050505050505061107a565b6000995050505050505050505061107a565b8061104b576000995050505050505050505061107a565b808401935061106086600181518110610f9c57fe5b94506110699050565b600101610e8c565b50505050505050505b949350505050565b6001546040517f41539d4a00000000000000000000000000000000000000000000000000000000815260009182918291829173ffffffffffffffffffffffffffffffffffffffff909116906341539d4a906110e1908990600401611ae3565b60a06040518083038186803b1580156110f957600080fd5b505afa15801561110d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113191906118da565b509350509250925061117e828b0384878d8d8d8d6040516020016111589493929190611a6d565b604051602081830303815290604052805190602001206116bf909392919063ffffffff16565b6111b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611eae565b9998505050505050505050565b6020810151805160009190821a9060c08210156111e3576000925050506107b4565b5060019392505050565b6000806000905060006112038460200151611349565b602085015185519181019250015b8082101561126b5761122282611274565b8201915080821115611260576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611d86565b600190920191611211565b50909392505050565b80516000908190811a608081101561128f5760019150611342565b60b88110156112c2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8181019150611342565b60c08110156112ef5760b78103600185019450806020036101000a85510460018201810193505050611342565b60f8811015611322577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4181019150611342565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b8051600090811a60808110156113635760009150506107b4565b60b881108061137e575060c0811080159061137e575060f881105b1561138d5760019150506107b4565b60c08110156113bf577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4a0190506107b4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0a0190506107b4565b806113f25761146a565b5b602081106114305782518252602092830192909101907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0016113f3565b8251825160208390036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161782525b505050565b600060028306156114a057601082600285048151811061148b57fe5b016020015160f81c8161149a57fe5b066114c2565b60108260028504815181106114b157fe5b016020015160f81c816114c057fe5b045b60f81b9392505050565b606080826000015167ffffffffffffffff811180156114ea57600080fd5b506040519080825280601f01601f191660200182016040528015611515576020820181803683370190505b509050600081602001905061134284602001518286600001516113e8565b6000806115438360200151611274565b83519091508114611580576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102719061206a565b82516021146115bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611aec565b5050602001516001015190565b60008060606115d686610c11565b90506060815167ffffffffffffffff811180156115f257600080fd5b506040519080825280601f01601f19166020018201604052801561161d576020820181803683370190505b509050845b8251860181101561168f57600087828151811061163b57fe5b602001015160f81c60f81b905080838884038151811061165757fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050600101611622565b508080519060200120828051906020012014156116af57815192506116b4565b600092505b509095945050505050565b600060208251816116cc57fe5b0615611704576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611e40565b6000602083518161171157fe5b0490508060020a8510611750576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611e77565b60008660205b855181116117d6578581015192506002880661179c57818360405160200161177f929190611a16565b6040516020818303038152906040528051906020012091506117c8565b82826040516020016117af929190611a16565b6040516020818303038152906040528051906020012091505b600288049750602001611756565b509094149695505050505050565b604051806040016040528060008152602001600081525090565b600082601f83011261180e578081fd5b813561182161181c826121dc565b6121b8565b915080825283602082850101111561183857600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215611862578081fd5b813561186d8161224c565b9392505050565b60008060408385031215611886578081fd5b82356118918161224c565b9150602083013567ffffffffffffffff8111156118ac578182fd5b6118b8858286016117fe565b9150509250929050565b6000602082840312156118d3578081fd5b5035919050565b600080600080600060a086880312156118f1578081fd5b8551945060208601519350604086015192506060860151915060808601516119188161224c565b809150509295509295909350565b600060208284031215611937578081fd5b813567ffffffffffffffff81111561194d578182fd5b61107a848285016117fe565b60006020828403121561196a578081fd5b815167ffffffffffffffff811115611980578182fd5b8201601f81018413611990578182fd5b805161199e61181c826121dc565b8181528560208385010111156119b2578384fd5b6119c382602083016020860161221c565b95945050505050565b600081518084526119e481602086016020860161221c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b918252602082015260400190565b60008251611a3681846020870161221c565b9190910192915050565b60008482528351611a5881602085016020880161221c565b60209201918201929092526040019392505050565b93845260208401929092526040830152606082015260800190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff841682526040602083015261107a60408301846119cc565b901515815260200190565b90815260200190565b60208082526025908201527f524c505265616465723a20494e56414c49445f55494e545f5354524943545f4c60408201527f454e475448000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f524c505265616465723a204445434f44494e475f4c4953545f41535f55494e54604082015260600190565b6020808252602a908201527f467842617365526f6f7454756e6e656c3a204348494c445f54554e4e454c5f4160408201527f4c52454144595f53455400000000000000000000000000000000000000000000606082015260800190565b60208082526023908201527f4678526f6f7454756e6e656c3a20494e56414c49445f524543454950545f505260408201527f4f4f460000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526029908201527f4c315f504c474e5f5750523a2043616c6c6572206d757374206265207468697360408201527f20636f6e74726163740000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f4678526f6f7454756e6e656c3a20455849545f414c52454144595f50524f434560408201527f5353454400000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f524c505265616465723a20494e56414c49445f42595445535f4c454e47544800604082015260600190565b60208082526028908201527f524c505265616465723a2042595445535f4445434f4445445f4c454e4754485f60408201527f4d49534d41544348000000000000000000000000000000000000000000000000606082015260800190565b6020808252602c908201527f524c505265616465723a204e554d5f4954454d535f4445434f4445445f4c454e60408201527f4754485f4d49534d415443480000000000000000000000000000000000000000606082015260800190565b60208082526023908201527f524c505265616465723a204445434f44494e475f4c4953545f41535f4144445260408201527f4553530000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526014908201527f496e76616c69642070726f6f66206c656e677468000000000000000000000000604082015260600190565b60208082526015908201527f4c65616620696e64657820697320746f6f206269670000000000000000000000604082015260600190565b6020808252601c908201527f4678526f6f7454756e6e656c3a20494e56414c49445f48454144455200000000604082015260600190565b60208082526025908201527f4c315f504c474e5f5750523a2043616c6c20746f204c3120427269646765206660408201527f61696c6564000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f4678526f6f7454756e6e656c3a20494e56414c49445f5349474e415455524500604082015260600190565b6020808252601e908201527f524c505265616465723a20494e56414c49445f55494e545f4c454e4754480000604082015260600190565b60208082526027908201527f524c505265616465723a204c4953545f4445434f4445445f4c454e4754485f4d60408201527f49534d4154434800000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f4678526f6f7454756e6e656c3a20494e56414c49445f46585f4348494c445f5460408201527f554e4e454c000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f524c505265616465723a2055494e545f5354524943545f4445434f4445445f4c60408201527f454e4754485f4d49534d41544348000000000000000000000000000000000000606082015260800190565b60208082526018908201527f524c505265616465723a204954454d5f4e4f545f4c4953540000000000000000604082015260600190565b60208082526027908201527f524c505265616465723a2055494e545f4445434f4445445f4c454e4754485f4d60408201527f49534d4154434800000000000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f524c505265616465723a20494e56414c49445f414444524553535f4c454e475460408201527f4800000000000000000000000000000000000000000000000000000000000000606082015260800190565b60405181810167ffffffffffffffff811182821017156121d457fe5b604052919050565b600067ffffffffffffffff8211156121f057fe5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b8381101561223757818101518382015260200161221f565b83811115612246576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff811681146101ca57600080fdfea26469706673582212205fc96262fc200246e5dc4c3a460f43d25ccd32dfec87e97b169789221c2ed9eb64736f6c6343000703003300000000000000000000000022b1cbb8d98a01a3b71d034bb899775a76eb1cc200000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a200000000000000000000000029fba7d2a6c95db162ee09c6250e912d6893dca6

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100be5760003560e01c806399178dd811610076578063c0857ba01161005b578063c0857ba014610159578063de9b771f14610161578063f953cec714610169576100be565b806399178dd814610133578063aea4e49e14610146576100be565b80635ab2a558116100a75780635ab2a558146100f6578063607f2d421461010b578063972c49281461012b576100be565b80630e387de6146100c3578063419cb550146100e1575b600080fd5b6100cb61017c565b6040516100d89190611ae3565b60405180910390f35b6100f46100ef366004611926565b6101a0565b005b6100fe6101cd565b6040516100d89190611a88565b61011e6101193660046118c2565b6101f1565b6040516100d89190611ad8565b6100fe610206565b6100f4610141366004611874565b610222565b6100f4610154366004611851565b61027e565b6100fe610315565b6100fe610331565b6100f4610177366004611926565b61034d565b7f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03681565b6101ca33826040516020016101b6929190611aa9565b604051602081830303815290604052610363565b50565b7f00000000000000000000000022b1cbb8d98a01a3b71d034bb899775a76eb1cc281565b60036020526000908152604090205460ff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff8216301461027a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611c38565b60405180910390fd5b5050565b60025473ffffffffffffffffffffffffffffffffffffffff16156102ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611b7e565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6060610358826103f4565b905061027a816107b9565b6000546002546040517fb472047700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283169263b4720477926103bf929116908590600401611aa9565b600060405180830381600087803b1580156103d957600080fd5b505af11580156103ed573d6000803e3d6000fd5b5050505050565b6060806104086104038461087d565b6108dd565b905060006104298260028151811061041c57fe5b6020026020010151610a3f565b61044e6104498460088151811061043c57fe5b6020026020010151610b4c565b610c11565b61045e8460098151811061041c57fe5b60405160200161047093929190611a40565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490915060ff16156104f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611c95565b600081815260036020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055815160609061054a9061040390610545908690600690811061043c57fe5b61087d565b90506105546117e4565b6105718260038151811061056457fe5b60200260200101516108dd565b6105818560098151811061041c57fe5b8151811061058b57fe5b6020026020010151905060606105a0826108dd565b90506105bf816000815181106105b257fe5b6020026020010151610db5565b60025473ffffffffffffffffffffffffffffffffffffffff908116911614610613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102719061200d565b61065b6106268660068151811061043c57fe5b6106368760088151811061043c57fe5b6106468860078151811061043c57fe5b6106568960058151811061041c57fe5b610e3b565b610691576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611bdb565b6106ff6106a48660028151811061041c57fe5b6106b48760038151811061041c57fe5b6106c48860048151811061041c57fe5b60001b6106d78960058151811061041c57fe5b60001b6106ea8a60008151811061041c57fe5b6106fa8b60018151811061043c57fe5b611082565b5060606107128260018151811061056457fe5b90507f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03660001b6107488260008151811061041c57fe5b1461077f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611f42565b60606107918360028151811061043c57fe5b90506060818060200190518101906107a99190611959565b985050505050505050505b919050565b60007f00000000000000000000000022b1cbb8d98a01a3b71d034bb899775a76eb1cc273ffffffffffffffffffffffffffffffffffffffff16826040516108009190611a24565b6000604051808303816000865af19150503d806000811461083d576040519150601f19603f3d011682016040523d82523d6000602084013e610842565b606091505b505090508061027a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611ee5565b6108856117e4565b60008251116108c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611cf2565b506040805180820190915281518152602082810190820152919050565b60606108e8826111c1565b61091e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610271906120c7565b6000610929836111ed565b905060608167ffffffffffffffff8111801561094457600080fd5b5060405190808252806020026020018201604052801561097e57816020015b61096b6117e4565b8152602001906001900390816109635790505b50905060006109908560200151611274565b855190915081146109cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611fb0565b60006109dc8660200151611349565b60208701510190506000805b85811015610a33576109f983611274565b9150604051806040016040528083815260200184815250858281518110610a1c57fe5b6020908102919091010152918101916001016109e8565b50929695505050505050565b6000610a4a826111c1565b15610a81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611b49565b815160211015610abd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611f79565b6000610acc8360200151611274565b83519091508114610b09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610271906120fe565b6000610b188460200151611349565b84516020808701518301805193945091849003929190831015610b4257826020036101000a820491505b5095945050505050565b60606000610b5d8360200151611274565b83519091508114610b9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611d29565b6000610ba98460200151611349565b845190915081900360608167ffffffffffffffff81118015610bca57600080fd5b506040519080825280601f01601f191660200182016040528015610bf5576020820181803683370190505b5090506000816020019050610b428488602001510182856113e8565b60408051602081019091526000815281516060919015610daf57600080610c3960008661146f565b60f81c90506001811480610c5057508060ff166003145b15610cf757600185516002020367ffffffffffffffff81118015610c7357600080fd5b506040519080825280601f01601f191660200182016040528015610c9e576020820181803683370190505b5092506000610cae60018761146f565b90508084600081518110610cbe57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506001925050610d48565b600285516002020367ffffffffffffffff81118015610d1557600080fd5b506040519080825280601f01601f191660200182016040528015610d40576020820181803683370190505b509250600091505b60ff82165b8351811015610dab57610d688360ff1682036002018761146f565b848281518110610d7457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600101610d4d565b5050505b92915050565b6000610dc0826111c1565b15610df7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611de3565b8151601514610e32576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102719061215b565b610daf82610a3f565b6000610e456117e4565b610e4e8461087d565b90506060610e5b826108dd565b905060608085600082610e6d8b610c11565b9050805160001415610e8957600097505050505050505061107a565b60005b8651811015611071578151831115610eaf5760009850505050505050505061107a565b610ecb878281518110610ebe57fe5b60200260200101516114cc565b955085805190602001208414610eec5760009850505050505050505061107a565b610efb87828151811061056457fe5b9450845160111415610fb8578151831415610f57578c80519060200120610f288660108151811061043c57fe5b805190602001201415610f465760019850505050505050505061107a565b60009850505050505050505061107a565b6000828481518110610f6557fe5b016020015160f81c90506010811115610f8a576000995050505050505050505061107a565b610fa9868260ff1681518110610f9c57fe5b6020026020010151611533565b94505060019290920191611069565b845160021415610f46576000610fde610fd78760008151811061043c57fe5b84866115c8565b905082518185011415611034578d805190602001206110038760018151811061043c57fe5b805190602001201415611022576001995050505050505050505061107a565b6000995050505050505050505061107a565b8061104b576000995050505050505050505061107a565b808401935061106086600181518110610f9c57fe5b94506110699050565b600101610e8c565b50505050505050505b949350505050565b6001546040517f41539d4a00000000000000000000000000000000000000000000000000000000815260009182918291829173ffffffffffffffffffffffffffffffffffffffff909116906341539d4a906110e1908990600401611ae3565b60a06040518083038186803b1580156110f957600080fd5b505afa15801561110d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113191906118da565b509350509250925061117e828b0384878d8d8d8d6040516020016111589493929190611a6d565b604051602081830303815290604052805190602001206116bf909392919063ffffffff16565b6111b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611eae565b9998505050505050505050565b6020810151805160009190821a9060c08210156111e3576000925050506107b4565b5060019392505050565b6000806000905060006112038460200151611349565b602085015185519181019250015b8082101561126b5761122282611274565b8201915080821115611260576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611d86565b600190920191611211565b50909392505050565b80516000908190811a608081101561128f5760019150611342565b60b88110156112c2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8181019150611342565b60c08110156112ef5760b78103600185019450806020036101000a85510460018201810193505050611342565b60f8811015611322577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4181019150611342565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b8051600090811a60808110156113635760009150506107b4565b60b881108061137e575060c0811080159061137e575060f881105b1561138d5760019150506107b4565b60c08110156113bf577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4a0190506107b4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0a0190506107b4565b806113f25761146a565b5b602081106114305782518252602092830192909101907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0016113f3565b8251825160208390036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161782525b505050565b600060028306156114a057601082600285048151811061148b57fe5b016020015160f81c8161149a57fe5b066114c2565b60108260028504815181106114b157fe5b016020015160f81c816114c057fe5b045b60f81b9392505050565b606080826000015167ffffffffffffffff811180156114ea57600080fd5b506040519080825280601f01601f191660200182016040528015611515576020820181803683370190505b509050600081602001905061134284602001518286600001516113e8565b6000806115438360200151611274565b83519091508114611580576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102719061206a565b82516021146115bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611aec565b5050602001516001015190565b60008060606115d686610c11565b90506060815167ffffffffffffffff811180156115f257600080fd5b506040519080825280601f01601f19166020018201604052801561161d576020820181803683370190505b509050845b8251860181101561168f57600087828151811061163b57fe5b602001015160f81c60f81b905080838884038151811061165757fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050600101611622565b508080519060200120828051906020012014156116af57815192506116b4565b600092505b509095945050505050565b600060208251816116cc57fe5b0615611704576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611e40565b6000602083518161171157fe5b0490508060020a8510611750576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027190611e77565b60008660205b855181116117d6578581015192506002880661179c57818360405160200161177f929190611a16565b6040516020818303038152906040528051906020012091506117c8565b82826040516020016117af929190611a16565b6040516020818303038152906040528051906020012091505b600288049750602001611756565b509094149695505050505050565b604051806040016040528060008152602001600081525090565b600082601f83011261180e578081fd5b813561182161181c826121dc565b6121b8565b915080825283602082850101111561183857600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215611862578081fd5b813561186d8161224c565b9392505050565b60008060408385031215611886578081fd5b82356118918161224c565b9150602083013567ffffffffffffffff8111156118ac578182fd5b6118b8858286016117fe565b9150509250929050565b6000602082840312156118d3578081fd5b5035919050565b600080600080600060a086880312156118f1578081fd5b8551945060208601519350604086015192506060860151915060808601516119188161224c565b809150509295509295909350565b600060208284031215611937578081fd5b813567ffffffffffffffff81111561194d578182fd5b61107a848285016117fe565b60006020828403121561196a578081fd5b815167ffffffffffffffff811115611980578182fd5b8201601f81018413611990578182fd5b805161199e61181c826121dc565b8181528560208385010111156119b2578384fd5b6119c382602083016020860161221c565b95945050505050565b600081518084526119e481602086016020860161221c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b918252602082015260400190565b60008251611a3681846020870161221c565b9190910192915050565b60008482528351611a5881602085016020880161221c565b60209201918201929092526040019392505050565b93845260208401929092526040830152606082015260800190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff841682526040602083015261107a60408301846119cc565b901515815260200190565b90815260200190565b60208082526025908201527f524c505265616465723a20494e56414c49445f55494e545f5354524943545f4c60408201527f454e475448000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f524c505265616465723a204445434f44494e475f4c4953545f41535f55494e54604082015260600190565b6020808252602a908201527f467842617365526f6f7454756e6e656c3a204348494c445f54554e4e454c5f4160408201527f4c52454144595f53455400000000000000000000000000000000000000000000606082015260800190565b60208082526023908201527f4678526f6f7454756e6e656c3a20494e56414c49445f524543454950545f505260408201527f4f4f460000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526029908201527f4c315f504c474e5f5750523a2043616c6c6572206d757374206265207468697360408201527f20636f6e74726163740000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f4678526f6f7454756e6e656c3a20455849545f414c52454144595f50524f434560408201527f5353454400000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f524c505265616465723a20494e56414c49445f42595445535f4c454e47544800604082015260600190565b60208082526028908201527f524c505265616465723a2042595445535f4445434f4445445f4c454e4754485f60408201527f4d49534d41544348000000000000000000000000000000000000000000000000606082015260800190565b6020808252602c908201527f524c505265616465723a204e554d5f4954454d535f4445434f4445445f4c454e60408201527f4754485f4d49534d415443480000000000000000000000000000000000000000606082015260800190565b60208082526023908201527f524c505265616465723a204445434f44494e475f4c4953545f41535f4144445260408201527f4553530000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526014908201527f496e76616c69642070726f6f66206c656e677468000000000000000000000000604082015260600190565b60208082526015908201527f4c65616620696e64657820697320746f6f206269670000000000000000000000604082015260600190565b6020808252601c908201527f4678526f6f7454756e6e656c3a20494e56414c49445f48454144455200000000604082015260600190565b60208082526025908201527f4c315f504c474e5f5750523a2043616c6c20746f204c3120427269646765206660408201527f61696c6564000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f4678526f6f7454756e6e656c3a20494e56414c49445f5349474e415455524500604082015260600190565b6020808252601e908201527f524c505265616465723a20494e56414c49445f55494e545f4c454e4754480000604082015260600190565b60208082526027908201527f524c505265616465723a204c4953545f4445434f4445445f4c454e4754485f4d60408201527f49534d4154434800000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f4678526f6f7454756e6e656c3a20494e56414c49445f46585f4348494c445f5460408201527f554e4e454c000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602e908201527f524c505265616465723a2055494e545f5354524943545f4445434f4445445f4c60408201527f454e4754485f4d49534d41544348000000000000000000000000000000000000606082015260800190565b60208082526018908201527f524c505265616465723a204954454d5f4e4f545f4c4953540000000000000000604082015260600190565b60208082526027908201527f524c505265616465723a2055494e545f4445434f4445445f4c454e4754485f4d60408201527f49534d4154434800000000000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f524c505265616465723a20494e56414c49445f414444524553535f4c454e475460408201527f4800000000000000000000000000000000000000000000000000000000000000606082015260800190565b60405181810167ffffffffffffffff811182821017156121d457fe5b604052919050565b600067ffffffffffffffff8211156121f057fe5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b8381101561223757818101518382015260200161221f565b83811115612246576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff811681146101ca57600080fdfea26469706673582212205fc96262fc200246e5dc4c3a460f43d25ccd32dfec87e97b169789221c2ed9eb64736f6c63430007030033

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

00000000000000000000000022b1cbb8d98a01a3b71d034bb899775a76eb1cc200000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a200000000000000000000000029fba7d2a6c95db162ee09c6250e912d6893dca6

-----Decoded View---------------
Arg [0] : _l1BridgeAddress (address): 0x22B1Cbb8D98a01a3B71D034BB899775A76Eb1cc2
Arg [1] : _checkpointManager (address): 0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287
Arg [2] : _fxRoot (address): 0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2
Arg [3] : _fxChildTunnel (address): 0x29Fba7d2A6C95DB162ee09C6250e912D6893DCa6

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000022b1cbb8d98a01a3b71d034bb899775a76eb1cc2
Arg [1] : 00000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287
Arg [2] : 000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a2
Arg [3] : 00000000000000000000000029fba7d2a6c95db162ee09c6250e912d6893dca6


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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