Contract 0x0de37e7bb99f8d934523f5211b90b0e05933972d 1

Contract Overview

Balance:
0 BNB

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xa92db31879ec9ba4e164c0573e85ddb7fcc6908cf2d8fa40f4cee4dc44a7f664Submit126603382021-09-25 1:32:5910 secs ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00191587
0x10d8c8d437594e552364fcadf7c68954a0ecc5497bd99ce3fdb8f2eadfd19ef6Submit126603332021-09-25 1:32:4425 secs ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00191611
0x0e41aa2d4e89dfe8268f18db7cb252c59dcb0bc2a3ad8bb6a2b4a0ac8f594281Submit126603292021-09-25 1:32:3237 secs ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00169117
0x394b6da325708cc54ba643b7f78b852974790c360f756d678e54373cf98012beSubmit126603232021-09-25 1:32:1455 secs ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00191599
0x64ec93b8914c4139e9bb8194748b13a9337d8bdf88427377495bff784422427cSubmit126603182021-09-25 1:31:591 min ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00191599
0xbc6d103ea1353b84e1045eedeaff20fc5620507d4b4c158128bc49552b258ea4Submit126603132021-09-25 1:31:441 min ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00169105
0xe62c2d32a0493d6c175fad6760221c7f61893db6c5aa78d0c5a8a14eebab945dSubmit126603082021-09-25 1:31:291 min ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00169117
0x933b8f063cbc3887d0567cc61d3f9549b84c2d5323f3a337fc13bf4e5e0b054dSubmit126603032021-09-25 1:31:141 min ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00169117
0xd8d7ea43bc16f21e1ddc3694d38848806afa11739c722622bf978364f7592fb3Submit126602982021-09-25 1:30:592 mins ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00169117
0x5b39b0bcdc0f21968dc0ec2e43c7a29f575c8cf6ff85537f2c9dbe6a809cd7c8Submit126602932021-09-25 1:30:442 mins ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00169117
0xe48c254bc920c546e96c494611583952b756381c8cf2081f92e6c63e65550673Submit126602862021-09-25 1:30:232 mins ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00191611
0xc6227095d69ae152483c0d2ae6c928bc2a7df36ba5b3483d88c6d3b73a8d3236Submit126602812021-09-25 1:30:083 mins ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00191599
0x29cb89bf3874d2f8f8bb13c27d01eb60cfb704502615e5e35c3ebb736732390bSubmit126602772021-09-25 1:29:563 mins ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.0018027
0x5be15fcedf94dba2bbe448f875420fd239660743ce1ddd5f98655ddac4968b01Submit126602722021-09-25 1:29:413 mins ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00169117
0x5ee9abd9566f434fb5d30cd81e00caf998c0bc41fbea66249b5136719da30603Submit126602662021-09-25 1:29:233 mins ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00191611
0x3d055793dad949ddcb71bd380229bf413c72494546d5534404b07115ab36d717Submit126602612021-09-25 1:29:084 mins ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00191611
0x88a1df5b56fa370e0bf5d6ab43f65b9c0b75726d6e17ebaee95246d42a76edd0Submit126602572021-09-25 1:28:564 mins ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00169117
0xa59c3c2a3d0aaa85bbc94122f566e36eaafb63121d07968325deb2436052b486Submit126602522021-09-25 1:28:414 mins ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00180258
0xdac06420fc00a24db288b1b9ec81568598bb4bbefea9547cf7a4d29c8bedcf93Submit126602462021-09-25 1:28:234 mins ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00191611
0xf283456a2ebebeeef671c8f3fb391a72fe0a03458728f7d1c9827bced53d073cSubmit126602422021-09-25 1:28:114 mins ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00169105
0x91144ec4302b1cfceedb923e14158c3aa781bdf10270bedb1ed356c7be9c0a33Submit126602372021-09-25 1:27:565 mins ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00169117
0x2a60b68345461184c33df15618e5c8be60372b7b8e7c48ee21d02c1b8601b3d1Submit126602312021-09-25 1:27:385 mins ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00191599
0x0201334d82186a3872b8d11af5500739f5da31777a8ac1d7cc4bc402c1fe65f4Submit126602272021-09-25 1:27:265 mins ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00169117
0x371f826fe8077481c23026b091c25c9f8e3587e51f8e642d4ea2325cdbbde8d3Submit126602212021-09-25 1:27:086 mins ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00169117
0x4256fa84553029bdc2e74a75b98a863ce55fbb90575c4750130078846a0570ebSubmit126602162021-09-25 1:26:536 mins ago0xe3bda0c6e1fbb111091dfef6f22a673b20ea5f50 IN  0x0de37e7bb99f8d934523f5211b90b0e05933972d0 BNB0.00191611
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xa92db31879ec9ba4e164c0573e85ddb7fcc6908cf2d8fa40f4cee4dc44a7f664126603382021-09-25 1:32:5910 secs ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0xa92db31879ec9ba4e164c0573e85ddb7fcc6908cf2d8fa40f4cee4dc44a7f664126603382021-09-25 1:32:5910 secs ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0x10d8c8d437594e552364fcadf7c68954a0ecc5497bd99ce3fdb8f2eadfd19ef6126603332021-09-25 1:32:4425 secs ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0x10d8c8d437594e552364fcadf7c68954a0ecc5497bd99ce3fdb8f2eadfd19ef6126603332021-09-25 1:32:4425 secs ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0x0e41aa2d4e89dfe8268f18db7cb252c59dcb0bc2a3ad8bb6a2b4a0ac8f594281126603292021-09-25 1:32:3237 secs ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0x0e41aa2d4e89dfe8268f18db7cb252c59dcb0bc2a3ad8bb6a2b4a0ac8f594281126603292021-09-25 1:32:3237 secs ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0x394b6da325708cc54ba643b7f78b852974790c360f756d678e54373cf98012be126603232021-09-25 1:32:1455 secs ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0x394b6da325708cc54ba643b7f78b852974790c360f756d678e54373cf98012be126603232021-09-25 1:32:1455 secs ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0x64ec93b8914c4139e9bb8194748b13a9337d8bdf88427377495bff784422427c126603182021-09-25 1:31:591 min ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0x64ec93b8914c4139e9bb8194748b13a9337d8bdf88427377495bff784422427c126603182021-09-25 1:31:591 min ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0xbc6d103ea1353b84e1045eedeaff20fc5620507d4b4c158128bc49552b258ea4126603132021-09-25 1:31:441 min ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0xbc6d103ea1353b84e1045eedeaff20fc5620507d4b4c158128bc49552b258ea4126603132021-09-25 1:31:441 min ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0xe62c2d32a0493d6c175fad6760221c7f61893db6c5aa78d0c5a8a14eebab945d126603082021-09-25 1:31:291 min ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0xe62c2d32a0493d6c175fad6760221c7f61893db6c5aa78d0c5a8a14eebab945d126603082021-09-25 1:31:291 min ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0x933b8f063cbc3887d0567cc61d3f9549b84c2d5323f3a337fc13bf4e5e0b054d126603032021-09-25 1:31:141 min ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0x933b8f063cbc3887d0567cc61d3f9549b84c2d5323f3a337fc13bf4e5e0b054d126603032021-09-25 1:31:141 min ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0xd8d7ea43bc16f21e1ddc3694d38848806afa11739c722622bf978364f7592fb3126602982021-09-25 1:30:592 mins ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0xd8d7ea43bc16f21e1ddc3694d38848806afa11739c722622bf978364f7592fb3126602982021-09-25 1:30:592 mins ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0x5b39b0bcdc0f21968dc0ec2e43c7a29f575c8cf6ff85537f2c9dbe6a809cd7c8126602932021-09-25 1:30:442 mins ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0x5b39b0bcdc0f21968dc0ec2e43c7a29f575c8cf6ff85537f2c9dbe6a809cd7c8126602932021-09-25 1:30:442 mins ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0xe48c254bc920c546e96c494611583952b756381c8cf2081f92e6c63e65550673126602862021-09-25 1:30:232 mins ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0xe48c254bc920c546e96c494611583952b756381c8cf2081f92e6c63e65550673126602862021-09-25 1:30:232 mins ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0xc6227095d69ae152483c0d2ae6c928bc2a7df36ba5b3483d88c6d3b73a8d3236126602812021-09-25 1:30:083 mins ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0xc6227095d69ae152483c0d2ae6c928bc2a7df36ba5b3483d88c6d3b73a8d3236126602812021-09-25 1:30:083 mins ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
0x29cb89bf3874d2f8f8bb13c27d01eb60cfb704502615e5e35c3ebb736732390b126602772021-09-25 1:29:563 mins ago 0x0de37e7bb99f8d934523f5211b90b0e05933972d 0x0560dc988ecac5f9ce64227d0a1bdfcab73561d30 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Chain

