FTM Price: $1.01 (-0.61%)
Gas: 109 GWei

Contract

0x9F5c3342981564cC606543580bC70fd42E642b32
 

Overview

FTM Balance

Fantom LogoFantom LogoFantom Logo0 FTM

FTM Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
0x60806040628369622023-05-22 4:15:51311 days ago1684728951IN
 Create: BscBlockUpdater
0 FTM1.42577786640.74547835

Latest 1 internal transaction

Parent Txn Hash Block From To Value
628369622023-05-22 4:15:51311 days ago1684728951  Contract Creation0 FTM
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BscBlockUpdater

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

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

pragma solidity ^0.8.14;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "./BscVerifier.sol";
import "../interface/IBlockUpdater.sol";

contract BscBlockUpdater is IBlockUpdater, BscVerifier, Initializable, OwnableUpgradeable {
    event ImportValidator(uint256 indexed epoch, uint256 indexed blockNumber, bytes32 blockHash, bytes32 receiptHash);
    event ModBlockConfirmation(uint256 oldBlockConfirmation, uint256 newBlockConfirmation);

    struct ParsedInput {
        uint256 blockNumber;
        uint256 epochValidatorCount;
        uint256 blockConfirmation;
        bytes32 blockHash;
        bytes32 receiptHash;
        bytes32 signingValidatorSetHash;
        bytes32 epochValidatorSetHash;
    }

    struct ZkProof {
        uint256[2] a;
        uint256[2][2] b;
        uint256[2] c;
        uint256[11] inputs;
    }

    uint256 public currentEpoch;

    uint256 public minBlockConfirmation;

    uint256 public  regularValidatorCount;

    // epoch=>validatorHash
    mapping(uint256 => bytes32) public validatorHashes;

    // epoch=>validatorCount
    mapping(uint256 => uint256) private validatorCounts;

    // blockHash=>receiptsRoot =>BlockConfirmation
    mapping(bytes32 => mapping(bytes32 => uint256)) public blockInfos;

    IBlockUpdater public oldBlockUpdater;

    function initialize(
        uint256 _epoch,
        uint256 _validatorCount,
        uint256 _preValidatorCount,
        bytes32 _epochValidatorSetHash,
        bytes32 _preEpochValidatorSetHash,
        bytes32 _blockHash,
        bytes32 _receiptHash,
        uint256 _minBlockConfirmation,
        uint256 _regularValidatorCount) public initializer {
        __Ownable_init();
        currentEpoch = _epoch;
        validatorHashes[_epoch] = _epochValidatorSetHash;
        validatorHashes[_epoch - 1] = _preEpochValidatorSetHash;
        validatorCounts[_epoch] = _validatorCount;
        _setValidatorCount(_epoch, _validatorCount);
        _setValidatorCount(_epoch - 1, _preValidatorCount);
        blockInfos[_blockHash][_receiptHash] = _minBlockConfirmation;
        minBlockConfirmation = _minBlockConfirmation;
        regularValidatorCount = _regularValidatorCount;
    }

    function importNextValidatorSet(bytes calldata _proof) external {
        _importNextValidatorSet(_proof);
    }

    function BatchImportNextValidatorSet(bytes[] calldata _proof) external {
        for (uint256 i = 0; i < _proof.length; i++) {
            _importNextValidatorSet(_proof[i]);
        }
    }

    function importBlock(bytes calldata _proof) external {
        _importBlock(_proof);
    }

    function BatchImportBlock(bytes[] calldata _proof) external {
        for (uint256 i = 0; i < _proof.length; i++) {
            _importBlock(_proof[i]);
        }
    }

    function checkBlock(bytes32 _blockHash, bytes32 _receiptHash) external view returns (bool) {
        (bool exist,) = _checkBlock(_blockHash, _receiptHash);
        if (!exist && address(oldBlockUpdater) != address(0)) {
            exist = oldBlockUpdater.checkBlock(_blockHash, _receiptHash);
        }
        return exist;
    }

    function checkBlockConfirmation(bytes32 _blockHash, bytes32 _receiptHash) external view returns (bool, uint256) {
        (bool exist,uint256 blockConfirmation) = _checkBlock(_blockHash, _receiptHash);
        if (!exist && address(oldBlockUpdater) != address(0)) {
            exist = oldBlockUpdater.checkBlock(_blockHash, _receiptHash);
            blockConfirmation = minBlockConfirmation;
        }
        return (exist, blockConfirmation);
    }

    function _checkBlock(bytes32 _blockHash, bytes32 _receiptHash) internal view returns (bool, uint256) {
        uint256 blockConfirmation = blockInfos[_blockHash][_receiptHash];
        if (blockConfirmation > 0) {
            return (true, blockConfirmation);
        }
        return (false, blockConfirmation);
    }

    function _setValidatorCount(uint256 _epoch, uint256 _validatorCount) internal {
        if (_validatorCount != regularValidatorCount) {
            validatorCounts[_epoch] = _validatorCount;
        }
    }

    function getValidatorCount(uint256 _epoch) public view returns (uint256) {
        if (validatorCounts[_epoch] != 0) {
            return validatorCounts[_epoch];
        }
        return regularValidatorCount;
    }

    function _importNextValidatorSet(bytes memory _proof) internal {
        ZkProof memory proofData;
        (proofData.a, proofData.b, proofData.c, proofData.inputs) = abi.decode(_proof, (uint256[2], uint256[2][2], uint256[2], uint256[11]));
        ParsedInput memory parsedInput = _parseInput(proofData.inputs);
        uint256 epoch = _computeEpoch(parsedInput.blockNumber);
        uint256 preEpoch = epoch - 1;
        require(parsedInput.epochValidatorSetHash != bytes32(0), "invalid epochValidatorSetHash");
        require(parsedInput.signingValidatorSetHash != bytes32(0), "invalid signingValidatorSetHash");
        require(parsedInput.blockConfirmation >= minBlockConfirmation, "Not enough block confirmations");
        require(validatorHashes[epoch] == bytes32(0), "epoch already exist");
        if (parsedInput.blockNumber % 200 <= getValidatorCount(preEpoch) / 2) {
            require(parsedInput.signingValidatorSetHash == validatorHashes[preEpoch], "invalid preEpochValidatorSetHash");
        } else {
            require(parsedInput.signingValidatorSetHash == parsedInput.epochValidatorSetHash, "invalid epochValidatorSetHash");
        }
        uint256[1] memory compressInput;
        compressInput[0] = _hashInput(proofData.inputs);
        require(verifyProof(proofData.a, proofData.b, proofData.c, compressInput), "invalid proof");
        validatorHashes[epoch] = parsedInput.epochValidatorSetHash;
        _setValidatorCount(epoch, parsedInput.epochValidatorCount);
        currentEpoch = epoch;
        blockInfos[parsedInput.blockHash][parsedInput.receiptHash] = parsedInput.blockConfirmation;
        emit ImportValidator(epoch, parsedInput.blockNumber, parsedInput.blockHash, parsedInput.receiptHash);
    }

    function _importBlock(bytes memory _proof) internal {
        ZkProof memory proofData;
        (proofData.a, proofData.b, proofData.c, proofData.inputs) = abi.decode(_proof, (uint256[2], uint256[2][2], uint256[2], uint256[11]));
        ParsedInput memory parsedInput = _parseInput(proofData.inputs);

        require(parsedInput.blockConfirmation >= minBlockConfirmation, "Not enough block confirmations");
        (bool exist,uint256 blockConfirmation) = _checkBlock(parsedInput.blockHash, parsedInput.receiptHash);
        if (exist && parsedInput.blockConfirmation <= blockConfirmation) {
            revert("already exist");
        }
        uint256 epoch = _computeEpoch(parsedInput.blockNumber);
        uint256 preEpoch = epoch - 1;
        require(validatorHashes[epoch] != bytes32(0), "epoch no upload");

        if (parsedInput.blockNumber % 200 <= getValidatorCount(preEpoch) / 2) {
            require(parsedInput.signingValidatorSetHash == validatorHashes[preEpoch], "invalid preEpochValidatorSetHash");
        } else {
            require(parsedInput.signingValidatorSetHash == validatorHashes[epoch], "invalid epochValidatorSetHash");
        }

        uint256[1] memory compressInput;
        compressInput[0] = _hashInput(proofData.inputs);
        require(verifyProof(proofData.a, proofData.b, proofData.c, compressInput), "invalid proof");
        blockInfos[parsedInput.blockHash][parsedInput.receiptHash] = parsedInput.blockConfirmation;
        emit ImportBlock(parsedInput.blockNumber, parsedInput.blockHash, parsedInput.receiptHash);
    }

    function _parseInput(uint256[11] memory _inputs) internal pure returns (ParsedInput memory)    {
        ParsedInput memory result;
        result.blockNumber = _inputs[0];
        result.blockHash = bytes32((_inputs[2] << 128) | _inputs[1]);
        result.receiptHash = bytes32((_inputs[4] << 128) | _inputs[3]);
        result.signingValidatorSetHash = bytes32((_inputs[6] << 128) | _inputs[5]);
        result.epochValidatorSetHash = bytes32((_inputs[8] << 128) | _inputs[7]);
        result.epochValidatorCount = _inputs[9];
        result.blockConfirmation = _inputs[10];
        return result;
    }

    function _hashInput(uint256[11] memory _inputs) internal pure returns (uint256) {
        uint256 computedHash = uint256(keccak256(abi.encodePacked(_inputs[0], _inputs[1], _inputs[2],
            _inputs[3], _inputs[4], _inputs[5], _inputs[6], _inputs[7], _inputs[8], _inputs[9], _inputs[10])));
        return computedHash / 256;
    }

    function _computeEpoch(uint256 blockNumber) internal pure returns (uint256) {
        return blockNumber / 200;
    }

    //----------------------------------------------------------------------------------
    // onlyOwner
    function setBlockConfirmation(uint256 _minBlockConfirmation) external onlyOwner {
        emit ModBlockConfirmation(minBlockConfirmation, _minBlockConfirmation);
        minBlockConfirmation = _minBlockConfirmation;
    }

    function setOldBlockUpdater(address _oldBlockUpdater) external onlyOwner {
        oldBlockUpdater = IBlockUpdater(_oldBlockUpdater);
    }

}

