Contract 0x0000000000000000000000000000000000001003

 
My Name Tag:
Not Available, login to update

ContractCreator:
GENESIS at txn GENESIS_0000000000000000000000000000000000001003
Txn Hash
Block
From
To
Value [Txn Fee]
0x7a8ff3fd5b7391d330395556d4feccf798fa5cb36bfe100a6c697b1a2cedf67382864562021-06-14 9:39:267 secs ago0xa387438d261be6149a2a6b20cdb2bd8a33387a27 IN  BSC: Tendermint Light Client0 BNB0.001203426137
0x2f975c7557a861cb5a2d641fb762e1d2abb4d1300d9426d89ea53d67fd8b345882864552021-06-14 9:39:2310 secs ago0xb005741528b86f5952469d80a8614591e3c5b632 IN  BSC: Tendermint Light Client0 BNB0.001150970318
0x6d6d98003076d178416fa18423bd7fa36a3a7efb7eb71637b811c20e4058566482864532021-06-14 9:39:1716 secs ago0xa387438d261be6149a2a6b20cdb2bd8a33387a27 IN  BSC: Tendermint Light Client0 BNB0.001093843725
0x07fb0f1388fa95f267609d5ed3248f61a5e1bc9b109121655a748f004378e97a82864502021-06-14 9:39:0825 secs ago0x70cc6ee58ba14fd4863eff094540b6faf5822770 IN  BSC: Tendermint Light Client0 BNB0.001093363629
0xcbe28615f5449255373e2e9b0dce94ec6d24a26056ce12cc61575bfff03e67e082864482021-06-14 9:39:0231 secs ago0xb005741528b86f5952469d80a8614591e3c5b632 IN  BSC: Tendermint Light Client0 BNB0.001157517595
0x110a2dcdfed1995dcbb95bf2890e9b100ae24627bba90aecde8e91e99babd19582864472021-06-14 9:38:5934 secs ago0x70cc6ee58ba14fd4863eff094540b6faf5822770 IN  BSC: Tendermint Light Client0 BNB0.001093963749
0xd71655bf6d8816af27899a6fc776030584ac703d6c3d94df9f145673cdde362982864412021-06-14 9:38:4152 secs ago0xb005741528b86f5952469d80a8614591e3c5b632 IN  BSC: Tendermint Light Client0 BNB0.001158037075
0x8a1d05f9979039bd20a8425b50c63ab538d0e56daf4cc55699f50f7c853980c682864402021-06-14 9:38:3855 secs ago0xa387438d261be6149a2a6b20cdb2bd8a33387a27 IN  BSC: Tendermint Light Client0 BNB0.001093543665
0x0e73a17af0af51c345f5886ca151c9937356844c57385a7aabce8831d592320c82864352021-06-14 9:38:231 min ago0x70cc6ee58ba14fd4863eff094540b6faf5822770 IN  BSC: Tendermint Light Client0 BNB0.001158376902
0x7a46b5ce293a63d97d394be1ab26af9ff1e6d5db7139f41f5db9d14fa12dc96a82864342021-06-14 9:38:201 min ago0xb005741528b86f5952469d80a8614591e3c5b632 IN  BSC: Tendermint Light Client0 BNB0.001159429571
0x11d1e2831293d39f243d3ded52d4a01cfd44175f9425eb4026e2f7ea89f9ab8a82864322021-06-14 9:38:141 min ago0x70cc6ee58ba14fd4863eff094540b6faf5822770 IN  BSC: Tendermint Light Client0 BNB0.001089772911
0x1d632218e83e942e41a0f07dd3eb5a9d9612a12abbc97fbbfb8de39d4622feec82864292021-06-14 9:38:051 min ago0x5bfda17eb452e6d14ad92238bc6737898b91b18c IN  BSC: Tendermint Light Client0 BNB0.001202964044
0xe4dc3ba001f2d20411fea76564393f79aeb0b8fed98eafa73fa9621f44405bac82864282021-06-14 9:38:021 min ago0xb005741528b86f5952469d80a8614591e3c5b632 IN  BSC: Tendermint Light Client0 BNB0.001155214055
0x2fa1f44eba9e500bf3e0bb2b5ebec42974a54348a365bf657466b3f1f3c9a50182864262021-06-14 9:37:561 min ago0x5bfda17eb452e6d14ad92238bc6737898b91b18c IN  BSC: Tendermint Light Client0 BNB0.001093183592
0xce75375a1598f5cfb2423a63266d39afc8fc5a81fecd03a80cf5547fdeecae1e82864242021-06-14 9:37:501 min ago0xa387438d261be6149a2a6b20cdb2bd8a33387a27 IN  BSC: Tendermint Light Client0 BNB0.001093843725
0xc8f8e987ace02c618659896d41048e7a3a7e2ac4b6cf5cf9ca7c00b3fb33006c82864222021-06-14 9:37:441 min ago0xa387438d261be6149a2a6b20cdb2bd8a33387a27 IN  BSC: Tendermint Light Client0 BNB0.001159393096
0x4410fa2bf599c0e9971ac761567be8b85d65b2f6751a83eebc6ca0038dd580bc82864212021-06-14 9:37:411 min ago0xb005741528b86f5952469d80a8614591e3c5b632 IN  BSC: Tendermint Light Client0 BNB0.001157460737
0x86e4653261408c492ee4cbc973f3de33fa6349822a1d956f76b5659ac092c83a82864202021-06-14 9:37:381 min ago0x70cc6ee58ba14fd4863eff094540b6faf5822770 IN  BSC: Tendermint Light Client0 BNB0.001092583473
0xd5b331478393c8a65836711ccef90ed8cef5f104bfb72a5d85f017895465e05382864192021-06-14 9:37:351 min ago0x70cc6ee58ba14fd4863eff094540b6faf5822770 IN  BSC: Tendermint Light Client0 BNB0.001093843725
0x54184dab128b131fa7e546e8d457ef125cabf7adeb714ed1667761aa8f1c57d382864172021-06-14 9:37:292 mins ago0x70cc6ee58ba14fd4863eff094540b6faf5822770 IN  BSC: Tendermint Light Client0 BNB0.001093963749
0x8fd9b117746241a0628f4687fc3cd7e50cd5661acd75f3b76eda73db74f123e282864162021-06-14 9:37:262 mins ago0x70cc6ee58ba14fd4863eff094540b6faf5822770 IN  BSC: Tendermint Light Client0 BNB0.001090192995
0x7bb2188466120e84c0059af0c1d02e1a8241d4d7eb7da5f14bcf9c2a3f83414182864142021-06-14 9:37:202 mins ago0xb005741528b86f5952469d80a8614591e3c5b632 IN  BSC: Tendermint Light Client0 BNB0.001157920526
0xe049eea695376f58c8314d841ef8e61a80e46f50b16397eee0ba2ee10c4104de82864132021-06-14 9:37:172 mins ago0x5bfda17eb452e6d14ad92238bc6737898b91b18c IN  BSC: Tendermint Light Client0 BNB0.001093903737
0xfb3c436de2a0a20c184af0113dc211d1a22bcdd85504c7384d0140699ded7cfe82864112021-06-14 9:37:112 mins ago0x5bfda17eb452e6d14ad92238bc6737898b91b18c IN  BSC: Tendermint Light Client0 BNB0.001093783712
0x2d68f8b64ceecd8527943d6f294f7d99096e10df07f55cdf2efdcf30144cad7282864102021-06-14 9:37:082 mins ago0xa387438d261be6149a2a6b20cdb2bd8a33387a27 IN  BSC: Tendermint Light Client0 BNB0.001093423641
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x11622e38cda89d87ca17a87d4b03a55fdc46c62b8be5adb4aaa77b00fef05d8354713362021-03-07 11:59:4598 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0x11622e38cda89d87ca17a87d4b03a55fdc46c62b8be5adb4aaa77b00fef05d8354713362021-03-07 11:59:4598 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0x11622e38cda89d87ca17a87d4b03a55fdc46c62b8be5adb4aaa77b00fef05d8354713362021-03-07 11:59:4598 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0xa3a8fd61166187a728146ef2d7974e210bb8baa669cbcd5a343bae9d6757149d54713362021-03-07 11:59:4598 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0xa3a8fd61166187a728146ef2d7974e210bb8baa669cbcd5a343bae9d6757149d54713362021-03-07 11:59:4598 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0xa3a8fd61166187a728146ef2d7974e210bb8baa669cbcd5a343bae9d6757149d54713362021-03-07 11:59:4598 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0xa94e0bb3cdffab7d05401e00d50ea136950266740fcf0a2f93eada500fe3a76554713362021-03-07 11:59:4598 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0xa94e0bb3cdffab7d05401e00d50ea136950266740fcf0a2f93eada500fe3a76554713362021-03-07 11:59:4598 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0xa94e0bb3cdffab7d05401e00d50ea136950266740fcf0a2f93eada500fe3a76554713362021-03-07 11:59:4598 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0x4e2ac52e66263790055021819e023a534729354766880b0b58f410747562551054713362021-03-07 11:59:4598 days 21 hrs ago BSC: Tendermint Light Client BSC: Relayer Hub0 BNB
0x4bdf2a85ef9f92d9cbd1375bfbfe65455edf29e519af524060d23d1d79f6d2df54713232021-03-07 11:59:0698 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0x4bdf2a85ef9f92d9cbd1375bfbfe65455edf29e519af524060d23d1d79f6d2df54713232021-03-07 11:59:0698 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0x4bdf2a85ef9f92d9cbd1375bfbfe65455edf29e519af524060d23d1d79f6d2df54713232021-03-07 11:59:0698 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0xa0fd72bb20233426a011da13bb43fc689b3a8f25b93747bc4d22144bc10a66ed54713232021-03-07 11:59:0698 days 21 hrs ago BSC: Tendermint Light Client BSC: Relayer Hub0 BNB
0x69907f270ab2a320aa42336624450236b50a60906e1033c42cc4311df529e44c54713192021-03-07 11:58:5498 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0x69907f270ab2a320aa42336624450236b50a60906e1033c42cc4311df529e44c54713192021-03-07 11:58:5498 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0x69907f270ab2a320aa42336624450236b50a60906e1033c42cc4311df529e44c54713192021-03-07 11:58:5498 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0x4b72d978b1c4c6ff8c1f57b44f49c3e918f3bcffbc41ac49329b54597a0622e654713192021-03-07 11:58:5498 days 21 hrs ago BSC: Tendermint Light Client BSC: Relayer Hub0 BNB
0x7708b94d6bde212750ef4d3c241dc97320f4295ceabe73b8be0d8669ccc23fa254713102021-03-07 11:58:2798 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0x7708b94d6bde212750ef4d3c241dc97320f4295ceabe73b8be0d8669ccc23fa254713102021-03-07 11:58:2798 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0x7708b94d6bde212750ef4d3c241dc97320f4295ceabe73b8be0d8669ccc23fa254713102021-03-07 11:58:2798 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0x1290b5b1bc423ca8c8ff7db6ddf1cbbd6f77b19c6a1d2a49b654ac028e1e23b354713102021-03-07 11:58:2798 days 21 hrs ago BSC: Tendermint Light Client BSC: Relayer Hub0 BNB
0xcaf35fd753aceafe0a4f0564c475898ed5f487177e1bf1d209fc959f9a86be6d54713062021-03-07 11:58:1598 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0xcaf35fd753aceafe0a4f0564c475898ed5f487177e1bf1d209fc959f9a86be6d54713062021-03-07 11:58:1598 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
0xcaf35fd753aceafe0a4f0564c475898ed5f487177e1bf1d209fc959f9a86be6d54713062021-03-07 11:58:1598 days 21 hrs ago BSC: Cross Chain BSC: Tendermint Light Client0 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TendermintLightClient

