ETH Price: $3,296.07 (-1.32%)

Contract

0x6BFaD42cFC4EfC96f529D786D643Ff4A8B89FA52
 
Transaction Hash
Method
Block
From
To
Deposit To Near214629842024-12-23 5:04:471 hr ago1734930287IN
0x6BFaD42c...A8B89FA52
0.0001 ETH0.000138654.91810654
Deposit To Near214622302024-12-23 2:32:473 hrs ago1734921167IN
0x6BFaD42c...A8B89FA52
0.2 ETH0.000179616.37073338
Withdraw214616202024-12-23 0:30:115 hrs ago1734913811IN
0x6BFaD42c...A8B89FA52
0 ETH0.001626755.74368845
Deposit To Near214606872024-12-22 21:21:358 hrs ago1734902495IN
0x6BFaD42c...A8B89FA52
0.0365 ETH0.000192537.03079973
Deposit To Near214598592024-12-22 18:34:5911 hrs ago1734892499IN
0x6BFaD42c...A8B89FA52
2 ETH0.000191846.78353991
Deposit To Near214590532024-12-22 15:52:4714 hrs ago1734882767IN
0x6BFaD42c...A8B89FA52
0.02 ETH0.00024368.64078561
Deposit To Near214586782024-12-22 14:37:2315 hrs ago1734878243IN
0x6BFaD42c...A8B89FA52
0.00151106 ETH0.0003169811.24331793
Deposit To Near214585742024-12-22 14:16:2316 hrs ago1734876983IN
0x6BFaD42c...A8B89FA52
0.0001 ETH0.000206947.34035571
Deposit To Near214581892024-12-22 12:59:1117 hrs ago1734872351IN
0x6BFaD42c...A8B89FA52
0.0005 ETH0.000193276.85553664
Deposit To Near214578692024-12-22 11:54:3518 hrs ago1734868475IN
0x6BFaD42c...A8B89FA52
0.0006 ETH0.00020277.18987664
Deposit To Near214573732024-12-22 10:14:4720 hrs ago1734862487IN
0x6BFaD42c...A8B89FA52
0.0001 ETH0.0002848410.10339931
Withdraw214567732024-12-22 8:13:5922 hrs ago1734855239IN
0x6BFaD42c...A8B89FA52
0 ETH0.001514735.17449302
Withdraw214564882024-12-22 7:16:5923 hrs ago1734851819IN
0x6BFaD42c...A8B89FA52
0 ETH0.001350714.61402808
Deposit To Near214564042024-12-22 7:00:1123 hrs ago1734850811IN
0x6BFaD42c...A8B89FA52
0.001 ETH0.000153725.45246436
Deposit To Near214558612024-12-22 5:10:5925 hrs ago1734844259IN
0x6BFaD42c...A8B89FA52
1.82 ETH0.000187196.8625908
Withdraw214551752024-12-22 2:52:5927 hrs ago1734835979IN
0x6BFaD42c...A8B89FA52
0 ETH0.00163725.59234047
Withdraw214549712024-12-22 2:11:5928 hrs ago1734833519IN
0x6BFaD42c...A8B89FA52
0 ETH0.001447795
Withdraw214543352024-12-22 0:04:1130 hrs ago1734825851IN
0x6BFaD42c...A8B89FA52
0 ETH0.002204437.69840573
Deposit To Near214532532024-12-21 20:25:2333 hrs ago1734812723IN
0x6BFaD42c...A8B89FA52
0.00063 ETH0.00020227.17205139
Deposit To Near214531062024-12-21 19:55:4734 hrs ago1734810947IN
0x6BFaD42c...A8B89FA52
0.5 ETH0.000186316.83054784
Deposit To Near214530782024-12-21 19:50:1134 hrs ago1734810611IN
0x6BFaD42c...A8B89FA52
0.00425 ETH0.000228368.1
Deposit To Near214529922024-12-21 19:32:4734 hrs ago1734809567IN
0x6BFaD42c...A8B89FA52
0.002 ETH0.000254729.03495481
Deposit To Near214527812024-12-21 18:50:1135 hrs ago1734807011IN
0x6BFaD42c...A8B89FA52
0.00028807 ETH0.0003115911.05215852
Withdraw214525962024-12-21 18:12:3536 hrs ago1734804755IN
0x6BFaD42c...A8B89FA52
0 ETH0.001920346.57286586
Deposit To Near214522882024-12-21 17:10:2337 hrs ago1734801023IN
0x6BFaD42c...A8B89FA52
0.0003 ETH0.000265389.41332904
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
214616202024-12-23 0:30:115 hrs ago1734913811
0x6BFaD42c...A8B89FA52
0.0099 ETH
214567732024-12-22 8:13:5922 hrs ago1734855239
0x6BFaD42c...A8B89FA52
0.00755 ETH
214564882024-12-22 7:16:5923 hrs ago1734851819
0x6BFaD42c...A8B89FA52
0.00976237 ETH
214551752024-12-22 2:52:5927 hrs ago1734835979
0x6BFaD42c...A8B89FA52
0.04575 ETH
214549712024-12-22 2:11:5928 hrs ago1734833519
0x6BFaD42c...A8B89FA52
0.02266479 ETH
214543352024-12-22 0:04:1130 hrs ago1734825851
0x6BFaD42c...A8B89FA52
0.66 ETH
214525962024-12-21 18:12:3536 hrs ago1734804755
0x6BFaD42c...A8B89FA52
0.036 ETH
214498722024-12-21 9:05:2345 hrs ago1734771923
0x6BFaD42c...A8B89FA52
0.086 ETH
214482342024-12-21 3:34:472 days ago1734752087
0x6BFaD42c...A8B89FA52
0.4648 ETH
214467032024-12-20 22:25:232 days ago1734733523
0x6BFaD42c...A8B89FA52
0.00681 ETH
214455292024-12-20 18:29:592 days ago1734719399
0x6BFaD42c...A8B89FA52
0.625 ETH
214442172024-12-20 14:06:112 days ago1734703571
0x6BFaD42c...A8B89FA52
3.59733362 ETH
214360412024-12-19 10:42:473 days ago1734604967
0x6BFaD42c...A8B89FA52
0.02491478 ETH
214294842024-12-18 12:41:594 days ago1734525719
0x6BFaD42c...A8B89FA52
0.5806 ETH
214279202024-12-18 7:26:474 days ago1734506807
0x6BFaD42c...A8B89FA52
0.0997 ETH
214269082024-12-18 4:03:355 days ago1734494615
0x6BFaD42c...A8B89FA52
0.38357076 ETH
214235042024-12-17 16:39:115 days ago1734453551
0x6BFaD42c...A8B89FA52
2.75 ETH
214219442024-12-17 11:25:355 days ago1734434735
0x6BFaD42c...A8B89FA52
0.0211 ETH
214209872024-12-17 8:13:115 days ago1734423191
0x6BFaD42c...A8B89FA52
0.4338 ETH
214190452024-12-17 1:43:476 days ago1734399827
0x6BFaD42c...A8B89FA52
4.1143 ETH
214188372024-12-17 1:01:596 days ago1734397319
0x6BFaD42c...A8B89FA52
0.0055 ETH
214170842024-12-16 19:10:236 days ago1734376223
0x6BFaD42c...A8B89FA52
25 ETH
214156812024-12-16 14:29:116 days ago1734359351
0x6BFaD42c...A8B89FA52
0.04267 ETH
214140602024-12-16 9:03:476 days ago1734339827
0x6BFaD42c...A8B89FA52
33 ETH
214127112024-12-16 4:32:117 days ago1734323531
0x6BFaD42c...A8B89FA52
0.095 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EthCustodian

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 8 : EthCustodian.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.6.12;

import 'rainbow-bridge/contracts/eth/nearbridge/contracts/AdminControlled.sol';
import 'rainbow-bridge/contracts/eth/nearbridge/contracts/Borsh.sol';
import 'rainbow-bridge/contracts/eth/nearprover/contracts/ProofDecoder.sol';
import { INearProver, ProofKeeper } from './ProofKeeper.sol';

