ETH Price: $3,176.68 (-8.47%)
Gas: 3 Gwei

Contract

0xb01eF958F37E999a5528D14F825Cd429596F3864
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Publish Root162168012022-12-19 5:58:23584 days ago1671429503IN
Aventus : AvN bridge
0 ETH0.0017811.92603364
Publish Root162096292022-12-18 5:57:11585 days ago1671343031IN
Aventus : AvN bridge
0 ETH0.0019720413.21549987
Disable Lifting162042802022-12-17 12:00:59585 days ago1671278459IN
Aventus : AvN bridge
0 ETH0.0003949913.36823281
Set Authorisatio...162037872022-12-17 10:21:35586 days ago1671272495IN
Aventus : AvN bridge
0 ETH0.0012500113.15137923
Publish Root162024682022-12-17 5:56:35586 days ago1671256595IN
Aventus : AvN bridge
0 ETH0.0018777912.57752415
Publish Root161953082022-12-16 5:56:35587 days ago1671170195IN
Aventus : AvN bridge
0 ETH0.0019203512.88048132
Publish Root161881462022-12-15 5:56:23588 days ago1671083783IN
Aventus : AvN bridge
0 ETH0.0019253912.89906137
Lift161862982022-12-14 23:43:59588 days ago1671061439IN
Aventus : AvN bridge
0 ETH0.0008960815.21415328
Lift161817682022-12-14 8:33:23589 days ago1671006803IN
Aventus : AvN bridge
0 ETH0.0008561114.53553438
Publish Root161809952022-12-14 5:57:11589 days ago1670997431IN
Aventus : AvN bridge
0 ETH0.0018086612.11542409
Lower161751692022-12-13 10:24:35590 days ago1670927075IN
Aventus : AvN bridge
0 ETH0.0013992213.73726854
Publish Root161738282022-12-13 5:54:59590 days ago1670910899IN
Aventus : AvN bridge
0 ETH0.0019163612.84409346
Publish Root161666792022-12-12 5:56:11591 days ago1670824571IN
Aventus : AvN bridge
0 ETH0.0018238312.21638916
Publish Root161592092022-12-11 4:54:47592 days ago1670734487IN
Aventus : AvN bridge
0 ETH0.0020293313.59761602
Publish Root161516282022-12-10 3:30:47593 days ago1670643047IN
Aventus : AvN bridge
0 ETH0.0020638813.83282975
Publish Root161445352022-12-09 3:41:47594 days ago1670557307IN
Aventus : AvN bridge
0 ETH0.001748911.56640595
Publish Root161373662022-12-08 3:40:11595 days ago1670470811IN
Aventus : AvN bridge
0 ETH0.0019048412.76178411
Publish Root161302412022-12-07 3:35:35596 days ago1670384135IN
Aventus : AvN bridge
0 ETH0.0018375312.30983937
Publish Root161230742022-12-06 3:30:23597 days ago1670297423IN
Aventus : AvN bridge
0 ETH0.0018561412.43613552
Publish Root161159202022-12-05 3:29:47598 days ago1670210987IN
Aventus : AvN bridge
0 ETH0.0017526711.73940711
Lower161090082022-12-04 4:17:47599 days ago1670127467IN
Aventus : AvN bridge
0 ETH0.0011130910.92879764
Publish Root161087712022-12-04 3:30:11599 days ago1670124611IN
Aventus : AvN bridge
0 ETH0.0015583710.44414308
Publish Root161016072022-12-03 3:29:47600 days ago1670038187IN
Aventus : AvN bridge
0 ETH0.0017382311.49066433
Publish Root160944402022-12-02 3:29:23601 days ago1669951763IN
Aventus : AvN bridge
0 ETH0.0021512714.41972934
Lower160890142022-12-01 9:18:35602 days ago1669886315IN
Aventus : AvN bridge
0 ETH0.0012944212.70139546
View all transactions

Latest 2 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
162043592022-12-17 12:16:59585 days ago1671279419
Aventus : AvN bridge
2 wei
144539722022-03-25 7:09:07853 days ago1648192147
Aventus : AvN bridge
1 wei
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AVN

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 2000 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2022-03-17
*/

// File: contracts\interfaces\IAVN.sol

// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

interface IAVN {
  event LogAuthorisationUpdated(address indexed contractAddress, bool status);
  event LogQuorumUpdated(uint256[2] quorum);
  event LogValidatorFunctionsAreEnabled(bool status);
  event LogLiftingIsEnabled(bool status);
  event LogLoweringIsEnabled(bool status);
  event LogLowerCallUpdated(bytes2 callId, uint256 numBytes);

  event LogValidatorRegistered(bytes32 indexed t1PublicKeyLHS, bytes32 t1PublicKeyRHS, bytes32 indexed t2PublicKey,
      uint256 indexed t2TransactionId);
  event LogValidatorDeregistered(bytes32 indexed t1PublicKeyLHS, bytes32 t1PublicKeyRHS, bytes32 indexed t2PublicKey,
      uint256 indexed t2TransactionId);
  event LogRootPublished(bytes32 indexed rootHash, uint256 indexed t2TransactionId);

  event LogLifted(address indexed token, address indexed t1Address, bytes32 indexed t2PublicKey, uint256 amount);
  event LogLowered(address indexed token, address indexed t1Address, bytes32 indexed t2PublicKey, uint256 amount);

  // Owner only
  function transferValidators() external;
  function setAuthorisationStatus(address contractAddress, bool status) external;
  function setQuorum(uint256[2] memory quorum) external;
  function disableValidatorFunctions() external;
  function enableValidatorFunctions() external;
  function disableLifting() external;
  function enableLifting() external;
  function disableLowering() external;
  function enableLowering() external;
  function updateLowerCall(bytes2 callId, uint256 numBytes) external;
  function recoverERC777TokensFromLegacyTreasury(address erc777Address) external;
  function recoverERC20TokensFromLegacyTreasury(address erc20Address) external;
  function liftLegacyStakes(bytes calldata t2PublicKey, uint256 amount) external;

  // Validator only
  function registerValidator(bytes memory t1PublicKey, bytes32 t2PublicKey, uint256 t2TransactionId,
      bytes calldata confirmations) external;
  function deregisterValidator(bytes memory t1PublicKey, bytes32 t2PublicKey, uint256 t2TransactionId,
      bytes calldata confirmations) external;
  function publishRoot(bytes32 rootHash, uint256 t2TransactionId, bytes calldata confirmations) external;

  // Authorised contract only
  function storeT2TransactionId(uint256 t2TransactionId) external;
  function storeRootHash(bytes32 rootHash) external;
  function storeLiftProofHash(bytes32 proofHash) external;
  function storeLoweredLeafHash(bytes32 leafHash) external;
  function unlockETH(address payable recipient, uint256 amount) external;
  function unlockERC777Tokens(address erc777Address, address recipient, uint256 amount) external;
  function unlockERC20Tokens(address erc20Address, address recipient, uint256 amount) external;

  // Public
  function getAuthorisedContracts() external view returns (address[] memory);
  function getIsPublishedRootHash(bytes32 rootHash) external view returns (bool);
  function lift(address erc20Address, bytes calldata t2PublicKey, uint256 amount) external;
  function proxyLift(address erc20Address, bytes calldata t2PublicKey, uint256 amount, address approver, uint256 proofNonce,
      bytes calldata proof) external;
  function liftETH(bytes calldata t2PublicKey) external payable;
  function lower(bytes memory leaf, bytes32[] calldata merklePath) external;
  function confirmAvnTransaction(bytes32 leafHash, bytes32[] memory merklePath) external view returns (bool);
}

// File: contracts\interfaces\IERC20.sol


pragma solidity 0.8.11;

// As described in https://eips.ethereum.org/EIPS/eip-20
interface IERC20 {
  event Transfer(address indexed from, address indexed to, uint256 value);
  event Approval(address indexed owner, address indexed spender, uint256 value);

  function name() external view returns (string memory); // optional method - see eip spec
  function symbol() external view returns (string memory); // optional method - see eip spec
  function decimals() external view returns (uint8); // optional method - see eip spec
  function totalSupply() external view returns (uint256);
  function balanceOf(address owner) external view returns (uint256);
  function transfer(address to, uint256 value) external returns (bool);
  function transferFrom(address from, address to, uint256 value) external returns (bool);
  function approve(address spender, uint256 value) external returns (bool);
  function allowance(address owner, address spender) external view returns (uint256);
}

// File: contracts\interfaces\IERC777.sol


pragma solidity 0.8.11;

// As defined in https://eips.ethereum.org/EIPS/eip-777
interface IERC777 {
  event Sent(address indexed operator, address indexed from, address indexed to, uint256 amount, bytes data,
      bytes operatorData);
  event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData);
  event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData);
  event AuthorizedOperator(address indexed operator,address indexed holder);
  event RevokedOperator(address indexed operator, address indexed holder);

  function name() external view returns (string memory);
  function symbol() external view returns (string memory);
  function totalSupply() external view returns (uint256);
  function balanceOf(address holder) external view returns (uint256);
  function granularity() external view returns (uint256);
  function defaultOperators() external view returns (address[] memory);
  function isOperatorFor(address operator, address holder) external view returns (bool);
  function authorizeOperator(address operator) external;
  function revokeOperator(address operator) external;
  function send(address to, uint256 amount, bytes calldata data) external;
  function operatorSend(address from, address to, uint256 amount, bytes calldata data, bytes calldata operatorData) external;
  function burn(uint256 amount, bytes calldata data) external;
  function operatorBurn( address from, uint256 amount, bytes calldata data, bytes calldata operatorData) external;
}

// File: contracts\interfaces\IERC777Recipient.sol


pragma solidity 0.8.11;

// As defined in the 'ERC777TokensRecipient And The tokensReceived Hook' section of https://eips.ethereum.org/EIPS/eip-777
interface IERC777Recipient {
  function tokensReceived(address operator, address from, address to, uint256 amount, bytes calldata data,
      bytes calldata operatorData) external;
}

// File: contracts\interfaces\IAvnFTTreasury.sol


pragma solidity 0.8.11;

interface IAvnFTTreasury {
  event LogFTTreasuryPermissionUpdated(address indexed treasurer, bool status);

  function setTreasurerPermission(address treasurer, bool status) external;
  function getTreasurers() external view returns(address[] memory);
  function unlockERC777Tokens(address token, uint256 amount, bytes calldata data) external;
  function unlockERC20Tokens(address token, uint256 amount) external;
}

// File: contracts\thirdParty\interfaces\IERC1820Registry.sol


// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC1820Registry.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the global ERC1820 Registry, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register
 * implementers for interfaces in this registry, as well as query support.
 *
 * Implementers may be shared by multiple accounts, and can also implement more
 * than a single interface for each account. Contracts can implement interfaces
 * for themselves, but externally-owned accounts (EOA) must delegate this to a
 * contract.
 *
 * {IERC165} interfaces can also be queried via the registry.
 *
 * For an in-depth explanation and source code analysis, see the EIP text.
 */
interface IERC1820Registry {
    /**
     * @dev Sets `newManager` as the manager for `account`. A manager of an
     * account is able to set interface implementers for it.
     *
     * By default, each account is its own manager. Passing a value of `0x0` in
     * `newManager` will reset the manager to this initial state.
     *
     * Emits a {ManagerChanged} event.
     *
     * Requirements:
     *
     * - the caller must be the current manager for `account`.
     */
    function setManager(address account, address newManager) external;

    /**
     * @dev Returns the manager for `account`.
     *
     * See {setManager}.
     */
    function getManager(address account) external view returns (address);

    /**
     * @dev Sets the `implementer` contract as ``account``'s implementer for
     * `interfaceHash`.
     *
     * `account` being the zero address is an alias for the caller's address.
     * The zero address can also be used in `implementer` to remove an old one.
     *
     * See {interfaceHash} to learn how these are created.
     *
     * Emits an {InterfaceImplementerSet} event.
     *
     * Requirements:
     *
     * - the caller must be the current manager for `account`.
     * - `interfaceHash` must not be an {IERC165} interface id (i.e. it must not
     * end in 28 zeroes).
     * - `implementer` must implement {IERC1820Implementer} and return true when
     * queried for support, unless `implementer` is the caller. See
     * {IERC1820Implementer-canImplementInterfaceForAddress}.
     */
    function setInterfaceImplementer(
        address account,
        bytes32 _interfaceHash,
        address implementer
    ) external;

    /**
     * @dev Returns the implementer of `interfaceHash` for `account`. If no such
     * implementer is registered, returns the zero address.
     *
     * If `interfaceHash` is an {IERC165} interface id (i.e. it ends with 28
     * zeroes), `account` will be queried for support of it.
     *
     * `account` being the zero address is an alias for the caller's address.
     */
    function getInterfaceImplementer(address account, bytes32 _interfaceHash) external view returns (address);

    /**
     * @dev Returns the interface hash for an `interfaceName`, as defined in the
     * corresponding
     * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP].
     */
    function interfaceHash(string calldata interfaceName) external pure returns (bytes32);

    /**
     * @notice Updates the cache with whether the contract implements an ERC165 interface or not.
     * @param account Address of the contract for which to update the cache.
     * @param interfaceId ERC165 interface for which to update the cache.
     */
    function updateERC165Cache(address account, bytes4 interfaceId) external;

    /**
     * @notice Checks whether a contract implements an ERC165 interface or not.
     * If the result is not cached a direct lookup on the contract address is performed.
     * If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling
     * {updateERC165Cache} with the contract address.
     * @param account Address of the contract to check.
     * @param interfaceId ERC165 interface to check.
     * @return True if `account` implements `interfaceId`, false otherwise.
     */
    function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool);

    /**
     * @notice Checks whether a contract implements an ERC165 interface or not without using nor updating the cache.
     * @param account Address of the contract to check.
     * @param interfaceId ERC165 interface to check.
     * @return True if `account` implements `interfaceId`, false otherwise.
     */
    function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool);

    event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer);

    event ManagerChanged(address indexed account, address indexed newManager);
}

