ETH Price: $3,315.06 (+1.70%)
Gas: 3 Gwei

Contract

0x21ada4D8A799c4b0ADF100eB597a6f1321bCD3E4
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040129070322021-07-27 8:18:101098 days ago1627373890IN
 Create: ERC20EscrowPredicate
0 ETH0.0265224330

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ERC20EscrowPredicate

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 2000 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at Etherscan.io on 2021-07-27
*/

// Sources flattened with hardhat v2.4.3 https://hardhat.org

// File @animoca/ethereum-contracts-core-1.1.1/contracts/utils/types/[email protected]

// SPDX-License-Identifier: MIT

// Partially derived from OpenZeppelin:
// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/406c83649bd6169fc1b578e08506d78f0873b276/contracts/utils/Address.sol

pragma solidity >=0.7.6 <0.8.0;

/**
 * @dev Upgrades the address type to check if it is a contract.
 */
library AddressIsContract {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }
}


// File @animoca/ethereum-contracts-core-1.1.1/contracts/utils/[email protected]

pragma solidity >=0.7.6 <0.8.0;

/**
 * @title ERC20Wrapper
 * Wraps ERC20 functions to support non-standard implementations which do not return a bool value.
 * Calls to the wrapped functions revert only if they throw or if they return false.
 */
library ERC20Wrapper {
    using AddressIsContract for address;

    function wrappedTransfer(
        IWrappedERC20 token,
        address to,
        uint256 value
    ) internal {
        _callWithOptionalReturnData(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function wrappedTransferFrom(
        IWrappedERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callWithOptionalReturnData(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    function wrappedApprove(
        IWrappedERC20 token,
        address spender,
        uint256 value
    ) internal {
        _callWithOptionalReturnData(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function _callWithOptionalReturnData(IWrappedERC20 token, bytes memory callData) internal {
        address target = address(token);
        require(target.isContract(), "ERC20Wrapper: non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory data) = target.call(callData);
        if (success) {
            if (data.length != 0) {
                require(abi.decode(data, (bool)), "ERC20Wrapper: operation failed");
            }
        } else {
            // revert using a standard revert message
            if (data.length == 0) {
                revert("ERC20Wrapper: operation failed");
            }

            // revert using the revert message coming from the call
            assembly {
                let size := mload(data)
                revert(add(32, data), size)
            }
        }
    }
}

interface IWrappedERC20 {
    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function approve(address spender, uint256 value) external returns (bool);
}


// File @animoca/ethereum-contracts-core-1.1.1/contracts/metatx/[email protected]

pragma solidity >=0.7.6 <0.8.0;

/*
 * Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner.
 */
abstract contract ManagedIdentity {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        return msg.data;
    }
}


// File @animoca/ethereum-contracts-core-1.1.1/contracts/bridging/[email protected]

pragma solidity >=0.7.6 <0.8.0;

/**
 * @title Token predicate interface for all POS portal predicates.
 * Abstract interface that defines methods for custom predicates.
 */
interface ITokenPredicate {
    /**
     * @notice Deposit tokens into POS portal.
     * @dev When `depositor` deposits tokens into POS portal, tokens get locked into predicate contract.
     * @param depositor Address who wants to deposit tokens
     * @param depositReceiver Address (address) who wants to receive tokens on side chain
     * @param rootToken Token which gets deposited
     * @param depositData Extra data for deposit (amount for ERC20, token id for ERC721 etc.) [ABI encoded]
     */
    function lockTokens(
        address depositor,
        address depositReceiver,
        address rootToken,
        bytes calldata depositData
    ) external;

    /**
     * @notice Validates and processes exit while withdraw process
     * @dev Validates exit log emitted on sidechain. Reverts if validation fails.
     * @dev Processes withdraw based on custom logic. Example: transfer ERC20/ERC721, mint ERC721 if mintable withdraw
     * @param sender Address
     * @param rootToken Token which gets withdrawn
     * @param logRLPList Valid sidechain log for data like amount, token id etc.
     */
    function exitTokens(
        address sender,
        address rootToken,
        bytes calldata logRLPList
    ) external;
}


// File @animoca/ethereum-contracts-core-1.1.1/contracts/utils/[email protected]

/*
 * @author Hamdi Allam [email protected]
 * Please reach out with any questions or concerns
 * https://github.com/hamdiallam/Solidity-RLP/blob/e681e25a376dbd5426b509380bc03446f05d0f97/contracts/RLPReader.sol
 */
pragma solidity >=0.7.6 <0.8.0;

library RLPReader {
    uint8 private constant _STRING_SHORT_START = 0x80;
    uint8 private constant _STRING_LONG_START = 0xb8;
    uint8 private constant _LIST_SHORT_START = 0xc0;
    uint8 private constant _LIST_LONG_START = 0xf8;
    uint8 private 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), "RLP: ITEM_NOT_LIST");

        uint256 items = numItems(item);
        RLPItem[] memory result = new RLPItem[](items);
        uint256 listLength = _itemLength(item.memPtr);
        require(listLength == item.len, "RLP: LIST_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), "RLP: DECODING_LIST_AS_ADDRESS");
        // 1 byte for the length prefix
        require(item.len == 21, "RLP: INVALID_ADDRESS_LEN");

        return address(toUint(item));
    }

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

        uint256 itemLength = _itemLength(item.memPtr);
        require(itemLength == item.len, "RLP: UINT_LEN_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, "RLP: UINT_STRICT_LEN_MISMATCH");
        // one byte prefix
        require(item.len == 33, "RLP: INVALID_UINT_STRICT_LEN");

        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, "RLP: BYTES_LEN_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, "RLP: NUM_ITEMS_LEN_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 contracts/bridging/ERC20BasePredicate.sol

pragma solidity >=0.7.6 <0.8.0;


/**
 * Polygon (MATIC) bridging base ERC20 predicate to be deployed on the root chain (Ethereum mainnet).
 */
abstract contract ERC20BasePredicate is ITokenPredicate {
    using RLPReader for bytes;
    using RLPReader for RLPReader.RLPItem;

    event LockedERC20(address indexed depositor, address indexed depositReceiver, address indexed rootToken, uint256 amount);

    bytes32 public constant WITHDRAWN_EVENT_SIG = 0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5;

    // see https://github.com/maticnetwork/pos-portal/blob/master/contracts/root/RootChainManager/RootChainManager.sol
    address public rootChainManager;

    /**
     * Constructor
     * @param rootChainManager_ the Polygon/MATIC RootChainManager proxy address.
     */
    constructor(address rootChainManager_) {
        rootChainManager = rootChainManager_;
    }

    function _requireManagerRole(address account) internal view {
        require(account == rootChainManager, "Predicate: only manager");
    }

    function _verifyWithdrawalLog(bytes memory log) internal pure returns (address withdrawer, uint256 amount) {
        RLPReader.RLPItem[] memory logRLPList = log.toRlpItem().toList();
        RLPReader.RLPItem[] memory logTopicRLPList = logRLPList[1].toList(); // topics

        require(
            bytes32(logTopicRLPList[0].toUint()) == WITHDRAWN_EVENT_SIG, // topic0 is event sig
            "Predicate: invalid signature"
        );

        bytes memory logData = logRLPList[2].toBytes();
        (withdrawer, amount) = abi.decode(logData, (address, uint256));
    }
}


// File contracts/bridging/ERC20EscrowPredicate.sol

pragma solidity >=0.7.6 <0.8.0;



/**
 * Polygon (MATIC) bridging ERC20 escrowing predicate to be deployed on the root chain (Ethereum mainnet).
 * This predicate must be used for non-mintable/non-burnable tokens.
 */
contract ERC20EscrowPredicate is ERC20BasePredicate, ManagedIdentity {
    using ERC20Wrapper for IWrappedERC20;

    constructor(address rootChainManager_) ERC20BasePredicate(rootChainManager_) {}

    /**
     * Locks ERC20 tokens for deposit.
     * @dev Reverts if not called by the manager (RootChainManager).
     * @param depositor Address who wants to deposit tokens.
     * @param depositReceiver Address (address) who wants to receive tokens on child chain.
     * @param rootToken Token which gets deposited.
     * @param depositData ABI encoded amount.
     */
    function lockTokens(
        address depositor,
        address depositReceiver,
        address rootToken,
        bytes calldata depositData
    ) external override {
        _requireManagerRole(_msgSender());
        uint256 amount = abi.decode(depositData, (uint256));
        emit LockedERC20(depositor, depositReceiver, rootToken, amount);
        IWrappedERC20(rootToken).wrappedTransferFrom(depositor, address(this), amount);
    }

    /**
     * Validates the {Withdrawn} log signature, then sends the correct amount to withdrawer.
     * @dev Reverts if not called only by the manager (RootChainManager).
     * @param rootToken Token which gets withdrawn
     * @param log Valid ERC20 burn log from child chain
     */
    function exitTokens(
        address,
        address rootToken,
        bytes memory log
    ) public override {
        _requireManagerRole(_msgSender());
        (address withdrawer, uint256 amount) = _verifyWithdrawalLog(log);
        IWrappedERC20(rootToken).wrappedTransfer(withdrawer, amount);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"rootChainManager_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"depositor","type":"address"},{"indexed":true,"internalType":"address","name":"depositReceiver","type":"address"},{"indexed":true,"internalType":"address","name":"rootToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LockedERC20","type":"event"},{"inputs":[],"name":"WITHDRAWN_EVENT_SIG","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"rootToken","type":"address"},{"internalType":"bytes","name":"log","type":"bytes"}],"name":"exitTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"depositor","type":"address"},{"internalType":"address","name":"depositReceiver","type":"address"},{"internalType":"address","name":"rootToken","type":"address"},{"internalType":"bytes","name":"depositData","type":"bytes"}],"name":"lockTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rootChainManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50604051610f06380380610f068339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610ea1806100656000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063206efea4146100515780638274664f1461006b578063bd07018d1461012c578063e375b64e14610150575b600080fd5b6100596101e1565b60408051918252519081900360200190f35b61012a6004803603606081101561008157600080fd5b6001600160a01b0382358116926020810135909116918101906060810160408201356401000000008111156100b557600080fd5b8201836020820111156100c757600080fd5b803590602001918460018302840111640100000000831117156100e957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610205945050505050565b005b610134610241565b604080516001600160a01b039092168252519081900360200190f35b61012a6004803603608081101561016657600080fd5b6001600160a01b03823581169260208101358216926040820135909216918101906080810160608201356401000000008111156101a257600080fd5b8201836020820111156101b457600080fd5b803590602001918460018302840111640100000000831117156101d657600080fd5b509092509050610250565b7f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d581565b6102156102106102d7565b6102db565b60008061022183610340565b909250905061023a6001600160a01b0385168383610458565b5050505050565b6000546001600160a01b031681565b61025b6102106102d7565b60008282602081101561026d57600080fd5b5060408051913580835290519092506001600160a01b038087169288821692918a16917f9b217a401a5ddf7c4d474074aff9958a18d48690d77cc2151c4706aa7348b4019181900360200190a46102cf6001600160a01b0385168730846104dd565b505050505050565b3390565b6000546001600160a01b0382811691161461033d576040805162461bcd60e51b815260206004820152601760248201527f5072656469636174653a206f6e6c79206d616e61676572000000000000000000604482015290519081900360640190fd5b50565b60008060006103566103518561056b565b6105e7565b905060006103778260018151811061036a57fe5b60200260200101516105e7565b90507f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d560001b6103ba826000815181106103ad57fe5b602002602001015161077f565b1461040c576040805162461bcd60e51b815260206004820152601c60248201527f5072656469636174653a20696e76616c6964207369676e617475726500000000604482015290519081900360640190fd5b600061042b8360028151811061041e57fe5b60200260200101516108dd565b905080806020019051604081101561044257600080fd5b5080516020909101519097909650945050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526104d89084906109bd565b505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526105659085906109bd565b50505050565b610573610e51565b60008251116105c9576040805162461bcd60e51b815260206004820152601f60248201527f524c505265616465723a20494e56414c49445f42595445535f4c454e47544800604482015290519081900360640190fd5b5060408051808201909152815181526020828101908201525b919050565b60606105f282610ba0565b610643576040805162461bcd60e51b815260206004820152601260248201527f524c503a204954454d5f4e4f545f4c4953540000000000000000000000000000604482015290519081900360640190fd5b600061064e83610bcc565b905060008167ffffffffffffffff8111801561066957600080fd5b506040519080825280602002602001820160405280156106a357816020015b610690610e51565b8152602001906001900390816106885790505b50905060006106b58560200151610c6e565b8551909150811461070d576040805162461bcd60e51b815260206004820152601960248201527f524c503a204c4953545f4c454e4754485f4d49534d4154434800000000000000604482015290519081900360640190fd5b600061071c8660200151610d43565b60208701510190506000805b858110156107735761073983610c6e565b915060405180604001604052808381526020018481525085828151811061075c57fe5b602090810291909101015291810191600101610728565b50929695505050505050565b600061078a82610ba0565b156107dc576040805162461bcd60e51b815260206004820152601a60248201527f524c503a204445434f44494e475f4c4953545f41535f55494e54000000000000604482015290519081900360640190fd5b815160211015610833576040805162461bcd60e51b815260206004820152601560248201527f524c503a20494e56414c49445f55494e545f4c454e0000000000000000000000604482015290519081900360640190fd5b60006108428360200151610c6e565b8351909150811461089a576040805162461bcd60e51b815260206004820152601660248201527f524c503a2055494e545f4c454e5f4d49534d4154434800000000000000000000604482015290519081900360640190fd5b60006108a98460200151610d43565b845160208087015183018051939450918490039291908310156108d357826020036101000a820491505b5095945050505050565b606060006108ee8360200151610c6e565b83519091508114610946576040805162461bcd60e51b815260206004820152601760248201527f524c503a2042595445535f4c454e5f4d49534d41544348000000000000000000604482015290519081900360640190fd5b60006109558460200151610d43565b845190915081900360008167ffffffffffffffff8111801561097657600080fd5b506040519080825280601f01601f1916602001820160405280156109a1576020820181803683370190505b50905060008160200190506108d3848860200151018285610de2565b816109d06001600160a01b038216610e4b565b610a21576040805162461bcd60e51b815260206004820152601a60248201527f4552433230577261707065723a206e6f6e2d636f6e7472616374000000000000604482015290519081900360640190fd5b600080826001600160a01b0316846040518082805190602001908083835b60208310610a5e5780518252601f199092019160209182019101610a3f565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610ac0576040519150601f19603f3d011682016040523d82523d6000602084013e610ac5565b606091505b50915091508115610b4457805115610b3f57808060200190516020811015610aec57600080fd5b5051610b3f576040805162461bcd60e51b815260206004820152601e60248201527f4552433230577261707065723a206f7065726174696f6e206661696c65640000604482015290519081900360640190fd5b61023a565b8051610b97576040805162461bcd60e51b815260206004820152601e60248201527f4552433230577261707065723a206f7065726174696f6e206661696c65640000604482015290519081900360640190fd5b80518082602001fd5b6020810151805160009190821a9060c0821015610bc2576000925050506105e2565b5060019392505050565b600080600090506000610be28460200151610d43565b602085015185519181019250015b80821015610c6557610c0182610c6e565b8201915080821115610c5a576040805162461bcd60e51b815260206004820152601b60248201527f524c503a204e554d5f4954454d535f4c454e5f4d49534d415443480000000000604482015290519081900360640190fd5b600190920191610bf0565b50909392505050565b80516000908190811a6080811015610c895760019150610d3c565b60b8811015610cbc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8181019150610d3c565b60c0811015610ce95760b78103600185019450806020036101000a85510460018201810193505050610d3c565b60f8811015610d1c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4181019150610d3c565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b8051600090811a6080811015610d5d5760009150506105e2565b60b8811080610d78575060c08110801590610d78575060f881105b15610d875760019150506105e2565b60c0811015610db9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4a0190506105e2565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0a0190506105e2565b80610dec576104d8565b5b60208110610e0c578251825260209283019290910190601f1901610ded565b915181516020939093036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0180199091169216919091179052565b3b151590565b60405180604001604052806000815260200160008152509056fea26469706673582212208a6717ce2769ab75fd9c5d5a44947c6a3679f343e41bc251fba416d7a301e36964736f6c63430007060033000000000000000000000000a0c68c638235ee32657e8f720a23cec1bfc77c77

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c8063206efea4146100515780638274664f1461006b578063bd07018d1461012c578063e375b64e14610150575b600080fd5b6100596101e1565b60408051918252519081900360200190f35b61012a6004803603606081101561008157600080fd5b6001600160a01b0382358116926020810135909116918101906060810160408201356401000000008111156100b557600080fd5b8201836020820111156100c757600080fd5b803590602001918460018302840111640100000000831117156100e957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610205945050505050565b005b610134610241565b604080516001600160a01b039092168252519081900360200190f35b61012a6004803603608081101561016657600080fd5b6001600160a01b03823581169260208101358216926040820135909216918101906080810160608201356401000000008111156101a257600080fd5b8201836020820111156101b457600080fd5b803590602001918460018302840111640100000000831117156101d657600080fd5b509092509050610250565b7f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d581565b6102156102106102d7565b6102db565b60008061022183610340565b909250905061023a6001600160a01b0385168383610458565b5050505050565b6000546001600160a01b031681565b61025b6102106102d7565b60008282602081101561026d57600080fd5b5060408051913580835290519092506001600160a01b038087169288821692918a16917f9b217a401a5ddf7c4d474074aff9958a18d48690d77cc2151c4706aa7348b4019181900360200190a46102cf6001600160a01b0385168730846104dd565b505050505050565b3390565b6000546001600160a01b0382811691161461033d576040805162461bcd60e51b815260206004820152601760248201527f5072656469636174653a206f6e6c79206d616e61676572000000000000000000604482015290519081900360640190fd5b50565b60008060006103566103518561056b565b6105e7565b905060006103778260018151811061036a57fe5b60200260200101516105e7565b90507f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d560001b6103ba826000815181106103ad57fe5b602002602001015161077f565b1461040c576040805162461bcd60e51b815260206004820152601c60248201527f5072656469636174653a20696e76616c6964207369676e617475726500000000604482015290519081900360640190fd5b600061042b8360028151811061041e57fe5b60200260200101516108dd565b905080806020019051604081101561044257600080fd5b5080516020909101519097909650945050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526104d89084906109bd565b505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526105659085906109bd565b50505050565b610573610e51565b60008251116105c9576040805162461bcd60e51b815260206004820152601f60248201527f524c505265616465723a20494e56414c49445f42595445535f4c454e47544800604482015290519081900360640190fd5b5060408051808201909152815181526020828101908201525b919050565b60606105f282610ba0565b610643576040805162461bcd60e51b815260206004820152601260248201527f524c503a204954454d5f4e4f545f4c4953540000000000000000000000000000604482015290519081900360640190fd5b600061064e83610bcc565b905060008167ffffffffffffffff8111801561066957600080fd5b506040519080825280602002602001820160405280156106a357816020015b610690610e51565b8152602001906001900390816106885790505b50905060006106b58560200151610c6e565b8551909150811461070d576040805162461bcd60e51b815260206004820152601960248201527f524c503a204c4953545f4c454e4754485f4d49534d4154434800000000000000604482015290519081900360640190fd5b600061071c8660200151610d43565b60208701510190506000805b858110156107735761073983610c6e565b915060405180604001604052808381526020018481525085828151811061075c57fe5b602090810291909101015291810191600101610728565b50929695505050505050565b600061078a82610ba0565b156107dc576040805162461bcd60e51b815260206004820152601a60248201527f524c503a204445434f44494e475f4c4953545f41535f55494e54000000000000604482015290519081900360640190fd5b815160211015610833576040805162461bcd60e51b815260206004820152601560248201527f524c503a20494e56414c49445f55494e545f4c454e0000000000000000000000604482015290519081900360640190fd5b60006108428360200151610c6e565b8351909150811461089a576040805162461bcd60e51b815260206004820152601660248201527f524c503a2055494e545f4c454e5f4d49534d4154434800000000000000000000604482015290519081900360640190fd5b60006108a98460200151610d43565b845160208087015183018051939450918490039291908310156108d357826020036101000a820491505b5095945050505050565b606060006108ee8360200151610c6e565b83519091508114610946576040805162461bcd60e51b815260206004820152601760248201527f524c503a2042595445535f4c454e5f4d49534d41544348000000000000000000604482015290519081900360640190fd5b60006109558460200151610d43565b845190915081900360008167ffffffffffffffff8111801561097657600080fd5b506040519080825280601f01601f1916602001820160405280156109a1576020820181803683370190505b50905060008160200190506108d3848860200151018285610de2565b816109d06001600160a01b038216610e4b565b610a21576040805162461bcd60e51b815260206004820152601a60248201527f4552433230577261707065723a206e6f6e2d636f6e7472616374000000000000604482015290519081900360640190fd5b600080826001600160a01b0316846040518082805190602001908083835b60208310610a5e5780518252601f199092019160209182019101610a3f565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610ac0576040519150601f19603f3d011682016040523d82523d6000602084013e610ac5565b606091505b50915091508115610b4457805115610b3f57808060200190516020811015610aec57600080fd5b5051610b3f576040805162461bcd60e51b815260206004820152601e60248201527f4552433230577261707065723a206f7065726174696f6e206661696c65640000604482015290519081900360640190fd5b61023a565b8051610b97576040805162461bcd60e51b815260206004820152601e60248201527f4552433230577261707065723a206f7065726174696f6e206661696c65640000604482015290519081900360640190fd5b80518082602001fd5b6020810151805160009190821a9060c0821015610bc2576000925050506105e2565b5060019392505050565b600080600090506000610be28460200151610d43565b602085015185519181019250015b80821015610c6557610c0182610c6e565b8201915080821115610c5a576040805162461bcd60e51b815260206004820152601b60248201527f524c503a204e554d5f4954454d535f4c454e5f4d49534d415443480000000000604482015290519081900360640190fd5b600190920191610bf0565b50909392505050565b80516000908190811a6080811015610c895760019150610d3c565b60b8811015610cbc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8181019150610d3c565b60c0811015610ce95760b78103600185019450806020036101000a85510460018201810193505050610d3c565b60f8811015610d1c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4181019150610d3c565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b8051600090811a6080811015610d5d5760009150506105e2565b60b8811080610d78575060c08110801590610d78575060f881105b15610d875760019150506105e2565b60c0811015610db9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4a0190506105e2565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0a0190506105e2565b80610dec576104d8565b5b60208110610e0c578251825260209283019290910190601f1901610ded565b915181516020939093036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0180199091169216919091179052565b3b151590565b60405180604001604052806000815260200160008152509056fea26469706673582212208a6717ce2769ab75fd9c5d5a44947c6a3679f343e41bc251fba416d7a301e36964736f6c63430007060033

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

000000000000000000000000a0c68c638235ee32657e8f720a23cec1bfc77c77

-----Decoded View---------------
Arg [0] : rootChainManager_ (address): 0xA0c68C638235ee32657e8f720a23ceC1bFc77C77

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a0c68c638235ee32657e8f720a23cec1bfc77c77


Deployed Bytecode Sourcemap

16460:1661:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14932:112;;;:::i;:::-;;;;;;;;;;;;;;;;17804:314;;;;;;;;;;;;;;;;-1:-1:-1;;;;;17804:314:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;17804:314:0;;-1:-1:-1;17804:314:0;;-1:-1:-1;;;;;17804:314:0:i;:::-;;15173:31;;;:::i;:::-;;;;-1:-1:-1;;;;;15173:31:0;;;;;;;;;;;;;;17051:449;;;;;;;;;;;;;;;;-1:-1:-1;;;;;17051:449:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;17051:449:0;;-1:-1:-1;17051:449:0;-1:-1:-1;17051:449:0;:::i;14932:112::-;14978:66;14932:112;:::o;17804:314::-;17931:33;17951:12;:10;:12::i;:::-;17931:19;:33::i;:::-;17976:18;17996:14;18014:25;18035:3;18014:20;:25::i;:::-;17975:64;;-1:-1:-1;17975:64:0;-1:-1:-1;18050:60:0;-1:-1:-1;;;;;18050:40:0;;17975:64;;18050:40;:60::i;:::-;17804:314;;;;;:::o;15173:31::-;;;-1:-1:-1;;;;;15173:31:0;;:::o;17051:449::-;17234:33;17254:12;:10;:12::i;17234:33::-;17278:14;17306:11;;17295:34;;;;;;;;;;-1:-1:-1;17345:58:0;;;17295:34;;17345:58;;;;;17295:34;;-1:-1:-1;;;;;;17345:58:0;;;;;;;;;;;;;;;;;17295:34;17345:58;;;17414:78;-1:-1:-1;;;;;17414:44:0;;17459:9;17478:4;17485:6;17414:44;:78::i;:::-;17051:449;;;;;;:::o;4318:106::-;4406:10;4318:106;:::o;15436:142::-;15526:16;;-1:-1:-1;;;;;15515:27:0;;;15526:16;;15515:27;15507:63;;;;;-1:-1:-1;;;15507:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;15436:142;:::o;15586:583::-;15657:18;15677:14;15704:37;15744:24;:15;:3;:13;:15::i;:::-;:22;:24::i;:::-;15704:64;;15779:42;15824:22;:10;15835:1;15824:13;;;;;;;;;;;;;;:20;:22::i;:::-;15779:67;;14978:66;15931:19;;15899:27;:15;15915:1;15899:18;;;;;;;;;;;;;;:25;:27::i;:::-;15891:59;15869:160;;;;;-1:-1:-1;;;15869:160:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;16042:20;16065:23;:10;16076:1;16065:13;;;;;;;;;;;;;;:21;:23::i;:::-;16042:46;;16133:7;16122:39;;;;;;;;;;;;;;;-1:-1:-1;16122:39:0;;;;;;;;;;;-1:-1:-1;15586:583:0;-1:-1:-1;;;;;15586:583:0:o;1919:229::-;2081:58;;;-1:-1:-1;;;;;2081:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2104:23;2081:58;;;2046:94;;2074:5;;2046:27;:94::i;:::-;1919:229;;;:::o;2156:266::-;2345:68;;;-1:-1:-1;;;;;2345:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2368:27;2345:68;;;2310:104;;2338:5;;2310:27;:104::i;:::-;2156:266;;;;:::o;6863:298::-;6924:14;;:::i;:::-;6973:1;6959:4;:11;:15;6951:59;;;;;-1:-1:-1;;;6951:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7125:28:0;;;;;;;;;7133:11;;7125:28;;7090:4;7080:15;;;7125:28;;;;6863:298;;;;:::o;7232:683::-;7292:16;7329:12;7336:4;7329:6;:12::i;:::-;7321:43;;;;;-1:-1:-1;;;7321:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;7377:13;7393:14;7402:4;7393:8;:14::i;:::-;7377:30;;7418:23;7458:5;7444:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;7418:46;;7475:18;7496:24;7508:4;:11;;;7496;:24::i;:::-;7553:8;;7475:45;;-1:-1:-1;7539:22:0;;7531:60;;;;;-1:-1:-1;;;7531:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;7604:14;7635:27;7650:4;:11;;;7635:14;:27::i;:::-;7621:11;;;;:41;;-1:-1:-1;7673:15:0;;7699:183;7723:5;7719:1;:9;7699:183;;;7760:19;7772:6;7760:11;:19::i;:::-;7750:29;;7806:24;;;;;;;;7814:7;7806:24;;;;7823:6;7806:24;;;7794:6;7801:1;7794:9;;;;;;;;;;;;;;;;;:36;7854:16;;;;7730:3;;7699:183;;;-1:-1:-1;7901:6:0;;7232:683;-1:-1:-1;;;;;;7232:683:0:o;9019:760::-;9079:7;9108:12;9115:4;9108:6;:12::i;:::-;9107:13;9099:52;;;;;-1:-1:-1;;;9099:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;9170:8;;9182:2;-1:-1:-1;9170:14:0;9162:48;;;;;-1:-1:-1;;;9162:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;9223:18;9244:24;9256:4;:11;;;9244;:24::i;:::-;9301:8;;9223:45;;-1:-1:-1;9287:22:0;;9279:57;;;;;-1:-1:-1;;;9279:57:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;9349:14;9366:27;9381:4;:11;;;9366:14;:27::i;:::-;9418:8;;9488:11;;;;;:20;;9553:13;;9349:44;;-1:-1:-1;9418:17:0;;;;;9553:13;9488:20;9644:11;;9641:2;;;9714:3;9710:2;9706:12;9701:3;9697:22;9689:6;9685:35;9675:45;;9641:2;-1:-1:-1;9765:6:0;9019:760;-1:-1:-1;;;;;9019:760:0:o;10299:547::-;10360:12;10385:18;10406:24;10418:4;:11;;;10406;:24::i;:::-;10463:8;;10385:45;;-1:-1:-1;10449:22:0;;10441:58;;;;;-1:-1:-1;;;10441:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;10510:14;10527:27;10542:4;:11;;;10527:14;:27::i;:::-;10581:8;;10510:44;;-1:-1:-1;10581:17:0;;;10567:11;10581:17;10646:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10646:14:0;;10624:36;;10673:15;10744:6;10738:4;10734:17;10723:28;;10774:40;10793:6;10779:4;:11;;;:20;10801:7;10810:3;10774:4;:40::i;2675:892::-;2801:5;2826:19;-1:-1:-1;;;;;2826:17:0;;;:19::i;:::-;2818:58;;;;;-1:-1:-1;;;2818:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2950:12;2964:17;2985:6;-1:-1:-1;;;;;2985:11:0;2997:8;2985:21;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2985:21:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2949:57;;;;3021:7;3017:543;;;3049:11;;:16;3045:124;;3105:4;3094:24;;;;;;;;;;;;;;;-1:-1:-1;3094:24:0;3086:67;;;;;-1:-1:-1;;;3086:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;3017:543;;;3260:11;;3256:97;;3297:40;;;-1:-1:-1;;;3297:40:0;;;;;;;;;;;;;;;;;;;;;;;;;;;3256:97;3484:4;3478:11;3529:4;3522;3518:2;3514:13;3507:27;8022:289;8138:11;;;;8201:13;;8082:4;;8193:22;;;;6619:4;8242:25;;8238:43;;;8276:5;8269:12;;;;;;8238:43;-1:-1:-1;8299:4:0;;8022:289;-1:-1:-1;;;8022:289:0:o;10961:643::-;11022:7;11217:13;11233:1;11217:17;;11245:15;11277:27;11292:4;:11;;;11277:14;:27::i;:::-;11263:11;;;;11346:8;;11263:41;;;;-1:-1:-1;11332:22:0;11365:207;11382:6;11372:7;:16;11365:207;;;11425:20;11437:7;11425:11;:20::i;:::-;11415:7;:30;11405:40;;11500:6;11489:7;:17;;11481:57;;;;;-1:-1:-1;;;11481:57:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;11553:7;;;;;11365:207;;;-1:-1:-1;11591:5:0;;10961:643;-1:-1:-1;;;10961:643:0:o;11656:1268::-;11826:13;;11715:7;;;;11818:22;;6510:4;11867:27;;11863:1027;;;11906:1;11896:11;;11863:1027;;;6565:4;11927:26;;11923:967;;;11965:31;;;;-1:-1:-1;11923:967:0;;;6619:4;12016:25;;12012:878;;;12112:4;12105:5;12101:16;12192:1;12184:6;12180:14;12170:24;;12334:7;12330:2;12326:16;12321:3;12317:26;12308:6;12302:13;12298:46;12432:1;12423:7;12419:15;12410:7;12406:29;12395:40;;;;12067:383;;;6672:4;12471:24;;12467:423;;;12522:29;;;;-1:-1:-1;12467:423:0;;;12638:4;12631:5;12627:16;12683:1;12675:6;12671:14;12661:24;;12756:7;12752:2;12748:16;12743:3;12739:26;12730:6;12724:13;12720:46;12861:1;12852:7;12848:15;12839:7;12835:29;12824:40;;;;12593:286;-1:-1:-1;12909:7:0;11656:1268;-1:-1:-1;;11656:1268:0:o;12979:540::-;13126:13;;13041:7;;13118:22;;6510:4;13167:27;;13163:348;;;13203:1;13196:8;;;;;13163:348;6565:4;13224:26;;;:86;;-1:-1:-1;6619:4:0;13255:26;;;;;:54;;-1:-1:-1;6672:4:0;13285:24;;13255:54;13220:291;;;13319:1;13312:8;;;;;13220:291;6619:4;13340:25;;13336:175;;;13418:36;;;-1:-1:-1;13411:43:0;;13336:175;13477:34;;;-1:-1:-1;13470:41:0;;13684:766;13800:8;13796:21;;13810:7;;13796:21;13877:205;6719:2;13884:17;;13877:205;;13978:10;;13965:24;;6719:2;14020:17;;;;14052:18;;;;-1:-1:-1;;13903:17:0;13877:205;;;14271:10;;14343:11;;6719:2;14196:16;;;;14190:3;:23;:27;;14283:9;;14267:26;;;14339:22;;14410:21;;;;14397:35;;14237:206::o;1106:387::-;1429:20;1477:8;;;1106:387::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;:::o

Swarm Source

ipfs://8a6717ce2769ab75fd9c5d5a44947c6a3679f343e41bc251fba416d7a301e369

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
[ 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.