contract EthCustodian is ProofKeeper, AdminControlled {

    uint constant UNPAUSED_ALL = 0;
    uint constant PAUSED_DEPOSIT_TO_EVM = 1 << 0;
    uint constant PAUSED_DEPOSIT_TO_NEAR = 1 << 1;
    uint constant PAUSED_WITHDRAW = 1 << 2;

    event Deposited (
        address indexed sender,
        string recipient,
        uint256 amount,
        uint256 fee
    );

    event Withdrawn(
        address indexed recipient,
        uint128 amount
    );

    // Function output from burning nETH on Near side.
    struct BurnResult {
        uint128 amount;
        address recipient;
        address ethCustodian;
    }

    /// EthCustodian is linked to the EVM on NEAR side.
    /// It also links to the prover that it uses to withdraw the tokens.
    constructor(
        bytes memory nearEvm,
        INearProver prover,
        uint64 minBlockAcceptanceHeight,
        address _admin,
        uint pausedFlags
    )
        AdminControlled(_admin, pausedFlags)
        ProofKeeper(nearEvm, prover, minBlockAcceptanceHeight)
        public
    {
    }

    /// Deposits the specified amount of provided ETH (except from the relayer's fee) into the smart contract.
    /// `ethRecipientOnNear` - the ETH address of the recipient in NEAR EVM
    /// `fee` - the amount of fee that will be paid to the near-relayer in nETH.
    function depositToEVM(
        string memory ethRecipientOnNear, 
        uint256 fee
    )
        external
        payable
        pausable(PAUSED_DEPOSIT_TO_EVM)
    {
        require(
            fee < msg.value,
            'The fee cannot be bigger than the transferred amount.'
        );

        string memory separator = ':';
        string memory protocolMessage = string(
            abi.encodePacked(
                string(nearProofProducerAccount_),
                separator, ethRecipientOnNear
            )
        );

        emit Deposited(
            msg.sender, 
            protocolMessage, 
            msg.value, 
            fee
        );
    }

    /// Deposits the specified amount of provided ETH (except from the relayer's fee) into the smart contract.
    /// `nearRecipientAccountId` - the AccountID of the recipient in NEAR
    /// `fee` - the amount of fee that will be paid to the near-relayer in nETH.
    function depositToNear(
        string memory nearRecipientAccountId, 
        uint256 fee
    )
        external
        payable
        pausable(PAUSED_DEPOSIT_TO_NEAR)
    {
        require(
            fee < msg.value,
            'The fee cannot be bigger than the transferred amount.'
        );

        emit Deposited(
            msg.sender, 
            nearRecipientAccountId, 
            msg.value, 
            fee
        );
    }

    /// Withdraws the appropriate amount of ETH which is encoded in `proofData`
    function withdraw(
        bytes calldata proofData, 
        uint64 proofBlockHeight
    )
        external
        pausable(PAUSED_WITHDRAW)
    {
        ProofDecoder.ExecutionStatus memory status = _parseAndConsumeProof(proofData, proofBlockHeight);

        BurnResult memory result = _decodeBurnResult(status.successValue);
        require(
            result.ethCustodian == address(this),
            'Can only withdraw coins that were expected for the current contract'
        );
        payable(result.recipient).transfer(result.amount);
        emit Withdrawn(
            result.recipient,
            result.amount
        );
    }

    function _decodeBurnResult(bytes memory data)
        internal
        pure
        returns (BurnResult memory result)
    {
        Borsh.Data memory borshData = Borsh.from(data);
        result.amount = borshData.decodeU128();
        bytes20 recipient = borshData.decodeBytes20();
        result.recipient = address(uint160(recipient));
        bytes20 ethCustodian = borshData.decodeBytes20();
        result.ethCustodian = address(uint160(ethCustodian));
    }
}

File 2 of 8 : AdminControlled.sol
pragma solidity ^0.6;

contract AdminControlled {
    address public admin;
    uint public paused;

    constructor(address _admin, uint flags) public {
        admin = _admin;
        paused = flags;
    }

    modifier onlyAdmin {
        require(msg.sender == admin);
        _;
    }

    modifier pausable(uint flag) {
        require((paused & flag) == 0 || msg.sender == admin);
        _;
    }

    function adminPause(uint flags) public onlyAdmin {
        paused = flags;
    }

    function adminSstore(uint key, uint value) public onlyAdmin {
        assembly {
            sstore(key, value)
        }
    }

    function adminSstoreWithMask(
        uint key,
        uint value,
        uint mask
    ) public onlyAdmin {
        assembly {
            let oldval := sload(key)
            sstore(key, xor(and(xor(value, oldval), mask), oldval))
        }
    }

    function adminSendEth(address payable destination, uint amount) public onlyAdmin {
        destination.transfer(amount);
    }

    function adminReceiveEth() public payable onlyAdmin {}

    function adminDelegatecall(address target, bytes memory data) public payable onlyAdmin returns (bytes memory) {
        (bool success, bytes memory rdata) = target.delegatecall(data);
        require(success);
        return rdata;
    }
}

File 3 of 8 : Borsh.sol
pragma solidity ^0.6;

import "@openzeppelin/contracts/math/SafeMath.sol";

library Borsh {
    using SafeMath for uint256;

    struct Data {
        uint256 offset;
        bytes raw;
    }

    function from(bytes memory data) internal pure returns (Data memory) {
        return Data({offset: 0, raw: data});
    }

    modifier shift(Data memory data, uint256 size) {
        require(data.raw.length >= data.offset + size, "Borsh: Out of range");
        _;
        data.offset += size;
    }

    function finished(Data memory data) internal pure returns (bool) {
        return data.offset == data.raw.length;
    }

    function peekKeccak256(Data memory data, uint256 length) internal pure returns (bytes32 res) {
        return bytesKeccak256(data.raw, data.offset, length);
    }

    function bytesKeccak256(
        bytes memory ptr,
        uint256 offset,
        uint256 length
    ) internal pure returns (bytes32 res) {
        // solium-disable-next-line security/no-inline-assembly
        assembly {
            res := keccak256(add(add(ptr, 32), offset), length)
        }
    }

    function peekSha256(Data memory data, uint256 length) internal view returns (bytes32) {
        return bytesSha256(data.raw, data.offset, length);
    }

    function bytesSha256(
        bytes memory ptr,
        uint256 offset,
        uint256 length
    ) internal view returns (bytes32) {
        bytes32[1] memory result;
        // solium-disable-next-line security/no-inline-assembly
        assembly {
            pop(staticcall(gas(), 0x02, add(add(ptr, 32), offset), length, result, 32))
        }
        return result[0];
    }

    function decodeU8(Data memory data) internal pure shift(data, 1) returns (uint8 value) {
        value = uint8(data.raw[data.offset]);
    }

    function decodeI8(Data memory data) internal pure shift(data, 1) returns (int8 value) {
        value = int8(data.raw[data.offset]);
    }

    function decodeU16(Data memory data) internal pure returns (uint16 value) {
        value = uint16(decodeU8(data));
        value |= (uint16(decodeU8(data)) << 8);
    }

    function decodeI16(Data memory data) internal pure returns (int16 value) {
        value = int16(decodeI8(data));
        value |= (int16(decodeI8(data)) << 8);
    }

    function decodeU32(Data memory data) internal pure returns (uint32 value) {
        value = uint32(decodeU16(data));
        value |= (uint32(decodeU16(data)) << 16);
    }

    function decodeI32(Data memory data) internal pure returns (int32 value) {
        value = int32(decodeI16(data));
        value |= (int32(decodeI16(data)) << 16);
    }

    function decodeU64(Data memory data) internal pure returns (uint64 value) {
        value = uint64(decodeU32(data));
        value |= (uint64(decodeU32(data)) << 32);
    }

    function decodeI64(Data memory data) internal pure returns (int64 value) {
        value = int64(decodeI32(data));
        value |= (int64(decodeI32(data)) << 32);
    }

    function decodeU128(Data memory data) internal pure returns (uint128 value) {
        value = uint128(decodeU64(data));
        value |= (uint128(decodeU64(data)) << 64);
    }

    function decodeI128(Data memory data) internal pure returns (int128 value) {
        value = int128(decodeI64(data));
        value |= (int128(decodeI64(data)) << 64);
    }

    function decodeU256(Data memory data) internal pure returns (uint256 value) {
        value = uint256(decodeU128(data));
        value |= (uint256(decodeU128(data)) << 128);
    }

    function decodeI256(Data memory data) internal pure returns (int256 value) {
        value = int256(decodeI128(data));
        value |= (int256(decodeI128(data)) << 128);
    }

    function decodeBool(Data memory data) internal pure returns (bool value) {
        value = (decodeU8(data) != 0);
    }

    function decodeBytes(Data memory data) internal pure returns (bytes memory value) {
        value = new bytes(decodeU32(data));
        for (uint i = 0; i < value.length; i++) {
            value[i] = byte(decodeU8(data));
        }
    }

    function decodeBytes32(Data memory data) internal pure shift(data, 32) returns (bytes32 value) {
        bytes memory raw = data.raw;
        uint256 offset = data.offset;
        // solium-disable-next-line security/no-inline-assembly
        assembly {
            value := mload(add(add(raw, 32), offset))
        }
    }

    function decodeBytes20(Data memory data) internal pure returns (bytes20 value) {
        for (uint i = 0; i < 20; i++) {
            value |= bytes20(byte(decodeU8(data)) & 0xFF) >> (i * 8);
        }
    }

    // Public key

    struct SECP256K1PublicKey {
        uint256 x;
        uint256 y;
    }

    function decodeSECP256K1PublicKey(Borsh.Data memory data) internal pure returns (SECP256K1PublicKey memory key) {
        key.x = decodeU256(data);
        key.y = decodeU256(data);
    }

    struct ED25519PublicKey {
        bytes32 xy;
    }

    function decodeED25519PublicKey(Borsh.Data memory data) internal pure returns (ED25519PublicKey memory key) {
        key.xy = decodeBytes32(data);
    }

    // Signature

    struct SECP256K1Signature {
        bytes32 r;
        bytes32 s;
        uint8 v;
    }

    function decodeSECP256K1Signature(Borsh.Data memory data) internal pure returns (SECP256K1Signature memory sig) {
        sig.r = decodeBytes32(data);
        sig.s = decodeBytes32(data);
        sig.v = decodeU8(data);
    }

    struct ED25519Signature {
        bytes32[2] rs;
    }

    function decodeED25519Signature(Borsh.Data memory data) internal pure returns (ED25519Signature memory sig) {
        sig.rs[0] = decodeBytes32(data);
        sig.rs[1] = decodeBytes32(data);
    }
}