Compiler Version
v0.6.8+commit.0bbfe453

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 13 : Chain.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.8;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@umb-network/toolbox/dist/contracts/lib/ValueDecoder.sol";

import "./interfaces/IStakingBank.sol";

import "./extensions/Registrable.sol";
import "./Registry.sol";

contract Chain is Registrable, Ownable {
  using ValueDecoder for bytes;

  // ========== STATE VARIABLES ========== //

  bytes constant public ETH_PREFIX = "\x19Ethereum Signed Message:\n32";

  struct Block {
    bytes32 root;
    uint32 dataTimestamp;
  }

  struct FirstClassData {
    uint224 value;
    uint32 dataTimestamp;
  }

  mapping(uint256 => Block) public blocks;
  mapping(bytes32 => FirstClassData) public fcds;

  IStakingBank public immutable stakingBank;
  uint32 public blocksCount;
  uint32 public immutable blocksCountOffset;
  uint16 public padding;
  uint16 public immutable requiredSignatures;

  // ========== CONSTRUCTOR ========== //

  constructor(
    address _contractRegistry,
    uint16 _padding,
    uint16 _requiredSignatures
  ) public Registrable(_contractRegistry) {
    padding = _padding;
    requiredSignatures = _requiredSignatures;
    Chain oldChain = Chain(Registry(_contractRegistry).getAddress("Chain"));

    blocksCountOffset = address(oldChain) != address(0x0)
      // +1 because it might be situation when tx is already in progress in old contract
      ? oldChain.blocksCount() + oldChain.blocksCountOffset() + 1
      : 0;

    // we not changing SB address that often, so lets save it once, it will save 10% gas
    stakingBank = stakingBankContract();
  }

  // ========== MUTATIVE FUNCTIONS ========== //

  function setPadding(uint16 _padding) external onlyOwner {
    padding = _padding;
    emit LogPadding(msg.sender, _padding);
  }

  function submit(
    uint32 _dataTimestamp,
    bytes32 _root,
    bytes32[] memory _keys,
    uint256[] memory _values,
    uint8[] memory _v,
    bytes32[] memory _r,
    bytes32[] memory _s
  ) public {
    uint32 lastBlockId = getLatestBlockId();
    require(blocks[lastBlockId].dataTimestamp + padding < block.timestamp, "do not spam");
    require(blocks[lastBlockId].dataTimestamp < _dataTimestamp, "can NOT submit older data");
    // we can't expect minter will have exactly the same timestamp
    // but for sure we can demand not to be off by a lot, that's why +3sec
    // temporary remove this condition, because recently on ropsten we see cases when minter/node
    // can be even 100sec behind
    // require(_dataTimestamp <= block.timestamp + 3,
    //   string(abi.encodePacked("oh, so you can predict the future:", _dataTimestamp - block.timestamp + 48)));
    require(_keys.length == _values.length, "numbers of keys and values not the same");

    bytes memory testimony = abi.encodePacked(_dataTimestamp, _root);

    for (uint256 i = 0; i < _keys.length; i++) {
      require(uint224(_values[i]) == _values[i], "FCD overflow");
      fcds[_keys[i]] = FirstClassData(uint224(_values[i]), _dataTimestamp);
      testimony = abi.encodePacked(testimony, _keys[i], _values[i]);
    }

    bytes32 affidavit = keccak256(testimony);
    uint256 power = 0;

    uint256 staked = stakingBank.totalSupply();
    address prevSigner = address(0x0);

    uint256 i = 0;

    for (; i < _v.length; i++) {
      address signer = recoverSigner(affidavit, _v[i], _r[i], _s[i]);
      uint256 balance = stakingBank.balanceOf(signer);

      require(prevSigner < signer, "validator included more than once");
      prevSigner = signer;
      if (balance == 0) continue;

      emit LogVoter(lastBlockId + 1, signer, balance);
      power += balance; // no need for safe math, if we overflow then we will not have enough power
    }

    require(i >= requiredSignatures, "not enough signatures");
    require(power * 100 / staked >= 66, "not enough power was gathered");

    blocks[lastBlockId + 1] = Block(_root, _dataTimestamp);
    blocksCount++;

    emit LogMint(msg.sender, lastBlockId + 1, staked, power);
  }

  // ========== VIEWS ========== //

  function getName() override external pure returns (bytes32) {
    return "Chain";
  }

  function recoverSigner(bytes32 _affidavit, uint8 _v, bytes32 _r, bytes32 _s) public pure returns (address) {
    bytes32 hash = keccak256(abi.encodePacked(ETH_PREFIX, _affidavit));
    return ecrecover(hash, _v, _r, _s);
  }

  function getStatus() external view returns(
    uint256 blockNumber,
    uint16 timePadding,
    uint32 lastDataTimestamp,
    uint32 lastBlockId,
    address nextLeader,
    uint32 nextBlockId,
    address[] memory validators,
    uint256[] memory powers,
    string[] memory locations,
    uint256 staked,
    uint16 minSignatures
  ) {
    blockNumber = block.number;
    timePadding = padding;
    lastBlockId = getLatestBlockId();
    lastDataTimestamp = blocks[lastBlockId].dataTimestamp;
    minSignatures = requiredSignatures;

    staked = stakingBank.totalSupply();
    uint256 numberOfValidators = stakingBank.getNumberOfValidators();
    powers = new uint256[](numberOfValidators);
    validators = new address[](numberOfValidators);
    locations = new string[](numberOfValidators);

    for (uint256 i = 0; i < numberOfValidators; i++) {
      validators[i] = stakingBank.addresses(i);
      (, locations[i]) = stakingBank.validators(validators[i]);
      powers[i] = stakingBank.balanceOf(validators[i]);
    }

    nextBlockId = getBlockIdAtTimestamp(block.timestamp + 1);

    nextLeader = numberOfValidators > 0
      ? validators[getLeaderIndex(numberOfValidators, block.timestamp + 1)]
      : address(0);
  }

  function getBlockId() public view returns (uint32) {
    return getBlockIdAtTimestamp(block.timestamp);
  }

  // this function does not works for past timestamps
  function getBlockIdAtTimestamp(uint256 _timestamp) public view returns (uint32) {
    uint32 _blocksCount = blocksCount + blocksCountOffset;

    if (_blocksCount == 0) {
      return 0;
    }

    if (blocks[_blocksCount - 1].dataTimestamp + padding < _timestamp) {
      return _blocksCount;
    }

    return _blocksCount - 1;
  }

  function getLatestBlockId() public view returns (uint32) {
    return blocksCount + blocksCountOffset - 1;
  }

  // note: I think its time to move leader selection from Chain
  // we don't have anchor so we using timestamp, but timestamp if available without calling blockchain
  // I will leave this methods but it should be deprecated soon
  function getLeaderIndex(uint256 _numberOfValidators, uint256 _timestamp) public view returns (uint256) {
    uint32 latestBlockId = getLatestBlockId();

    // timePadding + 1 => because padding is a space between blocks, so next round starts on first block after padding
    uint256 validatorIndex = latestBlockId +
      (_timestamp - blocks[latestBlockId].dataTimestamp) / (padding + 1);

    return uint16(validatorIndex % _numberOfValidators);
  }

  function getNextLeaderAddress() public view returns (address) {
    return getLeaderAddressAtTime(block.timestamp + 1);
  }

  function getLeaderAddress() public view returns (address) {
    return getLeaderAddressAtTime(block.timestamp);
  }

  // @todo - properly handled non-enabled validators, newly added validators, and validators with low stake
  function getLeaderAddressAtTime(uint256 _timestamp) public view returns (address) {
    uint256 numberOfValidators = stakingBank.getNumberOfValidators();

    if (numberOfValidators == 0) {
      return address(0x0);
    }

    uint256 validatorIndex = getLeaderIndex(numberOfValidators, _timestamp);

    return stakingBank.addresses(validatorIndex);
  }

  function verifyProof(bytes32[] memory _proof, bytes32 _root, bytes32 _leaf) public pure returns (bool) {
    if (_root == bytes32(0)) {
      return false;
    }

    return MerkleProof.verify(_proof, _root, _leaf);
  }

  function hashLeaf(bytes memory _key, bytes memory _value) public pure returns (bytes32) {
    return keccak256(abi.encodePacked(_key, _value));
  }

  function verifyProofForBlock(
    uint256 _blockId,
    bytes32[] memory _proof,
    bytes memory _key,
    bytes memory _value
  ) public view returns (bool) {
    return verifyProof(_proof, blocks[_blockId].root, keccak256(abi.encodePacked(_key, _value)));
  }

  function bytesToBytes32Array(
    bytes memory _data,
    uint256 _offset,
    uint256 _items
  ) public pure returns (bytes32[] memory) {
    bytes32[] memory dataList = new bytes32[](_items);

    for (uint256 i = 0; i < _items; i++) {
      bytes32 temp;
      uint256 idx = (i + 1 + _offset) * 32;

      assembly {
        temp := mload(add(_data, idx))
      }

      dataList[i] = temp;
    }

    return (dataList);
  }

  function verifyProofs(
    uint32[] memory _blockIds,
    bytes memory _proofs,
    uint256[] memory _proofItemsCounter,
    bytes32[] memory _leaves
  ) public view returns (bool[] memory results) {
    results = new bool[](_leaves.length);
    uint256 offset = 0;

    for (uint256 i = 0; i < _leaves.length; i++) {
      results[i] = verifyProof(
        bytesToBytes32Array(_proofs, offset, _proofItemsCounter[i]),
        blocks[_blockIds[i]].root,
        _leaves[i]
      );

      offset += _proofItemsCounter[i];
    }
  }

  function getBlockRoot(uint32 _blockId) external view returns (bytes32) {
    return blocks[_blockId].root;
  }

  function getBlockTimestamp(uint32 _blockId) external view returns (uint32) {
    return blocks[_blockId].dataTimestamp;
  }

  function getCurrentValues(bytes32[] calldata _keys)
  external view returns (uint256[] memory values, uint32[] memory timestamps) {
    timestamps = new uint32[](_keys.length);
    values = new uint256[](_keys.length);

    for (uint i=0; i<_keys.length; i++) {
      FirstClassData storage numericFCD = fcds[_keys[i]];
      values[i] = uint256(numericFCD.value);
      timestamps[i] = numericFCD.dataTimestamp;
    }
  }

  function getCurrentValue(bytes32 _key) external view returns (uint256 value, uint256 timestamp) {
    FirstClassData storage numericFCD = fcds[_key];
    return (uint256(numericFCD.value), numericFCD.dataTimestamp);
  }

  // ========== EVENTS ========== //

  event LogPadding(address indexed executor, uint16 timePadding);
  event LogMint(address indexed minter, uint256 blockId, uint256 staked, uint256 power);
  event LogVoter(uint256 indexed blockId, address indexed voter, uint256 vote);
}