// File: contracts\Owned.sol


pragma solidity 0.8.11;

contract Owned {

  address public owner = msg.sender;

  event LogOwnershipTransferred(address indexed owner, address indexed newOwner);

  modifier onlyOwner {
    require(msg.sender == owner, "Only owner");
    _;
  }

  function setOwner(address _owner)
    external
    onlyOwner
  {
    require(_owner != address(0), "Owner cannot be zero address");
    emit LogOwnershipTransferred(owner, _owner);
    owner = _owner;
  }
}

// File: ..\contracts\AVN.sol


pragma solidity 0.8.11;








contract LegacyValidatorsManager {
  uint256 public numActiveValidators;
  uint256 public validatorIdNum;
  mapping (uint256 => address) public t1Address;
  mapping (uint256 => bytes32) public t2PublicKey;
}

contract AVN is IAVN, IERC777Recipient, Owned {
  // Universal address as defined in Registry Contract Address section of https://eips.ethereum.org/EIPS/eip-1820
  IERC1820Registry constant internal ERC1820_REGISTRY = IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24);
  // keccak256("ERC777Token")
  bytes32 constant internal ERC777_TOKEN_HASH = 0xac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce2177054;
  // keccak256("ERC777TokensRecipient")
  bytes32 constant internal ERC777_TOKENS_RECIPIENT_HASH = 0xb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b;
  uint256 constant internal SIGNATURE_LENGTH = 65;
  uint256 constant internal LIFT_LIMIT = type(uint128).max;
  address constant internal PSEUDO_ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
  IAvnFTTreasury immutable internal LEGACY_AVN_TREASURY;
  LegacyValidatorsManager immutable internal LEGACY_AVN_VALIDATORS_MANAGER;

  mapping (uint256 => bool) public isRegisteredValidator;
  mapping (uint256 => bool) public isActiveValidator;
  mapping (address => uint256) public t1AddressToId;
  mapping (bytes32 => uint256) public t2PublicKeyToId;
  mapping (uint256 => address) public idToT1Address;
  mapping (uint256 => bytes32) public idToT2PublicKey;
  mapping (bytes2 => uint256) public numBytesToLowerData;
  mapping (address => bool) public isAuthorisedContract;
  mapping (bytes32 => bool) public isPublishedRootHash;
  mapping (uint256 => bool) public isUsedT2TransactionId;
  mapping (bytes32 => bool) public hasLowered;
  mapping (bytes32 => bool) public hasLifted;

  address[] public authorisedContracts;
  uint256[2] public quorum;

  uint256 public numActiveValidators;
  uint256 public nextValidatorId;
  uint256 public unliftedLegacyStakes;
  bool public validatorFunctionsAreEnabled;
  bool public liftingIsEnabled;
  bool public loweringIsEnabled;
  bool public validatorsTransferred;

  address immutable public avtAddress;

  constructor(address avt, LegacyValidatorsManager avnValidatorsManager, IAvnFTTreasury avnFTTreasury)
  {
    ERC1820_REGISTRY.setInterfaceImplementer(address(this), ERC777_TOKENS_RECIPIENT_HASH, address(this));
    avtAddress = avt;
    LEGACY_AVN_VALIDATORS_MANAGER = avnValidatorsManager;
    LEGACY_AVN_TREASURY = avnFTTreasury;
    numBytesToLowerData[0x2d00] = 133; // callID (2 bytes) + proof (2 prefix + 32 relayer + 32 signer + 1 prefix + 64 signature)
    numBytesToLowerData[0x2700] = 133; // callID (2 bytes) + proof (2 prefix + 32 relayer + 32 signer + 1 prefix + 64 signature)
    numBytesToLowerData[0x2702] = 2;   // callID (2 bytes)
    validatorFunctionsAreEnabled = true;
    liftingIsEnabled = true;
    loweringIsEnabled = true;
    nextValidatorId = 1;
    quorum[0] = 2;
    quorum[1] = 3;
    unliftedLegacyStakes = 2500000000000000000000000; // 2,500,000 AVT in full atto AVT
  }

  modifier onlyAuthorisedContract() {
    require(isAuthorisedContract[msg.sender], "Access denied");
    _;
  }

  modifier onlyWhenLiftingIsEnabled() {
    require(liftingIsEnabled, "Lifting currently disabled");
    _;
  }

  modifier onlyWhenValidatorFunctionsAreEnabled() {
    require(validatorFunctionsAreEnabled, "Function currently disabled");
    _;
  }

  function transferValidators()
    onlyOwner
    external
  {
    require(validatorsTransferred == false, "Validators already transferred");
    numActiveValidators = LEGACY_AVN_VALIDATORS_MANAGER.numActiveValidators();
    nextValidatorId = LEGACY_AVN_VALIDATORS_MANAGER.validatorIdNum();

    for (uint256 id = 1; id < nextValidatorId; id++) {
      idToT1Address[id] = LEGACY_AVN_VALIDATORS_MANAGER.t1Address(id);
      idToT2PublicKey[id] = LEGACY_AVN_VALIDATORS_MANAGER.t2PublicKey(id);
      t1AddressToId[idToT1Address[id]] = id;
      t2PublicKeyToId[idToT2PublicKey[id]] = id;
      isRegisteredValidator[id] = true;
      isActiveValidator[id] = true;
    }

    validatorsTransferred = true;
  }

  function setAuthorisationStatus(address contractAddress, bool status)
    onlyOwner
    external
  {
    uint256 size;

    assembly {
      size := extcodesize(contractAddress)
    }

    require(size > 0, "Only contracts");

    if (status == isAuthorisedContract[contractAddress]) {
      return;
    } else if (status) {
      isAuthorisedContract[contractAddress] = true;
      authorisedContracts.push(contractAddress);
    } else {
      isAuthorisedContract[contractAddress] = false;
      uint256 endContractAddress = authorisedContracts.length - 1;
      for (uint256 i; i < endContractAddress; i++) {
        if (authorisedContracts[i] == contractAddress) {
          authorisedContracts[i] = authorisedContracts[endContractAddress];
          break;
        }
      }
      authorisedContracts.pop();
    }
    emit LogAuthorisationUpdated(contractAddress, status);
  }

  function setQuorum(uint256[2] memory _quorum)
    onlyOwner
    public
  {
    require(_quorum[1] != 0, "Invalid: div by zero");
    require(_quorum[0] <= _quorum[1], "Invalid: above 100%");
    quorum = _quorum;
    emit LogQuorumUpdated(quorum);
  }

  function disableValidatorFunctions()
    onlyOwner
    external
  {
    validatorFunctionsAreEnabled = false;
    emit LogValidatorFunctionsAreEnabled(false);
  }

  function enableValidatorFunctions()
    onlyOwner
    external
  {
    validatorFunctionsAreEnabled = true;
    emit LogValidatorFunctionsAreEnabled(true);
  }

  function disableLifting()
    onlyOwner
    external
  {
    liftingIsEnabled = false;
    emit LogLiftingIsEnabled(false);
  }

  function enableLifting()
    onlyOwner
    external
  {
    liftingIsEnabled = true;
    emit LogLiftingIsEnabled(true);
  }

  function disableLowering()
    onlyOwner
    external
  {
    loweringIsEnabled = false;
    emit LogLoweringIsEnabled(false);
  }

  function enableLowering()
    onlyOwner
    external
  {
    loweringIsEnabled = true;
    emit LogLoweringIsEnabled(true);
  }

  function updateLowerCall(bytes2 callId, uint256 numBytes)
    onlyOwner
    external
  {
    numBytesToLowerData[callId] = numBytes;
    emit LogLowerCallUpdated(callId, numBytes);
  }

  function recoverERC777TokensFromLegacyTreasury(address erc777Address)
    onlyOwner
    external
  {
    uint256 lockedBalance = IERC777(erc777Address).balanceOf(address(LEGACY_AVN_TREASURY));
    LEGACY_AVN_TREASURY.unlockERC777Tokens(erc777Address, lockedBalance, "");
  }

  function recoverERC20TokensFromLegacyTreasury(address erc20Address)
    onlyOwner
    external
  {
    uint256 lockedBalance = IERC20(erc20Address).balanceOf(address(LEGACY_AVN_TREASURY));
    LEGACY_AVN_TREASURY.unlockERC20Tokens(erc20Address, lockedBalance);
  }

  function liftLegacyStakes(bytes calldata t2PublicKey, uint256 amount)
    onlyOwner
    external
  {
    require(amount <= unliftedLegacyStakes, "Not enough stake remaining");
    bytes32 checkedT2PublicKey = checkT2PublicKey(t2PublicKey);
    unliftedLegacyStakes = unliftedLegacyStakes - amount;
    emit LogLifted(avtAddress, address(this), checkedT2PublicKey, amount);
  }

  function registerValidator(bytes memory t1PublicKey, bytes32 t2PublicKey, uint256 t2TransactionId,
      bytes calldata confirmations)
    onlyWhenValidatorFunctionsAreEnabled
    external
  {
    require(t1PublicKey.length == 64, "T1 public key must be 64 bytes");
    address t1Address = address(uint160(uint256(keccak256(t1PublicKey))));
    uint256 id = t1AddressToId[t1Address];
    require(isRegisteredValidator[id] == false, "Validator is already registered");

    // The order of the elements is the reverse of the deregisterValidatorHash
    bytes32 registerValidatorHash = keccak256(abi.encodePacked(t1PublicKey, t2PublicKey));
    verifyConfirmations(toConfirmationHash(registerValidatorHash, t2TransactionId), confirmations);
    doStoreT2TransactionId(t2TransactionId);

    if (id == 0) {
      require(t2PublicKeyToId[t2PublicKey] == 0, "T2 public key already in use");
      id = nextValidatorId;
      idToT1Address[id] = t1Address;
      t1AddressToId[t1Address] = id;
      idToT2PublicKey[id] = t2PublicKey;
      t2PublicKeyToId[t2PublicKey] = id;
      nextValidatorId++;
    } else {
      require(idToT2PublicKey[id] == t2PublicKey, "Cannot change T2 public key");
    }

    isRegisteredValidator[id] = true;

    bytes32 t1PublicKeyLHS;
    bytes32 t1PublicKeyRHS;
    assembly {
      t1PublicKeyLHS := mload(add(t1PublicKey, 0x20))
      t1PublicKeyRHS := mload(add(t1PublicKey, 0x40))
    }

    emit LogValidatorRegistered(t1PublicKeyLHS, t1PublicKeyRHS, t2PublicKey, t2TransactionId);
  }

  function deregisterValidator(bytes memory t1PublicKey, bytes32 t2PublicKey, uint256 t2TransactionId,
      bytes calldata confirmations)
    onlyWhenValidatorFunctionsAreEnabled
    external
  {
    uint256 id = t2PublicKeyToId[t2PublicKey];
    require(isRegisteredValidator[id], "Validator is not registered");

    // The order of the elements is the reverse of the registerValidatorHash
    bytes32 deregisterValidatorHash = keccak256(abi.encodePacked(t2PublicKey, t1PublicKey));
    verifyConfirmations(toConfirmationHash(deregisterValidatorHash, t2TransactionId), confirmations);
    doStoreT2TransactionId(t2TransactionId);

    isRegisteredValidator[id] = false;
    isActiveValidator[id] = false;
    numActiveValidators--;

    bytes32 t1PublicKeyLHS;
    bytes32 t1PublicKeyRHS;
    assembly {
      t1PublicKeyLHS := mload(add(t1PublicKey, 0x20))
      t1PublicKeyRHS := mload(add(t1PublicKey, 0x40))
    }

    emit LogValidatorDeregistered(t1PublicKeyLHS, t1PublicKeyRHS, t2PublicKey, t2TransactionId);
  }

  function publishRoot(bytes32 rootHash, uint256 t2TransactionId, bytes calldata confirmations)
    onlyWhenValidatorFunctionsAreEnabled
    external
  {
    verifyConfirmations(toConfirmationHash(rootHash, t2TransactionId), confirmations);
    doStoreT2TransactionId(t2TransactionId);
    doStoreRootHash(rootHash);
    emit LogRootPublished(rootHash, t2TransactionId);
  }

  function storeT2TransactionId(uint256 t2TransactionId)
    onlyAuthorisedContract
    external
  {
    doStoreT2TransactionId(t2TransactionId);
  }

  function storeRootHash(bytes32 rootHash)
    onlyAuthorisedContract
    external
  {
    doStoreRootHash(rootHash);
  }

  function storeLiftProofHash(bytes32 proofHash)
    onlyAuthorisedContract
    external
  {
    doStoreLiftProofHash(proofHash);
  }

  function storeLoweredLeafHash(bytes32 leafHash)
    onlyAuthorisedContract
    external
  {
    doStoreLoweredLeafHash(leafHash);
  }

  function unlockETH(address payable recipient, uint256 amount)
    onlyAuthorisedContract
    external
  {
    (bool success, ) = recipient.call{value: amount}("");
    require(success, "ETH transfer failed");
  }

  function unlockERC777Tokens(address erc777Address, address recipient, uint256 amount)
    onlyAuthorisedContract
    external
  {
    IERC777(erc777Address).send(recipient, amount, "");
  }

  function unlockERC20Tokens(address erc20Address, address recipient, uint256 amount)
    onlyAuthorisedContract
    external
  {
    assert(IERC20(erc20Address).transfer(recipient, amount));
  }

  function getAuthorisedContracts()
    external
    view
    returns (address[] memory)
  {
    return authorisedContracts;
  }

  function getIsPublishedRootHash(bytes32 rootHash)
    external
    view
    returns (bool)
  {
    return isPublishedRootHash[rootHash];
  }

  function lift(address erc20Address, bytes calldata t2PublicKey, uint256 amount)
    onlyWhenLiftingIsEnabled
    external
  {
    doLift(erc20Address, msg.sender, t2PublicKey, amount);
  }

  function proxyLift(address erc20Address, bytes calldata t2PublicKey, uint256 amount, address approver, uint256 proofNonce,
      bytes calldata proof)
    onlyWhenLiftingIsEnabled
    external
  {
    if (msg.sender != approver) {
      doStoreLiftProofHash(keccak256(proof));
      bytes32 msgHash = keccak256(abi.encodePacked(erc20Address, t2PublicKey, amount, proofNonce));
      address signer = recoverSigner(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", msgHash)), proof);
      require(signer == approver, "Lift proof invalid");
    }
    doLift(erc20Address, approver, t2PublicKey, amount);
  }

  function liftETH(bytes calldata t2PublicKey)
    payable
    onlyWhenLiftingIsEnabled
    external
  {
    bytes32 checkedT2PublicKey = checkT2PublicKey(t2PublicKey);
    require(msg.value > 0, "Cannot lift zero ETH");
    emit LogLifted(PSEUDO_ETH_ADDRESS, msg.sender, checkedT2PublicKey, msg.value);
  }

  // ERC-777 automatic lifting
  function tokensReceived(address /* operator */, address from, address to, uint256 amount, bytes calldata data,
      bytes calldata /* operatorData */)
    onlyWhenLiftingIsEnabled
    external
  {
    if (from == address(LEGACY_AVN_TREASURY)) return; // recovering funds from the legacy treasury so we don't lift here
    require(to == address(this), "Tokens must be sent to this contract");
    require(amount > 0, "Cannot lift zero ERC777 tokens");
    bytes32 checkedT2PublicKey = checkT2PublicKey(data);
    require(ERC1820_REGISTRY.getInterfaceImplementer(msg.sender, ERC777_TOKEN_HASH) == msg.sender, "Token must be registered");
    IERC777 erc777Contract = IERC777(msg.sender);
    require(erc777Contract.balanceOf(address(this)) <= LIFT_LIMIT, "Exceeds ERC777 lift limit");
    emit LogLifted(msg.sender, from, checkedT2PublicKey, amount);
  }

  function lower(bytes memory leaf, bytes32[] calldata merklePath)
    external
  {
    require(loweringIsEnabled, "Lowering currently disabled");
    bytes32 leafHash = keccak256(leaf);
    require(confirmAvnTransaction(leafHash, merklePath), "Leaf or path invalid");
    doStoreLoweredLeafHash(leafHash);

    uint256 ptr;
    ptr += getCompactIntegerByteSize(leaf[ptr]); // add number of bytes encoding the leaf length
    require(uint8(leaf[ptr]) & 128 != 0, "Unsigned transaction"); // bitwise version check to ensure leaf is signed transaction
    ptr += 99; // version (1 byte) + multiAddress type (1 byte) + sender (32 bytes) + curve type (1 byte) + signature (64 bytes)
    ptr += leaf[ptr] == 0x00 ? 1 : 2; // add number of era bytes (immortal is 1, otherwise 2)
    ptr += getCompactIntegerByteSize(leaf[ptr]); // add number of bytes encoding the nonce
    ptr += getCompactIntegerByteSize(leaf[ptr]); // add number of bytes encoding the tip
    ptr += 32; // account for the first 32 EVM bytes holding the leaf's length

    bytes2 callId;

    assembly {
      callId := mload(add(leaf, ptr))
    }

    require(numBytesToLowerData[callId] != 0, "Not a lower leaf");
    ptr += numBytesToLowerData[callId];
    bytes32 t2PublicKey;
    address token;
    uint128 amount;
    address t1Address;

    assembly {
      t2PublicKey := mload(add(leaf, ptr)) // load next 32 bytes into 32 byte type starting at ptr
      token := mload(add(add(leaf, 20), ptr)) // load leftmost 20 of next 32 bytes into 20 byte type starting at ptr + 20
      amount := mload(add(add(leaf, 36), ptr)) // load leftmost 16 of next 32 bytes into 16 byte type starting at ptr + 20 + 16
      t1Address := mload(add(add(leaf, 56), ptr)) // load leftmost 20 of next 32 bytes type starting at ptr + 20 + 16 + 20
    }

    // amount was encoded in little endian so we need to reverse to big endian:
    amount = ((amount & 0xFF00FF00FF00FF00FF00FF00FF00FF00) >> 8) | ((amount & 0x00FF00FF00FF00FF00FF00FF00FF00FF) << 8);
    amount = ((amount & 0xFFFF0000FFFF0000FFFF0000FFFF0000) >> 16) | ((amount & 0x0000FFFF0000FFFF0000FFFF0000FFFF) << 16);
    amount = ((amount & 0xFFFFFFFF00000000FFFFFFFF00000000) >> 32) | ((amount & 0x00000000FFFFFFFF00000000FFFFFFFF) << 32);
    amount = (amount >> 64) | (amount << 64);

    if (token == PSEUDO_ETH_ADDRESS) {
      (bool success, ) = payable(t1Address).call{value: amount}("");
      require(success, "ETH transfer failed");
    } else if (ERC1820_REGISTRY.getInterfaceImplementer(token, ERC777_TOKEN_HASH) == token) {
      IERC777(token).send(t1Address, amount, "");
    } else {
      assert(IERC20(token).transfer(t1Address, amount));
    }

    emit LogLowered(token, t1Address, t2PublicKey, amount);
  }

  function confirmAvnTransaction(bytes32 leafHash, bytes32[] memory merklePath)
    public
    view
    returns (bool)
  {
    bytes32 rootHash = leafHash;

    for (uint256 i; i < merklePath.length; i++) {
      bytes32 node = merklePath[i];
      if (rootHash < node)
        rootHash = keccak256(abi.encode(rootHash, node));
      else
        rootHash = keccak256(abi.encode(node, rootHash));
    }

    return isPublishedRootHash[rootHash];
  }

  // reference: https://docs.substrate.io/v3/advanced/scale-codec/#compactgeneral-integers
  function getCompactIntegerByteSize(bytes1 checkByte)
    private
    pure
    returns (uint256 byteLength)
  {
    uint8 mode = uint8(checkByte) & 3; // the 2 least significant bits encode the byte mode so we do a bitwise AND on them

    if (mode == 0) { // single-byte mode
      byteLength = 1;
    } else if (mode == 1) { // two-byte mode
      byteLength = 2;
    } else if (mode == 2) { // four-byte mode
      byteLength = 4;
    } else {
      byteLength = uint8(checkByte >> 2) + 5; // upper 6 bits + 4 are the number of bytes following + 1 for the checkbyte itself
    }
  }

  function toConfirmationHash(bytes32 data, uint256 t2TransactionId)
    private
    view
    returns (bytes32)
  {
    return keccak256(abi.encode(data, t2TransactionId, idToT2PublicKey[t1AddressToId[msg.sender]]));
  }

  function verifyConfirmations(bytes32 msgHash, bytes memory confirmations)
    private
  {
    bytes32 ethSignedPrefixMsgHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", msgHash));
    uint256 numConfirmations = confirmations.length / SIGNATURE_LENGTH;
    uint256 requiredConfirmations = numActiveValidators * quorum[0] / quorum[1] + 1;
    uint256 validConfirmations;
    uint256 id;
    bytes32 r;
    bytes32 s;
    uint8 v;
    bool[] memory confirmed = new bool[](nextValidatorId);

    for (uint256 i; i < numConfirmations; i++) {
      assembly {
        let offset := mul(i, SIGNATURE_LENGTH)
        r := mload(add(confirmations, add(0x20, offset)))
        s := mload(add(confirmations, add(0x40, offset)))
        v := byte(0, mload(add(confirmations, add(0x60, offset))))
      }
      if (v < 27) v += 27;
      if (v != 27 && v != 28 || uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
        continue;
      } else {
        id = t1AddressToId[ecrecover(ethSignedPrefixMsgHash, v, r, s)];

        if (isActiveValidator[id] == false) {
          if (isRegisteredValidator[id]) {
            // Here we activate any previously registered but as yet unactivated validators
            isActiveValidator[id] = true;
            numActiveValidators++;
            validConfirmations++;
            confirmed[id] = true;
          }
        } else if (confirmed[id] == false) {
          validConfirmations++;
          confirmed[id] = true;
        }
      }
      if (validConfirmations == requiredConfirmations) break;
    }

    require(validConfirmations == requiredConfirmations, "Invalid confirmations");
  }

  function doStoreT2TransactionId(uint256 t2TransactionId)
    private
  {
    require(isUsedT2TransactionId[t2TransactionId] == false, "T2 transaction must be unique");
    isUsedT2TransactionId[t2TransactionId] = true;
  }

  function doStoreRootHash(bytes32 rootHash)
    private
  {
    require(isPublishedRootHash[rootHash] == false, "Root already exists");
    isPublishedRootHash[rootHash] = true;
  }

  function doStoreLiftProofHash(bytes32 proofHash)
    private
  {
    require(hasLifted[proofHash] == false, "Lift proof already used");
    hasLifted[proofHash] = true;
  }

  function doStoreLoweredLeafHash(bytes32 leafHash)
    private
  {
    require(hasLowered[leafHash] == false, "Already lowered");
    hasLowered[leafHash] = true;
  }

  function doLift(address erc20Address, address approver, bytes memory t2PublicKey, uint256 amount)
    private
  {
    require(ERC1820_REGISTRY.getInterfaceImplementer(erc20Address, ERC777_TOKEN_HASH) == address(0), "ERC20 lift only");
    require(amount > 0, "Cannot lift zero ERC20 tokens");
    bytes32 checkedT2PublicKey = checkT2PublicKey(t2PublicKey);
    IERC20 erc20Contract = IERC20(erc20Address);
    uint256 currentBalance = erc20Contract.balanceOf(address(this));
    assert(erc20Contract.transferFrom(approver, address(this), amount));
    uint256 newBalance = erc20Contract.balanceOf(address(this));
    require(newBalance <= LIFT_LIMIT, "Exceeds ERC20 lift limit");
    emit LogLifted(erc20Address, approver, checkedT2PublicKey, newBalance - currentBalance);
  }

  function checkT2PublicKey(bytes memory t2PublicKey)
    private
    pure
    returns (bytes32 checkedT2PublicKey)
  {
    require(t2PublicKey.length == 32, "Bad T2 public key");
    checkedT2PublicKey = bytes32(t2PublicKey);
  }

  function recoverSigner(bytes32 hash, bytes memory signature)
    private
    pure
    returns (address)
  {
    if (signature.length != 65) return address(0);

    bytes32 r;
    bytes32 s;
    uint8 v;

    assembly {
      r := mload(add(signature, 0x20))
      s := mload(add(signature, 0x40))
      v := byte(0, mload(add(signature, 0x60)))
    }

    if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) return address(0);
    if (v < 27) v += 27;
    if (v != 27 && v != 28) return address(0);

    return ecrecover(hash, v, r, s);
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"avt","type":"address"},{"internalType":"contract LegacyValidatorsManager","name":"avnValidatorsManager","type":"address"},{"internalType":"contract IAvnFTTreasury","name":"avnFTTreasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"LogAuthorisationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"t1Address","type":"address"},{"indexed":true,"internalType":"bytes32","name":"t2PublicKey","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogLifted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"LogLiftingIsEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes2","name":"callId","type":"bytes2"},{"indexed":false,"internalType":"uint256","name":"numBytes","type":"uint256"}],"name":"LogLowerCallUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"t1Address","type":"address"},{"indexed":true,"internalType":"bytes32","name":"t2PublicKey","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogLowered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"LogLoweringIsEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"LogOwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[2]","name":"quorum","type":"uint256[2]"}],"name":"LogQuorumUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"t2TransactionId","type":"uint256"}],"name":"LogRootPublished","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"t1PublicKeyLHS","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"t1PublicKeyRHS","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"t2PublicKey","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"t2TransactionId","type":"uint256"}],"name":"LogValidatorDeregistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"LogValidatorFunctionsAreEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"t1PublicKeyLHS","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"t1PublicKeyRHS","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"t2PublicKey","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"t2TransactionId","type":"uint256"}],"name":"LogValidatorRegistered","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"authorisedContracts","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"avtAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"leafHash","type":"bytes32"},{"internalType":"bytes32[]","name":"merklePath","type":"bytes32[]"}],"name":"confirmAvnTransaction","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"t1PublicKey","type":"bytes"},{"internalType":"bytes32","name":"t2PublicKey","type":"bytes32"},{"internalType":"uint256","name":"t2TransactionId","type":"uint256"},{"internalType":"bytes","name":"confirmations","type":"bytes"}],"name":"deregisterValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableLifting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableLowering","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableValidatorFunctions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableLifting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableLowering","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableValidatorFunctions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAuthorisedContracts","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"}],"name":"getIsPublishedRootHash","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"hasLifted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"hasLowered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"idToT1Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"idToT2PublicKey","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isActiveValidator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAuthorisedContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"isPublishedRootHash","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isRegisteredValidator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isUsedT2TransactionId","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"bytes","name":"t2PublicKey","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"lift","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"t2PublicKey","type":"bytes"}],"name":"liftETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"t2PublicKey","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"liftLegacyStakes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"liftingIsEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"leaf","type":"bytes"},{"internalType":"bytes32[]","name":"merklePath","type":"bytes32[]"}],"name":"lower","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"loweringIsEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextValidatorId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numActiveValidators","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes2","name":"","type":"bytes2"}],"name":"numBytesToLowerData","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"bytes","name":"t2PublicKey","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"approver","type":"address"},{"internalType":"uint256","name":"proofNonce","type":"uint256"},{"internalType":"bytes","name":"proof","type":"bytes"}],"name":"proxyLift","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"t2TransactionId","type":"uint256"},{"internalType":"bytes","name":"confirmations","type":"bytes"}],"name":"publishRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"quorum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"erc20Address","type":"address"}],"name":"recoverERC20TokensFromLegacyTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc777Address","type":"address"}],"name":"recoverERC777TokensFromLegacyTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"t1PublicKey","type":"bytes"},{"internalType":"bytes32","name":"t2PublicKey","type":"bytes32"},{"internalType":"uint256","name":"t2TransactionId","type":"uint256"},{"internalType":"bytes","name":"confirmations","type":"bytes"}],"name":"registerValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setAuthorisationStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[2]","name":"_quorum","type":"uint256[2]"}],"name":"setQuorum","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"proofHash","type":"bytes32"}],"name":"storeLiftProofHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"leafHash","type":"bytes32"}],"name":"storeLoweredLeafHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"}],"name":"storeRootHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"t2TransactionId","type":"uint256"}],"name":"storeT2TransactionId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"t1AddressToId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"t2PublicKeyToId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"tokensReceived","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transferValidators","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unliftedLegacyStakes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unlockERC20Tokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc777Address","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unlockERC777Tokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unlockETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes2","name":"callId","type":"bytes2"},{"internalType":"uint256","name":"numBytes","type":"uint256"}],"name":"updateLowerCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"validatorFunctionsAreEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"validatorsTransferred","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60e0604052600080546001600160a01b031916331790553480156200002357600080fd5b5060405162004e2338038062004e238339810160408190526200004691620001b9565b6040516329965a1d60e01b815230600482018190527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b60248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad24906329965a1d90606401600060405180830381600087803b158015620000c057600080fd5b505af1158015620000d5573d6000803e3d6000fd5b505050506001600160a01b0392831660c05290821660a05216608052600760205260857f48c4b3d34414b263eba050acebff3a86104567b8d18e934647ba4d4177e8ffd18190557f7a94b1d05f64a8a17bdd08880c4fb8a8a62dbfe40e3e8207d1b31bcb70c5db655561138160f11b60005260027fd9c341efad7bd98217ebd3d21fd5fb3d98219760fcc42c166bb59b5ca868b7cd8190556013805462ffffff1916620101011790556001601155600e556003600f556a02116545850052128000006012556200020d565b6001600160a01b0381168114620001b657600080fd5b50565b600080600060608486031215620001cf57600080fd5b8351620001dc81620001a0565b6020850151909350620001ef81620001a0565b60408501519092506200020281620001a0565b809150509250925092565b60805160a05160c051614bae620002756000396000818161055f0152610f9d015260008181612d7e01528181612e0601528181612ec50152612f9c015260008181610b410152818161132a015281816113f101528181612ad00152612b890152614bae6000f3fe60806040526004361061035f5760003560e01c80639d231008116101c6578063dcfe8fb3116100f7578063ec862ef311610095578063f7c091891161006f578063f7c0918914610a6d578063f86e352c14610a83578063f8ce560a14610aa3578063fa6f8ad514610ac357600080fd5b8063ec862ef314610a0a578063ed581fd314610a2c578063ed94a45114610a4c57600080fd5b8063e51d0921116100d1578063e51d09211461096d578063e5342ce61461099d578063e8fed1d6146109bd578063ebb79c4e146109ea57600080fd5b8063dcfe8fb314610918578063e1c067dd14610938578063e2ed13bb1461095857600080fd5b8063c3664d9811610164578063c4c4e4a91161013e578063c4c4e4a9146108ae578063c6e31068146108c4578063c95970e5146108d9578063d3578a94146108f957600080fd5b8063c3664d9814610841578063c4024f0e14610861578063c460eb071461088157600080fd5b8063aee37d39116101a0578063aee37d39146107c9578063b65569be146107dc578063b9b17e7f146107fc578063c0130ef41461082c57600080fd5b80639d231008146107675780639e79fe6b14610787578063ae5bb10d146107b457600080fd5b8063449edc70116102a05780635b2b285b1161023e578063872873ef11610218578063872873ef146106c75780638c3ce008146106e75780638da5cb5b146107175780638f78ea1b1461073757600080fd5b80635b2b285b146106725780635f56a1cb14610692578063740614a0146106a757600080fd5b80634a7d9f691161027a5780634a7d9f69146106015780634aea11911461061b5780634b82344b146106305780634fa182ea1461064557600080fd5b8063449edc701461058157806346971f4f146105b157806349a19ac1146105e157600080fd5b80631a6210521161030d578063289e3dce116102e7578063289e3dce146104bd57806328fa2fc8146104fd5780633083f7081461052d57806335bb5b191461054d57600080fd5b80631a6210521461045d5780631df653881461047d578063271df9501461049d57600080fd5b806313af40351161033e57806313af4035146103c657806314f1ee09146103e657806317a691aa1461040f57600080fd5b806223de29146103645780630204e173146103865780630caa9948146103a6575b600080fd5b34801561037057600080fd5b5061038461037f3660046141c9565b610ae3565b005b34801561039257600080fd5b506103846103a136600461427a565b610e9c565b3480156103b257600080fd5b506103846103c13660046142c6565b610ff1565b3480156103d257600080fd5b506103846103e1366004614322565b611091565b3480156103f257600080fd5b506103fc60125481565b6040519081526020015b60405180910390f35b34801561041b57600080fd5b5061044561042a366004614346565b6005602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610406565b34801561046957600080fd5b506103846104783660046143a6565b611196565b34801561048957600080fd5b50610384610498366004614322565b6112cc565b3480156104a957600080fd5b506103846104b8366004614346565b611454565b3480156104c957600080fd5b506104ed6104d8366004614322565b60086020526000908152604090205460ff1681565b6040519015158152602001610406565b34801561050957600080fd5b506104ed610518366004614346565b60016020526000908152604090205460ff1681565b34801561053957600080fd5b50610384610548366004614496565b6114af565b34801561055957600080fd5b506104457f000000000000000000000000000000000000000000000000000000000000000081565b34801561058d57600080fd5b506104ed61059c366004614346565b600c6020526000908152604090205460ff1681565b3480156105bd57600080fd5b506104ed6105cc366004614346565b60026020526000908152604090205460ff1681565b3480156105ed57600080fd5b506103846105fc366004614530565b611bb5565b34801561060d57600080fd5b506013546104ed9060ff1681565b34801561062757600080fd5b50610384611f3e565b34801561063c57600080fd5b50610384611fcb565b34801561065157600080fd5b506103fc6106603660046145e3565b60076020526000908152604090205481565b34801561067e57600080fd5b5061038461068d366004614530565b61204e565b34801561069e57600080fd5b5061038461226a565b3480156106b357600080fd5b506103846106c236600461460c565b6122f3565b3480156106d357600080fd5b506103846106e2366004614645565b6125b7565b3480156106f357600080fd5b506104ed610702366004614346565b60009081526009602052604090205460ff1690565b34801561072357600080fd5b50600054610445906001600160a01b031681565b34801561074357600080fd5b506104ed610752366004614346565b600a6020526000908152604090205460ff1681565b34801561077357600080fd5b50610445610782366004614346565b6127ae565b34801561079357600080fd5b506103fc6107a2366004614346565b60066020526000908152604090205481565b3480156107c057600080fd5b506103846127d8565b6103846107d73660046146ce565b61285a565b3480156107e857600080fd5b506103846107f7366004614346565b612996565b34801561080857600080fd5b506104ed610817366004614346565b60096020526000908152604090205460ff1681565b34801561083857600080fd5b506103846129ee565b34801561084d57600080fd5b5061038461085c366004614322565b612a72565b34801561086d57600080fd5b5061038461087c366004614710565b612bba565b34801561088d57600080fd5b506103fc61089c366004614346565b60046020526000908152604090205481565b3480156108ba57600080fd5b506103fc60105481565b3480156108d057600080fd5b50610384612cdb565b3480156108e557600080fd5b506013546104ed9062010000900460ff1681565b34801561090557600080fd5b506013546104ed90610100900460ff1681565b34801561092457600080fd5b50610384610933366004614763565b6130b6565b34801561094457600080fd5b5061038461095336600461478d565b61316e565b34801561096457600080fd5b5061038461324b565b34801561097957600080fd5b506104ed610988366004614346565b600b6020526000908152604090205460ff1681565b3480156109a957600080fd5b506104ed6109b83660046147ce565b6132d2565b3480156109c957600080fd5b506103fc6109d8366004614322565b60036020526000908152604090205481565b3480156109f657600080fd5b50610384610a05366004614346565b613393565b348015610a1657600080fd5b50610a1f6133eb565b6040516104069190614880565b348015610a3857600080fd5b50610384610a473660046148cd565b61344d565b348015610a5857600080fd5b506013546104ed906301000000900460ff1681565b348015610a7957600080fd5b506103fc60115481565b348015610a8f57600080fd5b50610384610a9e366004614346565b613544565b348015610aaf57600080fd5b506103fc610abe366004614346565b61359c565b348015610acf57600080fd5b50610384610ade36600461478d565b6135b3565b601354610100900460ff16610b3f5760405162461bcd60e51b815260206004820152601a60248201527f4c696674696e672063757272656e746c792064697361626c656400000000000060448201526064015b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b03161415610b7e57610e92565b6001600160a01b0386163014610bfb5760405162461bcd60e51b8152602060048201526024808201527f546f6b656e73206d7573742062652073656e7420746f207468697320636f6e7460448201527f72616374000000000000000000000000000000000000000000000000000000006064820152608401610b36565b60008511610c4b5760405162461bcd60e51b815260206004820152601e60248201527f43616e6e6f74206c696674207a65726f2045524337373720746f6b656e7300006044820152606401610b36565b6000610c8c85858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061369a92505050565b60405163555ddc6560e11b815233600482018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce21770546024830152919250731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610d06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2a91906148eb565b6001600160a01b031614610d805760405162461bcd60e51b815260206004820152601860248201527f546f6b656e206d757374206265207265676973746572656400000000000000006044820152606401610b36565b6040516370a0823160e01b815230600482015233906fffffffffffffffffffffffffffffffff9082906370a0823190602401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df39190614908565b1115610e415760405162461bcd60e51b815260206004820152601960248201527f4578636565647320455243373737206c696674206c696d6974000000000000006044820152606401610b36565b81896001600160a01b0316336001600160a01b03167f8964776336bc2fa8ecaaf70b6f8e8450807efb1ff78f8b87980707aa821f0ec08a604051610e8791815260200190565b60405180910390a450505b5050505050505050565b6000546001600160a01b03163314610ee35760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b601254811115610f355760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420656e6f756768207374616b652072656d61696e696e670000000000006044820152606401610b36565b6000610f7684848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061369a92505050565b905081601254610f869190614937565b601255604051828152819030906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016907f8964776336bc2fa8ecaaf70b6f8e8450807efb1ff78f8b87980707aa821f0ec09060200160405180910390a450505050565b601354610100900460ff166110485760405162461bcd60e51b815260206004820152601a60248201527f4c696674696e672063757272656e746c792064697361626c65640000000000006044820152606401610b36565b61108b843385858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508792506136f6915050565b50505050565b6000546001600160a01b031633146110d85760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6001600160a01b03811661112e5760405162461bcd60e51b815260206004820152601c60248201527f4f776e65722063616e6e6f74206265207a65726f2061646472657373000000006044820152606401610b36565b600080546040516001600160a01b03808516939216917fdb6d05f3295cede580affa301a1eb5297528f3b3f6a56b075887ce6f61c45f2191a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b031633146111dd5760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b602081015161122e5760405162461bcd60e51b815260206004820152601460248201527f496e76616c69643a20646976206279207a65726f0000000000000000000000006044820152606401610b36565b6020810151815111156112835760405162461bcd60e51b815260206004820152601360248201527f496e76616c69643a2061626f76652031303025000000000000000000000000006044820152606401610b36565b611290600e826002614118565b507fc7d2ab69ce7a42db5ca306ca58373ae7719b64ba1a5d0a86abdccea27fcfd8f9600e6040516112c19190614964565b60405180910390a150565b6000546001600160a01b031633146113135760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152600091908316906370a0823190602401602060405180830381865afa15801561137d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a19190614908565b6040517f0e3aef000000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526024820183905260606044830152600060648301529192507f000000000000000000000000000000000000000000000000000000000000000090911690630e3aef00906084015b600060405180830381600087803b15801561143857600080fd5b505af115801561144c573d6000803e3d6000fd5b505050505050565b3360009081526008602052604090205460ff166114a35760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b6044820152606401610b36565b6114ac81613a80565b50565b60135462010000900460ff166115075760405162461bcd60e51b815260206004820152601b60248201527f4c6f776572696e672063757272656e746c792064697361626c656400000000006044820152606401610b36565b600083805190602001209050611550818484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506132d292505050565b61159c5760405162461bcd60e51b815260206004820152601460248201527f4c656166206f72207061746820696e76616c69640000000000000000000000006044820152606401610b36565b6115a581613a80565b60006115e88582815181106115bc576115bc61494e565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016613afa565b6115f29082614995565b90508481815181106116065761160661494e565b60209101015160f81c60801661165e5760405162461bcd60e51b815260206004820152601460248201527f556e7369676e6564207472616e73616374696f6e0000000000000000000000006044820152606401610b36565b611669606382614995565b905084818151811061167d5761167d61494e565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016156116b05760026116b3565b60015b6116c09060ff1682614995565b90506116d78582815181106115bc576115bc61494e565b6116e19082614995565b90506116f88582815181106115bc576115bc61494e565b6117029082614995565b905061170f602082614995565b858101517fffff0000000000000000000000000000000000000000000000000000000000008116600090815260076020526040902054919250906117955760405162461bcd60e51b815260206004820152601060248201527f4e6f742061206c6f776572206c656166000000000000000000000000000000006044820152606401610b36565b7fffff00000000000000000000000000000000000000000000000000000000000081166000908152600760205260409020546117d19083614995565b868101805160148201516024830151603890930151939550909290916eff000000ff000000ff000000ff0000600882811c9182166fff000000ff000000ff000000ff0000009390911b92831617601090811c6cff000000ff000000ff000000ff9092166dff000000ff000000ff000000ff009093169290921790911b17602081811c6bffffffff00000000ffffffff166fffffffff00000000ffffffff000000009290911b9190911617604081811c91901b17906001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415611965576000816001600160a01b0316836fffffffffffffffffffffffffffffffff1660405160006040518083038185875af1925050503d8060008114611909576040519150601f19603f3d011682016040523d82523d6000602084013e61190e565b606091505b505090508061195f5760405162461bcd60e51b815260206004820152601360248201527f455448207472616e73666572206661696c6564000000000000000000000000006044820152606401610b36565b50611b61565b60405163555ddc6560e11b81526001600160a01b038416600482018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce2177054602483015290731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa1580156119e6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a0a91906148eb565b6001600160a01b03161415611ab8576040517f9bd9bbc60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301526fffffffffffffffffffffffffffffffff841660248301526060604483015260006064830152841690639bd9bbc690608401600060405180830381600087803b158015611a9b57600080fd5b505af1158015611aaf573d6000803e3d6000fd5b50505050611b61565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301526fffffffffffffffffffffffffffffffff8416602483015284169063a9059cbb906044016020604051808303816000875af1158015611b31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5591906149ad565b611b6157611b616149ca565b6040516fffffffffffffffffffffffffffffffff8316815284906001600160a01b0380841691908616907fea1b69480b8e6df6e2fba9e1fa47698276db9338f7de0d7c3a58cce4a94f450f90602001610e87565b60135460ff16611c075760405162461bcd60e51b815260206004820152601b60248201527f46756e6374696f6e2063757272656e746c792064697361626c656400000000006044820152606401610b36565b8451604014611c585760405162461bcd60e51b815260206004820152601e60248201527f5431207075626c6963206b6579206d75737420626520363420627974657300006044820152606401610b36565b84516020808701919091206001600160a01b038116600090815260038352604080822054808352600190945290205490919060ff1615611cda5760405162461bcd60e51b815260206004820152601f60248201527f56616c696461746f7220697320616c72656164792072656769737465726564006044820152606401610b36565b60008787604051602001611cef929190614a1b565b604051602081830303815290604052805190602001209050611d9c611d60828833600090815260036020908152604080832054835260068252808320548151928301869052908201849052606082015260800160405160208183030381529060405280519060200120905092915050565b86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613b5792505050565b611da586613ea6565b81611e855760008781526004602052604090205415611e065760405162461bcd60e51b815260206004820152601c60248201527f5432207075626c6963206b657920616c726561647920696e20757365000000006044820152606401610b36565b601180546000818152600560209081526040808320805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038a16908117909155835260038252808320849055838352600682528083208c90558b8352600490915281208290558254919450909190611e7b83614a34565b9190505550611ee2565b6000828152600660205260409020548714611ee25760405162461bcd60e51b815260206004820152601b60248201527f43616e6e6f74206368616e6765205432207075626c6963206b657900000000006044820152606401610b36565b600082815260016020818152604092839020805460ff1916909217909155898101518a830151925183815290929189918b9185917fff083a6e395a67771f3c9108922bc274c27b38b48c210b0f6a8c5f4710c0494b9101610e87565b6000546001600160a01b03163314611f855760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6013805460ff191660019081179091556040519081527fddbff3b04f8f09b378dea661b2bee67bbedea1db50196599cd887499d1f445d2906020015b60405180910390a1565b6000546001600160a01b031633146120125760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6013805461ff0019169055604051600081527f1cd6419035c493f53970c075a2a1c916d76018df8e189468f4c21c360e7c8aa990602001611fc1565b60135460ff166120a05760405162461bcd60e51b815260206004820152601b60248201527f46756e6374696f6e2063757272656e746c792064697361626c656400000000006044820152606401610b36565b60008481526004602090815260408083205480845260019092529091205460ff1661210d5760405162461bcd60e51b815260206004820152601b60248201527f56616c696461746f72206973206e6f74207265676973746572656400000000006044820152606401610b36565b60008587604051602001612122929190614a4f565b6040516020818303038152906040528051906020012090506121cf612193828733600090815260036020908152604080832054835260068252808320548151928301869052908201849052606082015260800160405160208183030381529060405280519060200120905092915050565b85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613b5792505050565b6121d885613ea6565b6000828152600160209081526040808320805460ff199081169091556002909252822080549091169055601080549161221083614a69565b9091555050602087015160408089015190518790899084907ff3ead85a271457d1249724c811bec3349855a5f1463cac7de6bb3e7801e6d176906122579086815260200190565b60405180910390a4505050505050505050565b6000546001600160a01b031633146122b15760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6013805462ff0000191662010000179055604051600181527f236540b1dc0f95bdefe04c9e02c5edcc415f7bf4d44dac6ab16528feba25f7ed90602001611fc1565b6000546001600160a01b0316331461233a5760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b813b806123895760405162461bcd60e51b815260206004820152600e60248201527f4f6e6c7920636f6e7472616374730000000000000000000000000000000000006044820152606401610b36565b6001600160a01b03831660009081526008602052604090205460ff16151582151514156123b557505050565b8115612432576001600160a01b0383166000818152600860205260408120805460ff19166001908117909155600d805491820181559091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb501805473ffffffffffffffffffffffffffffffffffffffff1916909117905561256d565b6001600160a01b0383166000908152600860205260408120805460ff19169055600d5461246190600190614937565b905060005b8181101561252a57846001600160a01b0316600d828154811061248b5761248b61494e565b6000918252602090912001546001600160a01b0316141561251857600d82815481106124b9576124b961494e565b600091825260209091200154600d80546001600160a01b0390921691839081106124e5576124e561494e565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555061252a565b8061252281614a34565b915050612466565b50600d80548061253c5761253c614a80565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff19169055019055505b826001600160a01b03167f12bf13eae70e3e6d4796ec20b5aa3623635a95d6f70bb0ac15e3319bb51669a0836040516125aa911515815260200190565b60405180910390a2505050565b601354610100900460ff1661260e5760405162461bcd60e51b815260206004820152601a60248201527f4c696674696e672063757272656e746c792064697361626c65640000000000006044820152606401610b36565b336001600160a01b0385161461276b5761263e8282604051612631929190614a96565b6040518091039020613f20565b60008888888887604051602001612659959493929190614aa6565b6040516020818303038152906040528051906020012090506000612705826040516020016126b391907f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b6040516020818303038152906040528051906020012085858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613f9a92505050565b9050856001600160a01b0316816001600160a01b0316146127685760405162461bcd60e51b815260206004820152601260248201527f4c6966742070726f6f6620696e76616c696400000000000000000000000000006044820152606401610b36565b50505b610e92888589898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92506136f6915050565b600d81815481106127be57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b0316331461281f5760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6013805460ff19169055604051600081527fddbff3b04f8f09b378dea661b2bee67bbedea1db50196599cd887499d1f445d290602001611fc1565b601354610100900460ff166128b15760405162461bcd60e51b815260206004820152601a60248201527f4c696674696e672063757272656e746c792064697361626c65640000000000006044820152606401610b36565b60006128f283838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061369a92505050565b9050600034116129445760405162461bcd60e51b815260206004820152601460248201527f43616e6e6f74206c696674207a65726f204554480000000000000000000000006044820152606401610b36565b6040513481528190339073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee907f8964776336bc2fa8ecaaf70b6f8e8450807efb1ff78f8b87980707aa821f0ec09060200160405180910390a4505050565b3360009081526008602052604090205460ff166129e55760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b6044820152606401610b36565b6114ac8161409e565b6000546001600160a01b03163314612a355760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6013805462ff000019169055604051600081527f236540b1dc0f95bdefe04c9e02c5edcc415f7bf4d44dac6ab16528feba25f7ed90602001611fc1565b6000546001600160a01b03163314612ab95760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152600091908316906370a0823190602401602060405180830381865afa158015612b23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b479190614908565b6040517ff2280dc90000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063f2280dc99060440161141e565b60135460ff16612c0c5760405162461bcd60e51b815260206004820152601b60248201527f46756e6374696f6e2063757272656e746c792064697361626c656400000000006044820152606401610b36565b3360009081526003602090815260408083205483526006825291829020548251808301889052808401879052606080820192909252835180820390920182526080019092528151910120612c969083838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613b5792505050565b612c9f83613ea6565b612ca88461409e565b604051839085907ffe808338418de30500c1a16538c15061c01827981732033cf0d1b9bc0464170390600090a350505050565b6000546001600160a01b03163314612d225760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6013546301000000900460ff1615612d7c5760405162461bcd60e51b815260206004820152601e60248201527f56616c696461746f727320616c7265616479207472616e7366657272656400006044820152606401610b36565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c4c4e4a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dfe9190614908565b6010819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634466ab6b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612e62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e869190614908565b60115560015b601154811015613085576040517f9a4b437d000000000000000000000000000000000000000000000000000000008152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639a4b437d90602401602060405180830381865afa158015612f14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f3891906148eb565b60008281526005602052604090819020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03938416179055517f5aaa4159000000000000000000000000000000000000000000000000000000008152600481018390527f000000000000000000000000000000000000000000000000000000000000000090911690635aaa415990602401602060405180830381865afa158015612fe5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130099190614908565b600082815260066020908152604080832093845560058252808320546001600160a01b031683526003825280832085905592548252600481528282208490558382526001808252838320805460ff199081168317909155600290925292909120805490911690911790558061307d81614a34565b915050612e8c565b50601380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff166301000000179055565b6000546001600160a01b031633146130fd5760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b7fffff0000000000000000000000000000000000000000000000000000000000008216600081815260076020908152604091829020849055815192835282018390527f8a2052ee12aa0ad46deb771b8cc507be8e8e773fd206bf9bd3603c36d59de122910160405180910390a15050565b3360009081526008602052604090205460ff166131bd5760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b6044820152606401610b36565b6040517f9bd9bbc60000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152602482018390526060604483015260006064830152841690639bd9bbc690608401600060405180830381600087803b15801561322e57600080fd5b505af1158015613242573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146132925760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6013805461ff001916610100179055604051600181527f1cd6419035c493f53970c075a2a1c916d76018df8e189468f4c21c360e7c8aa990602001611fc1565b600082815b83518110156133775760008482815181106132f4576132f461494e565b6020026020010151905080831015613337576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250613364565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061336f81614a34565b9150506132d7565b5060009081526009602052604090205460ff1690505b92915050565b3360009081526008602052604090205460ff166133e25760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b6044820152606401610b36565b6114ac81613f20565b6060600d80548060200260200160405190810160405280929190818152602001828054801561344357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613425575b5050505050905090565b3360009081526008602052604090205460ff1661349c5760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b6044820152606401610b36565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146134e9576040519150601f19603f3d011682016040523d82523d6000602084013e6134ee565b606091505b505090508061353f5760405162461bcd60e51b815260206004820152601360248201527f455448207472616e73666572206661696c6564000000000000000000000000006044820152606401610b36565b505050565b3360009081526008602052604090205460ff166135935760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b6044820152606401610b36565b6114ac81613ea6565b600e81600281106135ac57600080fd5b0154905081565b3360009081526008602052604090205460ff166136025760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b6044820152606401610b36565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526024820183905284169063a9059cbb906044016020604051808303816000875af115801561366a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061368e91906149ad565b61353f5761353f6149ca565b600081516020146136ed5760405162461bcd60e51b815260206004820152601160248201527f426164205432207075626c6963206b65790000000000000000000000000000006044820152606401610b36565b61338d82614aee565b60405163555ddc6560e11b81526001600160a01b03851660048201527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce21770546024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015613777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061379b91906148eb565b6001600160a01b0316146137f15760405162461bcd60e51b815260206004820152600f60248201527f4552433230206c696674206f6e6c7900000000000000000000000000000000006044820152606401610b36565b600081116138415760405162461bcd60e51b815260206004820152601d60248201527f43616e6e6f74206c696674207a65726f20455243323020746f6b656e730000006044820152606401610b36565b600061384c8361369a565b6040516370a0823160e01b815230600482015290915085906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015613898573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138bc9190614908565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b03888116600483015230602483015260448201879052919250908316906323b872dd906064016020604051808303816000875af115801561392e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061395291906149ad565b61395e5761395e6149ca565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156139a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139c99190614908565b90506fffffffffffffffffffffffffffffffff811115613a2b5760405162461bcd60e51b815260206004820152601860248201527f45786365656473204552433230206c696674206c696d697400000000000000006044820152606401610b36565b836001600160a01b03808916908a167f8964776336bc2fa8ecaaf70b6f8e8450807efb1ff78f8b87980707aa821f0ec0613a658686614937565b60405190815260200160405180910390a45050505050505050565b6000818152600b602052604090205460ff1615613adf5760405162461bcd60e51b815260206004820152600f60248201527f416c7265616479206c6f776572656400000000000000000000000000000000006044820152606401610b36565b6000908152600b60205260409020805460ff19166001179055565b6000600360f883901c1680613b125760019150613b51565b8060ff1660011415613b275760029150613b51565b8060ff1660021415613b3c5760049150613b51565b613b4b60fa84901c6005614b12565b60ff1691505b50919050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101839052600090605c01604051602081830303815290604052805190602001209050600060418351613bb59190614b37565b600f54600e54601054929350600092613bce9190614b59565b613bd89190614b37565b613be3906001614995565b905060008060008060008060115467ffffffffffffffff811115613c0957613c0961435f565b604051908082528060200260200182016040528015613c32578160200160208202803683370190505b50905060005b88811015613e4957604181028b016020810151604082015160609092015190965090945060001a9250601b831015613c7857613c75601b84614b12565b92505b8260ff16601b14158015613c9057508260ff16601c14155b80613cba57507f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084115b15613cc457613e37565b604080516000808252602082018084528d905260ff86169282019290925260608101879052608081018690526003919060019060a0016020604051602081039080840390855afa158015613d1c573d6000803e3d6000fd5b505060408051601f1901516001600160a01b03168352602083810194909452918201600090812054808252600290945291909120549197505060ff16613dd75760008681526001602052604090205460ff1615613dd2576000868152600260205260408120805460ff191660011790556010805491613d9a83614a34565b91905055508680613daa90614a34565b9750506001828781518110613dc157613dc161494e565b911515602092830291909101909101525b613e2a565b818681518110613de957613de961494e565b6020908102919091010151613e2a5786613e0281614a34565b9750506001828781518110613e1957613e1961494e565b911515602092830291909101909101525b87871415613e3757613e49565b80613e4181614a34565b915050613c38565b50868614613e995760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420636f6e6669726d6174696f6e7300000000000000000000006044820152606401610b36565b5050505050505050505050565b6000818152600a602052604090205460ff1615613f055760405162461bcd60e51b815260206004820152601d60248201527f5432207472616e73616374696f6e206d75737420626520756e697175650000006044820152606401610b36565b6000908152600a60205260409020805460ff19166001179055565b6000818152600c602052604090205460ff1615613f7f5760405162461bcd60e51b815260206004820152601760248201527f4c6966742070726f6f6620616c726561647920757365640000000000000000006044820152606401610b36565b6000908152600c60205260409020805460ff19166001179055565b60008151604114613fad5750600061338d565b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115613ff3576000935050505061338d565b601b8160ff16101561400d5761400a601b82614b12565b90505b8060ff16601b1415801561402557508060ff16601c14155b15614036576000935050505061338d565b60408051600081526020810180835288905260ff831691810191909152606081018490526080810183905260019060a0016020604051602081039080840390855afa158015614089573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b60008181526009602052604090205460ff16156140fd5760405162461bcd60e51b815260206004820152601360248201527f526f6f7420616c726561647920657869737473000000000000000000000000006044820152606401610b36565b6000908152600960205260409020805460ff19166001179055565b8260028101928215614146579160200282015b8281111561414657825182559160200191906001019061412b565b50614152929150614156565b5090565b5b808211156141525760008155600101614157565b6001600160a01b03811681146114ac57600080fd5b60008083601f84011261419257600080fd5b50813567ffffffffffffffff8111156141aa57600080fd5b6020830191508360208285010111156141c257600080fd5b9250929050565b60008060008060008060008060c0898b0312156141e557600080fd5b88356141f08161416b565b975060208901356142008161416b565b965060408901356142108161416b565b955060608901359450608089013567ffffffffffffffff8082111561423457600080fd5b6142408c838d01614180565b909650945060a08b013591508082111561425957600080fd5b506142668b828c01614180565b999c989b5096995094979396929594505050565b60008060006040848603121561428f57600080fd5b833567ffffffffffffffff8111156142a657600080fd5b6142b286828701614180565b909790965060209590950135949350505050565b600080600080606085870312156142dc57600080fd5b84356142e78161416b565b9350602085013567ffffffffffffffff81111561430357600080fd5b61430f87828801614180565b9598909750949560400135949350505050565b60006020828403121561433457600080fd5b813561433f8161416b565b9392505050565b60006020828403121561435857600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561439e5761439e61435f565b604052919050565b6000604082840312156143b857600080fd5b82601f8301126143c757600080fd5b6040516040810181811067ffffffffffffffff821117156143ea576143ea61435f565b806040525080604084018581111561440157600080fd5b845b8181101561441b578035835260209283019201614403565b509195945050505050565b600082601f83011261443757600080fd5b813567ffffffffffffffff8111156144515761445161435f565b6144646020601f19601f84011601614375565b81815284602083860101111561447957600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000604084860312156144ab57600080fd5b833567ffffffffffffffff808211156144c357600080fd5b6144cf87838801614426565b945060208601359150808211156144e557600080fd5b818601915086601f8301126144f957600080fd5b81358181111561450857600080fd5b8760208260051b850101111561451d57600080fd5b6020830194508093505050509250925092565b60008060008060006080868803121561454857600080fd5b853567ffffffffffffffff8082111561456057600080fd5b61456c89838a01614426565b96506020880135955060408801359450606088013591508082111561459057600080fd5b5061459d88828901614180565b969995985093965092949392505050565b80357fffff000000000000000000000000000000000000000000000000000000000000811681146145de57600080fd5b919050565b6000602082840312156145f557600080fd5b61433f826145ae565b80151581146114ac57600080fd5b6000806040838503121561461f57600080fd5b823561462a8161416b565b9150602083013561463a816145fe565b809150509250929050565b60008060008060008060008060c0898b03121561466157600080fd5b883561466c8161416b565b9750602089013567ffffffffffffffff8082111561468957600080fd5b6146958c838d01614180565b909950975060408b0135965060608b013591506146b18261416b565b90945060808a0135935060a08a0135908082111561425957600080fd5b600080602083850312156146e157600080fd5b823567ffffffffffffffff8111156146f857600080fd5b61470485828601614180565b90969095509350505050565b6000806000806060858703121561472657600080fd5b8435935060208501359250604085013567ffffffffffffffff81111561474b57600080fd5b61475787828801614180565b95989497509550505050565b6000806040838503121561477657600080fd5b61477f836145ae565b946020939093013593505050565b6000806000606084860312156147a257600080fd5b83356147ad8161416b565b925060208401356147bd8161416b565b929592945050506040919091013590565b600080604083850312156147e157600080fd5b8235915060208084013567ffffffffffffffff8082111561480157600080fd5b818601915086601f83011261481557600080fd5b8135818111156148275761482761435f565b8060051b9150614838848301614375565b818152918301840191848101908984111561485257600080fd5b938501935b8385101561487057843582529385019390850190614857565b8096505050505050509250929050565b6020808252825182820181905260009190848201906040850190845b818110156148c15783516001600160a01b03168352928401929184019160010161489c565b50909695505050505050565b600080604083850312156148e057600080fd5b823561477f8161416b565b6000602082840312156148fd57600080fd5b815161433f8161416b565b60006020828403121561491a57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008282101561494957614949614921565b500390565b634e487b7160e01b600052603260045260246000fd5b60408101818360005b600281101561498c57815483526020909201916001918201910161496d565b50505092915050565b600082198211156149a8576149a8614921565b500190565b6000602082840312156149bf57600080fd5b815161433f816145fe565b634e487b7160e01b600052600160045260246000fd5b6000815160005b81811015614a0157602081850181015186830152016149e7565b81811115614a10576000828601525b509290920192915050565b6000614a2782856149e0565b9283525050602001919050565b6000600019821415614a4857614a48614921565b5060010190565b8281526000614a6160208301846149e0565b949350505050565b600081614a7857614a78614921565b506000190190565b634e487b7160e01b600052603160045260246000fd5b8183823760009101908152919050565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008660601b168152838560148301376014930192830191909152603482015260540192915050565b80516020808301519190811015613b515760001960209190910360031b1b16919050565b600060ff821660ff84168060ff03821115614b2f57614b2f614921565b019392505050565b600082614b5457634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615614b7357614b73614921565b50029056fea264697066735822122041b6f5835d9e2fd101638711504fabbeff4edc932beac48cda81310c478b925a64736f6c634300080b00330000000000000000000000000d88ed6e74bbfd96b831231638b66c05571e824f00000000000000000000000046ead2891ecf9c7444cb9197d4faacc7f54c593c00000000000000000000000073fe91d082b3604b8261de321086333e78ab1112