File 4 of 8 : ProofDecoder.sol
pragma solidity ^0.6;

import "../../nearbridge/contracts/Borsh.sol";
import "../../nearbridge/contracts/NearDecoder.sol";

library ProofDecoder {
    using Borsh for Borsh.Data;
    using ProofDecoder for Borsh.Data;
    using NearDecoder for Borsh.Data;

    struct FullOutcomeProof {
        ExecutionOutcomeWithIdAndProof outcome_proof;
        MerklePath outcome_root_proof; // TODO: now empty array
        BlockHeaderLight block_header_lite;
        MerklePath block_proof;
    }

    function decodeFullOutcomeProof(Borsh.Data memory data) internal view returns (FullOutcomeProof memory proof) {
        proof.outcome_proof = data.decodeExecutionOutcomeWithIdAndProof();
        proof.outcome_root_proof = data.decodeMerklePath();
        proof.block_header_lite = data.decodeBlockHeaderLight();
        proof.block_proof = data.decodeMerklePath();
    }

    struct BlockHeaderLight {
        bytes32 prev_block_hash;
        bytes32 inner_rest_hash;
        NearDecoder.BlockHeaderInnerLite inner_lite;
        bytes32 hash; // Computable
    }

    function decodeBlockHeaderLight(Borsh.Data memory data) internal view returns (BlockHeaderLight memory header) {
        header.prev_block_hash = data.decodeBytes32();
        header.inner_rest_hash = data.decodeBytes32();
        header.inner_lite = data.decodeBlockHeaderInnerLite();

        header.hash = sha256(
            abi.encodePacked(
                sha256(abi.encodePacked(header.inner_lite.hash, header.inner_rest_hash)),
                header.prev_block_hash
            )
        );
    }

    struct ExecutionStatus {
        uint8 enumIndex;
        bool unknown;
        bool failed;
        bytes successValue; /// The final action succeeded and returned some value or an empty vec.
        bytes32 successReceiptId; /// The final action of the receipt returned a promise or the signed
        /// transaction was converted to a receipt. Contains the receipt_id of the generated receipt.
    }

    function decodeExecutionStatus(Borsh.Data memory data)
        internal
        pure
        returns (ExecutionStatus memory executionStatus)
    {
        executionStatus.enumIndex = data.decodeU8();
        if (executionStatus.enumIndex == 0) {
            executionStatus.unknown = true;
        } else if (executionStatus.enumIndex == 1) {
            //revert("NearDecoder: decodeExecutionStatus failure case not implemented yet");
            // Can avoid revert since ExecutionStatus is latest field in all parent structures
            executionStatus.failed = true;
        } else if (executionStatus.enumIndex == 2) {
            executionStatus.successValue = data.decodeBytes();
        } else if (executionStatus.enumIndex == 3) {
            executionStatus.successReceiptId = data.decodeBytes32();
        } else {
            revert("NearDecoder: decodeExecutionStatus index out of range");
        }
    }

    struct ExecutionOutcome {
        bytes[] logs; /// Logs from this transaction or receipt.
        bytes32[] receipt_ids; /// Receipt IDs generated by this transaction or receipt.
        uint64 gas_burnt; /// The amount of the gas burnt by the given transaction or receipt.
        uint128 tokens_burnt; /// The total number of the tokens burnt by the given transaction or receipt.
        bytes executor_id; /// Hash of the transaction or receipt id that produced this outcome.
        ExecutionStatus status; /// Execution status. Contains the result in case of successful execution.
        bytes32[] merkelization_hashes;
    }

    function decodeExecutionOutcome(Borsh.Data memory data) internal view returns (ExecutionOutcome memory outcome) {
        outcome.logs = new bytes[](data.decodeU32());
        for (uint i = 0; i < outcome.logs.length; i++) {
            outcome.logs[i] = data.decodeBytes();
        }

        uint256 start = data.offset;
        outcome.receipt_ids = new bytes32[](data.decodeU32());
        for (uint i = 0; i < outcome.receipt_ids.length; i++) {
            outcome.receipt_ids[i] = data.decodeBytes32();
        }
        outcome.gas_burnt = data.decodeU64();
        outcome.tokens_burnt = data.decodeU128();
        outcome.executor_id = data.decodeBytes();
        outcome.status = data.decodeExecutionStatus();
        uint256 stop = data.offset;

        outcome.merkelization_hashes = new bytes32[](1 + outcome.logs.length);
        data.offset = start;
        outcome.merkelization_hashes[0] = data.peekSha256(stop - start);
        data.offset = stop;
        for (uint i = 0; i < outcome.logs.length; i++) {
            outcome.merkelization_hashes[i + 1] = sha256(outcome.logs[i]);
        }
    }

    struct ExecutionOutcomeWithId {
        bytes32 id; /// The transaction hash or the receipt ID.
        ExecutionOutcome outcome;
        bytes32 hash;
    }

    function decodeExecutionOutcomeWithId(Borsh.Data memory data)
        internal
        view
        returns (ExecutionOutcomeWithId memory outcome)
    {
        outcome.id = data.decodeBytes32();
        outcome.outcome = data.decodeExecutionOutcome();

        uint256 len = 1 + outcome.outcome.merkelization_hashes.length;
        outcome.hash = sha256(
            abi.encodePacked(
                uint8((len >> 0) & 0xFF),
                uint8((len >> 8) & 0xFF),
                uint8((len >> 16) & 0xFF),
                uint8((len >> 24) & 0xFF),
                outcome.id,
                outcome.outcome.merkelization_hashes
            )
        );
    }

    struct MerklePathItem {
        bytes32 hash;
        uint8 direction; // 0 = left, 1 = right
    }

    function decodeMerklePathItem(Borsh.Data memory data) internal pure returns (MerklePathItem memory item) {
        item.hash = data.decodeBytes32();
        item.direction = data.decodeU8();
        require(item.direction < 2, "ProofDecoder: MerklePathItem direction should be 0 or 1");
    }

    struct MerklePath {
        MerklePathItem[] items;
    }

    function decodeMerklePath(Borsh.Data memory data) internal pure returns (MerklePath memory path) {
        path.items = new MerklePathItem[](data.decodeU32());
        for (uint i = 0; i < path.items.length; i++) {
            path.items[i] = data.decodeMerklePathItem();
        }
    }

    struct ExecutionOutcomeWithIdAndProof {
        MerklePath proof;
        bytes32 block_hash;
        ExecutionOutcomeWithId outcome_with_id;
    }

    function decodeExecutionOutcomeWithIdAndProof(Borsh.Data memory data)
        internal
        view
        returns (ExecutionOutcomeWithIdAndProof memory outcome)
    {
        outcome.proof = data.decodeMerklePath();
        outcome.block_hash = data.decodeBytes32();
        outcome.outcome_with_id = data.decodeExecutionOutcomeWithId();
    }
}

File 5 of 8 : ProofKeeper.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.6.12;

import 'rainbow-bridge/contracts/eth/nearprover/contracts/INearProver.sol';
import 'rainbow-bridge/contracts/eth/nearprover/contracts/ProofDecoder.sol';
import 'rainbow-bridge/contracts/eth/nearbridge/contracts/Borsh.sol';