File 2 of 13 : MerkleProof.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev These functions deal with verification of Merkle trees (hash trees),
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        bytes32 computedHash = leaf;

        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];

            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }

        // Check if the computed hash (root) is equal to the provided root
        return computedHash == root;
    }
}

File 3 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import "../GSN/Context.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.
 */
contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 4 of 13 : ValueDecoder.sol
//SPDX-License-Identifier: Unlicensed
pragma solidity >=0.6.8;

library ValueDecoder {
  function toUint(bytes memory _bytes) internal pure returns (uint256 value) {
    assembly {
      value := mload(add(_bytes, 32))
    }
  }

  function toUint(bytes32 _bytes) internal pure returns (uint256 value) {
    assembly {
      value := _bytes
    }
  }
}

File 5 of 13 : IStakingBank.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.8;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IStakingBank is IERC20 {
  function receiveApproval(address _from) external returns (bool success);

  function withdraw(uint256 _value) external returns (bool success);

  function create(address _id, string calldata _location) external;

  function update(address _id, string calldata _location) external;

  function addresses(uint256 _ix) external view returns (address);

  function validators(address _id) external view returns (address id, string memory location);

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

File 6 of 13 : Registrable.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.6.8;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "../interfaces/IRegistry.sol";
import "../interfaces/IStakingBank.sol";

abstract contract Registrable {
  IRegistry public contractRegistry;

  // ========== CONSTRUCTOR ========== //

  constructor(address _contractRegistry) internal {
    require(_contractRegistry != address(0x0), "_registry is empty");
    contractRegistry = IRegistry(_contractRegistry);
  }

  // ========== MODIFIERS ========== //

  modifier onlyFromContract(address _msgSender, bytes32 _contractName) {
    require(
      contractRegistry.getAddress(_contractName) == _msgSender,
        string(abi.encodePacked("caller is not ", _contractName))
    );
    _;
  }

  modifier withRegistrySetUp() {
    require(address(contractRegistry) != address(0x0), "_registry is empty");
    _;
  }

  // ========== VIEWS ========== //

  function getName() virtual external pure returns (bytes32);

  function stakingBankContract() public view returns (IStakingBank) {
    return IStakingBank(contractRegistry.requireAndGetAddress("StakingBank"));
  }

  function tokenContract() public view withRegistrySetUp returns (ERC20) {
    return ERC20(contractRegistry.requireAndGetAddress("UMB"));
  }
}

File 7 of 13 : Registry.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.6.8;

// Inheritance
import "@openzeppelin/contracts/access/Ownable.sol";

import "./extensions/Registrable.sol";

contract Registry is Ownable {
  mapping(bytes32 => address) public registry;

  // ========== EVENTS ========== //

  event LogRegistered(address indexed destination, bytes32 name);

  // ========== MUTATIVE FUNCTIONS ========== //

  function importAddresses(bytes32[] calldata _names, address[] calldata _destinations) external onlyOwner {
    require(_names.length == _destinations.length, "Input lengths must match");

    for (uint i = 0; i < _names.length; i++) {
      registry[_names[i]] = _destinations[i];
      emit LogRegistered(_destinations[i], _names[i]);
    }
  }

  function importContracts(address[] calldata _destinations) external onlyOwner {
    for (uint i = 0; i < _destinations.length; i++) {
      bytes32 name = Registrable(_destinations[i]).getName();
      registry[name] = _destinations[i];
      emit LogRegistered(_destinations[i], name);
    }
  }

  // ========== VIEWS ========== //

  function requireAndGetAddress(bytes32 name) external view returns (address) {
    address _foundAddress = registry[name];
    require(_foundAddress != address(0), string(abi.encodePacked("Name not registered: ", name)));
    return _foundAddress;
  }

  function getAddress(bytes32 _bytes) external view returns (address) {
    return registry[_bytes];
  }

  function getAddressByString(string memory _name) public view returns (address) {
    return registry[stringToBytes32(_name)];
  }

  function stringToBytes32(string memory _string) public pure returns (bytes32 result) {
    bytes memory tempEmptyStringTest = bytes(_string);

    if (tempEmptyStringTest.length == 0) {
      return 0x0;
    }

    assembly {
      result := mload(add(_string, 32))
    }
  }
}

File 8 of 13 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/*
 * @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 GSN 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 Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 9 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 10 of 13 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import "../../GSN/Context.sol";
import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;
    using Address for address;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name, string memory symbol) public {
        _name = name;
        _symbol = symbol;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

File 11 of 13 : IRegistry.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.6.8;


interface IRegistry {
    function getAddress(bytes32 name) external view returns (address);

    function requireAndGetAddress(bytes32 name) external view returns (address);
}

File 12 of 13 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

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

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

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

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

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

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

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

File 13 of 13 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;

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

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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 functionCall(target, data, "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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        if (success) {
            return returndata;
        } else {
            // 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_contractRegistry","type":"address"},{"internalType":"uint16","name":"_padding","type":"uint16"},{"internalType":"uint16","name":"_requiredSignatures","type":"uint16"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"blockId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"staked","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"power","type":"uint256"}],"name":"LogMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"uint16","name":"timePadding","type":"uint16"}],"name":"LogPadding","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"blockId","type":"uint256"},{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"uint256","name":"vote","type":"uint256"}],"name":"LogVoter","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":[],"name":"ETH_PREFIX","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"blocks","outputs":[{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"uint32","name":"dataTimestamp","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blocksCount","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blocksCountOffset","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"uint256","name":"_offset","type":"uint256"},{"internalType":"uint256","name":"_items","type":"uint256"}],"name":"bytesToBytes32Array","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"contractRegistry","outputs":[{"internalType":"contract IRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"fcds","outputs":[{"internalType":"uint224","name":"value","type":"uint224"},{"internalType":"uint32","name":"dataTimestamp","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBlockId","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getBlockIdAtTimestamp","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_blockId","type":"uint32"}],"name":"getBlockRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_blockId","type":"uint32"}],"name":"getBlockTimestamp","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"getCurrentValue","outputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_keys","type":"bytes32[]"}],"name":"getCurrentValues","outputs":[{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"uint32[]","name":"timestamps","type":"uint32[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestBlockId","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLeaderAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getLeaderAddressAtTime","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numberOfValidators","type":"uint256"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getLeaderIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getName","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getNextLeaderAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStatus","outputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"uint16","name":"timePadding","type":"uint16"},{"internalType":"uint32","name":"lastDataTimestamp","type":"uint32"},{"internalType":"uint32","name":"lastBlockId","type":"uint32"},{"internalType":"address","name":"nextLeader","type":"address"},{"internalType":"uint32","name":"nextBlockId","type":"uint32"},{"internalType":"address[]","name":"validators","type":"address[]"},{"internalType":"uint256[]","name":"powers","type":"uint256[]"},{"internalType":"string[]","name":"locations","type":"string[]"},{"internalType":"uint256","name":"staked","type":"uint256"},{"internalType":"uint16","name":"minSignatures","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_key","type":"bytes"},{"internalType":"bytes","name":"_value","type":"bytes"}],"name":"hashLeaf","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"padding","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_affidavit","type":"bytes32"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"recoverSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requiredSignatures","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_padding","type":"uint16"}],"name":"setPadding","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingBank","outputs":[{"internalType":"contract IStakingBank","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingBankContract","outputs":[{"internalType":"contract IStakingBank","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_dataTimestamp","type":"uint32"},{"internalType":"bytes32","name":"_root","type":"bytes32"},{"internalType":"bytes32[]","name":"_keys","type":"bytes32[]"},{"internalType":"uint256[]","name":"_values","type":"uint256[]"},{"internalType":"uint8[]","name":"_v","type":"uint8[]"},{"internalType":"bytes32[]","name":"_r","type":"bytes32[]"},{"internalType":"bytes32[]","name":"_s","type":"bytes32[]"}],"name":"submit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenContract","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"},{"internalType":"bytes32","name":"_root","type":"bytes32"},{"internalType":"bytes32","name":"_leaf","type":"bytes32"}],"name":"verifyProof","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_blockId","type":"uint256"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"},{"internalType":"bytes","name":"_key","type":"bytes"},{"internalType":"bytes","name":"_value","type":"bytes"}],"name":"verifyProofForBlock","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32[]","name":"_blockIds","type":"uint32[]"},{"internalType":"bytes","name":"_proofs","type":"bytes"},{"internalType":"uint256[]","name":"_proofItemsCounter","type":"uint256[]"},{"internalType":"bytes32[]","name":"_leaves","type":"bytes32[]"}],"name":"verifyProofs","outputs":[{"internalType":"bool[]","name":"results","type":"bool[]"}],"stateMutability":"view","type":"function"}]

60e06040523480156200001157600080fd5b5060405162004a5038038062004a50833981810160405281019062000037919062000538565b82600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415620000ab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000a29062000663565b60405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506000620000fe6200040a60201b60201c565b905080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350816004806101000a81548161ffff021916908361ffff1602179055508061ffff1660c08161ffff1660f01b8152505060008373ffffffffffffffffffffffffffffffffffffffff166321f8a7216040518163ffffffff1660e01b8152600401620002079062000685565b60206040518083038186803b1580156200022057600080fd5b505afa15801562000235573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200025b91906200050c565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156200029b576000620003a4565b60018173ffffffffffffffffffffffffffffffffffffffff166377839fe66040518163ffffffff1660e01b815260040160206040518083038186803b158015620002e457600080fd5b505afa158015620002f9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200031f91906200058e565b8273ffffffffffffffffffffffffffffffffffffffff16637353cbcb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200036657600080fd5b505afa1580156200037b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003a191906200058e565b01015b63ffffffff1660a08163ffffffff1660e01b81525050620003ca6200041260201b60201c565b73ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050505062000751565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166346bcb49d6040518163ffffffff1660e01b81526004016200046e9062000648565b60206040518083038186803b1580156200048757600080fd5b505afa1580156200049c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004c291906200050c565b905090565b600081519050620004d88162000703565b92915050565b600081519050620004ef816200071d565b92915050565b600081519050620005068162000737565b92915050565b6000602082840312156200051f57600080fd5b60006200052f84828501620004c7565b91505092915050565b6000806000606084860312156200054e57600080fd5b60006200055e86828701620004c7565b93505060206200057186828701620004de565b92505060406200058486828701620004de565b9150509250925092565b600060208284031215620005a157600080fd5b6000620005b184828501620004f5565b91505092915050565b7f5374616b696e6742616e6b000000000000000000000000000000000000000000815250565b6000620005ef601283620006a0565b91507f5f726567697374727920697320656d70747900000000000000000000000000006000830152602082019050919050565b7f436861696e000000000000000000000000000000000000000000000000000000815250565b60006020820190506200065e60008301620005ba565b919050565b600060208201905081810360008301526200067e81620005e0565b9050919050565b60006020820190506200069b6000830162000622565b919050565b600082825260208201905092915050565b6000620006be82620006d3565b9050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600063ffffffff82169050919050565b6200070e81620006b1565b81146200071a57600080fd5b50565b6200072881620006c5565b81146200073457600080fd5b50565b6200074281620006f3565b81146200074e57600080fd5b50565b60805160601c60a05160e01c60c05160f01c614288620007c86000398061118952806113d55280611d5c525080611c7d5280611ca452806120c7525080610a5b5280610ef15280610ff052806113f8528061149a5280611628528061171752806117f152806121e252806122a352506142886000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c8063805d343211610125578063ca4d29d2116100ad578063e76c0b571161007c578063e76c0b5714610679578063ed9975c314610697578063ef19f3e7146106b5578063f25b3f99146106e5578063f2fde38b1461071657610211565b8063ca4d29d2146105ca578063cbb1b2c7146105fa578063d3d3ea081461062b578063d45167d01461064957610211565b8063abf410e5116100f4578063abf410e5146104eb578063adf1639d14610509578063bef9f8a11461053a578063bf66e3ba1461056a578063c3369db81461059a57610211565b8063805d3432146104615780638d068043146104915780638da5cb5b146104af5780639f6119d7146104cd57610211565b806340a9e5e3116101a857806355a373d61161017757806355a373d6146103df578063637180a8146103fd578063715018a61461041b5780637353cbcb1461042557806377839fe61461044357610211565b806340a9e5e31461034f578063485e055d1461036b5780634bc935d7146103875780634e69d560146103b757610211565b8063243b68f9116101e4578063243b68f9146102b257806324c89a49146102e257806326f3ab8b1461030057806334ba34811461033157610211565b80630f2acc3e146102165780631374df0b1461024657806317d7de7c14610264578063199dadc514610282575b600080fd5b610230600480360381019061022b9190612c4a565b610732565b60405161023d9190613948565b60405180910390f35b61024e610765565b60405161025b9190613bb6565b60405180910390f35b61026c610778565b6040516102799190613948565b60405180910390f35b61029c60048036038101906102979190612d98565b6107a0565b6040516102a9919061392d565b60405180910390f35b6102cc60048036038101906102c79190612cb6565b6107f5565b6040516102d991906138d4565b60405180910390f35b6102ea610897565b6040516102f791906139d1565b60405180910390f35b61031a60048036038101906103159190612a4f565b6108d0565b6040516103289291906138f6565b60405180910390f35b610339610a59565b6040516103469190613a29565b60405180910390f35b61036960048036038101906103649190612d1d565b610a7d565b005b61038560048036038101906103809190612ea8565b610b81565b005b6103a1600480360381019061039c9190612a94565b611349565b6040516103ae919061392d565b60405180910390f35b6103bf611374565b6040516103d69b9a99989796959493929190613c15565b60405180910390f35b6103e761191f565b6040516103f491906139f3565b60405180910390f35b610405611a5e565b6040516104129190613a29565b60405180910390f35b610423611b0d565b005b61042d611c65565b60405161043a9190613cfe565b60405180910390f35b61044b611c7b565b6040516104589190613cfe565b60405180910390f35b61047b60048036038101906104769190612d46565b611c9f565b6040516104889190613cfe565b60405180910390f35b610499611d5a565b6040516104a69190613bb6565b60405180910390f35b6104b7611d7e565b6040516104c49190613897565b60405180910390f35b6104d5611da8565b6040516104e29190613897565b60405180910390f35b6104f3611dbb565b6040516105009190613a0e565b60405180910390f35b610523600480360381019061051e9190612bbe565b611de0565b604051610531929190613cd5565b60405180910390f35b610554600480360381019061054f9190612e7f565b611e6d565b6040516105619190613948565b60405180910390f35b610584600480360381019061057f9190612afb565b611e93565b60405161059191906138b2565b60405180910390f35b6105b460048036038101906105af9190612e7f565b611faa565b6040516105c19190613cfe565b60405180910390f35b6105e460048036038101906105df9190612e43565b611fe0565b6040516105f19190613bfa565b60405180910390f35b610614600480360381019061060f9190612bbe565b612065565b604051610622929190613bd1565b60405180910390f35b6106336120c1565b6040516106409190613cfe565b60405180910390f35b610663600480360381019061065e9190612be7565b612100565b6040516106709190613897565b60405180910390f35b6106816121bd565b60405161068e9190613cfe565b60405180910390f35b61069f6121cd565b6040516106ac9190613897565b60405180910390f35b6106cf60048036038101906106ca9190612d46565b6121dd565b6040516106dc9190613897565b60405180910390f35b6106ff60048036038101906106fa9190612d46565b612354565b60405161070d929190613963565b60405180910390f35b610730600480360381019061072b91906129a9565b612388565b005b60008282604051602001610747929190613847565b60405160208183030381529060405280519060200120905092915050565b6004809054906101000a900461ffff1681565b60007f436861696e000000000000000000000000000000000000000000000000000000905090565b60006107eb84600260008881526020019081526020016000206000015485856040516020016107d0929190613847565b60405160208183030381529060405280519060200120611349565b9050949350505050565b6060808267ffffffffffffffff8111801561080f57600080fd5b5060405190808252806020026020018201604052801561083e5781602001602082028036833780820191505090505b50905060008090505b8381101561088b5760008060208760018501010290508088015191508184848151811061087057fe5b60200260200101818152505050508080600101915050610847565b50809150509392505050565b6040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525081565b6060808383905067ffffffffffffffff811180156108ed57600080fd5b5060405190808252806020026020018201604052801561091c5781602001602082028036833780820191505090505b5090508383905067ffffffffffffffff8111801561093957600080fd5b506040519080825280602002602001820160405280156109685781602001602082028036833780820191505090505b50915060008090505b84849050811015610a515760006003600087878581811061098e57fe5b90506020020135815260200190815260200160002090508060000160009054906101000a90047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168483815181106109fc57fe5b60200260200101818152505080600001601c9054906101000a900463ffffffff16838381518110610a2957fe5b602002602001019063ffffffff16908163ffffffff1681525050508080600101915050610971565b509250929050565b7f000000000000000000000000000000000000000000000000000000000000000081565b610a8561254f565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0b90613b3d565b60405180910390fd5b806004806101000a81548161ffff021916908361ffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167f22d3c53dc5741f3378120ad17e6ae419e28fecb3c4c2572ca0de779d825f63f482604051610b769190613bb6565b60405180910390a250565b6000610b8b6120c1565b9050426004809054906101000a900461ffff1661ffff16600260008463ffffffff16815260200190815260200160002060010160009054906101000a900463ffffffff160163ffffffff1610610c16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0d90613aa4565b60405180910390fd5b8763ffffffff16600260008363ffffffff16815260200190815260200160002060010160009054906101000a900463ffffffff1663ffffffff1610610c90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8790613b96565b60405180910390fd5b8451865114610cd4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ccb90613afd565b60405180910390fd5b60608888604051602001610ce992919061386b565b604051602081830303815290604052905060008090505b8751811015610edb57868181518110610d1557fe5b6020026020010151878281518110610d2957fe5b60200260200101517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1614610d8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8690613a84565b60405180910390fd5b6040518060400160405280888381518110610da657fe5b60200260200101517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681526020018b63ffffffff16815250600360008a8481518110610deb57fe5b6020026020010151815260200190815260200160002060008201518160000160006101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff160217905550602082015181600001601c6101000a81548163ffffffff021916908363ffffffff16021790555090505081888281518110610e8f57fe5b6020026020010151888381518110610ea357fe5b6020026020010151604051602001610ebd9392919061380e565b60405160208183030381529060405291508080600101915050610d00565b50600081805190602001209050600080905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f5557600080fd5b505afa158015610f69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8d9190612d6f565b9050600080905060008090505b8951811015611187576000610fea868c8481518110610fb557fe5b60200260200101518c8581518110610fc957fe5b60200260200101518c8681518110610fdd57fe5b6020026020010151612100565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b81526004016110479190613897565b60206040518083038186803b15801561105f57600080fd5b505afa158015611073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110979190612d6f565b90508173ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610611107576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fe90613b1d565b60405180910390fd5b819350600081141561111a57505061117a565b8173ffffffffffffffffffffffffffffffffffffffff1660018a0163ffffffff167fbac7552ab5da8d0588709ddb75aceec28520646f54bca1cc5e6e104db61935ec8360405161116a9190613bfa565b60405180910390a3808601955050505b8080600101915050610f9a565b7f000000000000000000000000000000000000000000000000000000000000000061ffff168110156111ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e590613a64565b60405180910390fd5b60428360648602816111fc57fe5b04101561123e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161123590613b5d565b60405180910390fd5b60405180604001604052808e81526020018f63ffffffff168152506002600060018a0163ffffffff1681526020019081526020016000206000820151816000015560208201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055509050506004600081819054906101000a900463ffffffff168092919060010191906101000a81548163ffffffff021916908363ffffffff160217905550503373ffffffffffffffffffffffffffffffffffffffff167f5f11830295067c4bcc7d02d4e3b048cd7427be50a3aeb6afc9d3d559ee64bcfa60018901858760405161133193929190613d19565b60405180910390a25050505050505050505050505050565b60008060001b83141561135f576000905061136d565b61136a848484612557565b90505b9392505050565b6000806000806000806060806060600080439a506004809054906101000a900461ffff1699506113a26120c1565b9750600260008963ffffffff16815260200190815260200160002060010160009054906101000a900463ffffffff1698507f000000000000000000000000000000000000000000000000000000000000000090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561145c57600080fd5b505afa158015611470573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114949190612d6f565b915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639031d9136040518163ffffffff1660e01b815260040160206040518083038186803b1580156114fe57600080fd5b505afa158015611512573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115369190612d6f565b90508067ffffffffffffffff8111801561154f57600080fd5b5060405190808252806020026020018201604052801561157e5781602001602082028036833780820191505090505b5094508067ffffffffffffffff8111801561159857600080fd5b506040519080825280602002602001820160405280156115c75781602001602082028036833780820191505090505b5095508067ffffffffffffffff811180156115e157600080fd5b5060405190808252806020026020018201604052801561161557816020015b60608152602001906001900390816116005790505b50935060008090505b818110156118d0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663edf26d9b826040518263ffffffff1660e01b815260040161167f9190613bfa565b60206040518083038186803b15801561169757600080fd5b505afa1580156116ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116cf91906129d2565b8782815181106116db57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fa52c7d888838151811061175d57fe5b60200260200101516040518263ffffffff1660e01b81526004016117819190613897565b60006040518083038186803b15801561179957600080fd5b505afa1580156117ad573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906117d691906129fb565b90508582815181106117e457fe5b60200260200101819052507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a0823188838151811061183757fe5b60200260200101516040518263ffffffff1660e01b815260040161185b9190613897565b60206040518083038186803b15801561187357600080fd5b505afa158015611887573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ab9190612d6f565b8682815181106118b757fe5b602002602001018181525050808060010191505061161e565b506118dd60014201611c9f565b9650600081116118ee57600061190f565b856118fc8260014201611fe0565b8151811061190657fe5b60200260200101515b975050909192939495969798999a565b60008073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156119b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a890613add565b60405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166346bcb49d6040518163ffffffff1660e01b8152600401611a0990613b7d565b60206040518083038186803b158015611a2157600080fd5b505afa158015611a35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a5991906129d2565b905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166346bcb49d6040518163ffffffff1660e01b8152600401611ab890613ac4565b60206040518083038186803b158015611ad057600080fd5b505afa158015611ae4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0891906129d2565b905090565b611b1561254f565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611ba4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b9b90613b3d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600460009054906101000a900463ffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000807f0000000000000000000000000000000000000000000000000000000000000000600460009054906101000a900463ffffffff1601905060008163ffffffff161415611cf2576000915050611d55565b826004809054906101000a900461ffff1661ffff16600260006001850363ffffffff16815260200190815260200160002060010160009054906101000a900463ffffffff160163ffffffff161015611d4d5780915050611d55565b600181039150505b919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000611db6600142016121dd565b905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006003600085815260200190815260200160002090508060000160009054906101000a90047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681600001601c9054906101000a900463ffffffff168063ffffffff1690509250925050915091565b6000600260008363ffffffff168152602001908152602001600020600001549050919050565b6060815167ffffffffffffffff81118015611ead57600080fd5b50604051908082528060200260200182016040528015611edc5781602001602082028036833780820191505090505b509050600080905060008090505b8351811015611fa057611f5d611f148784888581518110611f0757fe5b60200260200101516107f5565b600260008a8581518110611f2457fe5b602002602001015163ffffffff16815260200190815260200160002060000154868481518110611f5057fe5b6020026020010151611349565b838281518110611f6957fe5b602002602001019015159081151581525050848181518110611f8757fe5b6020026020010151820191508080600101915050611eea565b5050949350505050565b6000600260008363ffffffff16815260200190815260200160002060010160009054906101000a900463ffffffff169050919050565b600080611feb6120c1565b9050600060016004809054906101000a900461ffff160161ffff16600260008463ffffffff16815260200190815260200160002060010160009054906101000a900463ffffffff1663ffffffff1685038161204257fe5b048263ffffffff1601905084818161205657fe5b0661ffff169250505092915050565b60036020528060005260406000206000915090508060000160009054906101000a90047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169080600001601c9054906101000a900463ffffffff16905082565b600060017f0000000000000000000000000000000000000000000000000000000000000000600460009054906101000a900463ffffffff160103905090565b6000806040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152508660405160200161214b9291906137e6565b60405160208183030381529060405280519060200120905060018186868660405160008152602001604052604051612186949392919061398c565b6020604051602081039080840390855afa1580156121a8573d6000803e3d6000fd5b50505060206040510351915050949350505050565b60006121c842611c9f565b905090565b60006121d8426121dd565b905090565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639031d9136040518163ffffffff1660e01b815260040160206040518083038186803b15801561224657600080fd5b505afa15801561225a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061227e9190612d6f565b9050600081141561229357600091505061234f565b600061229f8285611fe0565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663edf26d9b826040518263ffffffff1660e01b81526004016122fa9190613bfa565b60206040518083038186803b15801561231257600080fd5b505afa158015612326573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061234a91906129d2565b925050505b919050565b60026020528060005260406000206000915090508060000154908060010160009054906101000a900463ffffffff16905082565b61239061254f565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461241f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161241690613b3d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561248f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161248690613a44565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b60008082905060008090505b85518110156125f557600086828151811061257a57fe5b602002602001015190508083116125bb57828160405160200161259e9291906137ba565b6040516020818303038152906040528051906020012092506125e7565b80836040516020016125ce9291906137ba565b6040516020818303038152906040528051906020012092505b508080600101915050612563565b508381149150509392505050565b600081359050612612816141c8565b92915050565b600081519050612627816141c8565b92915050565b60008083601f84011261263f57600080fd5b8235905067ffffffffffffffff81111561265857600080fd5b60208301915083602082028301111561267057600080fd5b9250929050565b600082601f83011261268857600080fd5b813561269b61269682613d7d565b613d50565b915081818352602084019350602081019050838560208402820111156126c057600080fd5b60005b838110156126f057816126d68882612883565b8452602084019350602083019250506001810190506126c3565b5050505092915050565b600082601f83011261270b57600080fd5b813561271e61271982613da5565b613d50565b9150818183526020840193506020810190508385602084028201111561274357600080fd5b60005b8381101561277357816127598882612955565b845260208401935060208301925050600181019050612746565b5050505092915050565b600082601f83011261278e57600080fd5b81356127a161279c82613dcd565b613d50565b915081818352602084019350602081019050838560208402820111156127c657600080fd5b60005b838110156127f657816127dc888261297f565b8452602084019350602083019250506001810190506127c9565b5050505092915050565b600082601f83011261281157600080fd5b813561282461281f82613df5565b613d50565b9150818183526020840193506020810190508385602084028201111561284957600080fd5b60005b83811015612879578161285f8882612994565b84526020840193506020830192505060018101905061284c565b5050505092915050565b600081359050612892816141df565b92915050565b600082601f8301126128a957600080fd5b81356128bc6128b782613e1d565b613d50565b915080825260208301602083018583830111156128d857600080fd5b6128e3838284614142565b50505092915050565b600082601f8301126128fd57600080fd5b815161291061290b82613e49565b613d50565b9150808252602083016020830185838301111561292c57600080fd5b612937838284614151565b50505092915050565b60008135905061294f816141f6565b92915050565b6000813590506129648161420d565b92915050565b6000815190506129798161420d565b92915050565b60008135905061298e81614224565b92915050565b6000813590506129a38161423b565b92915050565b6000602082840312156129bb57600080fd5b60006129c984828501612603565b91505092915050565b6000602082840312156129e457600080fd5b60006129f284828501612618565b91505092915050565b60008060408385031215612a0e57600080fd5b6000612a1c85828601612618565b925050602083015167ffffffffffffffff811115612a3957600080fd5b612a45858286016128ec565b9150509250929050565b60008060208385031215612a6257600080fd5b600083013567ffffffffffffffff811115612a7c57600080fd5b612a888582860161262d565b92509250509250929050565b600080600060608486031215612aa957600080fd5b600084013567ffffffffffffffff811115612ac357600080fd5b612acf86828701612677565b9350506020612ae086828701612883565b9250506040612af186828701612883565b9150509250925092565b60008060008060808587031215612b1157600080fd5b600085013567ffffffffffffffff811115612b2b57600080fd5b612b378782880161277d565b945050602085013567ffffffffffffffff811115612b5457600080fd5b612b6087828801612898565b935050604085013567ffffffffffffffff811115612b7d57600080fd5b612b89878288016126fa565b925050606085013567ffffffffffffffff811115612ba657600080fd5b612bb287828801612677565b91505092959194509250565b600060208284031215612bd057600080fd5b6000612bde84828501612883565b91505092915050565b60008060008060808587031215612bfd57600080fd5b6000612c0b87828801612883565b9450506020612c1c87828801612994565b9350506040612c2d87828801612883565b9250506060612c3e87828801612883565b91505092959194509250565b60008060408385031215612c5d57600080fd5b600083013567ffffffffffffffff811115612c7757600080fd5b612c8385828601612898565b925050602083013567ffffffffffffffff811115612ca057600080fd5b612cac85828601612898565b9150509250929050565b600080600060608486031215612ccb57600080fd5b600084013567ffffffffffffffff811115612ce557600080fd5b612cf186828701612898565b9350506020612d0286828701612955565b9250506040612d1386828701612955565b9150509250925092565b600060208284031215612d2f57600080fd5b6000612d3d84828501612940565b91505092915050565b600060208284031215612d5857600080fd5b6000612d6684828501612955565b91505092915050565b600060208284031215612d8157600080fd5b6000612d8f8482850161296a565b91505092915050565b60008060008060808587031215612dae57600080fd5b6000612dbc87828801612955565b945050602085013567ffffffffffffffff811115612dd957600080fd5b612de587828801612677565b935050604085013567ffffffffffffffff811115612e0257600080fd5b612e0e87828801612898565b925050606085013567ffffffffffffffff811115612e2b57600080fd5b612e3787828801612898565b91505092959194509250565b60008060408385031215612e5657600080fd5b6000612e6485828601612955565b9250506020612e7585828601612955565b9150509250929050565b600060208284031215612e9157600080fd5b6000612e9f8482850161297f565b91505092915050565b600080600080600080600060e0888a031215612ec357600080fd5b6000612ed18a828b0161297f565b9750506020612ee28a828b01612883565b965050604088013567ffffffffffffffff811115612eff57600080fd5b612f0b8a828b01612677565b955050606088013567ffffffffffffffff811115612f2857600080fd5b612f348a828b016126fa565b945050608088013567ffffffffffffffff811115612f5157600080fd5b612f5d8a828b01612800565b93505060a088013567ffffffffffffffff811115612f7a57600080fd5b612f868a828b01612677565b92505060c088013567ffffffffffffffff811115612fa357600080fd5b612faf8a828b01612677565b91505092959891949750929550565b6000612fca838361304a565b60208301905092915050565b6000612fe283836132b3565b60208301905092915050565b6000612ffa83836132d1565b60208301905092915050565b6000613012838361339d565b905092915050565b60006130268383613732565b60208301905092915050565b600061303e8383613776565b60208301905092915050565b6130538161401f565b82525050565b6130628161401f565b82525050565b600061307382613ed5565b61307d8185613f7b565b935061308883613e75565b8060005b838110156130b95781516130a08882612fbe565b97506130ab83613f2d565b92505060018101905061308c565b5085935050505092915050565b60006130d182613ee0565b6130db8185613f8c565b93506130e683613e85565b8060005b838110156131175781516130fe8882612fd6565b975061310983613f3a565b9250506001810190506130ea565b5085935050505092915050565b600061312f82613eeb565b6131398185613f9d565b935061314483613e95565b8060005b8381101561317557815161315c8882612fee565b975061316783613f47565b925050600181019050613148565b5085935050505092915050565b600061318d82613ef6565b6131978185613fae565b9350836020820285016131a985613ea5565b8060005b858110156131e557848403895281516131c68582613006565b94506131d183613f54565b925060208a019950506001810190506131ad565b50829750879550505050505092915050565b600061320282613f01565b61320c8185613fbf565b935061321783613eb5565b8060005b8381101561324857815161322f888261301a565b975061323a83613f61565b92505060018101905061321b565b5085935050505092915050565b600061326082613f0c565b61326a8185613fd0565b935061327583613ec5565b8060005b838110156132a657815161328d8882613032565b975061329883613f6e565b925050600181019050613279565b5085935050505092915050565b6132bc81614031565b82525050565b6132cb81614031565b82525050565b6132da8161403d565b82525050565b6132e98161403d565b82525050565b6133006132fb8261403d565b614184565b82525050565b600061331182613f17565b61331b8185613fe1565b935061332b818560208601614151565b613334816141aa565b840191505092915050565b600061334a82613f17565b6133548185613ff2565b9350613364818560208601614151565b80840191505092915050565b613379816140c4565b82525050565b613388816140e8565b82525050565b6133978161410c565b82525050565b60006133a882613f22565b6133b28185613ffd565b93506133c2818560208601614151565b6133cb816141aa565b840191505092915050565b60006133e360268361400e565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061344960158361400e565b91507f6e6f7420656e6f756768207369676e61747572657300000000000000000000006000830152602082019050919050565b6000613489600c8361400e565b91507f464344206f766572666c6f7700000000000000000000000000000000000000006000830152602082019050919050565b60006134c9600b8361400e565b91507f646f206e6f74207370616d0000000000000000000000000000000000000000006000830152602082019050919050565b7f5374616b696e6742616e6b000000000000000000000000000000000000000000815250565b600061352f60128361400e565b91507f5f726567697374727920697320656d70747900000000000000000000000000006000830152602082019050919050565b600061356f60278361400e565b91507f6e756d62657273206f66206b65797320616e642076616c756573206e6f74207460008301527f68652073616d65000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006135d560218361400e565b91507f76616c696461746f7220696e636c75646564206d6f7265207468616e206f6e6360008301527f65000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061363b60208361400e565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b600061367b601d8361400e565b91507f6e6f7420656e6f75676820706f776572207761732067617468657265640000006000830152602082019050919050565b7f554d420000000000000000000000000000000000000000000000000000000000815250565b60006136e160198361400e565b91507f63616e204e4f54207375626d6974206f6c6465722064617461000000000000006000830152602082019050919050565b61371d81614047565b82525050565b61372c81614075565b82525050565b61373b8161409d565b82525050565b61374a8161409d565b82525050565b61376161375c8261409d565b61418e565b82525050565b61377081614130565b82525050565b61377f816140a7565b82525050565b61378e816140a7565b82525050565b6137a56137a0826140a7565b614198565b82525050565b6137b4816140b7565b82525050565b60006137c682856132ef565b6020820191506137d682846132ef565b6020820191508190509392505050565b60006137f2828561333f565b91506137fe82846132ef565b6020820191508190509392505050565b600061381a828661333f565b915061382682856132ef565b6020820191506138368284613750565b602082019150819050949350505050565b6000613853828561333f565b915061385f828461333f565b91508190509392505050565b60006138778285613794565b60048201915061388782846132ef565b6020820191508190509392505050565b60006020820190506138ac6000830184613059565b92915050565b600060208201905081810360008301526138cc81846130c6565b905092915050565b600060208201905081810360008301526138ee8184613124565b905092915050565b6000604082019050818103600083015261391081856131f7565b905081810360208301526139248184613255565b90509392505050565b600060208201905061394260008301846132c2565b92915050565b600060208201905061395d60008301846132e0565b92915050565b600060408201905061397860008301856132e0565b6139856020830184613785565b9392505050565b60006080820190506139a160008301876132e0565b6139ae60208301866137ab565b6139bb60408301856132e0565b6139c860608301846132e0565b95945050505050565b600060208201905081810360008301526139eb8184613306565b905092915050565b6000602082019050613a086000830184613370565b92915050565b6000602082019050613a23600083018461337f565b92915050565b6000602082019050613a3e600083018461338e565b92915050565b60006020820190508181036000830152613a5d816133d6565b9050919050565b60006020820190508181036000830152613a7d8161343c565b9050919050565b60006020820190508181036000830152613a9d8161347c565b9050919050565b60006020820190508181036000830152613abd816134bc565b9050919050565b6000602082019050613ad8600083016134fc565b919050565b60006020820190508181036000830152613af681613522565b9050919050565b60006020820190508181036000830152613b1681613562565b9050919050565b60006020820190508181036000830152613b36816135c8565b9050919050565b60006020820190508181036000830152613b568161362e565b9050919050565b60006020820190508181036000830152613b768161366e565b9050919050565b6000602082019050613b91600083016136ae565b919050565b60006020820190508181036000830152613baf816136d4565b9050919050565b6000602082019050613bcb6000830184613714565b92915050565b6000604082019050613be66000830185613723565b613bf36020830184613785565b9392505050565b6000602082019050613c0f6000830184613741565b92915050565b600061016082019050613c2b600083018e613741565b613c38602083018d613714565b613c45604083018c613785565b613c52606083018b613785565b613c5f608083018a613059565b613c6c60a0830189613785565b81810360c0830152613c7e8188613068565b905081810360e0830152613c9281876131f7565b9050818103610100830152613ca78186613182565b9050613cb7610120830185613741565b613cc5610140830184613714565b9c9b505050505050505050505050565b6000604082019050613cea6000830185613741565b613cf76020830184613741565b9392505050565b6000602082019050613d136000830184613785565b92915050565b6000606082019050613d2e6000830186613767565b613d3b6020830185613741565b613d486040830184613741565b949350505050565b6000604051905081810181811067ffffffffffffffff82111715613d7357600080fd5b8060405250919050565b600067ffffffffffffffff821115613d9457600080fd5b602082029050602081019050919050565b600067ffffffffffffffff821115613dbc57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff821115613de457600080fd5b602082029050602081019050919050565b600067ffffffffffffffff821115613e0c57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff821115613e3457600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff821115613e6057600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600061402a82614055565b9050919050565b60008115159050919050565b6000819050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600060ff82169050919050565b60006140cf826140d6565b9050919050565b60006140e182614055565b9050919050565b60006140f3826140fa565b9050919050565b600061410582614055565b9050919050565b60006141178261411e565b9050919050565b600061412982614055565b9050919050565b600061413b826140a7565b9050919050565b82818337600083830152505050565b60005b8381101561416f578082015181840152602081019050614154565b8381111561417e576000848401525b50505050565b6000819050919050565b6000819050919050565b60006141a3826141bb565b9050919050565b6000601f19601f8301169050919050565b60008160e01b9050919050565b6141d18161401f565b81146141dc57600080fd5b50565b6141e88161403d565b81146141f357600080fd5b50565b6141ff81614047565b811461420a57600080fd5b50565b6142168161409d565b811461422157600080fd5b50565b61422d816140a7565b811461423857600080fd5b50565b614244816140b7565b811461424f57600080fd5b5056fea2646970667358221220b49756542cc9ab208bd3ab4452fa94977f82fb0f6c0fc3c1bbaf0c3fe16268af64736f6c63430006080033000000000000000000000000e1cdce9a678e84aa73d3266176c6e11b3edc4f67000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000000000000000000000001

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

000000000000000000000000e1cdce9a678e84aa73d3266176c6e11b3edc4f67000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000000000000000000000001
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000e1cdce9a678e84aa73d3266176c6e11b3edc4f67
Arg [1] : 000000000000000000000000000000000000000000000000000000000000003c
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000001


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading