Contract 0x401f6c983ea34274ec46f84d70b31c151321188b

 
Ad
Ad
Txn Hash Method
Block
From
To
Value
0x1f5f96c63cdb6a050f48c44e0dc5163b574f2a7b5dc4b41310e278c806838600Deposit ERC20For...(pending)2021-05-11 9:05:281 hr 27 mins ago0xa1024c1ceca2336e5ab2bd467f4392ffc90af090 IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0xd8b6c4b9f8205359f5342804063b5e93cd6c002a3bf43023dcbdcf04b5270c39Deposit ERC20For...(pending)2021-05-11 8:24:362 hrs 8 mins ago0xb62cb1c0efe0a2cb5a3cb424307a398acdbbd1f4 IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0x4939547b5876bafc0eaee8731da8f7c1579800c8147391852da2618774786258Deposit ERC20For...(pending)2021-05-11 7:04:583 hrs 28 mins ago0x8416bb7a8f1cf99ad0d40df66cef458953e44310 IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0x20762a668616a239efcc1f87bcf50375d911f61a2038f926aa976faf99e0cddbDeposit ERC20For...(pending)2021-05-11 5:29:075 hrs 3 mins ago0xe0b4bfaea4ce41d50449e7e3f8d3a53ffe8005c2 IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0x4ea7538a7170ee03e2f284faff972c33f703402a9d9f1ade3449f4053e3cea32Deposit ERC20For...(pending)2021-05-10 19:56:1314 hrs 36 mins ago0xcbcfee45741396fd1ba795b24cb0cfc996461c99 IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0x7f9a022d02072f89436685378f30d017ba5a2ab2424316c92c4add5fe4c89528Deposit ERC20For...(pending)2021-05-10 10:04:381 day 28 mins ago0x36c32c14a458370c597286d7d61c6ef01bcf9889 IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0x1050987abe754349f74782c17f28c07b048bae406c15af4472cb4c9341a15a7fDeposit ERC20For...(pending)2021-05-10 9:33:201 day 59 mins ago0xc40b69e8dbba3b055e906f7ca1905968edc99483 IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0xdad02f9fa3639707418878a1beb32ecc6749fce5e0b85d81ad5e5bcab80bd371Deposit ERC20For...(pending)2021-05-10 9:10:361 day 1 hr ago0xf8418fc94ccaccc4fa79f172bd094e25c36f1d03 IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0x036156681ff09282945371eb5e754ad978fc87c8da360b7b3b9a44fe13244575Deposit ERC20For...(pending)2021-05-10 9:10:321 day 1 hr ago0xd548365ac4919f4539df2af936749e217e79b5e1 IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0x8d15324451c80b26455dd87793a16d91bbcfb6a5dbbe1504a8817e7653ac508bDeposit ERC20For...(pending)2021-05-10 9:10:131 day 1 hr ago0x9c5a010c9aa910f382a68fdbf7228e2b5a133955 IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0x1ea202d5e483dc091e8f0f58558eade911f24da58da1699cc595bc969e73f083Deposit ERC20For...(pending)2021-05-10 9:10:121 day 1 hr ago0x9691a0bd067367531082972832fda7e3ed1cc075 IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0xd433b2ed9f0bad3671f17677b7c7c71faafc28cb817f7d70daa72371666fc002Deposit ERC20For...(pending)2021-05-10 9:10:041 day 1 hr ago0x6fb0d585744bed76288b6ed0be69682afbc5342f IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0x401b0c3dbe0a7f03541e102f685e16318e279731fe43d89af2cd44d3d06b37b3Deposit ERC20For...(pending)2021-05-10 9:10:021 day 1 hr ago0x6591a04beafec9c75f1399c3747904ef753c42ce IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0x6d236eb60abb58a02970980c556dd23b2e2e205322ea8c59f55d6c2c94b59160Deposit ERC20For...(pending)2021-05-10 9:10:011 day 1 hr ago0x621f589b3faa786058a93ab0ccd5de4ab7f0a114 IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0xb3c2dee4ea67f3289ad81d3e9607fdd7db21afea27635f10c1cb7e07b4d99491Deposit ERC20For...(pending)2021-05-10 9:09:471 day 1 hr ago0x22df6737b09d388685b4faba9b3949bf4c93081c IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0xfdcb739c01d78541ac92fb027f6e3e1eae48933aee5165f057e9ac6c51c862b0Deposit ERC20For...(pending)2021-05-10 9:09:421 day 1 hr ago0x0d85a27c4dbc279eabbb3595c200753135e322bb IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0x80fc70b08d7b8774f0ec0b30a0dcd1ed3fbc80411f220a8460885597cc474d69Deposit ERC20For...(pending)2021-05-10 3:26:261 day 7 hrs ago0x667255bb0709d36f99a12565ab78569c62d3c6da IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0xcd93a2dd0be94a691b7c43e4df2622830ac002c36c585001dce741afd68c308eDeposit ERC20For...(pending)2021-05-09 18:10:421 day 16 hrs ago0xdf2164023bde79e632130919d203501de0122177 IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0xb541cdda972ca8788e12953df7b801ece9ab262693ca255bc5ff4e336eb782f6Deposit ERC20For...(pending)2021-05-09 1:14:302 days 9 hrs ago0xa34039f6a8efc7bc921d2212727df3571f9a0dee IN 0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether(Pending)(Pending)
0x702a8d4236dc4eb05fec5d180951157598de98bc56a428e39a22865b1d6c7881Deposit ERC20For...124126162021-05-11 10:29:083 mins ago0x73678b7b1701914fd393b446f3b4ce77a91272ad IN  0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether0.031300875202225.000001459
0x3dd5566a3686d42b27a537a0d4b8d7cb680a3facc04bd922319b1eca794c8495Deposit ERC20For...124125812021-05-11 10:22:1510 mins ago0x91312f706f16e97f19fdad73c4a78287830acfa6 IN  0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether0.035477385255
0xb165601b9360ef29ba438368eacaa5e0e1c2e132d79029a50e0963643deecce1Deposit ERC20For...124125712021-05-11 10:19:5113 mins ago0x27552b6daa98401a93160a5686572fb2ba0b3356 IN  0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether0.03894884280
0xf355ecd2279447efd94f8e16d493351a2a715d910908bf0bf68c8d389243ee3eDeposit ERC20For...124125562021-05-11 10:16:1516 mins ago0x520204b956d39da972cb27c0e7d0476132fb454c IN  0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether0.028796805156207.000001123
0xde63cfa72bb7dd34cb3618ae60c4caae70185ec49ffa818665dd5a4633b48169Deposit ERC20For...124125022021-05-11 10:06:0326 mins ago0x75f3e763f5308cb471b4619e1daf757d097d1571 IN  0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether0.0306053220
0x69b14c067855977fbf87f1bce8b8f7e2037dc0f6f272a38545893d0e55080757Deposit ERC20For...124124982021-05-11 10:05:5027 mins ago0x39b7f0fb892b79419d1c181028cbb8b59c21010f IN  0x401f6c983ea34274ec46f84d70b31c151321188b0 Ether0.032419387203233.000001459
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x7e6dc9ef273785551fa0afafcac30e6f9ba3e31ae407bd2c6fb476e93f52946d123703182021-05-04 21:53:056 days 12 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.02452045 Ether
0x644a91ddeba713e0b7ef3cefa241dc5627a62865c45488b390afd01acd096619123688652021-05-04 16:33:456 days 17 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.01369514 Ether
0x38e309bee65b612905d8f6729fdc9e8700e2dd955fa55d2eb3146f5292dbda78123609452021-05-03 11:25:187 days 23 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.10119046180504256 Ether
0x6c2669e25b8affc1abf5fd0d3fe68d3d40f7a9dd48937612fd7996a5e1b4b961123597072021-05-03 6:55:048 days 3 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.011 Ether
0x5a33d3d4a4e2c4199caf2d09656000559c24b438f9236adc4bc1700454506dfa123562002021-05-02 17:52:068 days 16 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.00001 Ether
0xb08c743efe367c86e758c7e1bb0131b0359b8b15a7cfc5df3b3680fa165a2302123558522021-05-02 16:35:168 days 17 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.01667385 Ether
0x0ec24a91b4735ed8e4c1276bc111a270d985c1f05be7ce7ce3de75e4f9641112123556102021-05-02 15:39:198 days 18 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.005 Ether
0x5ecc13040df88329b95c4a55f084229eb5b175e8bd8cf811513d13215902275e123398232021-04-30 4:54:4511 days 5 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.02 Ether
0xfddd778398dd895e422d3d38b5e4d4d93951233061139fd7d9dbc734527cdb52123265012021-04-28 3:31:3413 days 7 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.02 Ether
0x595d49dc146e10071e5a2701122b6f3dddf2177a81948758cb846c4b3dcd461b123247922021-04-27 21:08:2313 days 13 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.045 Ether
0xdf8ae9219912f105a1a6fcf7299a23a4f8f3a60a018a9e671a6393581b84f0e9122816912021-04-21 5:23:0020 days 5 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.02 Ether
0x7ff138d3c7b87411632f60f17bd47f86243db853f72f116f3f163fde3b241dac122546342021-04-17 1:22:2924 days 9 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.01254534 Ether
0x2090ebb945a5fb3b217431b120f3b636aaddda183a148e5b19aeb524bf10650c121587442021-04-02 7:26:5739 days 3 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.055 Ether
0x8938a1cf2950f1dbd24caa3552c4f238dd188e7ea7b87903160b91c24131b8eb121319722021-03-29 4:30:5243 days 6 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.02 Ether
0xd5ad2834aa8b7915da9660e19045e27b5cfd375b0186d18045c6f2fc55fea0cd121318312021-03-29 4:01:4743 days 6 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.02 Ether
0x606bc332d0a6049d71548b3c63d794c4718cee027cd55febfaa3794869e6c7b8121288162021-03-28 16:50:4243 days 17 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.00001 Ether
0xb648d311b8de4ba6f7f72569adde36e16510922b951caff906838ef6fcb27055121203332021-03-27 9:32:4245 days 1 hr ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.01873287 Ether
0xf5d19909eb967ab94db857492dcb00b75996f161cecb830f13ef19eb510b5c0f120954252021-03-23 13:29:1448 days 21 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.88 Ether
0x7d601550bc37cf6e55f14cd0314d83faeb2d55e89526628bf054492d2ff48b25120953982021-03-23 13:23:4348 days 21 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde81.973546864 Ether
0x2dac6ea33ad0869a81286166b932798425fc23370252482ae474120ca6f2688c120905842021-03-22 19:43:4849 days 14 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde82.498649073342016 Ether
0xe3d52fc1130e9959a53d7834b079831b88e5b4c1287678aac647ec0f6fcff674120885562021-03-22 12:13:1549 days 22 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.28340105209988349 Ether
0x48f75253d07ba61e31ea77bafe02fcab11f656f3a29c2ed4dc7e42f659da0f18120845812021-03-21 21:27:3750 days 13 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde81 Ether
0x3f7089031f91aa640538ff72b8df99a02f471cf7a4f4ceafd26bc326d454f61b120836452021-03-21 17:56:5650 days 16 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.056 Ether
0xac962650094a1d8ee875f1c212e4b90f6cc02d59e7b21660e39b3ed536965492120828332021-03-21 15:05:4750 days 19 hrs ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde80.470141705275636432 Ether
0xb0b474beabad22052d4dd79b32bf664d34e36fbecaf5a6601a070244f4dabebb120811482021-03-21 8:54:1751 days 1 hr ago 0x401f6c983ea34274ec46f84d70b31c151321188b 0xa45b966996374e9e65ab991c6fe4bfce3a56dde81.2 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DepositManagerProxy