contract ProofKeeper {
    using Borsh for Borsh.Data;
    using ProofDecoder for Borsh.Data;

    INearProver public prover_;
    bytes public nearProofProducerAccount_;

    /// Proofs from blocks that are below the acceptance height will be rejected.
    // If `minBlockAcceptanceHeight_` value is zero - proofs from block with any height are accepted.
    uint64 public minBlockAcceptanceHeight_;

    // OutcomeReciptId -> Used
    mapping(bytes32 => bool) public usedEvents_;

    constructor(
        bytes memory nearProofProducerAccount,
        INearProver prover,
        uint64 minBlockAcceptanceHeight
    ) 
        public 
    {
        require(
            nearProofProducerAccount.length > 0,
            'Invalid Near ProofProducer address'
        );
        require(
            address(prover) != address(0),
            'Invalid Near prover address'
        );

        nearProofProducerAccount_ = nearProofProducerAccount;
        prover_ = prover;
        minBlockAcceptanceHeight_ = minBlockAcceptanceHeight;
    }

    /// Parses the provided proof and consumes it if it's not already used.
    /// The consumed event cannot be reused for future calls.
    function _parseAndConsumeProof(
        bytes memory proofData, 
        uint64 proofBlockHeight
    )
        internal
        returns(ProofDecoder.ExecutionStatus memory result)
    {
        require(
            proofBlockHeight >= minBlockAcceptanceHeight_,
            'Proof is from the ancient block'
        );
        require(
            prover_.proveOutcome(proofData,proofBlockHeight),
            'Proof should be valid'
        );

        // Unpack the proof and extract the execution outcome.
        Borsh.Data memory borshData = Borsh.from(proofData);

        ProofDecoder.FullOutcomeProof memory fullOutcomeProof = 
        borshData.decodeFullOutcomeProof();
        
        require(
            borshData.finished(),
            'Argument should be exact borsh serialization'
        );

        bytes32 receiptId = 
        fullOutcomeProof.outcome_proof.outcome_with_id.outcome.receipt_ids[0];

        require(
            !usedEvents_[receiptId],
            'The burn event cannot be reused'
        );
        usedEvents_[receiptId] = true;

        require(
            keccak256(fullOutcomeProof.outcome_proof.outcome_with_id.outcome.executor_id) == 
            keccak256(nearProofProducerAccount_),
            'Can only withdraw coins from the linked proof producer on Near blockchain'
        );

        result = fullOutcomeProof.outcome_proof.outcome_with_id.outcome.status;
        require(
            !result.failed, 
            'Cannot use failed execution outcome for unlocking the tokens'
        );
        require(
            !result.unknown,
            'Cannot use unknown execution outcome for unlocking the tokens'
        );
    }
}

File 6 of 8 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 7 of 8 : NearDecoder.sol
pragma solidity ^0.6;

import "@openzeppelin/contracts/math/SafeMath.sol";
import "./Borsh.sol";

library NearDecoder {
    using Borsh for Borsh.Data;
    using NearDecoder for Borsh.Data;

    struct PublicKey {
        uint8 enumIndex;
        Borsh.ED25519PublicKey ed25519;
        Borsh.SECP256K1PublicKey secp256k1;
    }

    function decodePublicKey(Borsh.Data memory data) internal pure returns (PublicKey memory key) {
        key.enumIndex = data.decodeU8();

        if (key.enumIndex == 0) {
            key.ed25519 = data.decodeED25519PublicKey();
        } else if (key.enumIndex == 1) {
            key.secp256k1 = data.decodeSECP256K1PublicKey();
        } else {
            revert("NearBridge: Only ED25519 and SECP256K1 public keys are supported");
        }
    }

    struct ValidatorStake {
        string account_id;
        PublicKey public_key;
        uint128 stake;
    }

    function decodeValidatorStake(Borsh.Data memory data) internal pure returns (ValidatorStake memory validatorStake) {
        validatorStake.account_id = string(data.decodeBytes());
        validatorStake.public_key = data.decodePublicKey();
        validatorStake.stake = data.decodeU128();
    }

    struct OptionalValidatorStakes {
        bool none;
        ValidatorStake[] validatorStakes;
        bytes32 hash; // Additional computable element
    }

    function decodeOptionalValidatorStakes(Borsh.Data memory data)
        internal
        view
        returns (OptionalValidatorStakes memory stakes)
    {
        stakes.none = (data.decodeU8() == 0);
        if (!stakes.none) {
            uint256 start = data.offset;

            stakes.validatorStakes = new ValidatorStake[](data.decodeU32());
            for (uint i = 0; i < stakes.validatorStakes.length; i++) {
                stakes.validatorStakes[i] = data.decodeValidatorStake();
            }

            uint256 stop = data.offset;
            data.offset = start;
            stakes.hash = data.peekSha256(stop - start);
            data.offset = stop;
        }
    }

    struct Signature {
        uint8 enumIndex;
        Borsh.ED25519Signature ed25519;
        Borsh.SECP256K1Signature secp256k1;
    }

    function decodeSignature(Borsh.Data memory data) internal pure returns (Signature memory sig) {
        sig.enumIndex = data.decodeU8();

        if (sig.enumIndex == 0) {
            sig.ed25519 = data.decodeED25519Signature();
        } else if (sig.enumIndex == 1) {
            sig.secp256k1 = data.decodeSECP256K1Signature();
        } else {
            revert("NearBridge: Only ED25519 and SECP256K1 signatures are supported");
        }
    }

    struct OptionalSignature {
        bool none;
        Signature signature;
    }

    function decodeOptionalSignature(Borsh.Data memory data) internal pure returns (OptionalSignature memory sig) {
        sig.none = (data.decodeU8() == 0);
        if (!sig.none) {
            sig.signature = data.decodeSignature();
        }
    }

    struct LightClientBlock {
        bytes32 prev_block_hash;
        bytes32 next_block_inner_hash;
        BlockHeaderInnerLite inner_lite;
        bytes32 inner_rest_hash;
        OptionalValidatorStakes next_bps;
        OptionalSignature[] approvals_after_next;
        bytes32 hash;
        bytes32 next_hash;
    }

    struct InitialValidators {
        ValidatorStake[] validator_stakes;
    }

    function decodeInitialValidators(Borsh.Data memory data)
        internal
        view
        returns (InitialValidators memory validators)
    {
        validators.validator_stakes = new ValidatorStake[](data.decodeU32());
        for (uint i = 0; i < validators.validator_stakes.length; i++) {
            validators.validator_stakes[i] = data.decodeValidatorStake();
        }
    }

    function decodeLightClientBlock(Borsh.Data memory data) internal view returns (LightClientBlock memory header) {
        header.prev_block_hash = data.decodeBytes32();
        header.next_block_inner_hash = data.decodeBytes32();
        header.inner_lite = data.decodeBlockHeaderInnerLite();
        header.inner_rest_hash = data.decodeBytes32();
        header.next_bps = data.decodeOptionalValidatorStakes();

        header.approvals_after_next = new OptionalSignature[](data.decodeU32());
        for (uint i = 0; i < header.approvals_after_next.length; i++) {
            header.approvals_after_next[i] = data.decodeOptionalSignature();
        }

        header.hash = sha256(
            abi.encodePacked(
                sha256(abi.encodePacked(header.inner_lite.hash, header.inner_rest_hash)),
                header.prev_block_hash
            )
        );

        header.next_hash = sha256(abi.encodePacked(header.next_block_inner_hash, header.hash));
    }

    struct BlockHeaderInnerLite {
        uint64 height; /// Height of this block since the genesis block (height 0).
        bytes32 epoch_id; /// Epoch start hash of this block's epoch. Used for retrieving validator information
        bytes32 next_epoch_id;
        bytes32 prev_state_root; /// Root hash of the state at the previous block.
        bytes32 outcome_root; /// Root of the outcomes of transactions and receipts.
        uint64 timestamp; /// Timestamp at which the block was built.
        bytes32 next_bp_hash; /// Hash of the next epoch block producers set
        bytes32 block_merkle_root;
        bytes32 hash; // Additional computable element
    }

    function decodeBlockHeaderInnerLite(Borsh.Data memory data)
        internal
        view
        returns (BlockHeaderInnerLite memory header)
    {
        header.hash = data.peekSha256(208);
        header.height = data.decodeU64();
        header.epoch_id = data.decodeBytes32();
        header.next_epoch_id = data.decodeBytes32();
        header.prev_state_root = data.decodeBytes32();
        header.outcome_root = data.decodeBytes32();
        header.timestamp = data.decodeU64();
        header.next_bp_hash = data.decodeBytes32();
        header.block_merkle_root = data.decodeBytes32();
    }
}

File 8 of 8 : INearProver.sol
pragma solidity ^0.6;