File 2 of 7 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
     * constructor.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: setting the version to 255 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

File 3 of 7 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 4 of 7 : BscVerifier.sol
// SPDX-License-Identifier: AML
//
// Copyright 2017 Christian Reitwiessner
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.

// 2019 OKIMS

pragma solidity ^0.8.0;

library Pairing {

    uint256 constant PRIME_Q = 21888242871839275222246405745257275088696311157297823662689037894645226208583;

    struct G1Point {
        uint256 X;
        uint256 Y;
    }

    // Encoding of field elements is: X[0] * z + X[1]
    struct G2Point {
        uint256[2] X;
        uint256[2] Y;
    }

    /*
     * @return The negation of p, i.e. p.plus(p.negate()) should be zero.
     */
    function negate(G1Point memory p) internal pure returns (G1Point memory) {

        // The prime q in the base field F_q for G1
        if (p.X == 0 && p.Y == 0) {
            return G1Point(0, 0);
        } else {
            return G1Point(p.X, PRIME_Q - (p.Y % PRIME_Q));
        }
    }

    /*
     * @return The sum of two points of G1
     */
    function plus(
        G1Point memory p1,
        G1Point memory p2
    ) internal view returns (G1Point memory r) {

        uint256[4] memory input;
        input[0] = p1.X;
        input[1] = p1.Y;
        input[2] = p2.X;
        input[3] = p2.Y;
        bool success;

        // solium-disable-next-line security/no-inline-assembly
        assembly {
            success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60)
        // Use "invalid" to make gas estimation work
            switch success case 0 { invalid() }
        }

        require(success,"pairing-add-failed");
    }

    /*
     * @return The product of a point on G1 and a scalar, i.e.
     *         p == p.scalar_mul(1) and p.plus(p) == p.scalar_mul(2) for all
     *         points p.
     */
    function scalar_mul(G1Point memory p, uint256 s) internal view returns (G1Point memory r) {

        uint256[3] memory input;
        input[0] = p.X;
        input[1] = p.Y;
        input[2] = s;
        bool success;
        // solium-disable-next-line security/no-inline-assembly
        assembly {
            success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60)
        // Use "invalid" to make gas estimation work
            switch success case 0 { invalid() }
        }
        require (success,"pairing-mul-failed");
    }

    /* @return The result of computing the pairing check
     *         e(p1[0], p2[0]) *  .... * e(p1[n], p2[n]) == 1
     *         For example,
     *         pairing([P1(), P1().negate()], [P2(), P2()]) should return true.
     */
    function pairing(
        G1Point memory a1,
        G2Point memory a2,
        G1Point memory b1,
        G2Point memory b2,
        G1Point memory c1,
        G2Point memory c2,
        G1Point memory d1,
        G2Point memory d2
    ) internal view returns (bool) {

        G1Point[4] memory p1 = [a1, b1, c1, d1];
        G2Point[4] memory p2 = [a2, b2, c2, d2];
        uint256 inputSize = 24;
        uint256[] memory input = new uint256[](inputSize);

        for (uint256 i = 0; i < 4; i++) {
            uint256 j = i * 6;
            input[j + 0] = p1[i].X;
            input[j + 1] = p1[i].Y;
            input[j + 2] = p2[i].X[0];
            input[j + 3] = p2[i].X[1];
            input[j + 4] = p2[i].Y[0];
            input[j + 5] = p2[i].Y[1];
        }

        uint256[1] memory out;
        bool success;

        // solium-disable-next-line security/no-inline-assembly
        assembly {
            success := staticcall(sub(gas(), 2000), 8, add(input, 0x20), mul(inputSize, 0x20), out, 0x20)
        // Use "invalid" to make gas estimation work
            switch success case 0 { invalid() }
        }

        require(success,"pairing-opcode-failed");

        return out[0] != 0;
    }
}