Compiler Version
v0.5.11+commit.c082d0b4

Optimization Enabled:
Yes with 200 runs

Other Settings:
constantinople EvmVersion, GNU GPLv2 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-05-31
*/

// File: contracts/common/governance/IGovernance.sol

pragma solidity ^0.5.2;

interface IGovernance {
    function update(address target, bytes calldata data) external;
}

// File: contracts/common/governance/Governable.sol

pragma solidity ^0.5.2;


contract Governable {
    IGovernance public governance;

    constructor(address _governance) public {
        governance = IGovernance(_governance);
    }

    modifier onlyGovernance() {
        require(
            msg.sender == address(governance),
            "Only governance contract is authorized"
        );
        _;
    }
}

// File: contracts/root/withdrawManager/IWithdrawManager.sol

pragma solidity ^0.5.2;

contract IWithdrawManager {
    function createExitQueue(address token) external;

    function verifyInclusion(
        bytes calldata data,
        uint8 offset,
        bool verifyTxInclusion
    ) external view returns (uint256 age);

    function addExitToQueue(
        address exitor,
        address childToken,
        address rootToken,
        uint256 exitAmountOrTokenId,
        bytes32 txHash,
        bool isRegularExit,
        uint256 priority
    ) external;

    function addInput(
        uint256 exitId,
        uint256 age,
        address utxoOwner,
        address token
    ) external;

    function challengeExit(
        uint256 exitId,
        uint256 inputId,
        bytes calldata challengeData,
        address adjudicatorPredicate
    ) external;
}

// File: contracts/common/Registry.sol

pragma solidity ^0.5.2;




contract Registry is Governable {
    // @todo hardcode constants
    bytes32 private constant WETH_TOKEN = keccak256("wethToken");
    bytes32 private constant DEPOSIT_MANAGER = keccak256("depositManager");
    bytes32 private constant STAKE_MANAGER = keccak256("stakeManager");
    bytes32 private constant VALIDATOR_SHARE = keccak256("validatorShare");
    bytes32 private constant WITHDRAW_MANAGER = keccak256("withdrawManager");
    bytes32 private constant CHILD_CHAIN = keccak256("childChain");
    bytes32 private constant STATE_SENDER = keccak256("stateSender");
    bytes32 private constant SLASHING_MANAGER = keccak256("slashingManager");

    address public erc20Predicate;
    address public erc721Predicate;

    mapping(bytes32 => address) public contractMap;
    mapping(address => address) public rootToChildToken;
    mapping(address => address) public childToRootToken;
    mapping(address => bool) public proofValidatorContracts;
    mapping(address => bool) public isERC721;

    enum Type {Invalid, ERC20, ERC721, Custom}
    struct Predicate {
        Type _type;
    }
    mapping(address => Predicate) public predicates;

    event TokenMapped(address indexed rootToken, address indexed childToken);
    event ProofValidatorAdded(address indexed validator, address indexed from);
    event ProofValidatorRemoved(address indexed validator, address indexed from);
    event PredicateAdded(address indexed predicate, address indexed from);
    event PredicateRemoved(address indexed predicate, address indexed from);
    event ContractMapUpdated(bytes32 indexed key, address indexed previousContract, address indexed newContract);

    constructor(address _governance) public Governable(_governance) {}

    function updateContractMap(bytes32 _key, address _address) external onlyGovernance {
        emit ContractMapUpdated(_key, contractMap[_key], _address);
        contractMap[_key] = _address;
    }

    /**
     * @dev Map root token to child token
     * @param _rootToken Token address on the root chain
     * @param _childToken Token address on the child chain
     * @param _isERC721 Is the token being mapped ERC721
     */
    function mapToken(
        address _rootToken,
        address _childToken,
        bool _isERC721
    ) external onlyGovernance {
        require(_rootToken != address(0x0) && _childToken != address(0x0), "INVALID_TOKEN_ADDRESS");
        rootToChildToken[_rootToken] = _childToken;
        childToRootToken[_childToken] = _rootToken;
        isERC721[_rootToken] = _isERC721;
        IWithdrawManager(contractMap[WITHDRAW_MANAGER]).createExitQueue(_rootToken);
        emit TokenMapped(_rootToken, _childToken);
    }

    function addErc20Predicate(address predicate) public onlyGovernance {
        require(predicate != address(0x0), "Can not add null address as predicate");
        erc20Predicate = predicate;
        addPredicate(predicate, Type.ERC20);
    }

    function addErc721Predicate(address predicate) public onlyGovernance {
        erc721Predicate = predicate;
        addPredicate(predicate, Type.ERC721);
    }

    function addPredicate(address predicate, Type _type) public onlyGovernance {
        require(predicates[predicate]._type == Type.Invalid, "Predicate already added");
        predicates[predicate]._type = _type;
        emit PredicateAdded(predicate, msg.sender);
    }

    function removePredicate(address predicate) public onlyGovernance {
        require(predicates[predicate]._type != Type.Invalid, "Predicate does not exist");
        delete predicates[predicate];
        emit PredicateRemoved(predicate, msg.sender);
    }

    function getValidatorShareAddress() public view returns (address) {
        return contractMap[VALIDATOR_SHARE];
    }

    function getWethTokenAddress() public view returns (address) {
        return contractMap[WETH_TOKEN];
    }

    function getDepositManagerAddress() public view returns (address) {
        return contractMap[DEPOSIT_MANAGER];
    }

    function getStakeManagerAddress() public view returns (address) {
        return contractMap[STAKE_MANAGER];
    }

    function getSlashingManagerAddress() public view returns (address) {
        return contractMap[SLASHING_MANAGER];
    }

    function getWithdrawManagerAddress() public view returns (address) {
        return contractMap[WITHDRAW_MANAGER];
    }

    function getChildChainAndStateSender() public view returns (address, address) {
        return (contractMap[CHILD_CHAIN], contractMap[STATE_SENDER]);
    }

    function isTokenMapped(address _token) public view returns (bool) {
        return rootToChildToken[_token] != address(0x0);
    }

    function isTokenMappedAndIsErc721(address _token) public view returns (bool) {
        require(isTokenMapped(_token), "TOKEN_NOT_MAPPED");
        return isERC721[_token];
    }

    function isTokenMappedAndGetPredicate(address _token) public view returns (address) {
        if (isTokenMappedAndIsErc721(_token)) {
            return erc721Predicate;
        }
        return erc20Predicate;
    }

    function isChildTokenErc721(address childToken) public view returns (bool) {
        address rootToken = childToRootToken[childToken];
        require(rootToken != address(0x0), "Child token is not mapped");
        return isERC721[rootToken];
    }
}

// File: solidity-rlp/contracts/RLPReader.sol