interface INearProver {
    function proveOutcome(bytes calldata proofData, uint64 blockHeight) external view returns (bool);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"bytes","name":"nearEvm","type":"bytes"},{"internalType":"contract INearProver","name":"prover","type":"address"},{"internalType":"uint64","name":"minBlockAcceptanceHeight","type":"uint64"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"uint256","name":"pausedFlags","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"string","name":"recipient","type":"string"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint128","name":"amount","type":"uint128"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"adminDelegatecall","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"flags","type":"uint256"}],"name":"adminPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"adminReceiveEth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address payable","name":"destination","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"adminSendEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"key","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"adminSstore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"key","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"mask","type":"uint256"}],"name":"adminSstoreWithMask","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"ethRecipientOnNear","type":"string"},{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"depositToEVM","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"nearRecipientAccountId","type":"string"},{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"depositToNear","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"minBlockAcceptanceHeight_","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nearProofProducerAccount_","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"prover_","outputs":[{"internalType":"contract INearProver","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"usedEvents_","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"proofData","type":"bytes"},{"internalType":"uint64","name":"proofBlockHeight","type":"uint64"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040516200241538038062002415833981810160405260a08110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b506040908152602082015190820151606083015160809093015186519295509093509082908290879087908790620001505760405162461bcd60e51b8152600401808060200182810382526022815260200180620023f36022913960400191505060405180910390fd5b6001600160a01b038216620001ac576040805162461bcd60e51b815260206004820152601b60248201527f496e76616c6964204e6561722070726f76657220616464726573730000000000604482015290519081900360640190fd5b8251620001c190600190602086019062000224565b50600080546001600160a01b039384166001600160a01b031991821617909155600280546001600160401b039093166001600160401b031990931692909217909155600480549590921694169390931790925560055550620002c0945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200026757805160ff191683800117855562000297565b8280016001018555821562000297579182015b82811115620002975782518255916020019190600101906200027a565b50620002a5929150620002a9565b5090565b5b80821115620002a55760008155600101620002aa565b61212380620002d06000396000f3fe6080604052600436106100e85760003560e01c8063a8eb3b511161008a578063be831a2e11610059578063be831a2e146104b7578063ed940ed7146104e7578063f48ab4e01461058d578063f851a44014610595576100e8565b8063a8eb3b51146102ee578063b8e9744c14610394578063bb00b69814610448578063bccc9fcf14610479576100e8565b80635c975abb116100c65780635c975abb146101835780636c4624c3146101aa57806379ac038a146101e05780639813954e1461026a576100e8565b80631c420a20146100ed5780632692c59f1461011e578063530208f21461014a575b600080fd5b3480156100f957600080fd5b506101026105aa565b604080516001600160401b039092168252519081900360200190f35b34801561012a57600080fd5b506101486004803603602081101561014157600080fd5b50356105b9565b005b34801561015657600080fd5b506101486004803603604081101561016d57600080fd5b506001600160a01b0381351690602001356105d5565b34801561018f57600080fd5b50610198610627565b60408051918252519081900360200190f35b3480156101b657600080fd5b50610148600480360360608110156101cd57600080fd5b508035906020810135906040013561062d565b3480156101ec57600080fd5b506101f561064f565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561022f578181015183820152602001610217565b50505050905090810190601f16801561025c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561027657600080fd5b506101486004803603604081101561028d57600080fd5b810190602081018135600160201b8111156102a757600080fd5b8201836020820111156102b957600080fd5b803590602001918460018302840111600160201b831117156102da57600080fd5b9193509150356001600160401b03166106dc565b6101486004803603604081101561030457600080fd5b810190602081018135600160201b81111561031e57600080fd5b82018360208201111561033057600080fd5b803590602001918460018302840111600160201b8311171561035157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610854915050565b6101f5600480360360408110156103aa57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156103d457600080fd5b8201836020820111156103e657600080fd5b803590602001918460018302840111600160201b8311171561040757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610972945050505050565b34801561045457600080fd5b5061045d610a46565b604080516001600160a01b039092168252519081900360200190f35b34801561048557600080fd5b506104a36004803603602081101561049c57600080fd5b5035610a55565b604080519115158252519081900360200190f35b3480156104c357600080fd5b50610148600480360360408110156104da57600080fd5b5080359060200135610a6a565b610148600480360360408110156104fd57600080fd5b810190602081018135600160201b81111561051757600080fd5b82018360208201111561052957600080fd5b803590602001918460018302840111600160201b8311171561054a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610a85915050565b610148610cd3565b3480156105a157600080fd5b5061045d610cec565b6002546001600160401b031681565b6004546001600160a01b031633146105d057600080fd5b600555565b6004546001600160a01b031633146105ec57600080fd5b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610622573d6000803e3d6000fd5b505050565b60055481565b6004546001600160a01b0316331461064457600080fd5b825491821816189055565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156106d45780601f106106a9576101008083540402835291602001916106d4565b820191906000526020600020905b8154815290600101906020018083116106b757829003601f168201915b505050505081565b60048060055416600014806106fb57506004546001600160a01b031633145b61070457600080fd5b61070c611d1e565b61074d85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250879250610cfb915050565b9050610757611d4b565b6107648260600151611113565b60408101519091506001600160a01b031630146107b25760405162461bcd60e51b8152600401808060200182810382526043815260200180611f886043913960600191505060405180910390fd5b602081015181516040516001600160a01b03909216916001600160801b0390911680156108fc02916000818181858888f193505050501580156107f9573d6000803e3d6000fd5b5080602001516001600160a01b03167fab48b3d59a240196dc5bdd7f7a638fca310f8194c7d350c3dd7765861311ddf8826000015160405180826001600160801b0316815260200191505060405180910390a2505050505050565b600280600554166000148061087357506004546001600160a01b031633145b61087c57600080fd5b3482106108ba5760405162461bcd60e51b8152600401808060200182810382526035815260200180611f536035913960400191505060405180910390fd5b336001600160a01b03167fd142439c278e25dad9a50766f153d0e3d2d7bf2bd16fc2781c4bd494b2b15a9d8434856040518080602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610931578181015183820152602001610919565b50505050905090810190601f16801561095e5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a2505050565b6004546060906001600160a01b0316331461098c57600080fd5b60006060846001600160a01b0316846040518082805190602001908083835b602083106109ca5780518252601f1990920191602091820191016109ab565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610a2a576040519150601f19603f3d011682016040523d82523d6000602084013e610a2f565b606091505b509150915081610a3e57600080fd5b949350505050565b6000546001600160a01b031681565b60036020526000908152604090205460ff1681565b6004546001600160a01b03163314610a8157600080fd5b9055565b6001806005541660001480610aa457506004546001600160a01b031633145b610aad57600080fd5b348210610aeb5760405162461bcd60e51b8152600401808060200182810382526035815260200180611f536035913960400191505060405180910390fd5b6060604051806040016040528060018152602001601d60f91b81525090506060600182866040516020018084805460018160011615610100020316600290048015610b6d5780601f10610b4b576101008083540402835291820191610b6d565b820191906000526020600020905b815481529060010190602001808311610b59575b5050835160208501908083835b60208310610b995780518252601f199092019160209182019101610b7a565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310610be15780518252601f199092019160209182019101610bc2565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040529050336001600160a01b03167fd142439c278e25dad9a50766f153d0e3d2d7bf2bd16fc2781c4bd494b2b15a9d8234876040518080602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610c90578181015183820152602001610c78565b50505050905090810190601f168015610cbd5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a25050505050565b6004546001600160a01b03163314610cea57600080fd5b565b6004546001600160a01b031681565b610d03611d1e565b6002546001600160401b039081169083161015610d67576040805162461bcd60e51b815260206004820152601f60248201527f50726f6f662069732066726f6d2074686520616e6369656e7420626c6f636b00604482015290519081900360640190fd5b60008054604080516392d68dfd60e01b81526001600160401b0386166024820152600481019182528651604482015286516001600160a01b03909316936392d68dfd93889388939092839260649092019160208701918190849084905b83811015610ddc578181015183820152602001610dc4565b50505050905090810190601f168015610e095780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015610e2757600080fd5b505afa158015610e3b573d6000803e3d6000fd5b505050506040513d6020811015610e5157600080fd5b5051610e9c576040805162461bcd60e51b8152602060048201526015602482015274141c9bdbd9881cda1bdd5b19081899481d985b1a59605a1b604482015290519081900360640190fd5b610ea4611d6b565b610ead84611175565b9050610eb7611d85565b610ec08261119b565b9050610ecb826111dd565b610f065760405162461bcd60e51b815260040180806020018281038252602c815260200180612085602c913960400191505060405180910390fd5b60008160000151604001516020015160200151600081518110610f2557fe5b6020908102919091018101516000818152600390925260409091205490915060ff1615610f99576040805162461bcd60e51b815260206004820152601f60248201527f546865206275726e206576656e742063616e6e6f742062652072657573656400604482015290519081900360640190fd5b60008181526003602052604090819020805460ff19166001908117909155905181548190839060026000198284161561010002019091160480156110145780601f10610ff2576101008083540402835291820191611014565b820191906000526020600020905b815481529060010190602001808311611000575b50509150506040518091039020826000015160400151602001516080015180519060200120146110755760405162461bcd60e51b81526004018080602001828103825260498152602001806120006049913960600191505060405180910390fd5b8160000151604001516020015160a0015193508360400151156110c95760405162461bcd60e51b815260040180806020018281038252603c815260200180612049603c913960400191505060405180910390fd5b83602001511561110a5760405162461bcd60e51b815260040180806020018281038252603d8152602001806120b1603d913960400191505060405180910390fd5b50505092915050565b61111b611d4b565b611123611d6b565b61112c83611175565b9050611137816111e9565b6001600160801b03168252600061114d8261121b565b606081901c6020850152905060006111648361121b565b60601c604085015250919392505050565b61117d611d6b565b6040518060400160405280600081526020018381525090505b919050565b6111a3611d85565b6111ac82611257565b81526111b78261128b565b60208201526111c58261132b565b60408201526111d38261128b565b6060820152919050565b60208101515190511490565b60006111f4826114d0565b6001600160401b03169050604061120a836114d0565b6001600160401b0316901b17919050565b6000805b60148110156112515780600802611235846114fc565b60f81b6001600160f81b031916901c919091179060010161121f565b50919050565b61125f611dc4565b6112688261128b565b81526112738261157e565b6020820152611281826115f3565b6040820152919050565b611293611deb565b61129c8261176c565b63ffffffff166001600160401b03811180156112b757600080fd5b506040519080825280602002602001820160405280156112f157816020015b6112de611dfe565b8152602001906001900390816112d65790505b50815260005b8151518110156112515761130a83611794565b825180518390811061131857fe5b60209081029190910101526001016112f7565b611333611e15565b61133c8261157e565b81526113478261157e565b6020820152611355826117f8565b816040018190525060028082604001516101000151836020015160405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106113c45780518252601f1990920191602091820191016113a5565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015611403573d6000803e3d6000fd5b5050506040513d602081101561141857600080fd5b50518251604080516020818101949094528082019290925280518083038201815260609092019081905281519192909182918401908083835b602083106114705780518252601f199092019160209182019101611451565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa1580156114af573d6000803e3d6000fd5b5050506040513d60208110156114c457600080fd5b50516060820152919050565b60006114db8261176c565b63ffffffff16905060206114ee8361176c565b63ffffffff16901b17919050565b6000816001808260000151018260200151511015611557576040805162461bcd60e51b8152602060048201526013602482015272426f7273683a204f7574206f662072616e676560681b604482015290519081900360640190fd5b602084015184518151811061156857fe5b0160200151825190910190915260f81c92915050565b60008160208082600001510182602001515110156115d9576040805162461bcd60e51b8152602060048201526013602482015272426f7273683a204f7574206f662072616e676560681b604482015290519081900360640190fd5b602080850151945190940190930151815190930190525090565b6115fb611e41565b6116048261157e565b815261160f82611895565b81602001819052506000816020015160c001515160010190506002600082901c60ff16600883901c60ff16601084901c60ff16601885901c60ff168660000151876020015160c00151604051602001808760ff1660f81b81526001018660ff1660f81b81526001018560ff1660f81b81526001018460ff1660f81b8152600101838152602001828051906020019060200280838360005b838110156116be5781810151838201526020016116a6565b5050505090500196505050505050506040516020818303038152906040526040518082805190602001908083835b6020831061170b5780518252601f1990920191602091820191016116ec565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa15801561174a573d6000803e3d6000fd5b5050506040513d602081101561175f57600080fd5b5051604083015250919050565b600061177782611b63565b61ffff169050601061178883611b63565b61ffff16901b17919050565b61179c611dfe565b6117a58261157e565b81526117b0826114fc565b60ff16602082018190526002116111965760405162461bcd60e51b8152600401808060200182810382526037815260200180611f1c6037913960400191505060405180910390fd5b611800611e5c565b61180b8260d0611b89565b61010082015261181a826114d0565b6001600160401b0316815261182e8261157e565b602082015261183c8261157e565b604082015261184a8261157e565b60608201526118588261157e565b6080820152611866826114d0565b6001600160401b031660a082015261187d8261157e565b60c082015261188b8261157e565b60e0820152919050565b61189d611ea8565b6118a68261176c565b63ffffffff166001600160401b03811180156118c157600080fd5b506040519080825280602002602001820160405280156118f557816020015b60608152602001906001900390816118e05790505b50815260005b81515181101561192f5761190e83611ba5565b825180518390811061191c57fe5b60209081029190910101526001016118fb565b50815161193b8361176c565b63ffffffff166001600160401b038111801561195657600080fd5b50604051908082528060200260200182016040528015611980578160200160208202803683370190505b50602083015260005b8260200151518110156119c25761199f8461157e565b836020015182815181106119af57fe5b6020908102919091010152600101611989565b506119cc836114d0565b6001600160401b031660408301526119e3836111e9565b6001600160801b031660608301526119fa83611ba5565b6080830152611a0883611c3c565b60a083015282518251516001016001600160401b0381118015611a2a57600080fd5b50604051908082528060200260200182016040528015611a54578160200160208202803683370190505b5060c0840152818452611a6984838303611b89565b8360c00151600081518110611a7a57fe5b602090810291909101015280845260005b835151811015611b5b57600284600001518281518110611aa757fe5b60200260200101516040518082805190602001908083835b60208310611ade5780518252601f199092019160209182019101611abf565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015611b1d573d6000803e3d6000fd5b5050506040513d6020811015611b3257600080fd5b505160c0850151805160018401908110611b4857fe5b6020908102919091010152600101611a8b565b505050919050565b6000611b6e826114fc565b60ff1690506008611b7e836114fc565b60ff16901b17919050565b6000611b9e8360200151846000015184611cfc565b9392505050565b6060611bb08261176c565b63ffffffff166001600160401b0381118015611bcb57600080fd5b506040519080825280601f01601f191660200182016040528015611bf6576020820181803683370190505b50905060005b815181101561125157611c0e836114fc565b60f81b828281518110611c1d57fe5b60200101906001600160f81b031916908160001a905350600101611bfc565b611c44611d1e565b611c4d826114fc565b60ff16808252611c635760016020820152611196565b806000015160ff1660011415611c7f5760016040820152611196565b806000015160ff1660021415611ca257611c9882611ba5565b6060820152611196565b806000015160ff1660031415611cc557611cbb8261157e565b6080820152611196565b60405162461bcd60e51b8152600401808060200182810382526035815260200180611fcb6035913960400191505060405180910390fd5b6000611d06611efd565b6020818486602089010160025afa5051949350505050565b6040805160a081018252600080825260208201819052918101829052606080820152608081019190915290565b604080516060810182526000808252602082018190529181019190915290565b604051806040016040528060008152602001606081525090565b6040518060800160405280611d98611dc4565b8152602001611da5611deb565b8152602001611db2611e15565b8152602001611dbf611deb565b905290565b6040518060600160405280611dd7611deb565b815260006020820152604001611dbf611e41565b6040518060200160405280606081525090565b604080518082019091526000808252602082015290565b6040805160808101825260008082526020820152908101611e34611e5c565b8152600060209091015290565b60408051606081019091526000815260208101611e34611ea8565b6040805161012081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081019190915290565b6040518060e00160405280606081526020016060815260200160006001600160401b0316815260200160006001600160801b0316815260200160608152602001611ef0611d1e565b8152602001606081525090565b6040518060200160405280600190602082028036833750919291505056fe50726f6f664465636f6465723a204d65726b6c65506174684974656d20646972656374696f6e2073686f756c642062652030206f722031546865206665652063616e6e6f7420626520626967676572207468616e20746865207472616e7366657272656420616d6f756e742e43616e206f6e6c7920776974686472617720636f696e732074686174207765726520657870656374656420666f72207468652063757272656e7420636f6e74726163744e6561724465636f6465723a206465636f6465457865637574696f6e53746174757320696e646578206f7574206f662072616e676543616e206f6e6c7920776974686472617720636f696e732066726f6d20746865206c696e6b65642070726f6f662070726f6475636572206f6e204e65617220626c6f636b636861696e43616e6e6f7420757365206661696c656420657865637574696f6e206f7574636f6d6520666f7220756e6c6f636b696e672074686520746f6b656e73417267756d656e742073686f756c6420626520657861637420626f7273682073657269616c697a6174696f6e43616e6e6f742075736520756e6b6e6f776e20657865637574696f6e206f7574636f6d6520666f7220756e6c6f636b696e672074686520746f6b656e73a2646970667358221220fccb39238617726460b95094d690c604adea7f5e18b68acf285abc46ae0aa35164736f6c634300060c0033496e76616c6964204e6561722050726f6f6650726f6475636572206164647265737300000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000051ad3f020274910065dcb421629cd2e6e5b46c40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000015e634c7c1311a9034220c28d3d12b7f710a3b1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066175726f72610000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106100e85760003560e01c8063a8eb3b511161008a578063be831a2e11610059578063be831a2e146104b7578063ed940ed7146104e7578063f48ab4e01461058d578063f851a44014610595576100e8565b8063a8eb3b51146102ee578063b8e9744c14610394578063bb00b69814610448578063bccc9fcf14610479576100e8565b80635c975abb116100c65780635c975abb146101835780636c4624c3146101aa57806379ac038a146101e05780639813954e1461026a576100e8565b80631c420a20146100ed5780632692c59f1461011e578063530208f21461014a575b600080fd5b3480156100f957600080fd5b506101026105aa565b604080516001600160401b039092168252519081900360200190f35b34801561012a57600080fd5b506101486004803603602081101561014157600080fd5b50356105b9565b005b34801561015657600080fd5b506101486004803603604081101561016d57600080fd5b506001600160a01b0381351690602001356105d5565b34801561018f57600080fd5b50610198610627565b60408051918252519081900360200190f35b3480156101b657600080fd5b50610148600480360360608110156101cd57600080fd5b508035906020810135906040013561062d565b3480156101ec57600080fd5b506101f561064f565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561022f578181015183820152602001610217565b50505050905090810190601f16801561025c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561027657600080fd5b506101486004803603604081101561028d57600080fd5b810190602081018135600160201b8111156102a757600080fd5b8201836020820111156102b957600080fd5b803590602001918460018302840111600160201b831117156102da57600080fd5b9193509150356001600160401b03166106dc565b6101486004803603604081101561030457600080fd5b810190602081018135600160201b81111561031e57600080fd5b82018360208201111561033057600080fd5b803590602001918460018302840111600160201b8311171561035157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610854915050565b6101f5600480360360408110156103aa57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156103d457600080fd5b8201836020820111156103e657600080fd5b803590602001918460018302840111600160201b8311171561040757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610972945050505050565b34801561045457600080fd5b5061045d610a46565b604080516001600160a01b039092168252519081900360200190f35b34801561048557600080fd5b506104a36004803603602081101561049c57600080fd5b5035610a55565b604080519115158252519081900360200190f35b3480156104c357600080fd5b50610148600480360360408110156104da57600080fd5b5080359060200135610a6a565b610148600480360360408110156104fd57600080fd5b810190602081018135600160201b81111561051757600080fd5b82018360208201111561052957600080fd5b803590602001918460018302840111600160201b8311171561054a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610a85915050565b610148610cd3565b3480156105a157600080fd5b5061045d610cec565b6002546001600160401b031681565b6004546001600160a01b031633146105d057600080fd5b600555565b6004546001600160a01b031633146105ec57600080fd5b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610622573d6000803e3d6000fd5b505050565b60055481565b6004546001600160a01b0316331461064457600080fd5b825491821816189055565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156106d45780601f106106a9576101008083540402835291602001916106d4565b820191906000526020600020905b8154815290600101906020018083116106b757829003601f168201915b505050505081565b60048060055416600014806106fb57506004546001600160a01b031633145b61070457600080fd5b61070c611d1e565b61074d85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250879250610cfb915050565b9050610757611d4b565b6107648260600151611113565b60408101519091506001600160a01b031630146107b25760405162461bcd60e51b8152600401808060200182810382526043815260200180611f886043913960600191505060405180910390fd5b602081015181516040516001600160a01b03909216916001600160801b0390911680156108fc02916000818181858888f193505050501580156107f9573d6000803e3d6000fd5b5080602001516001600160a01b03167fab48b3d59a240196dc5bdd7f7a638fca310f8194c7d350c3dd7765861311ddf8826000015160405180826001600160801b0316815260200191505060405180910390a2505050505050565b600280600554166000148061087357506004546001600160a01b031633145b61087c57600080fd5b3482106108ba5760405162461bcd60e51b8152600401808060200182810382526035815260200180611f536035913960400191505060405180910390fd5b336001600160a01b03167fd142439c278e25dad9a50766f153d0e3d2d7bf2bd16fc2781c4bd494b2b15a9d8434856040518080602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610931578181015183820152602001610919565b50505050905090810190601f16801561095e5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a2505050565b6004546060906001600160a01b0316331461098c57600080fd5b60006060846001600160a01b0316846040518082805190602001908083835b602083106109ca5780518252601f1990920191602091820191016109ab565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610a2a576040519150601f19603f3d011682016040523d82523d6000602084013e610a2f565b606091505b509150915081610a3e57600080fd5b949350505050565b6000546001600160a01b031681565b60036020526000908152604090205460ff1681565b6004546001600160a01b03163314610a8157600080fd5b9055565b6001806005541660001480610aa457506004546001600160a01b031633145b610aad57600080fd5b348210610aeb5760405162461bcd60e51b8152600401808060200182810382526035815260200180611f536035913960400191505060405180910390fd5b6060604051806040016040528060018152602001601d60f91b81525090506060600182866040516020018084805460018160011615610100020316600290048015610b6d5780601f10610b4b576101008083540402835291820191610b6d565b820191906000526020600020905b815481529060010190602001808311610b59575b5050835160208501908083835b60208310610b995780518252601f199092019160209182019101610b7a565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310610be15780518252601f199092019160209182019101610bc2565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040529050336001600160a01b03167fd142439c278e25dad9a50766f153d0e3d2d7bf2bd16fc2781c4bd494b2b15a9d8234876040518080602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610c90578181015183820152602001610c78565b50505050905090810190601f168015610cbd5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a25050505050565b6004546001600160a01b03163314610cea57600080fd5b565b6004546001600160a01b031681565b610d03611d1e565b6002546001600160401b039081169083161015610d67576040805162461bcd60e51b815260206004820152601f60248201527f50726f6f662069732066726f6d2074686520616e6369656e7420626c6f636b00604482015290519081900360640190fd5b60008054604080516392d68dfd60e01b81526001600160401b0386166024820152600481019182528651604482015286516001600160a01b03909316936392d68dfd93889388939092839260649092019160208701918190849084905b83811015610ddc578181015183820152602001610dc4565b50505050905090810190601f168015610e095780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015610e2757600080fd5b505afa158015610e3b573d6000803e3d6000fd5b505050506040513d6020811015610e5157600080fd5b5051610e9c576040805162461bcd60e51b8152602060048201526015602482015274141c9bdbd9881cda1bdd5b19081899481d985b1a59605a1b604482015290519081900360640190fd5b610ea4611d6b565b610ead84611175565b9050610eb7611d85565b610ec08261119b565b9050610ecb826111dd565b610f065760405162461bcd60e51b815260040180806020018281038252602c815260200180612085602c913960400191505060405180910390fd5b60008160000151604001516020015160200151600081518110610f2557fe5b6020908102919091018101516000818152600390925260409091205490915060ff1615610f99576040805162461bcd60e51b815260206004820152601f60248201527f546865206275726e206576656e742063616e6e6f742062652072657573656400604482015290519081900360640190fd5b60008181526003602052604090819020805460ff19166001908117909155905181548190839060026000198284161561010002019091160480156110145780601f10610ff2576101008083540402835291820191611014565b820191906000526020600020905b815481529060010190602001808311611000575b50509150506040518091039020826000015160400151602001516080015180519060200120146110755760405162461bcd60e51b81526004018080602001828103825260498152602001806120006049913960600191505060405180910390fd5b8160000151604001516020015160a0015193508360400151156110c95760405162461bcd60e51b815260040180806020018281038252603c815260200180612049603c913960400191505060405180910390fd5b83602001511561110a5760405162461bcd60e51b815260040180806020018281038252603d8152602001806120b1603d913960400191505060405180910390fd5b50505092915050565b61111b611d4b565b611123611d6b565b61112c83611175565b9050611137816111e9565b6001600160801b03168252600061114d8261121b565b606081901c6020850152905060006111648361121b565b60601c604085015250919392505050565b61117d611d6b565b6040518060400160405280600081526020018381525090505b919050565b6111a3611d85565b6111ac82611257565b81526111b78261128b565b60208201526111c58261132b565b60408201526111d38261128b565b6060820152919050565b60208101515190511490565b60006111f4826114d0565b6001600160401b03169050604061120a836114d0565b6001600160401b0316901b17919050565b6000805b60148110156112515780600802611235846114fc565b60f81b6001600160f81b031916901c919091179060010161121f565b50919050565b61125f611dc4565b6112688261128b565b81526112738261157e565b6020820152611281826115f3565b6040820152919050565b611293611deb565b61129c8261176c565b63ffffffff166001600160401b03811180156112b757600080fd5b506040519080825280602002602001820160405280156112f157816020015b6112de611dfe565b8152602001906001900390816112d65790505b50815260005b8151518110156112515761130a83611794565b825180518390811061131857fe5b60209081029190910101526001016112f7565b611333611e15565b61133c8261157e565b81526113478261157e565b6020820152611355826117f8565b816040018190525060028082604001516101000151836020015160405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106113c45780518252601f1990920191602091820191016113a5565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015611403573d6000803e3d6000fd5b5050506040513d602081101561141857600080fd5b50518251604080516020818101949094528082019290925280518083038201815260609092019081905281519192909182918401908083835b602083106114705780518252601f199092019160209182019101611451565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa1580156114af573d6000803e3d6000fd5b5050506040513d60208110156114c457600080fd5b50516060820152919050565b60006114db8261176c565b63ffffffff16905060206114ee8361176c565b63ffffffff16901b17919050565b6000816001808260000151018260200151511015611557576040805162461bcd60e51b8152602060048201526013602482015272426f7273683a204f7574206f662072616e676560681b604482015290519081900360640190fd5b602084015184518151811061156857fe5b0160200151825190910190915260f81c92915050565b60008160208082600001510182602001515110156115d9576040805162461bcd60e51b8152602060048201526013602482015272426f7273683a204f7574206f662072616e676560681b604482015290519081900360640190fd5b602080850151945190940190930151815190930190525090565b6115fb611e41565b6116048261157e565b815261160f82611895565b81602001819052506000816020015160c001515160010190506002600082901c60ff16600883901c60ff16601084901c60ff16601885901c60ff168660000151876020015160c00151604051602001808760ff1660f81b81526001018660ff1660f81b81526001018560ff1660f81b81526001018460ff1660f81b8152600101838152602001828051906020019060200280838360005b838110156116be5781810151838201526020016116a6565b5050505090500196505050505050506040516020818303038152906040526040518082805190602001908083835b6020831061170b5780518252601f1990920191602091820191016116ec565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa15801561174a573d6000803e3d6000fd5b5050506040513d602081101561175f57600080fd5b5051604083015250919050565b600061177782611b63565b61ffff169050601061178883611b63565b61ffff16901b17919050565b61179c611dfe565b6117a58261157e565b81526117b0826114fc565b60ff16602082018190526002116111965760405162461bcd60e51b8152600401808060200182810382526037815260200180611f1c6037913960400191505060405180910390fd5b611800611e5c565b61180b8260d0611b89565b61010082015261181a826114d0565b6001600160401b0316815261182e8261157e565b602082015261183c8261157e565b604082015261184a8261157e565b60608201526118588261157e565b6080820152611866826114d0565b6001600160401b031660a082015261187d8261157e565b60c082015261188b8261157e565b60e0820152919050565b61189d611ea8565b6118a68261176c565b63ffffffff166001600160401b03811180156118c157600080fd5b506040519080825280602002602001820160405280156118f557816020015b60608152602001906001900390816118e05790505b50815260005b81515181101561192f5761190e83611ba5565b825180518390811061191c57fe5b60209081029190910101526001016118fb565b50815161193b8361176c565b63ffffffff166001600160401b038111801561195657600080fd5b50604051908082528060200260200182016040528015611980578160200160208202803683370190505b50602083015260005b8260200151518110156119c25761199f8461157e565b836020015182815181106119af57fe5b6020908102919091010152600101611989565b506119cc836114d0565b6001600160401b031660408301526119e3836111e9565b6001600160801b031660608301526119fa83611ba5565b6080830152611a0883611c3c565b60a083015282518251516001016001600160401b0381118015611a2a57600080fd5b50604051908082528060200260200182016040528015611a54578160200160208202803683370190505b5060c0840152818452611a6984838303611b89565b8360c00151600081518110611a7a57fe5b602090810291909101015280845260005b835151811015611b5b57600284600001518281518110611aa757fe5b60200260200101516040518082805190602001908083835b60208310611ade5780518252601f199092019160209182019101611abf565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015611b1d573d6000803e3d6000fd5b5050506040513d6020811015611b3257600080fd5b505160c0850151805160018401908110611b4857fe5b6020908102919091010152600101611a8b565b505050919050565b6000611b6e826114fc565b60ff1690506008611b7e836114fc565b60ff16901b17919050565b6000611b9e8360200151846000015184611cfc565b9392505050565b6060611bb08261176c565b63ffffffff166001600160401b0381118015611bcb57600080fd5b506040519080825280601f01601f191660200182016040528015611bf6576020820181803683370190505b50905060005b815181101561125157611c0e836114fc565b60f81b828281518110611c1d57fe5b60200101906001600160f81b031916908160001a905350600101611bfc565b611c44611d1e565b611c4d826114fc565b60ff16808252611c635760016020820152611196565b806000015160ff1660011415611c7f5760016040820152611196565b806000015160ff1660021415611ca257611c9882611ba5565b6060820152611196565b806000015160ff1660031415611cc557611cbb8261157e565b6080820152611196565b60405162461bcd60e51b8152600401808060200182810382526035815260200180611fcb6035913960400191505060405180910390fd5b6000611d06611efd565b6020818486602089010160025afa5051949350505050565b6040805160a081018252600080825260208201819052918101829052606080820152608081019190915290565b604080516060810182526000808252602082018190529181019190915290565b604051806040016040528060008152602001606081525090565b6040518060800160405280611d98611dc4565b8152602001611da5611deb565b8152602001611db2611e15565b8152602001611dbf611deb565b905290565b6040518060600160405280611dd7611deb565b815260006020820152604001611dbf611e41565b6040518060200160405280606081525090565b604080518082019091526000808252602082015290565b6040805160808101825260008082526020820152908101611e34611e5c565b8152600060209091015290565b60408051606081019091526000815260208101611e34611ea8565b6040805161012081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081019190915290565b6040518060e00160405280606081526020016060815260200160006001600160401b0316815260200160006001600160801b0316815260200160608152602001611ef0611d1e565b8152602001606081525090565b6040518060200160405280600190602082028036833750919291505056fe50726f6f664465636f6465723a204d65726b6c65506174684974656d20646972656374696f6e2073686f756c642062652030206f722031546865206665652063616e6e6f7420626520626967676572207468616e20746865207472616e7366657272656420616d6f756e742e43616e206f6e6c7920776974686472617720636f696e732074686174207765726520657870656374656420666f72207468652063757272656e7420636f6e74726163744e6561724465636f6465723a206465636f6465457865637574696f6e53746174757320696e646578206f7574206f662072616e676543616e206f6e6c7920776974686472617720636f696e732066726f6d20746865206c696e6b65642070726f6f662070726f6475636572206f6e204e65617220626c6f636b636861696e43616e6e6f7420757365206661696c656420657865637574696f6e206f7574636f6d6520666f7220756e6c6f636b696e672074686520746f6b656e73417267756d656e742073686f756c6420626520657861637420626f7273682073657269616c697a6174696f6e43616e6e6f742075736520756e6b6e6f776e20657865637574696f6e206f7574636f6d6520666f7220756e6c6f636b696e672074686520746f6b656e73a2646970667358221220fccb39238617726460b95094d690c604adea7f5e18b68acf285abc46ae0aa35164736f6c634300060c0033

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

00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000051ad3f020274910065dcb421629cd2e6e5b46c40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000015e634c7c1311a9034220c28d3d12b7f710a3b1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066175726f72610000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : nearEvm (bytes): 0x6175726f7261
Arg [1] : prover (address): 0x051AD3F020274910065Dcb421629cd2e6E5b46c4
Arg [2] : minBlockAcceptanceHeight (uint64): 0
Arg [3] : _admin (address): 0x015e634C7C1311A9034220c28d3D12b7f710a3b1
Arg [4] : pausedFlags (uint256): 0

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 000000000000000000000000051ad3f020274910065dcb421629cd2e6e5b46c4
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 000000000000000000000000015e634c7c1311a9034220c28d3d12b7f710a3b1
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [6] : 6175726f72610000000000000000000000000000000000000000000000000000


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