contract BscVerifier {

    using Pairing for *;

    uint256 constant SNARK_SCALAR_FIELD = 21888242871839275222246405745257275088548364400416034343698204186575808495617;
    uint256 constant PRIME_Q = 21888242871839275222246405745257275088696311157297823662689037894645226208583;

    struct VerifyingKey {
        Pairing.G1Point alfa1;
        Pairing.G2Point beta2;
        Pairing.G2Point gamma2;
        Pairing.G2Point delta2;
        Pairing.G1Point[2] IC;
    }

    struct Proof {
        Pairing.G1Point A;
        Pairing.G2Point B;
        Pairing.G1Point C;
    }

    function verifyingKey() internal pure returns (VerifyingKey memory vk) {
        vk.alfa1 = Pairing.G1Point(uint256(15386280964909293549543580114300687380387134322486892793005010018775909349522), uint256(5224627123709432703899278589870654908109616596901308298070912486748008390684));
        vk.beta2 = Pairing.G2Point([uint256(20197092222513397334967695987893349464262123242703778831499974229879677949340), uint256(9535630844984453248229438347778321174122276214990396865791206459646309912698)], [uint256(2222710970859525163301820647075141384588896570230424713501308882210358317614), uint256(3442110103579425700543700638317311502652246077342222901209550699286678420073)]);
        vk.gamma2 = Pairing.G2Point([uint256(6371433908097100257198716724654991635024703915523196289242238068279759541873), uint256(6744866678139215885036237564688979346365880632502466734213049444387808035799)], [uint256(8724792965072698548979483477917856500578128017781249920514951913789276567908), uint256(5887622452851979925017497334375233359170704243537272980589333929764787855505)]);
        vk.delta2 = Pairing.G2Point([uint256(13716209222931846996265200607502342862360236329306209551742708001102668058637), uint256(21126722617470047576758416841293214558031294314325749749118882846468303409234)], [uint256(5748560724378029066856860360297183950861011555485264817423859750519495735147), uint256(5218097891213868351451641840596370746322498964076638476955961190696845142096)]);
        vk.IC[0] = Pairing.G1Point(uint256(15937582811916819834341534665097878102209122534384239238532054152632073584450), uint256(456518938111387689117971671211007397671159466619451871128892238270653320853));
        vk.IC[1] = Pairing.G1Point(uint256(9799889853371565013179868234211600548434432305460435244291810560530639114466), uint256(5623956361073954996523754276859436475155172569053202848417393353733457526411));
    }

    /*
     * @returns Whether the proof is valid given the hardcoded verifying key
     *          above and the public inputs
     */
    function verifyProof(
        uint256[2] memory a,
        uint256[2][2] memory b,
        uint256[2] memory c,
        uint256[1] memory input
    ) public view returns (bool r) {

        Proof memory proof;
        proof.A = Pairing.G1Point(a[0], a[1]);
        proof.B = Pairing.G2Point([b[0][0], b[0][1]], [b[1][0], b[1][1]]);
        proof.C = Pairing.G1Point(c[0], c[1]);

        VerifyingKey memory vk = verifyingKey();

        // Compute the linear combination vk_x
        Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);

        // Make sure that proof.A, B, and C are each less than the prime q
        require(proof.A.X < PRIME_Q, "verifier-aX-gte-prime-q");
        require(proof.A.Y < PRIME_Q, "verifier-aY-gte-prime-q");

        require(proof.B.X[0] < PRIME_Q, "verifier-bX0-gte-prime-q");
        require(proof.B.Y[0] < PRIME_Q, "verifier-bY0-gte-prime-q");

        require(proof.B.X[1] < PRIME_Q, "verifier-bX1-gte-prime-q");
        require(proof.B.Y[1] < PRIME_Q, "verifier-bY1-gte-prime-q");

        require(proof.C.X < PRIME_Q, "verifier-cX-gte-prime-q");
        require(proof.C.Y < PRIME_Q, "verifier-cY-gte-prime-q");

        // Make sure that every input is less than the snark scalar field
        for (uint256 i = 0; i < input.length; i++) {
            require(input[i] < SNARK_SCALAR_FIELD,"verifier-gte-snark-scalar-field");
            vk_x = Pairing.plus(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i]));
        }

        vk_x = Pairing.plus(vk_x, vk.IC[0]);

        return Pairing.pairing(
            Pairing.negate(proof.A),
            proof.B,
            vk.alfa1,
            vk.beta2,
            vk_x,
            vk.gamma2,
            proof.C,
            vk.delta2
        );
    }
}

File 5 of 7 : IBlockUpdater.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IBlockUpdater {
    event ImportBlock(uint256 identifier, bytes32 blockHash, bytes32 receiptHash);

    function importBlock(bytes calldata _proof) external;

    function checkBlock(bytes32 _blockHash, bytes32 _receiptsRoot) external view returns (bool);

    function checkBlockConfirmation(bytes32 _blockHash, bytes32 _receiptsRoot) external view returns (bool, uint256);
}