/*
* @author Hamdi Allam [email protected]
* Please reach out with any questions or concerns
*/
pragma solidity ^0.5.0;

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 {
        uint len;
        uint memPtr;
    }

    struct Iterator {
        RLPItem item;   // Item that's being iterated over.
        uint nextPtr;   // Position of the next item in the list.
    }

    /*
    * @dev Returns the next element in the iteration. Reverts if it has not next element.
    * @param self The iterator.
    * @return The next element in the iteration.
    */
    function next(Iterator memory self) internal pure returns (RLPItem memory) {
        require(hasNext(self));

        uint ptr = self.nextPtr;
        uint itemLength = _itemLength(ptr);
        self.nextPtr = ptr + itemLength;

        return RLPItem(itemLength, ptr);
    }

    /*
    * @dev Returns true if the iteration has more elements.
    * @param self The iterator.
    * @return true if the iteration has more elements.
    */
    function hasNext(Iterator memory self) internal pure returns (bool) {
        RLPItem memory item = self.item;
        return self.nextPtr < item.memPtr + item.len;
    }

    /*
    * @param item RLP encoded bytes
    */
    function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) {
        uint memPtr;
        assembly {
            memPtr := add(item, 0x20)
        }

        return RLPItem(item.length, memPtr);
    }

    /*
    * @dev Create an iterator. Reverts if item is not a list.
    * @param self The RLP item.
    * @return An 'Iterator' over the item.
    */
    function iterator(RLPItem memory self) internal pure returns (Iterator memory) {
        require(isList(self));

        uint ptr = self.memPtr + _payloadOffset(self.memPtr);
        return Iterator(self, ptr);
    }

    /*
    * @param item RLP encoded bytes
    */
    function rlpLen(RLPItem memory item) internal pure returns (uint) {
        return item.len;
    }

    /*
    * @param item RLP encoded bytes
    */
    function payloadLen(RLPItem memory item) internal pure returns (uint) {
        return item.len - _payloadOffset(item.memPtr);
    }

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

        uint items = numItems(item);
        RLPItem[] memory result = new RLPItem[](items);

        uint memPtr = item.memPtr + _payloadOffset(item.memPtr);
        uint dataLen;
        for (uint 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) {
        if (item.len == 0) return false;

        uint8 byte0;
        uint 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);
        if (result.length == 0) return result;
        
        uint ptr;
        assembly {
            ptr := add(0x20, result)
        }

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

    // any non-zero byte is considered true
    function toBoolean(RLPItem memory item) internal pure returns (bool) {
        require(item.len == 1);
        uint result;
        uint memPtr = item.memPtr;
        assembly {
            result := byte(0, mload(memPtr))
        }

        return result == 0 ? false : true;
    }

    function toAddress(RLPItem memory item) internal pure returns (address) {
        // 1 byte for the length prefix
        require(item.len == 21);

        return address(toUint(item));
    }

    function toUint(RLPItem memory item) internal pure returns (uint) {
        require(item.len > 0 && item.len <= 33);

        uint offset = _payloadOffset(item.memPtr);
        uint len = item.len - offset;

        uint result;
        uint 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 (uint) {
        // one byte prefix
        require(item.len == 33);

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

        return result;
    }

    function toBytes(RLPItem memory item) internal pure returns (bytes memory) {
        require(item.len > 0);

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

        uint 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 (uint) {
        if (item.len == 0) return 0;

        uint count = 0;
        uint currPtr = item.memPtr + _payloadOffset(item.memPtr);
        uint endPtr = item.memPtr + item.len;
        while (currPtr < endPtr) {
           currPtr = currPtr + _itemLength(currPtr); // skip over an item
           count++;
        }

        return count;
    }

    // @return entire rlp item byte length
    function _itemLength(uint memPtr) private pure returns (uint) {
        uint itemLen;
        uint 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(uint memPtr) private pure returns (uint) {
        uint 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(uint src, uint dest, uint 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
        uint 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: openzeppelin-solidity/contracts/math/SafeMath.sol

pragma solidity ^0.5.2;

/**
 * @title SafeMath
 * @dev Unsigned math operations with safety checks that revert on error
 */
library SafeMath {
    /**
     * @dev Multiplies two unsigned integers, reverts on overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b);

        return c;
    }

    /**
     * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Adds two unsigned integers, reverts on overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a);

        return c;
    }

    /**
     * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
     * reverts when dividing by zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0);
        return a % b;
    }
}

// File: openzeppelin-solidity/contracts/ownership/Ownable.sol

pragma solidity ^0.5.2;

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev The Ownable constructor sets the original `owner` of the contract to the sender
     * account.
     */
    constructor () internal {
        _owner = msg.sender;
        emit OwnershipTransferred(address(0), _owner);
    }

    /**
     * @return the address of the owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner());
        _;
    }

    /**
     * @return true if `msg.sender` is the owner of the contract.
     */
    function isOwner() public view returns (bool) {
        return msg.sender == _owner;
    }

    /**
     * @dev Allows the current owner to relinquish control of the contract.
     * It will not be possible to call the functions with the `onlyOwner`
     * modifier anymore.
     * @notice Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Allows the current owner to transfer control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0));
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// File: contracts/common/misc/ProxyStorage.sol

pragma solidity ^0.5.2;


contract ProxyStorage is Ownable {
    address internal proxyTo;
}

// File: contracts/common/mixin/ChainIdMixin.sol

pragma solidity ^0.5.2;

contract ChainIdMixin {
  bytes constant public networkId = hex"89";
  uint256 constant public CHAINID = 137;
}

// File: contracts/root/RootChainStorage.sol

pragma solidity ^0.5.2;





contract RootChainHeader {
    event NewHeaderBlock(
        address indexed proposer,
        uint256 indexed headerBlockId,
        uint256 indexed reward,
        uint256 start,
        uint256 end,
        bytes32 root
    );
    // housekeeping event
    event ResetHeaderBlock(address indexed proposer, uint256 indexed headerBlockId);
    struct HeaderBlock {
        bytes32 root;
        uint256 start;
        uint256 end;
        uint256 createdAt;
        address proposer;
    }
}


contract RootChainStorage is ProxyStorage, RootChainHeader, ChainIdMixin {
    bytes32 public heimdallId;
    uint8 public constant VOTE_TYPE = 2;

    uint16 internal constant MAX_DEPOSITS = 10000;
    uint256 public _nextHeaderBlock = MAX_DEPOSITS;
    uint256 internal _blockDepositId = 1;
    mapping(uint256 => HeaderBlock) public headerBlocks;
    Registry internal registry;
}

// File: contracts/staking/stakeManager/IStakeManager.sol

pragma solidity ^0.5.2;


contract IStakeManager {
    // validator replacement
    function startAuction(uint256 validatorId, uint256 amount) external;

    function confirmAuctionBid(
        uint256 validatorId,
        uint256 heimdallFee,
        bool acceptDelegation,
        bytes calldata signerPubkey
    ) external;

    function transferFunds(
        uint256 validatorId,
        uint256 amount,
        address delegator
    ) external returns (bool);

    function delegationDeposit(
        uint256 validatorId,
        uint256 amount,
        address delegator
    ) external returns (bool);

    function stake(
        uint256 amount,
        uint256 heimdallFee,
        bool acceptDelegation,
        bytes calldata signerPubkey
    ) external;

    function unstake(uint256 validatorId) external;

    function totalStakedFor(address addr) external view returns (uint256);

    function supportsHistory() external pure returns (bool);

    function stakeFor(
        address user,
        uint256 amount,
        uint256 heimdallFee,
        bool acceptDelegation,
        bytes memory signerPubkey
    ) public;

    function checkSignatures(
        uint256 blockInterval,
        bytes32 voteHash,
        bytes32 stateRoot,
        address proposer,
        bytes memory sigs
    ) public returns (uint256);

    function updateValidatorState(uint256 validatorId, int256 amount) public;

    function ownerOf(uint256 tokenId) public view returns (address);

    function slash(bytes memory slashingInfoList) public returns (uint256);

    function validatorStake(uint256 validatorId) public view returns (uint256);

    function epoch() public view returns (uint256);

    function withdrawalDelay() public view returns (uint256);
}

// File: contracts/root/IRootChain.sol

pragma solidity ^0.5.2;


interface IRootChain {
    function slash() external;

    function submitHeaderBlock(bytes calldata data, bytes calldata sigs)
        external;

    function getLastChildBlock() external view returns (uint256);

    function currentHeaderBlock() external view returns (uint256);
}

// File: contracts/root/RootChain.sol

pragma solidity ^0.5.2;








contract RootChain is RootChainStorage, IRootChain {
    using SafeMath for uint256;
    using RLPReader for bytes;
    using RLPReader for RLPReader.RLPItem;

    modifier onlyDepositManager() {
        require(msg.sender == registry.getDepositManagerAddress(), "UNAUTHORIZED_DEPOSIT_MANAGER_ONLY");
        _;
    }

    function submitHeaderBlock(bytes calldata data, bytes calldata sigs) external {
        (address proposer, uint256 start, uint256 end, bytes32 rootHash, bytes32 accountHash, uint256 _borChainID) = abi
            .decode(data, (address, uint256, uint256, bytes32, bytes32, uint256));
        require(CHAINID == _borChainID, "Invalid bor chain id");

        require(_buildHeaderBlock(proposer, start, end, rootHash), "INCORRECT_HEADER_DATA");

        // check if it is better to keep it in local storage instead
        IStakeManager stakeManager = IStakeManager(registry.getStakeManagerAddress());
        uint256 _reward = stakeManager.checkSignatures(
            end.sub(start).add(1),
            /**  
                prefix 01 to data 
                01 represents positive vote on data and 00 is negative vote
                malicious validator can try to send 2/3 on negative vote so 01 is appended
             */
            keccak256(abi.encodePacked(bytes(hex"01"), data)),
            accountHash,
            proposer,
            sigs
        );

        require(_reward != 0, "Invalid checkpoint");
        emit NewHeaderBlock(proposer, _nextHeaderBlock, _reward, start, end, rootHash);
        _nextHeaderBlock = _nextHeaderBlock.add(MAX_DEPOSITS);
        _blockDepositId = 1;
    }

    function updateDepositId(uint256 numDeposits) external onlyDepositManager returns (uint256 depositId) {
        depositId = currentHeaderBlock().add(_blockDepositId);
        // deposit ids will be (_blockDepositId, _blockDepositId + 1, .... _blockDepositId + numDeposits - 1)
        _blockDepositId = _blockDepositId.add(numDeposits);
        require(
            // Since _blockDepositId is initialized to 1; only (MAX_DEPOSITS - 1) deposits per header block are allowed
            _blockDepositId <= MAX_DEPOSITS,
            "TOO_MANY_DEPOSITS"
        );
    }

    function getLastChildBlock() external view returns (uint256) {
        return headerBlocks[currentHeaderBlock()].end;
    }

    function slash() external {
        //TODO: future implementation
    }

    function currentHeaderBlock() public view returns (uint256) {
        return _nextHeaderBlock.sub(MAX_DEPOSITS);
    }

    function _buildHeaderBlock(
        address proposer,
        uint256 start,
        uint256 end,
        bytes32 rootHash
    ) private returns (bool) {
        uint256 nextChildBlock;
        /*
    The ID of the 1st header block is MAX_DEPOSITS.
    if _nextHeaderBlock == MAX_DEPOSITS, then the first header block is yet to be submitted, hence nextChildBlock = 0
    */
        if (_nextHeaderBlock > MAX_DEPOSITS) {
            nextChildBlock = headerBlocks[currentHeaderBlock()].end + 1;
        }
        if (nextChildBlock != start) {
            return false;
        }

        HeaderBlock memory headerBlock = HeaderBlock({
            root: rootHash,
            start: nextChildBlock,
            end: end,
            createdAt: now,
            proposer: proposer
        });

        headerBlocks[_nextHeaderBlock] = headerBlock;
        return true;
    }

    // Housekeeping function. @todo remove later
    function setNextHeaderBlock(uint256 _value) public onlyOwner {
        require(_value % MAX_DEPOSITS == 0, "Invalid value");
        for (uint256 i = _value; i < _nextHeaderBlock; i += MAX_DEPOSITS) {
            delete headerBlocks[i];
        }
        _nextHeaderBlock = _value;
        _blockDepositId = 1;
        emit ResetHeaderBlock(msg.sender, _nextHeaderBlock);
    }

    // Housekeeping function. @todo remove later
    function setHeimdallId(string memory _heimdallId) public onlyOwner {
        heimdallId = keccak256(abi.encodePacked(_heimdallId));
    }
}

// File: contracts/root/stateSyncer/StateSender.sol

pragma solidity ^0.5.2;



contract StateSender is Ownable {
    using SafeMath for uint256;

    uint256 public counter;
    mapping(address => address) public registrations;

    event NewRegistration(
        address indexed user,
        address indexed sender,
        address indexed receiver
    );
    event RegistrationUpdated(
        address indexed user,
        address indexed sender,
        address indexed receiver
    );
    event StateSynced(
        uint256 indexed id,
        address indexed contractAddress,
        bytes data
    );

    modifier onlyRegistered(address receiver) {
        require(registrations[receiver] == msg.sender, "Invalid sender");
        _;
    }

    function syncState(address receiver, bytes calldata data)
        external
        onlyRegistered(receiver)
    {
        counter = counter.add(1);
        emit StateSynced(counter, receiver, data);
    }

    // register new contract for state sync
    function register(address sender, address receiver) public {
        require(
            isOwner() || registrations[receiver] == msg.sender,
            "StateSender.register: Not authorized to register"
        );
        registrations[receiver] = sender;
        if (registrations[receiver] == address(0)) {
            emit NewRegistration(msg.sender, sender, receiver);
        } else {
            emit RegistrationUpdated(msg.sender, sender, receiver);
        }
    }
}

// File: contracts/common/mixin/Lockable.sol

pragma solidity ^0.5.2;


contract Lockable is Governable {
    bool public locked;

    modifier onlyWhenUnlocked() {
        require(!locked, "Is Locked");
        _;
    }

    constructor(address _governance) public Governable(_governance) {}

    function lock() external onlyGovernance {
        locked = true;
    }

    function unlock() external onlyGovernance {
        locked = false;
    }
}

// File: contracts/root/depositManager/DepositManagerStorage.sol

pragma solidity ^0.5.2;







contract DepositManagerHeader {
    event NewDepositBlock(address indexed owner, address indexed token, uint256 amountOrNFTId, uint256 depositBlockId);
    event MaxErc20DepositUpdate(uint256 indexed oldLimit, uint256 indexed newLimit);

    struct DepositBlock {
        bytes32 depositHash;
        uint256 createdAt;
    }
}


contract DepositManagerStorage is ProxyStorage, Lockable, DepositManagerHeader {
    Registry public registry;
    RootChain public rootChain;
    StateSender public stateSender;

    mapping(uint256 => DepositBlock) public deposits;

    address public childChain;
    uint256 public maxErc20Deposit = 100 * (10**18);
}

// File: contracts/common/misc/ERCProxy.sol

/*
 * SPDX-License-Identitifer:    MIT
 */

pragma solidity ^0.5.2;

// See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-897.md

interface ERCProxy {
    function proxyType() external pure returns (uint256 proxyTypeId);
    function implementation() external view returns (address codeAddr);
}

// File: contracts/common/misc/DelegateProxy.sol

pragma solidity ^0.5.2;



contract DelegateProxy is ERCProxy {
    function proxyType() external pure returns (uint256 proxyTypeId) {
        // Upgradeable proxy
        proxyTypeId = 2;
    }

    function implementation() external view returns (address);

    function delegatedFwd(address _dst, bytes memory _calldata) internal {
        // solium-disable-next-line security/no-inline-assembly
        assembly {
            let result := delegatecall(
                sub(gas, 10000),
                _dst,
                add(_calldata, 0x20),
                mload(_calldata),
                0,
                0
            )
            let size := returndatasize

            let ptr := mload(0x40)
            returndatacopy(ptr, 0, size)

            // revert instead of invalid() bc if the underlying call failed with invalid() it already wasted gas.
            // if the call returned error data, forward it
            switch result
                case 0 {
                    revert(ptr, size)
                }
                default {
                    return(ptr, size)
                }
        }
    }
}

// File: contracts/common/misc/Proxy.sol

pragma solidity ^0.5.2;




contract Proxy is ProxyStorage, DelegateProxy {
    event ProxyUpdated(address indexed _new, address indexed _old);
    event OwnerUpdate(address _prevOwner, address _newOwner);

    constructor(address _proxyTo) public {
        updateImplementation(_proxyTo);
    }

    function() external payable {
        // require(currentContract != 0, "If app code has not been set yet, do not call");
        // Todo: filter out some calls or handle in the end fallback
        delegatedFwd(proxyTo, msg.data);
    }

    function implementation() external view returns (address) {
        return proxyTo;
    }

    function updateImplementation(address _newProxyTo) public onlyOwner {
        require(_newProxyTo != address(0x0), "INVALID_PROXY_ADDRESS");
        require(isContract(_newProxyTo), "DESTINATION_ADDRESS_IS_NOT_A_CONTRACT");
        emit ProxyUpdated(_newProxyTo, proxyTo);
        proxyTo = _newProxyTo;
    }

    function isContract(address _target) internal view returns (bool) {
        if (_target == address(0)) {
            return false;
        }

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

// File: contracts/root/depositManager/DepositManagerProxy.sol

pragma solidity ^0.5.2;






contract DepositManagerProxy is Proxy, DepositManagerStorage {
    constructor(
        address _proxyTo,
        address _registry,
        address _rootChain,
        address _governance
    ) public Proxy(_proxyTo) Lockable(_governance) {
        registry = Registry(_registry);
        rootChain = RootChain(_rootChain);
    }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"internalType":"address","name":"_newProxyTo","type":"address"}],"name":"updateImplementation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"childChain","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"proxyType","outputs":[{"internalType":"uint256","name":"proxyTypeId","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"governance","outputs":[{"internalType":"contract IGovernance","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"registry","outputs":[{"internalType":"contract Registry","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rootChain","outputs":[{"internalType":"contract RootChain","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unlock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"deposits","outputs":[{"internalType":"bytes32","name":"depositHash","type":"bytes32"},{"internalType":"uint256","name":"createdAt","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stateSender","outputs":[{"internalType":"contract StateSender","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"locked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxErc20Deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"lock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_proxyTo","type":"address"},{"internalType":"address","name":"_registry","type":"address"},{"internalType":"address","name":"_rootChain","type":"address"},{"internalType":"address","name":"_governance","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOrNFTId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"depositBlockId","type":"uint256"}],"name":"NewDepositBlock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldLimit","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newLimit","type":"uint256"}],"name":"MaxErc20DepositUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_new","type":"address"},{"indexed":true,"internalType":"address","name":"_old","type":"address"}],"name":"ProxyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_prevOwner","type":"address"},{"indexed":false,"internalType":"address","name":"_newOwner","type":"address"}],"name":"OwnerUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

608060405268056bc75e2d6310000060085534801561001d57600080fd5b50604051610a2f380380610a2f8339818101604052608081101561004057600080fd5b5080516020820151604080840151606090940151600080546001600160a01b031916331780825592519495939491928392839288926001600160a01b0316917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36100b6816001600160e01b036100ff16565b50600280546001600160a01b03199081166001600160a01b0393841617909155600380548216968316969096179095556004805490951693169290921790925550610286915050565b6101106001600160e01b0361025216565b61011957600080fd5b6001600160a01b03811661018e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f494e56414c49445f50524f58595f414444524553530000000000000000000000604482015290519081900360640190fd5b6101a0816001600160e01b0361026316565b6101f5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180610a0a6025913960400191505060405180910390fd5b6001546040516001600160a01b03918216918316907fd32d24edea94f55e932d9a008afc425a8561462d1b1f57bc6e508e9a6b9509e190600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331490565b60006001600160a01b03821661027b57506000610281565b50803b15155b919050565b610775806102956000396000f3fe6080604052600436106100fe5760003560e01c80638f32d59b11610095578063cb10f94c11610064578063cb10f94c146102d4578063cf309012146102e9578063e7af7ba1146102fe578063f2fde38b14610313578063f83d08ba14610346576100fe565b80638f32d59b1461023e578063987ab9db14610267578063a69df4b51461027c578063b02c43d014610291576100fe565b80635c60da1b116100d15780635c60da1b146101ea578063715018a6146101ff5780637b103999146102145780638da5cb5b14610229576100fe565b8063025b22bc1461014a57806342fc47fb1461017d5780634555d5c9146101ae5780635aa6e675146101d5575b60015460408051602036601f8101829004820283018201909352828252610148936001600160a01b0316926000918190840183828082843760009201919091525061035b92505050565b005b34801561015657600080fd5b506101486004803603602081101561016d57600080fd5b50356001600160a01b0316610383565b34801561018957600080fd5b50610192610488565b604080516001600160a01b039092168252519081900360200190f35b3480156101ba57600080fd5b506101c3610497565b60408051918252519081900360200190f35b3480156101e157600080fd5b5061019261049c565b3480156101f657600080fd5b506101926104ab565b34801561020b57600080fd5b506101486104ba565b34801561022057600080fd5b50610192610515565b34801561023557600080fd5b50610192610524565b34801561024a57600080fd5b50610253610533565b604080519115158252519081900360200190f35b34801561027357600080fd5b50610192610544565b34801561028857600080fd5b50610148610553565b34801561029d57600080fd5b506102bb600480360360208110156102b457600080fd5b50356105ab565b6040805192835260208301919091528051918290030190f35b3480156102e057600080fd5b506101926105c4565b3480156102f557600080fd5b506102536105d3565b34801561030a57600080fd5b506101c36105e3565b34801561031f57600080fd5b506101486004803603602081101561033657600080fd5b50356001600160a01b03166105e9565b34801561035257600080fd5b50610148610606565b600080825160208401856127105a03f43d604051816000823e82801561037f578282f35b8282fd5b61038b610533565b61039457600080fd5b6001600160a01b0381166103e7576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f50524f58595f4144445245535360581b604482015290519081900360640190fd5b6103f081610664565b61042b5760405162461bcd60e51b81526004018080602001828103825260258152602001806106f66025913960400191505060405180910390fd5b6001546040516001600160a01b03918216918316907fd32d24edea94f55e932d9a008afc425a8561462d1b1f57bc6e508e9a6b9509e190600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6007546001600160a01b031681565b600290565b6002546001600160a01b031681565b6001546001600160a01b031690565b6104c2610533565b6104cb57600080fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6003546001600160a01b031681565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b6004546001600160a01b031681565b6002546001600160a01b0316331461059c5760405162461bcd60e51b815260040180806020018281038252602681526020018061071b6026913960400191505060405180910390fd5b6002805460ff60a01b19169055565b6006602052600090815260409020805460019091015482565b6005546001600160a01b031681565b600254600160a01b900460ff1681565b60085481565b6105f1610533565b6105fa57600080fd5b61060381610687565b50565b6002546001600160a01b0316331461064f5760405162461bcd60e51b815260040180806020018281038252602681526020018061071b6026913960400191505060405180910390fd5b6002805460ff60a01b1916600160a01b179055565b60006001600160a01b03821661067c57506000610682565b50803b15155b919050565b6001600160a01b03811661069a57600080fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b039290921691909117905556fe44455354494e4154494f4e5f414444524553535f49535f4e4f545f415f434f4e54524143544f6e6c7920676f7665726e616e636520636f6e747261637420697320617574686f72697a6564a265627a7a723158204e22673a649d3492096222588aa27dfd0c56e19f89115cbb72492f5046e6d60b64736f6c634300050b003244455354494e4154494f4e5f414444524553535f49535f4e4f545f415f434f4e5452414354000000000000000000000000d505c3822c787d51d5c2b1ae9adb943b2304eb2300000000000000000000000033a02e6cc863d393d6bf231b697b82f6e499ca7100000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c2870000000000000000000000006e7a5820bad6ceba8ef5ea69c0c92ebbdac9ce48

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

000000000000000000000000d505c3822c787d51d5c2b1ae9adb943b2304eb2300000000000000000000000033a02e6cc863d393d6bf231b697b82f6e499ca7100000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c2870000000000000000000000006e7a5820bad6ceba8ef5ea69c0c92ebbdac9ce48

-----Decoded View---------------
Arg [0] : _proxyTo (address): 0xd505c3822c787d51d5c2b1ae9adb943b2304eb23
Arg [1] : _registry (address): 0x33a02e6cc863d393d6bf231b697b82f6e499ca71
Arg [2] : _rootChain (address): 0x86e4dc95c7fbdbf52e33d563bbdb00823894c287
Arg [3] : _governance (address): 0x6e7a5820bad6ceba8ef5ea69c0c92ebbdac9ce48

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000d505c3822c787d51d5c2b1ae9adb943b2304eb23
Arg [1] : 00000000000000000000000033a02e6cc863d393d6bf231b697b82f6e499ca71
Arg [2] : 00000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287
Arg [3] : 0000000000000000000000006e7a5820bad6ceba8ef5ea69c0c92ebbdac9ce48


Deployed ByteCode Sourcemap

34299:342:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33460:7;;33447:31;;;;33469:8;33447:31;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;33460:7:0;;-1:-1:-1;;33469:8:0;;33447:31;;-1:-1:-1;33469:8:0;;-1:-1:-1;33447:31:0;1:33:-1;99:1;81:16;;74:27;;;;-1:-1;33447:12:0;;-1:-1:-1;;;33447:31:0:i;:::-;34299:342;33593:314;;8:9:-1;5:2;;;30:1;27;20:12;5:2;33593:314:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;33593:314:0;-1:-1:-1;;;;;33593:314:0;;:::i;31210:25::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;31210:25:0;;;:::i;:::-;;;;-1:-1:-1;;;;;31210:25:0;;;;;;;;;;;;;;31786:129;;8:9:-1;5:2;;;30:1;27;20:12;5:2;31786:129:0;;;:::i;:::-;;;;;;;;;;;;;;;;292:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;292:29:0;;;:::i;33494:91::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;33494:91:0;;;:::i;19902:140::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;19902:140:0;;;:::i;31050:24::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;31050:24:0;;;:::i;19112:79::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;19112:79:0;;;:::i;19447:92::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;19447:92:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;31081:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;31081:26:0;;;:::i;30434:75::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;30434:75:0;;;:::i;31153:48::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;31153:48:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31153:48:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;31114:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;31114:30:0;;;:::i;30157:18::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;30157:18:0;;;:::i;31242:47::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;31242:47:0;;;:::i;20219:109::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;20219:109:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;20219:109:0;-1:-1:-1;;;;;20219:109:0;;:::i;30354:72::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;30354:72:0;;;:::i;31989:892::-;32354:1;32334;32305:9;32299:16;32275:4;32264:9;32260:20;32237:4;32212:5;32207:3;32203:15;32172:198;32396:14;32443:4;32437:11;32485:4;32482:1;32477:3;32462:28;32688:6;32712:66;;;;32839:4;32834:3;32827:17;32712:66;32754:4;32749:3;32742:17;33593:314;19324:9;:7;:9::i;:::-;19316:18;;;;;;-1:-1:-1;;;;;33680:27:0;;33672:61;;;;;-1:-1:-1;;;33672:61:0;;;;;;;;;;;;-1:-1:-1;;;33672:61:0;;;;;;;;;;;;;;;33752:23;33763:11;33752:10;:23::i;:::-;33744:73;;;;-1:-1:-1;;;33744:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33859:7;;33833:34;;-1:-1:-1;;;;;33859:7:0;;;;33833:34;;;;;33859:7;;33833:34;33878:7;:21;;-1:-1:-1;;;;;;33878:21:0;-1:-1:-1;;;;;33878:21:0;;;;;;;;;;33593:314::o;31210:25::-;;;-1:-1:-1;;;;;31210:25:0;;:::o;31786:129::-;31906:1;;31786:129::o;292:29::-;;;-1:-1:-1;;;;;292:29:0;;:::o;33494:91::-;33570:7;;-1:-1:-1;;;;;33570:7:0;33494:91;:::o;19902:140::-;19324:9;:7;:9::i;:::-;19316:18;;;;;;20001:1;19985:6;;19964:40;;-1:-1:-1;;;;;19985:6:0;;;;19964:40;;20001:1;;19964:40;20032:1;20015:19;;-1:-1:-1;;;;;;20015:19:0;;;19902:140::o;31050:24::-;;;-1:-1:-1;;;;;31050:24:0;;:::o;19112:79::-;19150:7;19177:6;-1:-1:-1;;;;;19177:6:0;19112:79;:::o;19447:92::-;19487:4;19525:6;-1:-1:-1;;;;;19525:6:0;19511:10;:20;;19447:92::o;31081:26::-;;;-1:-1:-1;;;;;31081:26:0;;:::o;30434:75::-;515:10;;-1:-1:-1;;;;;515:10:0;493;:33;471:121;;;;-1:-1:-1;;;471:121:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30487:6;:14;;-1:-1:-1;;;;30487:14:0;;;30434:75::o;31153:48::-;;;;;;;;;;;;;;;;;;;:::o;31114:30::-;;;-1:-1:-1;;;;;31114:30:0;;:::o;30157:18::-;;;-1:-1:-1;;;30157:18:0;;;;;:::o;31242:47::-;;;;:::o;20219:109::-;19324:9;:7;:9::i;:::-;19316:18;;;;;;20292:28;20311:8;20292:18;:28::i;:::-;20219:109;:::o;30354:72::-;515:10;;-1:-1:-1;;;;;515:10:0;493;:33;471:121;;;;-1:-1:-1;;;471:121:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30405:6;:13;;-1:-1:-1;;;;30405:13:0;-1:-1:-1;;;30405:13:0;;;30354:72::o;33915:274::-;33975:4;-1:-1:-1;;;;;33996:21:0;;33992:66;;-1:-1:-1;34041:5:0;34034:12;;33992:66;-1:-1:-1;34125:20:0;;34173:8;;33915:274;;;;:::o;20478:187::-;-1:-1:-1;;;;;20552:22:0;;20544:31;;;;;;20612:6;;;20591:38;;-1:-1:-1;;;;;20591:38:0;;;;20612:6;;;20591:38;;;20640:6;:17;;-1:-1:-1;;;;;;20640:17:0;-1:-1:-1;;;;;20640:17:0;;;;;;;;;;20478:187::o

Swarm Source

bzzr://4e22673a649d3492096222588aa27dfd0c56e19f89115cbb72492f5046e6d60b
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.