Deployed Bytecode

0x60806040526004361061035f5760003560e01c80639d231008116101c6578063dcfe8fb3116100f7578063ec862ef311610095578063f7c091891161006f578063f7c0918914610a6d578063f86e352c14610a83578063f8ce560a14610aa3578063fa6f8ad514610ac357600080fd5b8063ec862ef314610a0a578063ed581fd314610a2c578063ed94a45114610a4c57600080fd5b8063e51d0921116100d1578063e51d09211461096d578063e5342ce61461099d578063e8fed1d6146109bd578063ebb79c4e146109ea57600080fd5b8063dcfe8fb314610918578063e1c067dd14610938578063e2ed13bb1461095857600080fd5b8063c3664d9811610164578063c4c4e4a91161013e578063c4c4e4a9146108ae578063c6e31068146108c4578063c95970e5146108d9578063d3578a94146108f957600080fd5b8063c3664d9814610841578063c4024f0e14610861578063c460eb071461088157600080fd5b8063aee37d39116101a0578063aee37d39146107c9578063b65569be146107dc578063b9b17e7f146107fc578063c0130ef41461082c57600080fd5b80639d231008146107675780639e79fe6b14610787578063ae5bb10d146107b457600080fd5b8063449edc70116102a05780635b2b285b1161023e578063872873ef11610218578063872873ef146106c75780638c3ce008146106e75780638da5cb5b146107175780638f78ea1b1461073757600080fd5b80635b2b285b146106725780635f56a1cb14610692578063740614a0146106a757600080fd5b80634a7d9f691161027a5780634a7d9f69146106015780634aea11911461061b5780634b82344b146106305780634fa182ea1461064557600080fd5b8063449edc701461058157806346971f4f146105b157806349a19ac1146105e157600080fd5b80631a6210521161030d578063289e3dce116102e7578063289e3dce146104bd57806328fa2fc8146104fd5780633083f7081461052d57806335bb5b191461054d57600080fd5b80631a6210521461045d5780631df653881461047d578063271df9501461049d57600080fd5b806313af40351161033e57806313af4035146103c657806314f1ee09146103e657806317a691aa1461040f57600080fd5b806223de29146103645780630204e173146103865780630caa9948146103a6575b600080fd5b34801561037057600080fd5b5061038461037f3660046141c9565b610ae3565b005b34801561039257600080fd5b506103846103a136600461427a565b610e9c565b3480156103b257600080fd5b506103846103c13660046142c6565b610ff1565b3480156103d257600080fd5b506103846103e1366004614322565b611091565b3480156103f257600080fd5b506103fc60125481565b6040519081526020015b60405180910390f35b34801561041b57600080fd5b5061044561042a366004614346565b6005602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610406565b34801561046957600080fd5b506103846104783660046143a6565b611196565b34801561048957600080fd5b50610384610498366004614322565b6112cc565b3480156104a957600080fd5b506103846104b8366004614346565b611454565b3480156104c957600080fd5b506104ed6104d8366004614322565b60086020526000908152604090205460ff1681565b6040519015158152602001610406565b34801561050957600080fd5b506104ed610518366004614346565b60016020526000908152604090205460ff1681565b34801561053957600080fd5b50610384610548366004614496565b6114af565b34801561055957600080fd5b506104457f0000000000000000000000000d88ed6e74bbfd96b831231638b66c05571e824f81565b34801561058d57600080fd5b506104ed61059c366004614346565b600c6020526000908152604090205460ff1681565b3480156105bd57600080fd5b506104ed6105cc366004614346565b60026020526000908152604090205460ff1681565b3480156105ed57600080fd5b506103846105fc366004614530565b611bb5565b34801561060d57600080fd5b506013546104ed9060ff1681565b34801561062757600080fd5b50610384611f3e565b34801561063c57600080fd5b50610384611fcb565b34801561065157600080fd5b506103fc6106603660046145e3565b60076020526000908152604090205481565b34801561067e57600080fd5b5061038461068d366004614530565b61204e565b34801561069e57600080fd5b5061038461226a565b3480156106b357600080fd5b506103846106c236600461460c565b6122f3565b3480156106d357600080fd5b506103846106e2366004614645565b6125b7565b3480156106f357600080fd5b506104ed610702366004614346565b60009081526009602052604090205460ff1690565b34801561072357600080fd5b50600054610445906001600160a01b031681565b34801561074357600080fd5b506104ed610752366004614346565b600a6020526000908152604090205460ff1681565b34801561077357600080fd5b50610445610782366004614346565b6127ae565b34801561079357600080fd5b506103fc6107a2366004614346565b60066020526000908152604090205481565b3480156107c057600080fd5b506103846127d8565b6103846107d73660046146ce565b61285a565b3480156107e857600080fd5b506103846107f7366004614346565b612996565b34801561080857600080fd5b506104ed610817366004614346565b60096020526000908152604090205460ff1681565b34801561083857600080fd5b506103846129ee565b34801561084d57600080fd5b5061038461085c366004614322565b612a72565b34801561086d57600080fd5b5061038461087c366004614710565b612bba565b34801561088d57600080fd5b506103fc61089c366004614346565b60046020526000908152604090205481565b3480156108ba57600080fd5b506103fc60105481565b3480156108d057600080fd5b50610384612cdb565b3480156108e557600080fd5b506013546104ed9062010000900460ff1681565b34801561090557600080fd5b506013546104ed90610100900460ff1681565b34801561092457600080fd5b50610384610933366004614763565b6130b6565b34801561094457600080fd5b5061038461095336600461478d565b61316e565b34801561096457600080fd5b5061038461324b565b34801561097957600080fd5b506104ed610988366004614346565b600b6020526000908152604090205460ff1681565b3480156109a957600080fd5b506104ed6109b83660046147ce565b6132d2565b3480156109c957600080fd5b506103fc6109d8366004614322565b60036020526000908152604090205481565b3480156109f657600080fd5b50610384610a05366004614346565b613393565b348015610a1657600080fd5b50610a1f6133eb565b6040516104069190614880565b348015610a3857600080fd5b50610384610a473660046148cd565b61344d565b348015610a5857600080fd5b506013546104ed906301000000900460ff1681565b348015610a7957600080fd5b506103fc60115481565b348015610a8f57600080fd5b50610384610a9e366004614346565b613544565b348015610aaf57600080fd5b506103fc610abe366004614346565b61359c565b348015610acf57600080fd5b50610384610ade36600461478d565b6135b3565b601354610100900460ff16610b3f5760405162461bcd60e51b815260206004820152601a60248201527f4c696674696e672063757272656e746c792064697361626c656400000000000060448201526064015b60405180910390fd5b7f00000000000000000000000073fe91d082b3604b8261de321086333e78ab11126001600160a01b0316876001600160a01b03161415610b7e57610e92565b6001600160a01b0386163014610bfb5760405162461bcd60e51b8152602060048201526024808201527f546f6b656e73206d7573742062652073656e7420746f207468697320636f6e7460448201527f72616374000000000000000000000000000000000000000000000000000000006064820152608401610b36565b60008511610c4b5760405162461bcd60e51b815260206004820152601e60248201527f43616e6e6f74206c696674207a65726f2045524337373720746f6b656e7300006044820152606401610b36565b6000610c8c85858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061369a92505050565b60405163555ddc6560e11b815233600482018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce21770546024830152919250731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610d06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2a91906148eb565b6001600160a01b031614610d805760405162461bcd60e51b815260206004820152601860248201527f546f6b656e206d757374206265207265676973746572656400000000000000006044820152606401610b36565b6040516370a0823160e01b815230600482015233906fffffffffffffffffffffffffffffffff9082906370a0823190602401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df39190614908565b1115610e415760405162461bcd60e51b815260206004820152601960248201527f4578636565647320455243373737206c696674206c696d6974000000000000006044820152606401610b36565b81896001600160a01b0316336001600160a01b03167f8964776336bc2fa8ecaaf70b6f8e8450807efb1ff78f8b87980707aa821f0ec08a604051610e8791815260200190565b60405180910390a450505b5050505050505050565b6000546001600160a01b03163314610ee35760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b601254811115610f355760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420656e6f756768207374616b652072656d61696e696e670000000000006044820152606401610b36565b6000610f7684848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061369a92505050565b905081601254610f869190614937565b601255604051828152819030906001600160a01b037f0000000000000000000000000d88ed6e74bbfd96b831231638b66c05571e824f16907f8964776336bc2fa8ecaaf70b6f8e8450807efb1ff78f8b87980707aa821f0ec09060200160405180910390a450505050565b601354610100900460ff166110485760405162461bcd60e51b815260206004820152601a60248201527f4c696674696e672063757272656e746c792064697361626c65640000000000006044820152606401610b36565b61108b843385858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508792506136f6915050565b50505050565b6000546001600160a01b031633146110d85760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6001600160a01b03811661112e5760405162461bcd60e51b815260206004820152601c60248201527f4f776e65722063616e6e6f74206265207a65726f2061646472657373000000006044820152606401610b36565b600080546040516001600160a01b03808516939216917fdb6d05f3295cede580affa301a1eb5297528f3b3f6a56b075887ce6f61c45f2191a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b031633146111dd5760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b602081015161122e5760405162461bcd60e51b815260206004820152601460248201527f496e76616c69643a20646976206279207a65726f0000000000000000000000006044820152606401610b36565b6020810151815111156112835760405162461bcd60e51b815260206004820152601360248201527f496e76616c69643a2061626f76652031303025000000000000000000000000006044820152606401610b36565b611290600e826002614118565b507fc7d2ab69ce7a42db5ca306ca58373ae7719b64ba1a5d0a86abdccea27fcfd8f9600e6040516112c19190614964565b60405180910390a150565b6000546001600160a01b031633146113135760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6040516370a0823160e01b81526001600160a01b037f00000000000000000000000073fe91d082b3604b8261de321086333e78ab111281166004830152600091908316906370a0823190602401602060405180830381865afa15801561137d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a19190614908565b6040517f0e3aef000000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526024820183905260606044830152600060648301529192507f00000000000000000000000073fe91d082b3604b8261de321086333e78ab111290911690630e3aef00906084015b600060405180830381600087803b15801561143857600080fd5b505af115801561144c573d6000803e3d6000fd5b505050505050565b3360009081526008602052604090205460ff166114a35760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b6044820152606401610b36565b6114ac81613a80565b50565b60135462010000900460ff166115075760405162461bcd60e51b815260206004820152601b60248201527f4c6f776572696e672063757272656e746c792064697361626c656400000000006044820152606401610b36565b600083805190602001209050611550818484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506132d292505050565b61159c5760405162461bcd60e51b815260206004820152601460248201527f4c656166206f72207061746820696e76616c69640000000000000000000000006044820152606401610b36565b6115a581613a80565b60006115e88582815181106115bc576115bc61494e565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016613afa565b6115f29082614995565b90508481815181106116065761160661494e565b60209101015160f81c60801661165e5760405162461bcd60e51b815260206004820152601460248201527f556e7369676e6564207472616e73616374696f6e0000000000000000000000006044820152606401610b36565b611669606382614995565b905084818151811061167d5761167d61494e565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016156116b05760026116b3565b60015b6116c09060ff1682614995565b90506116d78582815181106115bc576115bc61494e565b6116e19082614995565b90506116f88582815181106115bc576115bc61494e565b6117029082614995565b905061170f602082614995565b858101517fffff0000000000000000000000000000000000000000000000000000000000008116600090815260076020526040902054919250906117955760405162461bcd60e51b815260206004820152601060248201527f4e6f742061206c6f776572206c656166000000000000000000000000000000006044820152606401610b36565b7fffff00000000000000000000000000000000000000000000000000000000000081166000908152600760205260409020546117d19083614995565b868101805160148201516024830151603890930151939550909290916eff000000ff000000ff000000ff0000600882811c9182166fff000000ff000000ff000000ff0000009390911b92831617601090811c6cff000000ff000000ff000000ff9092166dff000000ff000000ff000000ff009093169290921790911b17602081811c6bffffffff00000000ffffffff166fffffffff00000000ffffffff000000009290911b9190911617604081811c91901b17906001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415611965576000816001600160a01b0316836fffffffffffffffffffffffffffffffff1660405160006040518083038185875af1925050503d8060008114611909576040519150601f19603f3d011682016040523d82523d6000602084013e61190e565b606091505b505090508061195f5760405162461bcd60e51b815260206004820152601360248201527f455448207472616e73666572206661696c6564000000000000000000000000006044820152606401610b36565b50611b61565b60405163555ddc6560e11b81526001600160a01b038416600482018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce2177054602483015290731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa1580156119e6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a0a91906148eb565b6001600160a01b03161415611ab8576040517f9bd9bbc60000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301526fffffffffffffffffffffffffffffffff841660248301526060604483015260006064830152841690639bd9bbc690608401600060405180830381600087803b158015611a9b57600080fd5b505af1158015611aaf573d6000803e3d6000fd5b50505050611b61565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301526fffffffffffffffffffffffffffffffff8416602483015284169063a9059cbb906044016020604051808303816000875af1158015611b31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5591906149ad565b611b6157611b616149ca565b6040516fffffffffffffffffffffffffffffffff8316815284906001600160a01b0380841691908616907fea1b69480b8e6df6e2fba9e1fa47698276db9338f7de0d7c3a58cce4a94f450f90602001610e87565b60135460ff16611c075760405162461bcd60e51b815260206004820152601b60248201527f46756e6374696f6e2063757272656e746c792064697361626c656400000000006044820152606401610b36565b8451604014611c585760405162461bcd60e51b815260206004820152601e60248201527f5431207075626c6963206b6579206d75737420626520363420627974657300006044820152606401610b36565b84516020808701919091206001600160a01b038116600090815260038352604080822054808352600190945290205490919060ff1615611cda5760405162461bcd60e51b815260206004820152601f60248201527f56616c696461746f7220697320616c72656164792072656769737465726564006044820152606401610b36565b60008787604051602001611cef929190614a1b565b604051602081830303815290604052805190602001209050611d9c611d60828833600090815260036020908152604080832054835260068252808320548151928301869052908201849052606082015260800160405160208183030381529060405280519060200120905092915050565b86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613b5792505050565b611da586613ea6565b81611e855760008781526004602052604090205415611e065760405162461bcd60e51b815260206004820152601c60248201527f5432207075626c6963206b657920616c726561647920696e20757365000000006044820152606401610b36565b601180546000818152600560209081526040808320805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038a16908117909155835260038252808320849055838352600682528083208c90558b8352600490915281208290558254919450909190611e7b83614a34565b9190505550611ee2565b6000828152600660205260409020548714611ee25760405162461bcd60e51b815260206004820152601b60248201527f43616e6e6f74206368616e6765205432207075626c6963206b657900000000006044820152606401610b36565b600082815260016020818152604092839020805460ff1916909217909155898101518a830151925183815290929189918b9185917fff083a6e395a67771f3c9108922bc274c27b38b48c210b0f6a8c5f4710c0494b9101610e87565b6000546001600160a01b03163314611f855760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6013805460ff191660019081179091556040519081527fddbff3b04f8f09b378dea661b2bee67bbedea1db50196599cd887499d1f445d2906020015b60405180910390a1565b6000546001600160a01b031633146120125760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6013805461ff0019169055604051600081527f1cd6419035c493f53970c075a2a1c916d76018df8e189468f4c21c360e7c8aa990602001611fc1565b60135460ff166120a05760405162461bcd60e51b815260206004820152601b60248201527f46756e6374696f6e2063757272656e746c792064697361626c656400000000006044820152606401610b36565b60008481526004602090815260408083205480845260019092529091205460ff1661210d5760405162461bcd60e51b815260206004820152601b60248201527f56616c696461746f72206973206e6f74207265676973746572656400000000006044820152606401610b36565b60008587604051602001612122929190614a4f565b6040516020818303038152906040528051906020012090506121cf612193828733600090815260036020908152604080832054835260068252808320548151928301869052908201849052606082015260800160405160208183030381529060405280519060200120905092915050565b85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613b5792505050565b6121d885613ea6565b6000828152600160209081526040808320805460ff199081169091556002909252822080549091169055601080549161221083614a69565b9091555050602087015160408089015190518790899084907ff3ead85a271457d1249724c811bec3349855a5f1463cac7de6bb3e7801e6d176906122579086815260200190565b60405180910390a4505050505050505050565b6000546001600160a01b031633146122b15760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6013805462ff0000191662010000179055604051600181527f236540b1dc0f95bdefe04c9e02c5edcc415f7bf4d44dac6ab16528feba25f7ed90602001611fc1565b6000546001600160a01b0316331461233a5760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b813b806123895760405162461bcd60e51b815260206004820152600e60248201527f4f6e6c7920636f6e7472616374730000000000000000000000000000000000006044820152606401610b36565b6001600160a01b03831660009081526008602052604090205460ff16151582151514156123b557505050565b8115612432576001600160a01b0383166000818152600860205260408120805460ff19166001908117909155600d805491820181559091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb501805473ffffffffffffffffffffffffffffffffffffffff1916909117905561256d565b6001600160a01b0383166000908152600860205260408120805460ff19169055600d5461246190600190614937565b905060005b8181101561252a57846001600160a01b0316600d828154811061248b5761248b61494e565b6000918252602090912001546001600160a01b0316141561251857600d82815481106124b9576124b961494e565b600091825260209091200154600d80546001600160a01b0390921691839081106124e5576124e561494e565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555061252a565b8061252281614a34565b915050612466565b50600d80548061253c5761253c614a80565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff19169055019055505b826001600160a01b03167f12bf13eae70e3e6d4796ec20b5aa3623635a95d6f70bb0ac15e3319bb51669a0836040516125aa911515815260200190565b60405180910390a2505050565b601354610100900460ff1661260e5760405162461bcd60e51b815260206004820152601a60248201527f4c696674696e672063757272656e746c792064697361626c65640000000000006044820152606401610b36565b336001600160a01b0385161461276b5761263e8282604051612631929190614a96565b6040518091039020613f20565b60008888888887604051602001612659959493929190614aa6565b6040516020818303038152906040528051906020012090506000612705826040516020016126b391907f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b6040516020818303038152906040528051906020012085858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613f9a92505050565b9050856001600160a01b0316816001600160a01b0316146127685760405162461bcd60e51b815260206004820152601260248201527f4c6966742070726f6f6620696e76616c696400000000000000000000000000006044820152606401610b36565b50505b610e92888589898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92506136f6915050565b600d81815481106127be57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b0316331461281f5760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6013805460ff19169055604051600081527fddbff3b04f8f09b378dea661b2bee67bbedea1db50196599cd887499d1f445d290602001611fc1565b601354610100900460ff166128b15760405162461bcd60e51b815260206004820152601a60248201527f4c696674696e672063757272656e746c792064697361626c65640000000000006044820152606401610b36565b60006128f283838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061369a92505050565b9050600034116129445760405162461bcd60e51b815260206004820152601460248201527f43616e6e6f74206c696674207a65726f204554480000000000000000000000006044820152606401610b36565b6040513481528190339073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee907f8964776336bc2fa8ecaaf70b6f8e8450807efb1ff78f8b87980707aa821f0ec09060200160405180910390a4505050565b3360009081526008602052604090205460ff166129e55760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b6044820152606401610b36565b6114ac8161409e565b6000546001600160a01b03163314612a355760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6013805462ff000019169055604051600081527f236540b1dc0f95bdefe04c9e02c5edcc415f7bf4d44dac6ab16528feba25f7ed90602001611fc1565b6000546001600160a01b03163314612ab95760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6040516370a0823160e01b81526001600160a01b037f00000000000000000000000073fe91d082b3604b8261de321086333e78ab111281166004830152600091908316906370a0823190602401602060405180830381865afa158015612b23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b479190614908565b6040517ff2280dc90000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482018390529192507f00000000000000000000000073fe91d082b3604b8261de321086333e78ab11129091169063f2280dc99060440161141e565b60135460ff16612c0c5760405162461bcd60e51b815260206004820152601b60248201527f46756e6374696f6e2063757272656e746c792064697361626c656400000000006044820152606401610b36565b3360009081526003602090815260408083205483526006825291829020548251808301889052808401879052606080820192909252835180820390920182526080019092528151910120612c969083838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613b5792505050565b612c9f83613ea6565b612ca88461409e565b604051839085907ffe808338418de30500c1a16538c15061c01827981732033cf0d1b9bc0464170390600090a350505050565b6000546001600160a01b03163314612d225760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6013546301000000900460ff1615612d7c5760405162461bcd60e51b815260206004820152601e60248201527f56616c696461746f727320616c7265616479207472616e7366657272656400006044820152606401610b36565b7f00000000000000000000000046ead2891ecf9c7444cb9197d4faacc7f54c593c6001600160a01b031663c4c4e4a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015612dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dfe9190614908565b6010819055507f00000000000000000000000046ead2891ecf9c7444cb9197d4faacc7f54c593c6001600160a01b0316634466ab6b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612e62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e869190614908565b60115560015b601154811015613085576040517f9a4b437d000000000000000000000000000000000000000000000000000000008152600481018290527f00000000000000000000000046ead2891ecf9c7444cb9197d4faacc7f54c593c6001600160a01b031690639a4b437d90602401602060405180830381865afa158015612f14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f3891906148eb565b60008281526005602052604090819020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03938416179055517f5aaa4159000000000000000000000000000000000000000000000000000000008152600481018390527f00000000000000000000000046ead2891ecf9c7444cb9197d4faacc7f54c593c90911690635aaa415990602401602060405180830381865afa158015612fe5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130099190614908565b600082815260066020908152604080832093845560058252808320546001600160a01b031683526003825280832085905592548252600481528282208490558382526001808252838320805460ff199081168317909155600290925292909120805490911690911790558061307d81614a34565b915050612e8c565b50601380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff166301000000179055565b6000546001600160a01b031633146130fd5760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b7fffff0000000000000000000000000000000000000000000000000000000000008216600081815260076020908152604091829020849055815192835282018390527f8a2052ee12aa0ad46deb771b8cc507be8e8e773fd206bf9bd3603c36d59de122910160405180910390a15050565b3360009081526008602052604090205460ff166131bd5760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b6044820152606401610b36565b6040517f9bd9bbc60000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152602482018390526060604483015260006064830152841690639bd9bbc690608401600060405180830381600087803b15801561322e57600080fd5b505af1158015613242573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146132925760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b6044820152606401610b36565b6013805461ff001916610100179055604051600181527f1cd6419035c493f53970c075a2a1c916d76018df8e189468f4c21c360e7c8aa990602001611fc1565b600082815b83518110156133775760008482815181106132f4576132f461494e565b6020026020010151905080831015613337576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250613364565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b508061336f81614a34565b9150506132d7565b5060009081526009602052604090205460ff1690505b92915050565b3360009081526008602052604090205460ff166133e25760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b6044820152606401610b36565b6114ac81613f20565b6060600d80548060200260200160405190810160405280929190818152602001828054801561344357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613425575b5050505050905090565b3360009081526008602052604090205460ff1661349c5760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b6044820152606401610b36565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146134e9576040519150601f19603f3d011682016040523d82523d6000602084013e6134ee565b606091505b505090508061353f5760405162461bcd60e51b815260206004820152601360248201527f455448207472616e73666572206661696c6564000000000000000000000000006044820152606401610b36565b505050565b3360009081526008602052604090205460ff166135935760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b6044820152606401610b36565b6114ac81613ea6565b600e81600281106135ac57600080fd5b0154905081565b3360009081526008602052604090205460ff166136025760405162461bcd60e51b815260206004820152600d60248201526c1058d8d95cdcc819195b9a5959609a1b6044820152606401610b36565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526024820183905284169063a9059cbb906044016020604051808303816000875af115801561366a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061368e91906149ad565b61353f5761353f6149ca565b600081516020146136ed5760405162461bcd60e51b815260206004820152601160248201527f426164205432207075626c6963206b65790000000000000000000000000000006044820152606401610b36565b61338d82614aee565b60405163555ddc6560e11b81526001600160a01b03851660048201527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce21770546024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015613777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061379b91906148eb565b6001600160a01b0316146137f15760405162461bcd60e51b815260206004820152600f60248201527f4552433230206c696674206f6e6c7900000000000000000000000000000000006044820152606401610b36565b600081116138415760405162461bcd60e51b815260206004820152601d60248201527f43616e6e6f74206c696674207a65726f20455243323020746f6b656e730000006044820152606401610b36565b600061384c8361369a565b6040516370a0823160e01b815230600482015290915085906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015613898573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138bc9190614908565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b03888116600483015230602483015260448201879052919250908316906323b872dd906064016020604051808303816000875af115801561392e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061395291906149ad565b61395e5761395e6149ca565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156139a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139c99190614908565b90506fffffffffffffffffffffffffffffffff811115613a2b5760405162461bcd60e51b815260206004820152601860248201527f45786365656473204552433230206c696674206c696d697400000000000000006044820152606401610b36565b836001600160a01b03808916908a167f8964776336bc2fa8ecaaf70b6f8e8450807efb1ff78f8b87980707aa821f0ec0613a658686614937565b60405190815260200160405180910390a45050505050505050565b6000818152600b602052604090205460ff1615613adf5760405162461bcd60e51b815260206004820152600f60248201527f416c7265616479206c6f776572656400000000000000000000000000000000006044820152606401610b36565b6000908152600b60205260409020805460ff19166001179055565b6000600360f883901c1680613b125760019150613b51565b8060ff1660011415613b275760029150613b51565b8060ff1660021415613b3c5760049150613b51565b613b4b60fa84901c6005614b12565b60ff1691505b50919050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101839052600090605c01604051602081830303815290604052805190602001209050600060418351613bb59190614b37565b600f54600e54601054929350600092613bce9190614b59565b613bd89190614b37565b613be3906001614995565b905060008060008060008060115467ffffffffffffffff811115613c0957613c0961435f565b604051908082528060200260200182016040528015613c32578160200160208202803683370190505b50905060005b88811015613e4957604181028b016020810151604082015160609092015190965090945060001a9250601b831015613c7857613c75601b84614b12565b92505b8260ff16601b14158015613c9057508260ff16601c14155b80613cba57507f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084115b15613cc457613e37565b604080516000808252602082018084528d905260ff86169282019290925260608101879052608081018690526003919060019060a0016020604051602081039080840390855afa158015613d1c573d6000803e3d6000fd5b505060408051601f1901516001600160a01b03168352602083810194909452918201600090812054808252600290945291909120549197505060ff16613dd75760008681526001602052604090205460ff1615613dd2576000868152600260205260408120805460ff191660011790556010805491613d9a83614a34565b91905055508680613daa90614a34565b9750506001828781518110613dc157613dc161494e565b911515602092830291909101909101525b613e2a565b818681518110613de957613de961494e565b6020908102919091010151613e2a5786613e0281614a34565b9750506001828781518110613e1957613e1961494e565b911515602092830291909101909101525b87871415613e3757613e49565b80613e4181614a34565b915050613c38565b50868614613e995760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420636f6e6669726d6174696f6e7300000000000000000000006044820152606401610b36565b5050505050505050505050565b6000818152600a602052604090205460ff1615613f055760405162461bcd60e51b815260206004820152601d60248201527f5432207472616e73616374696f6e206d75737420626520756e697175650000006044820152606401610b36565b6000908152600a60205260409020805460ff19166001179055565b6000818152600c602052604090205460ff1615613f7f5760405162461bcd60e51b815260206004820152601760248201527f4c6966742070726f6f6620616c726561647920757365640000000000000000006044820152606401610b36565b6000908152600c60205260409020805460ff19166001179055565b60008151604114613fad5750600061338d565b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115613ff3576000935050505061338d565b601b8160ff16101561400d5761400a601b82614b12565b90505b8060ff16601b1415801561402557508060ff16601c14155b15614036576000935050505061338d565b60408051600081526020810180835288905260ff831691810191909152606081018490526080810183905260019060a0016020604051602081039080840390855afa158015614089573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b60008181526009602052604090205460ff16156140fd5760405162461bcd60e51b815260206004820152601360248201527f526f6f7420616c726561647920657869737473000000000000000000000000006044820152606401610b36565b6000908152600960205260409020805460ff19166001179055565b8260028101928215614146579160200282015b8281111561414657825182559160200191906001019061412b565b50614152929150614156565b5090565b5b808211156141525760008155600101614157565b6001600160a01b03811681146114ac57600080fd5b60008083601f84011261419257600080fd5b50813567ffffffffffffffff8111156141aa57600080fd5b6020830191508360208285010111156141c257600080fd5b9250929050565b60008060008060008060008060c0898b0312156141e557600080fd5b88356141f08161416b565b975060208901356142008161416b565b965060408901356142108161416b565b955060608901359450608089013567ffffffffffffffff8082111561423457600080fd5b6142408c838d01614180565b909650945060a08b013591508082111561425957600080fd5b506142668b828c01614180565b999c989b5096995094979396929594505050565b60008060006040848603121561428f57600080fd5b833567ffffffffffffffff8111156142a657600080fd5b6142b286828701614180565b909790965060209590950135949350505050565b600080600080606085870312156142dc57600080fd5b84356142e78161416b565b9350602085013567ffffffffffffffff81111561430357600080fd5b61430f87828801614180565b9598909750949560400135949350505050565b60006020828403121561433457600080fd5b813561433f8161416b565b9392505050565b60006020828403121561435857600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561439e5761439e61435f565b604052919050565b6000604082840312156143b857600080fd5b82601f8301126143c757600080fd5b6040516040810181811067ffffffffffffffff821117156143ea576143ea61435f565b806040525080604084018581111561440157600080fd5b845b8181101561441b578035835260209283019201614403565b509195945050505050565b600082601f83011261443757600080fd5b813567ffffffffffffffff8111156144515761445161435f565b6144646020601f19601f84011601614375565b81815284602083860101111561447957600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000604084860312156144ab57600080fd5b833567ffffffffffffffff808211156144c357600080fd5b6144cf87838801614426565b945060208601359150808211156144e557600080fd5b818601915086601f8301126144f957600080fd5b81358181111561450857600080fd5b8760208260051b850101111561451d57600080fd5b6020830194508093505050509250925092565b60008060008060006080868803121561454857600080fd5b853567ffffffffffffffff8082111561456057600080fd5b61456c89838a01614426565b96506020880135955060408801359450606088013591508082111561459057600080fd5b5061459d88828901614180565b969995985093965092949392505050565b80357fffff000000000000000000000000000000000000000000000000000000000000811681146145de57600080fd5b919050565b6000602082840312156145f557600080fd5b61433f826145ae565b80151581146114ac57600080fd5b6000806040838503121561461f57600080fd5b823561462a8161416b565b9150602083013561463a816145fe565b809150509250929050565b60008060008060008060008060c0898b03121561466157600080fd5b883561466c8161416b565b9750602089013567ffffffffffffffff8082111561468957600080fd5b6146958c838d01614180565b909950975060408b0135965060608b013591506146b18261416b565b90945060808a0135935060a08a0135908082111561425957600080fd5b600080602083850312156146e157600080fd5b823567ffffffffffffffff8111156146f857600080fd5b61470485828601614180565b90969095509350505050565b6000806000806060858703121561472657600080fd5b8435935060208501359250604085013567ffffffffffffffff81111561474b57600080fd5b61475787828801614180565b95989497509550505050565b6000806040838503121561477657600080fd5b61477f836145ae565b946020939093013593505050565b6000806000606084860312156147a257600080fd5b83356147ad8161416b565b925060208401356147bd8161416b565b929592945050506040919091013590565b600080604083850312156147e157600080fd5b8235915060208084013567ffffffffffffffff8082111561480157600080fd5b818601915086601f83011261481557600080fd5b8135818111156148275761482761435f565b8060051b9150614838848301614375565b818152918301840191848101908984111561485257600080fd5b938501935b8385101561487057843582529385019390850190614857565b8096505050505050509250929050565b6020808252825182820181905260009190848201906040850190845b818110156148c15783516001600160a01b03168352928401929184019160010161489c565b50909695505050505050565b600080604083850312156148e057600080fd5b823561477f8161416b565b6000602082840312156148fd57600080fd5b815161433f8161416b565b60006020828403121561491a57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008282101561494957614949614921565b500390565b634e487b7160e01b600052603260045260246000fd5b60408101818360005b600281101561498c57815483526020909201916001918201910161496d565b50505092915050565b600082198211156149a8576149a8614921565b500190565b6000602082840312156149bf57600080fd5b815161433f816145fe565b634e487b7160e01b600052600160045260246000fd5b6000815160005b81811015614a0157602081850181015186830152016149e7565b81811115614a10576000828601525b509290920192915050565b6000614a2782856149e0565b9283525050602001919050565b6000600019821415614a4857614a48614921565b5060010190565b8281526000614a6160208301846149e0565b949350505050565b600081614a7857614a78614921565b506000190190565b634e487b7160e01b600052603160045260246000fd5b8183823760009101908152919050565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008660601b168152838560148301376014930192830191909152603482015260540192915050565b80516020808301519190811015613b515760001960209190910360031b1b16919050565b600060ff821660ff84168060ff03821115614b2f57614b2f614921565b019392505050565b600082614b5457634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615614b7357614b73614921565b50029056fea264697066735822122041b6f5835d9e2fd101638711504fabbeff4edc932beac48cda81310c478b925a64736f6c634300080b0033

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

0000000000000000000000000d88ed6e74bbfd96b831231638b66c05571e824f00000000000000000000000046ead2891ecf9c7444cb9197d4faacc7f54c593c00000000000000000000000073fe91d082b3604b8261de321086333e78ab1112

-----Decoded View---------------
Arg [0] : avt (address): 0x0d88eD6E74bbFD96B831231638b66C05571e824F
Arg [1] : avnValidatorsManager (address): 0x46eaD2891ecf9c7444cB9197D4FAacC7F54C593C
Arg [2] : avnFTTreasury (address): 0x73fe91d082b3604b8261De321086333E78AB1112

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000000d88ed6e74bbfd96b831231638b66c05571e824f
Arg [1] : 00000000000000000000000046ead2891ecf9c7444cb9197d4faacc7f54c593c
Arg [2] : 00000000000000000000000073fe91d082b3604b8261de321086333e78ab1112


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.