File 6 of 7 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 7 of 7 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"identifier","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"receiptHash","type":"bytes32"}],"name":"ImportBlock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"blockNumber","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"receiptHash","type":"bytes32"}],"name":"ImportValidator","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldBlockConfirmation","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBlockConfirmation","type":"uint256"}],"name":"ModBlockConfirmation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"bytes[]","name":"_proof","type":"bytes[]"}],"name":"BatchImportBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"_proof","type":"bytes[]"}],"name":"BatchImportNextValidatorSet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"blockInfos","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_blockHash","type":"bytes32"},{"internalType":"bytes32","name":"_receiptHash","type":"bytes32"}],"name":"checkBlock","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_blockHash","type":"bytes32"},{"internalType":"bytes32","name":"_receiptHash","type":"bytes32"}],"name":"checkBlockConfirmation","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_epoch","type":"uint256"}],"name":"getValidatorCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_proof","type":"bytes"}],"name":"importBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_proof","type":"bytes"}],"name":"importNextValidatorSet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_epoch","type":"uint256"},{"internalType":"uint256","name":"_validatorCount","type":"uint256"},{"internalType":"uint256","name":"_preValidatorCount","type":"uint256"},{"internalType":"bytes32","name":"_epochValidatorSetHash","type":"bytes32"},{"internalType":"bytes32","name":"_preEpochValidatorSetHash","type":"bytes32"},{"internalType":"bytes32","name":"_blockHash","type":"bytes32"},{"internalType":"bytes32","name":"_receiptHash","type":"bytes32"},{"internalType":"uint256","name":"_minBlockConfirmation","type":"uint256"},{"internalType":"uint256","name":"_regularValidatorCount","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minBlockConfirmation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oldBlockUpdater","outputs":[{"internalType":"contract IBlockUpdater","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"regularValidatorCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minBlockConfirmation","type":"uint256"}],"name":"setBlockConfirmation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oldBlockUpdater","type":"address"}],"name":"setOldBlockUpdater","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"validatorHashes","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[2]","name":"a","type":"uint256[2]"},{"internalType":"uint256[2][2]","name":"b","type":"uint256[2][2]"},{"internalType":"uint256[2]","name":"c","type":"uint256[2]"},{"internalType":"uint256[1]","name":"input","type":"uint256[1]"}],"name":"verifyProof","outputs":[{"internalType":"bool","name":"r","type":"bool"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5061274b806100206000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80638da5cb5b116100ad578063a9ef31de11610071578063a9ef31de14610295578063bd043d881461029e578063cc373045146102be578063dc3588ea146102d1578063f2fde38b146102e457600080fd5b80638da5cb5b1461022e578063953537f8146102535780639c6a3f56146102665780639d0167e71461026f578063a4f2b42f1461028257600080fd5b806343753b4d116100f457806343753b4d146101d457806348933b30146101f7578063715018a61461020a57806376671808146102125780638d19d82b1461021b57600080fd5b806302952ab6146101315780631bf4864e1461016f578063254252af1461018457806327143e88146101ae57806336fbafad146101c1575b600080fd5b61015c61013f3660046120d8565b606a60209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61018261017d3660046120fa565b6102f7565b005b6101976101923660046120d8565b610321565b604080519215158352602083019190915201610166565b6101826101bc366004612123565b6103db565b6101826101cf366004612198565b61045e565b6101e76101e23660046122ce565b6104a1565b6040519015158152602001610166565b610182610205366004612198565b6109a6565b6101826109e5565b61015c60655481565b610182610229366004612123565b6109f9565b6033546001600160a01b03165b6040516001600160a01b039091168152602001610166565b6101826102613660046123ac565b610a77565b61015c60675481565b61018261027d36600461240b565b610c24565b606b5461023b906001600160a01b031681565b61015c60665481565b61015c6102ac36600461240b565b60686020526000908152604090205481565b61015c6102cc36600461240b565b610c6d565b6101e76102df3660046120d8565b610c9c565b6101826102f23660046120fa565b610d47565b6102ff610dc0565b606b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000806000806103318686610e1a565b915091508115801561034d5750606b546001600160a01b031615155b156103ce57606b54604051636e1ac47560e11b815260048101889052602481018790526001600160a01b039091169063dc3588ea90604401602060405180830381865afa1580156103a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c69190612424565b915060665490505b90925090505b9250929050565b60005b81811015610459576104478383838181106103fb576103fb612446565b905060200281019061040d919061245c565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e5392505050565b80610451816124b9565b9150506103de565b505050565b61049d82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061119792505050565b5050565b60006104ab611ee3565b6040805180820182528751815260208089015181830152908352815160808101835287515181840190815288518301516060830152815282518084018452888301805151825251830151818401528183015283820152815180830183528651815286820151918101919091529082015260006105256114aa565b6040805180820190915260008082526020820152835151919250906000805160206126f6833981519152116105a15760405162461bcd60e51b815260206004820152601760248201527f76657269666965722d61582d6774652d7072696d652d7100000000000000000060448201526064015b60405180910390fd5b8251602001516000805160206126f6833981519152116106035760405162461bcd60e51b815260206004820152601760248201527f76657269666965722d61592d6774652d7072696d652d710000000000000000006044820152606401610598565b602083015151516000805160206126f6833981519152116106665760405162461bcd60e51b815260206004820152601860248201527f76657269666965722d6258302d6774652d7072696d652d7100000000000000006044820152606401610598565b6020838101510151516000805160206126f6833981519152116106cb5760405162461bcd60e51b815260206004820152601860248201527f76657269666965722d6259302d6774652d7072696d652d7100000000000000006044820152606401610598565b6020838101515101516000805160206126f6833981519152116107305760405162461bcd60e51b815260206004820152601860248201527f76657269666965722d6258312d6774652d7072696d652d7100000000000000006044820152606401610598565b60208381015181015101516000805160206126f6833981519152116107975760405162461bcd60e51b815260206004820152601860248201527f76657269666965722d6259312d6774652d7072696d652d7100000000000000006044820152606401610598565b6040830151516000805160206126f6833981519152116107f95760405162461bcd60e51b815260206004820152601760248201527f76657269666965722d63582d6774652d7072696d652d710000000000000000006044820152606401610598565b6000805160206126f68339815191528360400151602001511061085e5760405162461bcd60e51b815260206004820152601760248201527f76657269666965722d63592d6774652d7072696d652d710000000000000000006044820152606401610598565b60005b6001811015610952577f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000186826001811061089d5761089d612446565b6020020151106108ef5760405162461bcd60e51b815260206004820152601f60248201527f76657269666965722d6774652d736e61726b2d7363616c61722d6669656c64006044820152606401610598565b61093e82610939856080015184600161090891906124d2565b6002811061091857610918612446565b602002015189856001811061092f5761092f612446565b60200201516117cb565b611861565b91508061094a816124b9565b915050610861565b50608082015151610964908290611861565b905061099a61097684600001516118fa565b84602001518460000151856020015185876040015189604001518960600151611990565b98975050505050505050565b61049d82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e5392505050565b6109ed610dc0565b6109f76000611c67565b565b60005b8181101561045957610a65838383818110610a1957610a19612446565b9050602002810190610a2b919061245c565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061119792505050565b80610a6f816124b9565b9150506109fc565b600054610100900460ff1615808015610a975750600054600160ff909116105b80610ab15750303b158015610ab1575060005460ff166001145b610b145760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610598565b6000805460ff191660011790558015610b37576000805461ff0019166101001790555b610b3f611cb9565b60658a905560008a815260686020819052604082208990558791610b6460018e6124ea565b81526020019081526020016000208190555088606960008c815260200190815260200160002081905550610b988a8a611ce8565b610bac610ba660018c6124ea565b89611ce8565b6000858152606a602090815260408083208784529091529020839055606683905560678290558015610c18576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050505050565b610c2c610dc0565b60665460408051918252602082018390527f5ab2642364d92dafb2be757706f004ccf8325cca566bc2d0742133d316a5eaed910160405180910390a1606655565b60008181526069602052604081205415610c94575060009081526069602052604090205490565b505060675490565b600080610ca98484610e1a565b50905080158015610cc45750606b546001600160a01b031615155b15610d4057606b54604051636e1ac47560e11b815260048101869052602481018590526001600160a01b039091169063dc3588ea90604401602060405180830381865afa158015610d19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3d9190612424565b90505b9392505050565b610d4f610dc0565b6001600160a01b038116610db45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610598565b610dbd81611c67565b50565b6033546001600160a01b031633146109f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610598565b6000828152606a6020908152604080832084845290915281205481908015610e47576001925090506103d4565b60009590945092505050565b610e5b611f34565b81806020019051810190610e6f9190612546565b6060850181905260408501919091526020840191909152908252600090610e9590611d03565b90506000610ea68260000151611dc5565b90506000610eb56001836124ea565b60c0840151909150610ed95760405162461bcd60e51b815260040161059890612616565b60a0830151610f2a5760405162461bcd60e51b815260206004820152601f60248201527f696e76616c6964207369676e696e6756616c696461746f7253657448617368006044820152606401610598565b60665483604001511015610f805760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f75676820626c6f636b20636f6e6669726d6174696f6e7300006044820152606401610598565b60008281526068602052604090205415610fd25760405162461bcd60e51b8152602060048201526013602482015272195c1bd8da08185b1c9958591e48195e1a5cdd606a1b6044820152606401610598565b6002610fdd82610c6d565b610fe79190612663565b8351610ff59060c890612677565b116110605760008181526068602052604090205460a08401511461105b5760405162461bcd60e51b815260206004820181905260248201527f696e76616c69642070726545706f636856616c696461746f72536574486173686044820152606401610598565b611087565b8260c001518360a00151146110875760405162461bcd60e51b815260040161059890612616565b61108f611f6e565b61109c8560600151611dd8565b81528451602086015160408701516110b6929190846104a1565b6110f25760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b6044820152606401610598565b8360c00151606860008581526020019081526020016000208190555061111c838560200151611ce8565b60658390556040848101516060860180516000908152606a602090815284822060808a018051845290825291859020939093558751915190518451918252928101929092529185917fb20f83d7fca2253dd4a37d0ee1922398cbbecf5a89899514947161ae70c0037f910160405180910390a3505050505050565b61119f611f34565b818060200190518101906111b39190612546565b60608501819052604085019190915260208401919091529082526000906111d990611d03565b9050606654816040015110156112315760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f75676820626c6f636b20636f6e6669726d6174696f6e7300006044820152606401610598565b60008061124683606001518460800151610e1a565b9150915081801561125b575080836040015111155b156112985760405162461bcd60e51b815260206004820152600d60248201526c185b1c9958591e48195e1a5cdd609a1b6044820152606401610598565b60006112a78460000151611dc5565b905060006112b66001836124ea565b6000838152606860205260409020549091506113065760405162461bcd60e51b815260206004820152600f60248201526e195c1bd8da081b9bc81d5c1b1bd859608a1b6044820152606401610598565b600261131182610c6d565b61131b9190612663565b85516113299060c890612677565b116113945760008181526068602052604090205460a08601511461138f5760405162461bcd60e51b815260206004820181905260248201527f696e76616c69642070726545706f636856616c696461746f72536574486173686044820152606401610598565b6113c5565b60008281526068602052604090205460a0860151146113c55760405162461bcd60e51b815260040161059890612616565b6113cd611f6e565b6113da8760600151611dd8565b81528651602088015160408901516113f4929190846104a1565b6114305760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b6044820152606401610598565b604086810151606080890180516000908152606a602090815285822060808d018051845290825291869020949094558a5191519051855192835293820152928301919091527fa3fa2e60f4d1c7f6bd60da77a4be0625773dfb6b22c54fe77e725d03e49cdf2e910160405180910390a15050505050505050565b6114b2611f8c565b6040805180820182527f2204538fe997344b218ddec1948bf49426afbf3ffc30f670ee4f1224d9bd389281527f0b8d08be9f845f4b6a0f52e97bbc43f5c930f06bdf0d9dd4fc2da4d104e2a01c6020808301919091529083528151608080820184527f2ca7262afa3bfb57c51fed399f4787ce6fbe8be867e1d17af6c77b71c712959c8285019081527f1514f9cdcf1b4c14e23a3c327f49370ced9ca153a4dd38bd24b6dcfb835d507a606080850191909152908352845180860186527f04ea02840b0a479a6c25b2596a5b07f0e332490eb82f56bbbc347409142c522e81527f079c2a4face7184f0e760cefea934eb135bd04a554b7fda038c7266a604b3a69818601528385015285840192909252835180820185527f0e161a9267f795a322f6bd1eb96ebc61aad4c0fed93df59acd30c0215a8316718186019081527f0ee97591ae6386d6cf9bb3a7a688c2053b45da0280c1a409de9e55b33a6343d7828501528152845180860186527f134a0ecd4b93895c03d79e69d6baa94732443a7a4337eaa28ab3a6fa0968396481527f0d0446b62683300de796477fb48d9cca925cecd5b25fba423655af62e7b02091818601528185015285850152835180820185527f1e53196c235d5e3dc83b953831067c9b3c48efc4fd2ba8413afa746bc855500d8186019081527f2eb54d1ec41007839db5119c2a0df0c5586221a1b5e3064f24fa683c0da6d052828501528152845180860186527f0cb591eff6f212a902f2fdbeef1690a21e24ee55ba8e7acace0f7a6838dc376b81527f0b8956b7ee0712daeaaf6af15be1ce6f360413aaee2e9b69d13f76ed20696850818601528185015291850191909152825180840184527f233c5a29ee368e79abbd6739f0b2286420ef20a04e85a69271abe07fd1f5ff4281527f0102616c880f1b0fbce3a0ad21ce91be1d2abaf6942a6f8bc8c858fd18acce958184015290840180519190915282518084019093527f15aa8a8533ac7b4a8fd6fb4fce16508578f1ff84fa3cbdfb04b1cca13bde50e283527f0c6f0be741c645585e16a099d9d90bb29c189d45d836cdc513f0e9e55fb33e8b8383015251015290565b60408051808201909152600080825260208201526117e7611fdd565b835181526020808501519082015260408101839052600060608360808460076107d05a03fa9050808061181657fe5b50806118595760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5b5d5b0b59985a5b195960721b6044820152606401610598565b505092915050565b604080518082019091526000808252602082015261187d611ffb565b8351815260208085015181830152835160408301528301516060808301919091526000908360c08460066107d05a03fa905080806118b757fe5b50806118595760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5859190b59985a5b195960721b6044820152606401610598565b6040805180820190915260008082526020820152815115801561191f57506020820151155b1561193d575050604080518082019091526000808252602082015290565b6040518060400160405280836000015181526020016000805160206126f683398151915284602001516119709190612677565b611988906000805160206126f68339815191526124ea565b905292915050565b60408051608080820183528a825260208083018a90528284018890526060808401879052845192830185528b83528282018a9052828501889052820185905283516018808252610320820190955260009491859190839082016103008036833701905050905060005b6004811015611be4576000611a0f82600661268b565b9050858260048110611a2357611a23612446565b60200201515183611a358360006124d2565b81518110611a4557611a45612446565b602002602001018181525050858260048110611a6357611a63612446565b60200201516020015183826001611a7a91906124d2565b81518110611a8a57611a8a612446565b602002602001018181525050848260048110611aa857611aa8612446565b6020020151515183611abb8360026124d2565b81518110611acb57611acb612446565b602002602001018181525050848260048110611ae957611ae9612446565b6020020151516001602002015183611b028360036124d2565b81518110611b1257611b12612446565b602002602001018181525050848260048110611b3057611b30612446565b602002015160200151600060028110611b4b57611b4b612446565b602002015183611b5c8360046124d2565b81518110611b6c57611b6c612446565b602002602001018181525050848260048110611b8a57611b8a612446565b602002015160200151600160028110611ba557611ba5612446565b602002015183611bb68360056124d2565b81518110611bc657611bc6612446565b60209081029190910101525080611bdc816124b9565b9150506119f9565b50611bed611f6e565b6000602082602086026020860160086107d05a03fa90508080611c0c57fe5b5080611c525760405162461bcd60e51b81526020600482015260156024820152741c185a5c9a5b99cb5bdc18dbd9194b59985a5b1959605a1b6044820152606401610598565b505115159d9c50505050505050505050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16611ce05760405162461bcd60e51b8152600401610598906126aa565b6109f7611eb3565b606754811461049d5760009182526069602052604090912055565b6040805160e08082018352600080835260208084018290528385018290526060808501839052608080860184905260a080870185905260c096870185905287518087018952858152808501868152818a018781528286018881528386018981528486018a8152858d019a8b528e518652988e01519c8e0151871b909c179052948b01518b850151851b179099529089015196890151821b9096179092529286015161010087015190911b17905261012084015190925261014090920151905290565b6000611dd260c883612663565b92915050565b6000808281602002015183600160200201518460026020020151856003602002015186600460200201518760056020020151886006602002015189600760200201518a600860200201518b600960200201518c600a60209081029190910151604080519283019c909c529a8101999099526060890197909752608088019590955260a087019390935260c086019190915260e08501526101008401526101208301526101408201526101608101919091526101800160408051601f1981840301815291905280516020909101209050610d4061010082612663565b600054610100900460ff16611eda5760405162461bcd60e51b8152600401610598906126aa565b6109f733611c67565b6040805160a081019091526000606082018181526080830191909152815260208101611f0d612019565b8152602001611f2f604051806040016040528060008152602001600081525090565b905290565b6040518060800160405280611f47612035565b8152602001611f54612053565b8152602001611f61612035565b8152602001611f2f612080565b60405180602001604052806001906020820280368337509192915050565b6040805160e08101909152600060a0820181815260c0830191909152815260208101611fb6612019565b8152602001611fc3612019565b8152602001611fd0612019565b8152602001611f2f61209f565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b604051806040016040528061202c612035565b8152602001611f2f5b60405180604001604052806002906020820280368337509192915050565b60405180604001604052806002905b61206a612035565b8152602001906001900390816120625790505090565b604051806101600160405280600b906020820280368337509192915050565b60405180604001604052806002905b60408051808201909152600080825260208201528152602001906001900390816120ae5790505090565b600080604083850312156120eb57600080fd5b50508035926020909101359150565b60006020828403121561210c57600080fd5b81356001600160a01b0381168114610d4057600080fd5b6000806020838503121561213657600080fd5b823567ffffffffffffffff8082111561214e57600080fd5b818501915085601f83011261216257600080fd5b81358181111561217157600080fd5b8660208260051b850101111561218657600080fd5b60209290920196919550909350505050565b600080602083850312156121ab57600080fd5b823567ffffffffffffffff808211156121c357600080fd5b818501915085601f8301126121d757600080fd5b8135818111156121e657600080fd5b86602082850101111561218657600080fd5b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715612231576122316121f8565b60405290565b6040516020810167ffffffffffffffff81118282101715612231576122316121f8565b604051610160810167ffffffffffffffff81118282101715612231576122316121f8565b600082601f83011261228f57600080fd5b61229761220e565b8060408401858111156122a957600080fd5b845b818110156122c35780358452602093840193016122ab565b509095945050505050565b6000806000806101208086880312156122e657600080fd5b6122f0878761227e565b9450604087605f88011261230357600080fd5b61230b61220e565b8060c089018a81111561231d57600080fd5b838a015b81811015612342576123338c8261227e565b84526020909301928401612321565b508197506123508b8261227e565b9650505050508661011f87011261236657600080fd5b61236e612237565b90860190808883111561238057600080fd5b61010088015b8381101561239e578035835260209283019201612386565b509598949750929550505050565b60008060008060008060008060006101208a8c0312156123cb57600080fd5b505087359960208901359950604089013598606081013598506080810135975060a0810135965060c0810135955060e08101359450610100013592509050565b60006020828403121561241d57600080fd5b5035919050565b60006020828403121561243657600080fd5b81518015158114610d4057600080fd5b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261247357600080fd5b83018035915067ffffffffffffffff82111561248e57600080fd5b6020019150368190038213156103d457600080fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016124cb576124cb6124a3565b5060010190565b600082198211156124e5576124e56124a3565b500190565b6000828210156124fc576124fc6124a3565b500390565b600082601f83011261251257600080fd5b61251a61220e565b80604084018581111561252c57600080fd5b845b818110156122c357805184526020938401930161252e565b60008060008061026080868803121561255e57600080fd5b6125688787612501565b9450604087605f88011261257b57600080fd5b61258361220e565b8060c089018a81111561259557600080fd5b838a015b818110156125ba576125ab8c82612501565b84526020909301928401612599565b508197506125c88b82612501565b9650505050508661011f8701126125de57600080fd5b6125e661225a565b9086019080888311156125f857600080fd5b61010088015b8381101561239e5780518352602092830192016125fe565b6020808252601d908201527f696e76616c69642065706f636856616c696461746f7253657448617368000000604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000826126725761267261264d565b500490565b6000826126865761268661264d565b500690565b60008160001904831182151516156126a5576126a56124a3565b500290565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fe30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47a26469706673582212201b59086b12e19c5b492014f75e4133bfbe36041c4bf82ab37bb6f4bda012450964736f6c634300080e0033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061012c5760003560e01c80638da5cb5b116100ad578063a9ef31de11610071578063a9ef31de14610295578063bd043d881461029e578063cc373045146102be578063dc3588ea146102d1578063f2fde38b146102e457600080fd5b80638da5cb5b1461022e578063953537f8146102535780639c6a3f56146102665780639d0167e71461026f578063a4f2b42f1461028257600080fd5b806343753b4d116100f457806343753b4d146101d457806348933b30146101f7578063715018a61461020a57806376671808146102125780638d19d82b1461021b57600080fd5b806302952ab6146101315780631bf4864e1461016f578063254252af1461018457806327143e88146101ae57806336fbafad146101c1575b600080fd5b61015c61013f3660046120d8565b606a60209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61018261017d3660046120fa565b6102f7565b005b6101976101923660046120d8565b610321565b604080519215158352602083019190915201610166565b6101826101bc366004612123565b6103db565b6101826101cf366004612198565b61045e565b6101e76101e23660046122ce565b6104a1565b6040519015158152602001610166565b610182610205366004612198565b6109a6565b6101826109e5565b61015c60655481565b610182610229366004612123565b6109f9565b6033546001600160a01b03165b6040516001600160a01b039091168152602001610166565b6101826102613660046123ac565b610a77565b61015c60675481565b61018261027d36600461240b565b610c24565b606b5461023b906001600160a01b031681565b61015c60665481565b61015c6102ac36600461240b565b60686020526000908152604090205481565b61015c6102cc36600461240b565b610c6d565b6101e76102df3660046120d8565b610c9c565b6101826102f23660046120fa565b610d47565b6102ff610dc0565b606b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000806000806103318686610e1a565b915091508115801561034d5750606b546001600160a01b031615155b156103ce57606b54604051636e1ac47560e11b815260048101889052602481018790526001600160a01b039091169063dc3588ea90604401602060405180830381865afa1580156103a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c69190612424565b915060665490505b90925090505b9250929050565b60005b81811015610459576104478383838181106103fb576103fb612446565b905060200281019061040d919061245c565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e5392505050565b80610451816124b9565b9150506103de565b505050565b61049d82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061119792505050565b5050565b60006104ab611ee3565b6040805180820182528751815260208089015181830152908352815160808101835287515181840190815288518301516060830152815282518084018452888301805151825251830151818401528183015283820152815180830183528651815286820151918101919091529082015260006105256114aa565b6040805180820190915260008082526020820152835151919250906000805160206126f6833981519152116105a15760405162461bcd60e51b815260206004820152601760248201527f76657269666965722d61582d6774652d7072696d652d7100000000000000000060448201526064015b60405180910390fd5b8251602001516000805160206126f6833981519152116106035760405162461bcd60e51b815260206004820152601760248201527f76657269666965722d61592d6774652d7072696d652d710000000000000000006044820152606401610598565b602083015151516000805160206126f6833981519152116106665760405162461bcd60e51b815260206004820152601860248201527f76657269666965722d6258302d6774652d7072696d652d7100000000000000006044820152606401610598565b6020838101510151516000805160206126f6833981519152116106cb5760405162461bcd60e51b815260206004820152601860248201527f76657269666965722d6259302d6774652d7072696d652d7100000000000000006044820152606401610598565b6020838101515101516000805160206126f6833981519152116107305760405162461bcd60e51b815260206004820152601860248201527f76657269666965722d6258312d6774652d7072696d652d7100000000000000006044820152606401610598565b60208381015181015101516000805160206126f6833981519152116107975760405162461bcd60e51b815260206004820152601860248201527f76657269666965722d6259312d6774652d7072696d652d7100000000000000006044820152606401610598565b6040830151516000805160206126f6833981519152116107f95760405162461bcd60e51b815260206004820152601760248201527f76657269666965722d63582d6774652d7072696d652d710000000000000000006044820152606401610598565b6000805160206126f68339815191528360400151602001511061085e5760405162461bcd60e51b815260206004820152601760248201527f76657269666965722d63592d6774652d7072696d652d710000000000000000006044820152606401610598565b60005b6001811015610952577f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000186826001811061089d5761089d612446565b6020020151106108ef5760405162461bcd60e51b815260206004820152601f60248201527f76657269666965722d6774652d736e61726b2d7363616c61722d6669656c64006044820152606401610598565b61093e82610939856080015184600161090891906124d2565b6002811061091857610918612446565b602002015189856001811061092f5761092f612446565b60200201516117cb565b611861565b91508061094a816124b9565b915050610861565b50608082015151610964908290611861565b905061099a61097684600001516118fa565b84602001518460000151856020015185876040015189604001518960600151611990565b98975050505050505050565b61049d82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e5392505050565b6109ed610dc0565b6109f76000611c67565b565b60005b8181101561045957610a65838383818110610a1957610a19612446565b9050602002810190610a2b919061245c565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061119792505050565b80610a6f816124b9565b9150506109fc565b600054610100900460ff1615808015610a975750600054600160ff909116105b80610ab15750303b158015610ab1575060005460ff166001145b610b145760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610598565b6000805460ff191660011790558015610b37576000805461ff0019166101001790555b610b3f611cb9565b60658a905560008a815260686020819052604082208990558791610b6460018e6124ea565b81526020019081526020016000208190555088606960008c815260200190815260200160002081905550610b988a8a611ce8565b610bac610ba660018c6124ea565b89611ce8565b6000858152606a602090815260408083208784529091529020839055606683905560678290558015610c18576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050505050565b610c2c610dc0565b60665460408051918252602082018390527f5ab2642364d92dafb2be757706f004ccf8325cca566bc2d0742133d316a5eaed910160405180910390a1606655565b60008181526069602052604081205415610c94575060009081526069602052604090205490565b505060675490565b600080610ca98484610e1a565b50905080158015610cc45750606b546001600160a01b031615155b15610d4057606b54604051636e1ac47560e11b815260048101869052602481018590526001600160a01b039091169063dc3588ea90604401602060405180830381865afa158015610d19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3d9190612424565b90505b9392505050565b610d4f610dc0565b6001600160a01b038116610db45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610598565b610dbd81611c67565b50565b6033546001600160a01b031633146109f75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610598565b6000828152606a6020908152604080832084845290915281205481908015610e47576001925090506103d4565b60009590945092505050565b610e5b611f34565b81806020019051810190610e6f9190612546565b6060850181905260408501919091526020840191909152908252600090610e9590611d03565b90506000610ea68260000151611dc5565b90506000610eb56001836124ea565b60c0840151909150610ed95760405162461bcd60e51b815260040161059890612616565b60a0830151610f2a5760405162461bcd60e51b815260206004820152601f60248201527f696e76616c6964207369676e696e6756616c696461746f7253657448617368006044820152606401610598565b60665483604001511015610f805760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f75676820626c6f636b20636f6e6669726d6174696f6e7300006044820152606401610598565b60008281526068602052604090205415610fd25760405162461bcd60e51b8152602060048201526013602482015272195c1bd8da08185b1c9958591e48195e1a5cdd606a1b6044820152606401610598565b6002610fdd82610c6d565b610fe79190612663565b8351610ff59060c890612677565b116110605760008181526068602052604090205460a08401511461105b5760405162461bcd60e51b815260206004820181905260248201527f696e76616c69642070726545706f636856616c696461746f72536574486173686044820152606401610598565b611087565b8260c001518360a00151146110875760405162461bcd60e51b815260040161059890612616565b61108f611f6e565b61109c8560600151611dd8565b81528451602086015160408701516110b6929190846104a1565b6110f25760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b6044820152606401610598565b8360c00151606860008581526020019081526020016000208190555061111c838560200151611ce8565b60658390556040848101516060860180516000908152606a602090815284822060808a018051845290825291859020939093558751915190518451918252928101929092529185917fb20f83d7fca2253dd4a37d0ee1922398cbbecf5a89899514947161ae70c0037f910160405180910390a3505050505050565b61119f611f34565b818060200190518101906111b39190612546565b60608501819052604085019190915260208401919091529082526000906111d990611d03565b9050606654816040015110156112315760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f75676820626c6f636b20636f6e6669726d6174696f6e7300006044820152606401610598565b60008061124683606001518460800151610e1a565b9150915081801561125b575080836040015111155b156112985760405162461bcd60e51b815260206004820152600d60248201526c185b1c9958591e48195e1a5cdd609a1b6044820152606401610598565b60006112a78460000151611dc5565b905060006112b66001836124ea565b6000838152606860205260409020549091506113065760405162461bcd60e51b815260206004820152600f60248201526e195c1bd8da081b9bc81d5c1b1bd859608a1b6044820152606401610598565b600261131182610c6d565b61131b9190612663565b85516113299060c890612677565b116113945760008181526068602052604090205460a08601511461138f5760405162461bcd60e51b815260206004820181905260248201527f696e76616c69642070726545706f636856616c696461746f72536574486173686044820152606401610598565b6113c5565b60008281526068602052604090205460a0860151146113c55760405162461bcd60e51b815260040161059890612616565b6113cd611f6e565b6113da8760600151611dd8565b81528651602088015160408901516113f4929190846104a1565b6114305760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b6044820152606401610598565b604086810151606080890180516000908152606a602090815285822060808d018051845290825291869020949094558a5191519051855192835293820152928301919091527fa3fa2e60f4d1c7f6bd60da77a4be0625773dfb6b22c54fe77e725d03e49cdf2e910160405180910390a15050505050505050565b6114b2611f8c565b6040805180820182527f2204538fe997344b218ddec1948bf49426afbf3ffc30f670ee4f1224d9bd389281527f0b8d08be9f845f4b6a0f52e97bbc43f5c930f06bdf0d9dd4fc2da4d104e2a01c6020808301919091529083528151608080820184527f2ca7262afa3bfb57c51fed399f4787ce6fbe8be867e1d17af6c77b71c712959c8285019081527f1514f9cdcf1b4c14e23a3c327f49370ced9ca153a4dd38bd24b6dcfb835d507a606080850191909152908352845180860186527f04ea02840b0a479a6c25b2596a5b07f0e332490eb82f56bbbc347409142c522e81527f079c2a4face7184f0e760cefea934eb135bd04a554b7fda038c7266a604b3a69818601528385015285840192909252835180820185527f0e161a9267f795a322f6bd1eb96ebc61aad4c0fed93df59acd30c0215a8316718186019081527f0ee97591ae6386d6cf9bb3a7a688c2053b45da0280c1a409de9e55b33a6343d7828501528152845180860186527f134a0ecd4b93895c03d79e69d6baa94732443a7a4337eaa28ab3a6fa0968396481527f0d0446b62683300de796477fb48d9cca925cecd5b25fba423655af62e7b02091818601528185015285850152835180820185527f1e53196c235d5e3dc83b953831067c9b3c48efc4fd2ba8413afa746bc855500d8186019081527f2eb54d1ec41007839db5119c2a0df0c5586221a1b5e3064f24fa683c0da6d052828501528152845180860186527f0cb591eff6f212a902f2fdbeef1690a21e24ee55ba8e7acace0f7a6838dc376b81527f0b8956b7ee0712daeaaf6af15be1ce6f360413aaee2e9b69d13f76ed20696850818601528185015291850191909152825180840184527f233c5a29ee368e79abbd6739f0b2286420ef20a04e85a69271abe07fd1f5ff4281527f0102616c880f1b0fbce3a0ad21ce91be1d2abaf6942a6f8bc8c858fd18acce958184015290840180519190915282518084019093527f15aa8a8533ac7b4a8fd6fb4fce16508578f1ff84fa3cbdfb04b1cca13bde50e283527f0c6f0be741c645585e16a099d9d90bb29c189d45d836cdc513f0e9e55fb33e8b8383015251015290565b60408051808201909152600080825260208201526117e7611fdd565b835181526020808501519082015260408101839052600060608360808460076107d05a03fa9050808061181657fe5b50806118595760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5b5d5b0b59985a5b195960721b6044820152606401610598565b505092915050565b604080518082019091526000808252602082015261187d611ffb565b8351815260208085015181830152835160408301528301516060808301919091526000908360c08460066107d05a03fa905080806118b757fe5b50806118595760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5859190b59985a5b195960721b6044820152606401610598565b6040805180820190915260008082526020820152815115801561191f57506020820151155b1561193d575050604080518082019091526000808252602082015290565b6040518060400160405280836000015181526020016000805160206126f683398151915284602001516119709190612677565b611988906000805160206126f68339815191526124ea565b905292915050565b60408051608080820183528a825260208083018a90528284018890526060808401879052845192830185528b83528282018a9052828501889052820185905283516018808252610320820190955260009491859190839082016103008036833701905050905060005b6004811015611be4576000611a0f82600661268b565b9050858260048110611a2357611a23612446565b60200201515183611a358360006124d2565b81518110611a4557611a45612446565b602002602001018181525050858260048110611a6357611a63612446565b60200201516020015183826001611a7a91906124d2565b81518110611a8a57611a8a612446565b602002602001018181525050848260048110611aa857611aa8612446565b6020020151515183611abb8360026124d2565b81518110611acb57611acb612446565b602002602001018181525050848260048110611ae957611ae9612446565b6020020151516001602002015183611b028360036124d2565b81518110611b1257611b12612446565b602002602001018181525050848260048110611b3057611b30612446565b602002015160200151600060028110611b4b57611b4b612446565b602002015183611b5c8360046124d2565b81518110611b6c57611b6c612446565b602002602001018181525050848260048110611b8a57611b8a612446565b602002015160200151600160028110611ba557611ba5612446565b602002015183611bb68360056124d2565b81518110611bc657611bc6612446565b60209081029190910101525080611bdc816124b9565b9150506119f9565b50611bed611f6e565b6000602082602086026020860160086107d05a03fa90508080611c0c57fe5b5080611c525760405162461bcd60e51b81526020600482015260156024820152741c185a5c9a5b99cb5bdc18dbd9194b59985a5b1959605a1b6044820152606401610598565b505115159d9c50505050505050505050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16611ce05760405162461bcd60e51b8152600401610598906126aa565b6109f7611eb3565b606754811461049d5760009182526069602052604090912055565b6040805160e08082018352600080835260208084018290528385018290526060808501839052608080860184905260a080870185905260c096870185905287518087018952858152808501868152818a018781528286018881528386018981528486018a8152858d019a8b528e518652988e01519c8e0151871b909c179052948b01518b850151851b179099529089015196890151821b9096179092529286015161010087015190911b17905261012084015190925261014090920151905290565b6000611dd260c883612663565b92915050565b6000808281602002015183600160200201518460026020020151856003602002015186600460200201518760056020020151886006602002015189600760200201518a600860200201518b600960200201518c600a60209081029190910151604080519283019c909c529a8101999099526060890197909752608088019590955260a087019390935260c086019190915260e08501526101008401526101208301526101408201526101608101919091526101800160408051601f1981840301815291905280516020909101209050610d4061010082612663565b600054610100900460ff16611eda5760405162461bcd60e51b8152600401610598906126aa565b6109f733611c67565b6040805160a081019091526000606082018181526080830191909152815260208101611f0d612019565b8152602001611f2f604051806040016040528060008152602001600081525090565b905290565b6040518060800160405280611f47612035565b8152602001611f54612053565b8152602001611f61612035565b8152602001611f2f612080565b60405180602001604052806001906020820280368337509192915050565b6040805160e08101909152600060a0820181815260c0830191909152815260208101611fb6612019565b8152602001611fc3612019565b8152602001611fd0612019565b8152602001611f2f61209f565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b604051806040016040528061202c612035565b8152602001611f2f5b60405180604001604052806002906020820280368337509192915050565b60405180604001604052806002905b61206a612035565b8152602001906001900390816120625790505090565b604051806101600160405280600b906020820280368337509192915050565b60405180604001604052806002905b60408051808201909152600080825260208201528152602001906001900390816120ae5790505090565b600080604083850312156120eb57600080fd5b50508035926020909101359150565b60006020828403121561210c57600080fd5b81356001600160a01b0381168114610d4057600080fd5b6000806020838503121561213657600080fd5b823567ffffffffffffffff8082111561214e57600080fd5b818501915085601f83011261216257600080fd5b81358181111561217157600080fd5b8660208260051b850101111561218657600080fd5b60209290920196919550909350505050565b600080602083850312156121ab57600080fd5b823567ffffffffffffffff808211156121c357600080fd5b818501915085601f8301126121d757600080fd5b8135818111156121e657600080fd5b86602082850101111561218657600080fd5b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715612231576122316121f8565b60405290565b6040516020810167ffffffffffffffff81118282101715612231576122316121f8565b604051610160810167ffffffffffffffff81118282101715612231576122316121f8565b600082601f83011261228f57600080fd5b61229761220e565b8060408401858111156122a957600080fd5b845b818110156122c35780358452602093840193016122ab565b509095945050505050565b6000806000806101208086880312156122e657600080fd5b6122f0878761227e565b9450604087605f88011261230357600080fd5b61230b61220e565b8060c089018a81111561231d57600080fd5b838a015b81811015612342576123338c8261227e565b84526020909301928401612321565b508197506123508b8261227e565b9650505050508661011f87011261236657600080fd5b61236e612237565b90860190808883111561238057600080fd5b61010088015b8381101561239e578035835260209283019201612386565b509598949750929550505050565b60008060008060008060008060006101208a8c0312156123cb57600080fd5b505087359960208901359950604089013598606081013598506080810135975060a0810135965060c0810135955060e08101359450610100013592509050565b60006020828403121561241d57600080fd5b5035919050565b60006020828403121561243657600080fd5b81518015158114610d4057600080fd5b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261247357600080fd5b83018035915067ffffffffffffffff82111561248e57600080fd5b6020019150368190038213156103d457600080fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016124cb576124cb6124a3565b5060010190565b600082198211156124e5576124e56124a3565b500190565b6000828210156124fc576124fc6124a3565b500390565b600082601f83011261251257600080fd5b61251a61220e565b80604084018581111561252c57600080fd5b845b818110156122c357805184526020938401930161252e565b60008060008061026080868803121561255e57600080fd5b6125688787612501565b9450604087605f88011261257b57600080fd5b61258361220e565b8060c089018a81111561259557600080fd5b838a015b818110156125ba576125ab8c82612501565b84526020909301928401612599565b508197506125c88b82612501565b9650505050508661011f8701126125de57600080fd5b6125e661225a565b9086019080888311156125f857600080fd5b61010088015b8381101561239e5780518352602092830192016125fe565b6020808252601d908201527f696e76616c69642065706f636856616c696461746f7253657448617368000000604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000826126725761267261264d565b500490565b6000826126865761268661264d565b500690565b60008160001904831182151516156126a5576126a56124a3565b500290565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fe30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47a26469706673582212201b59086b12e19c5b492014f75e4133bfbe36041c4bf82ab37bb6f4bda012450964736f6c634300080e0033

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

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