Compiler Version
v0.6.4+commit.1dca32f3

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at BscScan.com on 2020-09-02
*/

// File: contracts/lib/Memory.sol

pragma solidity 0.6.4;

library Memory {

    // Size of a word, in bytes.
    uint internal constant WORD_SIZE = 32;
    // Size of the header of a 'bytes' array.
    uint internal constant BYTES_HEADER_SIZE = 32;
    // Address of the free memory pointer.
    uint internal constant FREE_MEM_PTR = 0x40;

    // Compares the 'len' bytes starting at address 'addr' in memory with the 'len'
    // bytes starting at 'addr2'.
    // Returns 'true' if the bytes are the same, otherwise 'false'.
    function equals(uint addr, uint addr2, uint len) internal pure returns (bool equal) {
        assembly {
            equal := eq(keccak256(addr, len), keccak256(addr2, len))
        }
    }

    // Compares the 'len' bytes starting at address 'addr' in memory with the bytes stored in
    // 'bts'. It is allowed to set 'len' to a lower value then 'bts.length', in which case only
    // the first 'len' bytes will be compared.
    // Requires that 'bts.length >= len'
    function equals(uint addr, uint len, bytes memory bts) internal pure returns (bool equal) {
        require(bts.length >= len);
        uint addr2;
        assembly {
            addr2 := add(bts, /*BYTES_HEADER_SIZE*/32)
        }
        return equals(addr, addr2, len);
    }

    function compareStrings(string memory a, string memory b) internal pure returns (bool) {
        return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));
    }

    // Copy 'len' bytes from memory address 'src', to address 'dest'.
    // This function does not check the or destination, it only copies
    // the bytes.
    function copy(uint src, uint dest, uint len) internal pure {
        // Copy word-length chunks while possible
        for (; len >= WORD_SIZE; len -= WORD_SIZE) {
            assembly {
                mstore(dest, mload(src))
            }
            dest += WORD_SIZE;
            src += WORD_SIZE;
        }

        // Copy remaining bytes
        uint mask = 256 ** (WORD_SIZE - len) - 1;
        assembly {
            let srcpart := and(mload(src), not(mask))
            let destpart := and(mload(dest), mask)
            mstore(dest, or(destpart, srcpart))
        }
    }

    // Returns a memory pointer to the provided bytes array.
    function ptr(bytes memory bts) internal pure returns (uint addr) {
        assembly {
            addr := bts
        }
    }

    // Returns a memory pointer to the data portion of the provided bytes array.
    function dataPtr(bytes memory bts) internal pure returns (uint addr) {
        assembly {
            addr := add(bts, /*BYTES_HEADER_SIZE*/32)
        }
    }

    // This function does the same as 'dataPtr(bytes memory)', but will also return the
    // length of the provided bytes array.
    function fromBytes(bytes memory bts) internal pure returns (uint addr, uint len) {
        len = bts.length;
        assembly {
            addr := add(bts, /*BYTES_HEADER_SIZE*/32)
        }
    }

    // Creates a 'bytes memory' variable from the memory address 'addr', with the
    // length 'len'. The function will allocate new memory for the bytes array, and
    // the 'len bytes starting at 'addr' will be copied into that new memory.
    function toBytes(uint addr, uint len) internal pure returns (bytes memory bts) {
        bts = new bytes(len);
        uint btsptr;
        assembly {
            btsptr := add(bts, /*BYTES_HEADER_SIZE*/32)
        }
        copy(addr, btsptr, len);
    }

    // Get the word stored at memory address 'addr' as a 'uint'.
    function toUint(uint addr) internal pure returns (uint n) {
        assembly {
            n := mload(addr)
        }
    }

    // Get the word stored at memory address 'addr' as a 'bytes32'.
    function toBytes32(uint addr) internal pure returns (bytes32 bts) {
        assembly {
            bts := mload(addr)
        }
    }
}

// File: contracts/lib/BytesToTypes.sol

pragma solidity 0.6.4;

/**
 * @title BytesToTypes
 * Copyright (c) 2016-2020 zpouladzade/Seriality
 * @dev The BytesToTypes contract converts the memory byte arrays to the standard solidity types
 * @author [email protected]
 */

library BytesToTypes {


    function bytesToAddress(uint _offst, bytes memory _input) internal pure returns (address _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToBool(uint _offst, bytes memory _input) internal pure returns (bool _output) {

        uint8 x;
        assembly {
            x := mload(add(_input, _offst))
        }
        x==0 ? _output = false : _output = true;
    }

    function getStringSize(uint _offst, bytes memory _input) internal pure returns(uint size) {

        assembly{

            size := mload(add(_input,_offst))
            let chunk_count := add(div(size,32),1) // chunk_count = size/32 + 1

            if gt(mod(size,32),0) {// if size%32 > 0
                chunk_count := add(chunk_count,1)
            }

             size := mul(chunk_count,32)// first 32 bytes reseves for size in strings
        }
    }

    function bytesToString(uint _offst, bytes memory _input, bytes memory _output) internal pure {

        uint size = 32;
        assembly {

            let chunk_count

            size := mload(add(_input,_offst))
            chunk_count := add(div(size,32),1) // chunk_count = size/32 + 1

            if gt(mod(size,32),0) {
                chunk_count := add(chunk_count,1)  // chunk_count++
            }

            for { let index:= 0 }  lt(index , chunk_count) { index := add(index,1) } {
                mstore(add(_output,mul(index,32)),mload(add(_input,_offst)))
                _offst := sub(_offst,32)           // _offst -= 32
            }
        }
    }

    function bytesToBytes32(uint _offst, bytes memory  _input, bytes32 _output) internal pure {

        assembly {
            mstore(_output , add(_input, _offst))
            mstore(add(_output,32) , add(add(_input, _offst),32))
        }
    }

    function bytesToInt8(uint _offst, bytes memory  _input) internal pure returns (int8 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt16(uint _offst, bytes memory _input) internal pure returns (int16 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt24(uint _offst, bytes memory _input) internal pure returns (int24 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt32(uint _offst, bytes memory _input) internal pure returns (int32 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt40(uint _offst, bytes memory _input) internal pure returns (int40 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt48(uint _offst, bytes memory _input) internal pure returns (int48 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt56(uint _offst, bytes memory _input) internal pure returns (int56 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt64(uint _offst, bytes memory _input) internal pure returns (int64 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt72(uint _offst, bytes memory _input) internal pure returns (int72 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt80(uint _offst, bytes memory _input) internal pure returns (int80 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt88(uint _offst, bytes memory _input) internal pure returns (int88 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt96(uint _offst, bytes memory _input) internal pure returns (int96 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

        function bytesToInt104(uint _offst, bytes memory _input) internal pure returns (int104 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt112(uint _offst, bytes memory _input) internal pure returns (int112 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt120(uint _offst, bytes memory _input) internal pure returns (int120 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt128(uint _offst, bytes memory _input) internal pure returns (int128 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt136(uint _offst, bytes memory _input) internal pure returns (int136 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt144(uint _offst, bytes memory _input) internal pure returns (int144 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt152(uint _offst, bytes memory _input) internal pure returns (int152 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt160(uint _offst, bytes memory _input) internal pure returns (int160 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt168(uint _offst, bytes memory _input) internal pure returns (int168 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt176(uint _offst, bytes memory _input) internal pure returns (int176 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt184(uint _offst, bytes memory _input) internal pure returns (int184 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt192(uint _offst, bytes memory _input) internal pure returns (int192 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt200(uint _offst, bytes memory _input) internal pure returns (int200 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt208(uint _offst, bytes memory _input) internal pure returns (int208 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt216(uint _offst, bytes memory _input) internal pure returns (int216 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt224(uint _offst, bytes memory _input) internal pure returns (int224 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt232(uint _offst, bytes memory _input) internal pure returns (int232 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt240(uint _offst, bytes memory _input) internal pure returns (int240 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt248(uint _offst, bytes memory _input) internal pure returns (int248 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToInt256(uint _offst, bytes memory _input) internal pure returns (int256 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

        function bytesToUint8(uint _offst, bytes memory _input) internal pure returns (uint8 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

        function bytesToUint16(uint _offst, bytes memory _input) internal pure returns (uint16 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

        function bytesToUint24(uint _offst, bytes memory _input) internal pure returns (uint24 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

        function bytesToUint32(uint _offst, bytes memory _input) internal pure returns (uint32 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

        function bytesToUint40(uint _offst, bytes memory _input) internal pure returns (uint40 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

        function bytesToUint48(uint _offst, bytes memory _input) internal pure returns (uint48 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

        function bytesToUint56(uint _offst, bytes memory _input) internal pure returns (uint56 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

        function bytesToUint64(uint _offst, bytes memory _input) internal pure returns (uint64 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

        function bytesToUint72(uint _offst, bytes memory _input) internal pure returns (uint72 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

        function bytesToUint80(uint _offst, bytes memory _input) internal pure returns (uint80 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

        function bytesToUint88(uint _offst, bytes memory _input) internal pure returns (uint88 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

        function bytesToUint96(uint _offst, bytes memory _input) internal pure returns (uint96 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

        function bytesToUint104(uint _offst, bytes memory _input) internal pure returns (uint104 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint112(uint _offst, bytes memory _input) internal pure returns (uint112 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint120(uint _offst, bytes memory _input) internal pure returns (uint120 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint128(uint _offst, bytes memory _input) internal pure returns (uint128 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint136(uint _offst, bytes memory _input) internal pure returns (uint136 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint144(uint _offst, bytes memory _input) internal pure returns (uint144 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint152(uint _offst, bytes memory _input) internal pure returns (uint152 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint160(uint _offst, bytes memory _input) internal pure returns (uint160 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint168(uint _offst, bytes memory _input) internal pure returns (uint168 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint176(uint _offst, bytes memory _input) internal pure returns (uint176 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint184(uint _offst, bytes memory _input) internal pure returns (uint184 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint192(uint _offst, bytes memory _input) internal pure returns (uint192 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint200(uint _offst, bytes memory _input) internal pure returns (uint200 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint208(uint _offst, bytes memory _input) internal pure returns (uint208 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint216(uint _offst, bytes memory _input) internal pure returns (uint216 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint224(uint _offst, bytes memory _input) internal pure returns (uint224 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint232(uint _offst, bytes memory _input) internal pure returns (uint232 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint240(uint _offst, bytes memory _input) internal pure returns (uint240 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint248(uint _offst, bytes memory _input) internal pure returns (uint248 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

    function bytesToUint256(uint _offst, bytes memory _input) internal pure returns (uint256 _output) {

        assembly {
            _output := mload(add(_input, _offst))
        }
    }

}

// File: contracts/interface/ILightClient.sol

pragma solidity 0.6.4;

interface ILightClient {

  function isHeaderSynced(uint64 height) external view returns (bool);

  function getAppHash(uint64 height) external view returns (bytes32);

  function getSubmitter(uint64 height) external view returns (address payable);

}

// File: contracts/interface/ISystemReward.sol

pragma solidity 0.6.4;

interface ISystemReward {
  function claimRewards(address payable to, uint256 amount) external returns(uint256 actualAmount);
}

// File: contracts/interface/IParamSubscriber.sol

pragma solidity 0.6.4;

interface IParamSubscriber {
    function updateParam(string calldata key, bytes calldata value) external;
}

// File: contracts/interface/IRelayerHub.sol

pragma solidity 0.6.4;

interface IRelayerHub {
  function isRelayer(address sender) external view returns (bool);
}

// File: contracts/System.sol

pragma solidity 0.6.4;




contract System {

  bool public alreadyInit;

  uint32 public constant CODE_OK = 0;
  uint32 public constant ERROR_FAIL_DECODE = 100;

  uint8 constant public BIND_CHANNELID = 0x01;
  uint8 constant public TRANSFER_IN_CHANNELID = 0x02;
  uint8 constant public TRANSFER_OUT_CHANNELID = 0x03;
  uint8 constant public STAKING_CHANNELID = 0x08;
  uint8 constant public GOV_CHANNELID = 0x09;
  uint8 constant public SLASH_CHANNELID = 0x0b;
  uint16 constant public bscChainID = 0x0038;

  address public constant VALIDATOR_CONTRACT_ADDR = 0x0000000000000000000000000000000000001000;
  address public constant SLASH_CONTRACT_ADDR = 0x0000000000000000000000000000000000001001;
  address public constant SYSTEM_REWARD_ADDR = 0x0000000000000000000000000000000000001002;
  address public constant LIGHT_CLIENT_ADDR = 0x0000000000000000000000000000000000001003;
  address public constant TOKEN_HUB_ADDR = 0x0000000000000000000000000000000000001004;
  address public constant INCENTIVIZE_ADDR=0x0000000000000000000000000000000000001005;
  address public constant RELAYERHUB_CONTRACT_ADDR = 0x0000000000000000000000000000000000001006;
  address public constant GOV_HUB_ADDR = 0x0000000000000000000000000000000000001007;
  address public constant TOKEN_MANAGER_ADDR = 0x0000000000000000000000000000000000001008;
  address public constant CROSS_CHAIN_CONTRACT_ADDR = 0x0000000000000000000000000000000000002000;


  modifier onlyCoinbase() {
    require(msg.sender == block.coinbase, "the message sender must be the block producer");
    _;
  }

  modifier onlyNotInit() {
    require(!alreadyInit, "the contract already init");
    _;
  }

  modifier onlyInit() {
    require(alreadyInit, "the contract not init yet");
    _;
  }

  modifier onlySlash() {
    require(msg.sender == SLASH_CONTRACT_ADDR, "the message sender must be slash contract");
    _;
  }

  modifier onlyTokenHub() {
    require(msg.sender == TOKEN_HUB_ADDR, "the message sender must be token hub contract");
    _;
  }

  modifier onlyGov() {
    require(msg.sender == GOV_HUB_ADDR, "the message sender must be governance contract");
    _;
  }

  modifier onlyValidatorContract() {
    require(msg.sender == VALIDATOR_CONTRACT_ADDR, "the message sender must be validatorSet contract");
    _;
  }

  modifier onlyCrossChainContract() {
    require(msg.sender == CROSS_CHAIN_CONTRACT_ADDR, "the message sender must be cross chain contract");
    _;
  }

  modifier onlyRelayerIncentivize() {
    require(msg.sender == INCENTIVIZE_ADDR, "the message sender must be incentivize contract");
    _;
  }

  modifier onlyRelayer() {
    require(IRelayerHub(RELAYERHUB_CONTRACT_ADDR).isRelayer(msg.sender), "the msg sender is not a relayer");
    _;
  }

  modifier onlyTokenManager() {
    require(msg.sender == TOKEN_MANAGER_ADDR, "the msg sender must be tokenManager");
    _;
  }

  // Not reliable, do not use when need strong verify
  function isContract(address addr) internal view returns (bool) {
    uint size;
    assembly { size := extcodesize(addr) }
    return size > 0;
  }
}

// File: contracts/TendermintLightClient.sol

pragma solidity 0.6.4;







contract TendermintLightClient is ILightClient, System, IParamSubscriber{

  struct ConsensusState {
    uint64  preValidatorSetChangeHeight;
    bytes32 appHash;
    bytes32 curValidatorSetHash;
    bytes   nextValidatorSet;
  }

  mapping(uint64 => ConsensusState) public lightClientConsensusStates;
  mapping(uint64 => address payable) public submitters;
  uint64 public initialHeight;
  uint64 public latestHeight;
  bytes32 public chainID;

  bytes constant public INIT_CONSENSUS_STATE_BYTES = hex"42696e616e63652d436861696e2d5469677269730000000000000000000000000000000006915167cedaf7bbf7df47d932fdda630527ee648562cf3e52c5e5f46156a3a971a4ceb443c53a50d8653ef8cf1e5716da68120fb51b636dc6d111ec3277b098ecd42d49d3769d8a1f78b4c17a965f7a30d4181fabbd1f969f46d3c8e83b5ad4845421d8000000e8d4a510002ba4e81542f437b7ae1f8a35ddb233c789a8dc22734377d9b6d63af1ca403b61000000e8d4a51000df8da8c5abfdb38595391308bb71e5a1e0aabdc1d0cf38315d50d6be939b2606000000e8d4a51000b6619edca4143484800281d698b70c935e9152ad57b31d85c05f2f79f64b39f3000000e8d4a510009446d14ad86c8d2d74780b0847110001a1c2e252eedfea4753ebbbfce3a22f52000000e8d4a510000353c639f80cc8015944436dab1032245d44f912edc31ef668ff9f4a45cd0599000000e8d4a51000e81d3797e0544c3a718e1f05f0fb782212e248e784c1a851be87e77ae0db230e000000e8d4a510005e3fcda30bd19d45c4b73688da35e7da1fce7c6859b2c1f20ed5202d24144e3e000000e8d4a51000b06a59a2d75bf5d014fce7c999b5e71e7a960870f725847d4ba3235baeaa08ef000000e8d4a510000c910e2fe650e4e01406b3310b489fb60a84bc3ff5c5bee3a56d5898b6a8af32000000e8d4a5100071f2d7b8ec1c8b99a653429b0118cd201f794f409d0fea4d65b1b662f2b00063000000e8d4a51000";
  uint256 constant public INIT_REWARD_FOR_VALIDATOR_SER_CHANGE  = 1e16;
  uint256 public rewardForValidatorSetChange;

  event initConsensusState(uint64 initHeight, bytes32 appHash);
  event syncConsensusState(uint64 height, uint64 preValidatorSetChangeHeight, bytes32 appHash, bool validatorChanged);
  event paramChange(string key, bytes value);

  /* solium-disable-next-line */
  constructor() public {}

  function init() external onlyNotInit {
    uint256 pointer;
    uint256 length;
    (pointer, length) = Memory.fromBytes(INIT_CONSENSUS_STATE_BYTES);

    /* solium-disable-next-line */
    assembly {
      sstore(chainID_slot, mload(pointer))
    }

    ConsensusState memory cs;
    uint64 height;
    (cs, height) = decodeConsensusState(pointer, length, false);
    cs.preValidatorSetChangeHeight = 0;
    lightClientConsensusStates[height] = cs;

    initialHeight = height;
    latestHeight = height;
    alreadyInit = true;
    rewardForValidatorSetChange = INIT_REWARD_FOR_VALIDATOR_SER_CHANGE;

    emit initConsensusState(initialHeight, cs.appHash);
  }

  function syncTendermintHeader(bytes calldata header, uint64 height) external onlyRelayer returns (bool) {
    require(submitters[height] == address(0x0), "can't sync duplicated header");
    require(height > initialHeight, "can't sync header before initialHeight");

    uint64 preValidatorSetChangeHeight = latestHeight;
    ConsensusState memory cs = lightClientConsensusStates[preValidatorSetChangeHeight];
    for (; preValidatorSetChangeHeight >= height && preValidatorSetChangeHeight >= initialHeight;) {
      preValidatorSetChangeHeight = cs.preValidatorSetChangeHeight;
      cs = lightClientConsensusStates[preValidatorSetChangeHeight];
    }
    if (cs.nextValidatorSet.length == 0) {
      preValidatorSetChangeHeight = cs.preValidatorSetChangeHeight;
      cs.nextValidatorSet = lightClientConsensusStates[preValidatorSetChangeHeight].nextValidatorSet;
      require(cs.nextValidatorSet.length != 0, "failed to load validator set data");
    }

    //32 + 32 + 8 + 32 + 32 + cs.nextValidatorSet.length;
    uint256 length = 136 + cs.nextValidatorSet.length;
    bytes memory input = new bytes(length+header.length);
    uint256 ptr = Memory.dataPtr(input);
    require(encodeConsensusState(cs, preValidatorSetChangeHeight, ptr, length), "failed to serialize consensus state");

    // write header to input
    uint256 src;
    ptr = ptr+length;
    (src, length) = Memory.fromBytes(header);
    Memory.copy(src, ptr, length);

    length = input.length+32;
    // Maximum validator quantity is 99
    bytes32[128] memory result;
    /* solium-disable-next-line */
    assembly {
    // call validateTendermintHeader precompile contract
    // Contract address: 0x64
      if iszero(staticcall(not(0), 0x64, input, length, result, 4096)) {
        revert(0, 0)
      }
    }

    //Judge if the validator set is changed
    /* solium-disable-next-line */
    assembly {
      length := mload(add(result, 0))
    }
    bool validatorChanged = false;
    if ((length&(0x01<<248))!=0x00) {
      validatorChanged = true;
      ISystemReward(SYSTEM_REWARD_ADDR).claimRewards(msg.sender, rewardForValidatorSetChange);
    }
    length = length&0xffffffffffffffff;

    /* solium-disable-next-line */
    assembly {
      ptr := add(result, 32)
    }

    uint64 actualHeaderHeight;
    (cs, actualHeaderHeight) = decodeConsensusState(ptr, length, !validatorChanged);
    require(actualHeaderHeight == height, "header height doesn't equal to the specified height");

    submitters[height] = msg.sender;
    cs.preValidatorSetChangeHeight = preValidatorSetChangeHeight;
    lightClientConsensusStates[height] = cs;
    if (height > latestHeight) {
      latestHeight = height;
    }

    emit syncConsensusState(height, preValidatorSetChangeHeight, cs.appHash, validatorChanged);

    return true;
  }

  function isHeaderSynced(uint64 height) external override view returns (bool) {
    return submitters[height] != address(0x0) || height == initialHeight;
  }

  function getAppHash(uint64 height) external override view returns (bytes32) {
    return lightClientConsensusStates[height].appHash;
  }

  function getSubmitter(uint64 height) external override view returns (address payable) {
    return submitters[height];
  }

  function getChainID() external view returns (string memory) {
    bytes memory chainIDBytes = new bytes(32);
    assembly {
      mstore(add(chainIDBytes,32), sload(chainID_slot))
    }

    uint8 chainIDLength = 0;
    for (uint8 j = 0; j < 32; j++) {
      if (chainIDBytes[j] != 0) {
        chainIDLength++;
      } else {
        break;
      }
    }

    bytes memory chainIDStr = new bytes(chainIDLength);
    for (uint8 j = 0; j < chainIDLength; j++) {
      chainIDStr[j] = chainIDBytes[j];
    }

    return string(chainIDStr);
  }

  // | length   | chainID   | height   | appHash  | curValidatorSetHash | [{validator pubkey, voting power}] |
  // | 32 bytes | 32 bytes   | 8 bytes  | 32 bytes | 32 bytes            | [{32 bytes, 8 bytes}]              |
  /* solium-disable-next-line */
  function encodeConsensusState(ConsensusState memory cs, uint64 height, uint256 outputPtr, uint256 size) internal view returns (bool) {
    outputPtr = outputPtr + size - cs.nextValidatorSet.length;

    uint256 src;
    uint256 length;
    (src, length) = Memory.fromBytes(cs.nextValidatorSet);
    Memory.copy(src, outputPtr, length);
    outputPtr = outputPtr-32;

    bytes32 hash = cs.curValidatorSetHash;
    /* solium-disable-next-line */
    assembly {
      mstore(outputPtr, hash)
    }
    outputPtr = outputPtr-32;

    hash = cs.appHash;
    /* solium-disable-next-line */
    assembly {
      mstore(outputPtr, hash)
    }
    outputPtr = outputPtr-32;

    /* solium-disable-next-line */
    assembly {
      mstore(outputPtr, height)
    }
    outputPtr = outputPtr-8;

    /* solium-disable-next-line */
    assembly {
      mstore(outputPtr, sload(chainID_slot))
    }
    outputPtr = outputPtr-32;

    // size doesn't contain length
    size = size-32;
    /* solium-disable-next-line */
    assembly {
      mstore(outputPtr, size)
    }

    return true;
  }

  // | chainID  | height   | appHash  | curValidatorSetHash | [{validator pubkey, voting power}] |
  // | 32 bytes  | 8 bytes  | 32 bytes | 32 bytes            | [{32 bytes, 8 bytes}]              |
  /* solium-disable-next-line */
  function decodeConsensusState(uint256 ptr, uint256 size, bool leaveOutValidatorSet) internal pure returns(ConsensusState memory, uint64) {
    ptr = ptr+8;
    uint64 height;
    /* solium-disable-next-line */
    assembly {
      height := mload(ptr)
    }

    ptr = ptr+32;
    bytes32 appHash;
    /* solium-disable-next-line */
    assembly {
      appHash := mload(ptr)
    }

    ptr = ptr+32;
    bytes32 curValidatorSetHash;
    /* solium-disable-next-line */
    assembly {
      curValidatorSetHash := mload(ptr)
    }

    ConsensusState memory cs;
    cs.appHash = appHash;
    cs.curValidatorSetHash = curValidatorSetHash;

    if (!leaveOutValidatorSet) {
      uint256 dest;
      uint256 length;
      cs.nextValidatorSet = new bytes(size-104);
      (dest,length) = Memory.fromBytes(cs.nextValidatorSet);

      Memory.copy(ptr+32, dest, length);
    }

    return (cs, height);
  }

  function updateParam(string calldata key, bytes calldata value) external override onlyInit onlyGov{
    if (Memory.compareStrings(key,"rewardForValidatorSetChange")) {
      require(value.length == 32, "length of rewardForValidatorSetChange mismatch");
      uint256 newRewardForValidatorSetChange = BytesToTypes.bytesToUint256(32, value);
      require(newRewardForValidatorSetChange > 0 && newRewardForValidatorSetChange <= 1e18, "the newRewardForValidatorSetChange out of range");
      rewardForValidatorSetChange = newRewardForValidatorSetChange;
    } else {
      require(false, "unknown param");
    }
    emit paramChange(key, value);
  }
}

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"event","name":"initConsensusState","inputs":[{"type":"uint64","name":"initHeight","internalType":"uint64","indexed":false},{"type":"bytes32","name":"appHash","internalType":"bytes32","indexed":false}],"anonymous":false},{"type":"event","name":"paramChange","inputs":[{"type":"string","name":"key","internalType":"string","indexed":false},{"type":"bytes","name":"value","internalType":"bytes","indexed":false}],"anonymous":false},{"type":"event","name":"syncConsensusState","inputs":[{"type":"uint64","name":"height","internalType":"uint64","indexed":false},{"type":"uint64","name":"preValidatorSetChangeHeight","internalType":"uint64","indexed":false},{"type":"bytes32","name":"appHash","internalType":"bytes32","indexed":false},{"type":"bool","name":"validatorChanged","internalType":"bool","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"BIND_CHANNELID","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint32","name":"","internalType":"uint32"}],"name":"CODE_OK","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"CROSS_CHAIN_CONTRACT_ADDR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint32","name":"","internalType":"uint32"}],"name":"ERROR_FAIL_DECODE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"GOV_CHANNELID","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"GOV_HUB_ADDR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"INCENTIVIZE_ADDR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes","name":"","internalType":"bytes"}],"name":"INIT_CONSENSUS_STATE_BYTES","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"INIT_REWARD_FOR_VALIDATOR_SER_CHANGE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"LIGHT_CLIENT_ADDR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"RELAYERHUB_CONTRACT_ADDR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"SLASH_CHANNELID","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"SLASH_CONTRACT_ADDR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"STAKING_CHANNELID","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"SYSTEM_REWARD_ADDR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"TOKEN_HUB_ADDR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"TOKEN_MANAGER_ADDR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"TRANSFER_IN_CHANNELID","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"TRANSFER_OUT_CHANNELID","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"VALIDATOR_CONTRACT_ADDR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"alreadyInit","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint16","name":"","internalType":"uint16"}],"name":"bscChainID","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"chainID","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getAppHash","inputs":[{"type":"uint64","name":"height","internalType":"uint64"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"getChainID","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address payable"}],"name":"getSubmitter","inputs":[{"type":"uint64","name":"height","internalType":"uint64"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"init","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint64","name":"","internalType":"uint64"}],"name":"initialHeight","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isHeaderSynced","inputs":[{"type":"uint64","name":"height","internalType":"uint64"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint64","name":"","internalType":"uint64"}],"name":"latestHeight","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint64","name":"preValidatorSetChangeHeight","internalType":"uint64"},{"type":"bytes32","name":"appHash","internalType":"bytes32"},{"type":"bytes32","name":"curValidatorSetHash","internalType":"bytes32"},{"type":"bytes","name":"nextValidatorSet","internalType":"bytes"}],"name":"lightClientConsensusStates","inputs":[{"type":"uint64","name":"","internalType":"uint64"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"rewardForValidatorSetChange","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address payable"}],"name":"submitters","inputs":[{"type":"uint64","name":"","internalType":"uint64"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"syncTendermintHeader","inputs":[{"type":"bytes","name":"header","internalType":"bytes"},{"type":"uint64","name":"height","internalType":"uint64"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateParam","inputs":[{"type":"string","name":"key","internalType":"string"},{"type":"bytes","name":"value","internalType":"bytes"}]}]

0x608060405234801561001057600080fd5b50600436106102115760003560e01c8063a78abc1611610125578063dda83148116100ad578063e405bbc31161007c578063e405bbc314610681578063ea54b2aa14610689578063f9a2bbc714610691578063fc3e590814610699578063fd6a6879146106a157610211565b8063dda8314814610609578063df5fe7041461062f578063e1c7392a14610655578063e2761af01461065d57610211565b8063c81b1662116100f4578063c81b166214610534578063cba510a91461053c578063d816987914610562578063da8d08f0146105db578063dc927faf1461060157610211565b8063a78abc1614610444578063ab51bb9614610460578063ac43175114610468578063adc879e91461052c57610211565b8063564b81ef116101a857806375d47a0a1161017757806375d47a0a1461041c5780637942fd051461042457806396713da91461042c5780639dc0926214610434578063a1a11bf51461043c57610211565b8063564b81ef146102ca5780635c5ae8db146103475780636e47b4821461040c57806370fd5bad1461041457610211565b806343756e5c116101e457806343756e5c14610277578063493279b11461029b5780634bf6c882146102ba57806351e80672146102c257610211565b80630bee7a67146102165780632657e9b61461023757806333f7798d146102515780633dffc38714610259575b600080fd5b61021e6106a9565b6040805163ffffffff9092168252519081900360200190f35b61023f6106ae565b60408051918252519081900360200190f35b61023f6106b9565b6102616106bf565b6040805160ff9092168252519081900360200190f35b61027f6106c4565b604080516001600160a01b039092168252519081900360200190f35b6102a36106ca565b6040805161ffff9092168252519081900360200190f35b6102616106cf565b61027f6106d4565b6102d26106da565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561030c5781810151838201526020016102f4565b50505050905090810190601f1680156103395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61036d6004803603602081101561035d57600080fd5b50356001600160401b03166107e6565b60405180856001600160401b03166001600160401b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156103ce5781810151838201526020016103b6565b50505050905090810190601f1680156103fb5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b61027f6108a1565b6102616108a7565b61027f6108ac565b6102616108b2565b6102616108b7565b61027f6108bc565b61027f6108c2565b61044c6108c8565b604080519115158252519081900360200190f35b61021e6108d1565b61052a6004803603604081101561047e57600080fd5b81019060208101813564010000000081111561049957600080fd5b8201836020820111156104ab57600080fd5b803590602001918460018302840111640100000000831117156104cd57600080fd5b9193909290916020810190356401000000008111156104eb57600080fd5b8201836020820111156104fd57600080fd5b8035906020019184600183028401116401000000008311171561051f57600080fd5b5090925090506108d6565b005b61023f610b8f565b61027f610b95565b61023f6004803603602081101561055257600080fd5b50356001600160401b0316610b9b565b61044c6004803603604081101561057857600080fd5b81019060208101813564010000000081111561059357600080fd5b8201836020820111156105a557600080fd5b803590602001918460018302840111640100000000831117156105c757600080fd5b9193509150356001600160401b0316610bba565b61027f600480360360208110156105f157600080fd5b50356001600160401b031661139b565b61027f6113b6565b61027f6004803603602081101561061f57600080fd5b50356001600160401b03166113bc565b61044c6004803603602081101561064557600080fd5b50356001600160401b03166113e0565b61052a611422565b6106656115c9565b604080516001600160401b039092168252519081900360200190f35b6106656115d8565b6102d26115ee565b61027f61160d565b610261611613565b61027f611618565b606481565b662386f26fc1000081565b60055481565b600181565b61100181565b603881565b600881565b61200081565b604080516020808252818301909252606091829190602082018180368337505060045460208301525090506000805b60208160ff16101561075057828160ff168151811061072457fe5b01602001516001600160f81b0319161561074357600190910190610748565b610750565b600101610709565b5060608160ff166040519080825280601f01601f191660200182016040528015610781576020820181803683370190505b50905060005b8260ff168160ff1610156107dd57838160ff16815181106107a457fe5b602001015160f81c60f81b828260ff16815181106107be57fe5b60200101906001600160f81b031916908160001a905350600101610787565b50925050505b90565b60016020818152600092835260409283902080548184015460028084015460038501805489516101009982161599909902600019011692909204601f81018790048702880187019098528787526001600160401b0390931696919592949091908301828280156108975780601f1061086c57610100808354040283529160200191610897565b820191906000526020600020905b81548152906001019060200180831161087a57829003601f168201915b5050505050905084565b61100581565b600281565b61100881565b600b81565b600981565b61100781565b61100681565b60005460ff1681565b600081565b60005460ff1661092d576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e7472616374206e6f7420696e69742079657400000000000000604482015290519081900360640190fd5b336110071461096d5760405162461bcd60e51b815260040180806020018281038252602e8152602001806119ea602e913960400191505060405180910390fd5b6109e184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601b81527f726577617264466f7256616c696461746f725365744368616e676500000000006020820152915061161e9050565b15610ac05760208114610a255760405162461bcd60e51b815260040180806020018281038252602e815260200180611989602e913960400191505060405180910390fd5b604080516020601f8401819004810282018101909252828152600091610a639185858083850183828082843760009201919091525061170592505050565b9050600081118015610a7d5750670de0b6b3a76400008111155b610ab85760405162461bcd60e51b815260040180806020018281038252602f815260200180611a18602f913960400191505060405180910390fd5b600555610afd565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b60045481565b61100281565b6001600160401b03166000908152600160208190526040909120015490565b60408051630a83aaa960e31b815233600482015290516000916110069163541d554891602480820192602092909190829003018186803b158015610bfd57600080fd5b505afa158015610c11573d6000803e3d6000fd5b505050506040513d6020811015610c2757600080fd5b5051610c7a576040805162461bcd60e51b815260206004820152601f60248201527f746865206d73672073656e646572206973206e6f7420612072656c6179657200604482015290519081900360640190fd5b6001600160401b0382166000908152600260205260409020546001600160a01b031615610cee576040805162461bcd60e51b815260206004820152601c60248201527f63616e27742073796e63206475706c6963617465642068656164657200000000604482015290519081900360640190fd5b6003546001600160401b0390811690831611610d3b5760405162461bcd60e51b8152600401808060200182810382526026815260200180611a476026913960400191505060405180910390fd5b600354600160401b90046001600160401b0316610d56611867565b6001600160401b0382811660009081526001602081815260409283902083516080810185528154909516855280830154858301526002808201548686015260038201805486516101009682161596909602600019011691909104601f81018490048402850184019095528484529093606086019392830182828015610e1c5780601f10610df157610100808354040283529160200191610e1c565b820191906000526020600020905b815481529060010190602001808311610dff57829003601f168201915b50505050508152505090505b836001600160401b0316826001600160401b031610158015610e5957506003546001600160401b0390811690831610155b15610f3a5780516001600160401b0380821660009081526001602081815260409283902083516080810185528154909516855280830154858301526002808201548686015260038201805486516101009682161596909602600019011691909104601f8101849004840285018401909552848452959750939460608601939091830182828015610f2a5780601f10610eff57610100808354040283529160200191610f2a565b820191906000526020600020905b815481529060010190602001808311610f0d57829003601f168201915b5050505050815250509050610e28565b6060810151516110315780516001600160401b03811660009081526001602081815260409283902060030180548451600294821615610100026000190190911693909304601f810183900483028401830190945283835293955090929190830182828015610fe95780601f10610fbe57610100808354040283529160200191610fe9565b820191906000526020600020905b815481529060010190602001808311610fcc57829003601f168201915b505050506060830182905250516110315760405162461bcd60e51b81526004018080602001828103825260218152602001806119686021913960400191505060405180910390fd5b6000816060015151608801905060608787905082016040519080825280601f01601f191660200182016040528015611070576020820181803683370190505b509050600061107e8261170a565b905061108c84868386611710565b6110c75760405162461bcd60e51b81526004018080602001828103825260238152602001806119456023913960400191505060405180910390fd5b6000838201915061110d8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061177c92505050565b9450905061111c818386611786565b8251602001935061112b61188d565b6110008186866064600019fa61114057600080fd5b805194506000600160f81b8616156111cf5750600554604080516309a99b4f60e41b815233600482015260248101929092525160019161100291639a99b4f0916044808201926020929091908290030181600087803b1580156111a257600080fd5b505af11580156111b6573d6000803e3d6000fd5b505050506040513d60208110156111cc57600080fd5b50505b856001600160401b0316955060208201935060006111ef858884156117c7565b90985090506001600160401b03808216908c161461123e5760405162461bcd60e51b81526004018080602001828103825260338152602001806119b76033913960400191505060405180910390fd5b6001600160401b03808c16600081815260026020818152604080842080546001600160a01b031916331790558e86168e529383526001808252928490208d518154961667ffffffffffffffff199096169590951785558c81015192850192909255918b01519183019190915560608a015180518b93926112c59260038501929101906118ac565b50506003546001600160401b03600160401b9091048116908d161115905061130d576003805467ffffffffffffffff60401b1916600160401b6001600160401b038e16021790555b7f4042c1020a8f410fb1c8859d276ab436aeb2c3074960e48467299cf1c966d3b48b8a8a602001518560405180856001600160401b03166001600160401b03168152602001846001600160401b03166001600160401b031681526020018381526020018215151515815260200194505050505060405180910390a15060019c9b505050505050505050505050565b6002602052600090815260409020546001600160a01b031681565b61100381565b6001600160401b03166000908152600260205260409020546001600160a01b031690565b6001600160401b0381166000908152600260205260408120546001600160a01b031615158061141c57506003546001600160401b038381169116145b92915050565b60005460ff161561147a576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b6000806114a16040518061024001604052806102208152602001611a6d610220913961177c565b815160045590925090506114b3611867565b60006114c1848460006117c7565b60008083526001600160401b038281168252600160208181526040938490208651815467ffffffffffffffff191694169390931783558086015191830191909155918401516002820155606084015180519496509294508593909261152d9260038501929101906118ac565b50506003805467ffffffffffffffff19166001600160401b0384811691821767ffffffffffffffff60401b1916600160401b9290920291909117918290556000805460ff19166001179055662386f26fc10000600555602085810151604080519490931684529083015280517f5ac9b37d571677b80957ca05693f371526c602fd08042b416a29fdab7efefa499350918290030190a150505050565b6003546001600160401b031681565b600354600160401b90046001600160401b031681565b6040518061024001604052806102208152602001611a6d610220913981565b61100081565b600381565b61100481565b6000816040516020018082805190602001908083835b602083106116535780518252601f199092019160209182019101611634565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b602083106116c15780518252601f1990920191602091820191016116a2565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b60200190565b600084606001515182840103925060008061172e876060015161177c565b909250905061173e828683611786565b5050506040840151601f1983810191909152602090940151603f19830152605f19820192909252600454606719820152910160871990910152600190565b8051602090910191565b5b602081106117a6578251825260209283019290910190601f1901611787565b915181516020939093036101000a6000190180199091169216919091179052565b6117cf611867565b60088401516028850151604890950180519095600092916117ee611867565b6020810183905260408101829052866118595760008060688a036040519080825280601f01601f191660200182016040528015611832576020820181803683370190505b50606084018190526118439061177c565b909250905061185660208c018383611786565b50505b989297509195505050505050565b604080516080810182526000808252602082018190529181019190915260608082015290565b6040518061100001604052806080906020820280368337509192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106118ed57805160ff191683800117855561191a565b8280016001018555821561191a579182015b8281111561191a5782518255916020019190600101906118ff565b5061192692915061192a565b5090565b6107e391905b80821115611926576000815560010161193056fe6661696c656420746f2073657269616c697a6520636f6e73656e7375732073746174656661696c656420746f206c6f61642076616c696461746f722073657420646174616c656e677468206f6620726577617264466f7256616c696461746f725365744368616e6765206d69736d617463686865616465722068656967687420646f65736e277420657175616c20746f207468652073706563696669656420686569676874746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e7472616374746865206e6577526577617264466f7256616c696461746f725365744368616e6765206f7574206f662072616e676563616e27742073796e6320686561646572206265666f726520696e697469616c48656967687442696e616e63652d436861696e2d5469677269730000000000000000000000000000000006915167cedaf7bbf7df47d932fdda630527ee648562cf3e52c5e5f46156a3a971a4ceb443c53a50d8653ef8cf1e5716da68120fb51b636dc6d111ec3277b098ecd42d49d3769d8a1f78b4c17a965f7a30d4181fabbd1f969f46d3c8e83b5ad4845421d8000000e8d4a510002ba4e81542f437b7ae1f8a35ddb233c789a8dc22734377d9b6d63af1ca403b61000000e8d4a51000df8da8c5abfdb38595391308bb71e5a1e0aabdc1d0cf38315d50d6be939b2606000000e8d4a51000b6619edca4143484800281d698b70c935e9152ad57b31d85c05f2f79f64b39f3000000e8d4a510009446d14ad86c8d2d74780b0847110001a1c2e252eedfea4753ebbbfce3a22f52000000e8d4a510000353c639f80cc8015944436dab1032245d44f912edc31ef668ff9f4a45cd0599000000e8d4a51000e81d3797e0544c3a718e1f05f0fb782212e248e784c1a851be87e77ae0db230e000000e8d4a510005e3fcda30bd19d45c4b73688da35e7da1fce7c6859b2c1f20ed5202d24144e3e000000e8d4a51000b06a59a2d75bf5d014fce7c999b5e71e7a960870f725847d4ba3235baeaa08ef000000e8d4a510000c910e2fe650e4e01406b3310b489fb60a84bc3ff5c5bee3a56d5898b6a8af32000000e8d4a5100071f2d7b8ec1c8b99a653429b0118cd201f794f409d0fea4d65b1b662f2b00063000000e8d4a51000a264697066735822122032fc162aed7c2a4fe0f40397d327efc38d8aaf5dbdd1720f7f5d8101877da61d64736f6c63430006040033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
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.