ETH Price: $3,485.93 (+2.10%)
Gas: 2 Gwei

Contract

0x6ADff7bedD9D7BF4794421D078CCED17AA4EC39c
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw Unlock195755382024-04-03 13:27:35107 days ago1712150855IN
0x6ADff7be...7AA4EC39c
0 ETH0.0016958830.45118193
Withdraw Unlock189920622024-01-12 16:39:35189 days ago1705077575IN
0x6ADff7be...7AA4EC39c
0 ETH0.0019013834.14104931
Withdraw Unlock181680702023-09-19 6:07:23304 days ago1695103643IN
0x6ADff7be...7AA4EC39c
0 ETH0.000462468.30395632
Withdraw Unlock166700072023-02-20 13:18:47515 days ago1676899127IN
0x6ADff7be...7AA4EC39c
0 ETH0.0020774437.30234677
Withdraw Unlock154625562022-09-03 1:36:05686 days ago1662168965IN
0x6ADff7be...7AA4EC39c
0 ETH0.000476888.56289577
Withdraw Unlock154606442022-09-02 18:10:09686 days ago1662142209IN
0x6ADff7be...7AA4EC39c
0 ETH0.0007493213.45473036
Withdraw Unlock152909202022-08-06 20:36:08713 days ago1659818168IN
0x6ADff7be...7AA4EC39c
0 ETH0.00024564.41014407
Withdraw Unlock150701192022-07-03 14:24:51747 days ago1656858291IN
0x6ADff7be...7AA4EC39c
0 ETH0.0011565520.76692309
Withdraw Unlock150150752022-06-23 22:05:29757 days ago1656021929IN
0x6ADff7be...7AA4EC39c
0 ETH0.0022919341.15374643
Withdraw Unlock149500542022-06-12 12:13:44768 days ago1655036024IN
0x6ADff7be...7AA4EC39c
0 ETH0.0011343520.36838687
Withdraw Unlock144800482022-03-29 8:25:45843 days ago1648542345IN
0x6ADff7be...7AA4EC39c
0 ETH0.0011286120.26529752
Withdraw Unlock144568512022-03-25 17:45:44847 days ago1648230344IN
0x6ADff7be...7AA4EC39c
0 ETH0.0026256747.14634247
Withdraw Unlock144217992022-03-20 7:10:35852 days ago1647760235IN
0x6ADff7be...7AA4EC39c
0 ETH0.0006961512.5
Withdraw Unlock142179382022-02-16 15:27:23884 days ago1645025243IN
0x6ADff7be...7AA4EC39c
0 ETH0.0043073777.34274109
Withdraw Unlock141631612022-02-08 4:02:56892 days ago1644292976IN
0x6ADff7be...7AA4EC39c
0 ETH0.0036983266.40678218
Withdraw Unlock141159722022-01-31 21:02:48900 days ago1643662968IN
0x6ADff7be...7AA4EC39c
0 ETH0.00779688140
Withdraw Unlock140800932022-01-26 8:10:29905 days ago1643184629IN
0x6ADff7be...7AA4EC39c
0 ETH0.0053947496.86754818
Withdraw Unlock138732742021-12-25 8:38:55937 days ago1640421535IN
0x6ADff7be...7AA4EC39c
0 ETH0.0034819362.52126446
Withdraw Unlock138599952021-12-23 7:10:14939 days ago1640243414IN
0x6ADff7be...7AA4EC39c
0 ETH0.0027863750.03195745
Withdraw Unlock137433922021-12-05 2:22:53957 days ago1638670973IN
0x6ADff7be...7AA4EC39c
0 ETH0.0040156772.10513346
Withdraw Unlock137254282021-12-02 5:05:12960 days ago1638421512IN
0x6ADff7be...7AA4EC39c
0 ETH0.0048288286.70595909
Withdraw Unlock136892992021-11-26 10:53:25966 days ago1637924005IN
0x6ADff7be...7AA4EC39c
0 ETH0.00590455106.02166586
Withdraw Unlock136705222021-11-23 11:15:06969 days ago1637666106IN
0x6ADff7be...7AA4EC39c
0 ETH0.0048694187.43479628
Withdraw Unlock136704622021-11-23 11:02:31969 days ago1637665351IN
0x6ADff7be...7AA4EC39c
0 ETH0.0045858182.34248892
Withdraw Unlock136701112021-11-23 9:38:06969 days ago1637660286IN
0x6ADff7be...7AA4EC39c
0 ETH0.0046781284
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TunnelV2

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 17 : TunnelV2.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import "./interface/IAddressResolver.sol";
import "./interface/ITunnel.sol";
import "./ParamBook.sol";
import "./lib/SafeDecimalMath.sol";
import "./interface/IBoringDAO.sol";
import "./interface/IOracle.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./interface/IFeePool.sol";
import "./interface/IStakingRewardsFactory.sol";
import "./interface/IMintBurn.sol";
import "./interface/ITrusteeFeePool.sol";
import "./interface/ILiquidate.sol";

contract TunnelV2 is Ownable, Pausable, ITunnelV2, ILiquidate {
    using SafeMath for uint256;
    using SafeDecimalMath for uint256;

    IAddressResolver addrResolver;
    bytes32 public constant BORINGDAO = "BoringDAO";
    // BTOKEN_BTC
    bytes32 public tunnelKey;
    bytes32 public constant MINT_FEE = "mint_fee";
    bytes32 public constant BURN_FEE = "burn_fee";
    bytes32 public constant MINT_FEE_TRUSTEE = "mint_fee_trustee";
    bytes32 public constant MINT_FEE_PLEDGER = "mint_fee_pledger";
    bytes32 public constant MINT_FEE_DEV = "mint_fee_dev";
    bytes32 public constant BURN_FEE_INSURANCE = "burn_fee_insurance";
    bytes32 public constant BURN_FEE_PLEDGER = "burn_fee_pledger";
    bytes32 public constant FEE_POOL = "FeePool";
    bytes32 public constant INSURANCE_POOL = "InsurancePool";
    bytes32 public constant DEV_ADDRESS = "DevUser";
    bytes32 public constant ADDRESS_BOOK = "AddressBook";
    bytes32 public constant ORACLE = "Oracle";
    bytes32 public constant BOR = "BORING";
    bytes32 public constant PLEDGE_RATE = "pledge_rate";
    bytes32 public constant NETWORK_FEE = "network_fee";
    bytes32 public constant PLEDGE_TOKEN = "ppToken";
    bytes32 public constant OTOKEN = "oToken";
    bytes32 public constant PARAM_BOOK = "ParamBook";
    bytes32 public constant TRUSTEE_FEE_POOL = "TrusteeFeePool";
    bytes32 public constant SATELLITE_POOL_FACTORY = "SatellitePoolFactory";
    bytes32 public constant LIQUIDATION = "Liquidation";

    mapping(address => uint) public borPledgeInfo;
    // total pledge value in one token
    uint256 public totalPledgeBOR;

    // burn mini limit
    uint256 public burnMiniLimit=1e15;
    uint256 public redeemLockTxLimit=5;

    struct PledgerInfo {
        uint256 amount;
        uint256 feeDebt;
    }

    struct LockAmount{
        uint unlockTime;
        uint amount;
    }
    mapping(address=>LockAmount[]) public lockInfo;

    uint256 public lockDuration = 86400;

    ITunnelTVL public oldTunnel;

    constructor(
        IAddressResolver _addrResolver,
        bytes32 _tunnelKey,
        ITunnelTVL _oldTunnel 
    ) public {
        addrResolver = _addrResolver;
        tunnelKey = _tunnelKey;
        oldTunnel = _oldTunnel;
        // _pause();
    }

    // view
    function otokenMintBurn() internal view returns (IMintBurn) {
        return IMintBurn(addrResolver.requireKKAddrs(tunnelKey, OTOKEN, "Tunnel::otokenMintBurn: oToken contract not exist in Tunnel"));
    }

    function otokenERC20() internal view returns (IERC20) {
        return IERC20(addrResolver.requireKKAddrs(tunnelKey, OTOKEN, "Tunnel::otokenERC20: oToken contract not exist in Tunnel"));
    }

    function borERC20() internal view returns (IERC20) {
        return IERC20(addrResolver.requireAndKey2Address(BOR, "borERC20::borERC20: BOR contract not exist in Tunnel"));
    }

    function boringDAO() internal view returns (IBoringDAO) {
        return IBoringDAO(addrResolver.key2address(BORINGDAO));
    }

    function oracle() internal view returns (IOracle) {
        return IOracle(addrResolver.key2address(ORACLE));
    }

    function ppTokenMintBurn() internal view returns (IMintBurn) {
        return IMintBurn(addrResolver.requireKKAddrs(tunnelKey, PLEDGE_TOKEN, "Tunnel::ppTokenMintBurn::pptoken not exist"));
    }

    function ppTokenERC20() internal view returns (IERC20) {
        return IERC20(addrResolver.requireKKAddrs(tunnelKey, PLEDGE_TOKEN, "Tunnel::ppTokenMintBurn::pptoken not exist"));
    }

    function feePool() internal view returns (IFeePool) {
        return IFeePool(addrResolver.requireKKAddrs(tunnelKey, FEE_POOL, "Tunnel::feePool::feePool is not exist"));
    }

    function trusteeFeePool() internal view returns (ITrusteeFeePool) {
        return ITrusteeFeePool(addrResolver.requireKKAddrs(tunnelKey, TRUSTEE_FEE_POOL, "Tunnel::trusteeFeePool is address(0)"));
    }

    function paramBook() internal view returns (ParamBook) {
        return ParamBook(addrResolver.key2address(PARAM_BOOK));
    }

    function getRate(bytes32 name) internal view returns (uint256) {
        return paramBook().params2(tunnelKey, name);
    }

    function satellitePoolFactory() internal view returns(IStakingRewardsFactory) {
        return IStakingRewardsFactory(addrResolver.requireKKAddrs(tunnelKey, SATELLITE_POOL_FACTORY, "Tunnel::spf::spf is not exist"));
    }

    function totalValuePledge() public override view returns (uint256) {
        uint256 borPrice = oracle().getPrice(BOR);
        return totalPledgeBOR.multiplyDecimal(borPrice);
    }

    function userLockLength(address account) public view returns (uint) {
        return lockInfo[account].length;
    }

    function userLockAmount() public view returns(uint256, uint256) {
        uint lock;
        uint unlock;
        for (uint i=0; i<lockInfo[msg.sender].length; i++) {
            if(block.timestamp >= lockInfo[msg.sender][i].unlockTime) {
                unlock = unlock.add(lockInfo[msg.sender][i].amount);
            } else {
                lock = lock.add(lockInfo[msg.sender][i].amount);
            }
        }
        return (lock, unlock);
    }

    // todo

    // duration should bigger than lockDuration
    function setLockDuration(uint duration) public onlyOwner {
        lockDuration = duration;
    }

    function setRedeemLockTxLimit(uint limit) public onlyOwner {
            redeemLockTxLimit = limit;
    }

    function setBurnMiniLimit(uint amount) public onlyOwner {
        burnMiniLimit = amount;
    }

    function pledge(address account, uint256 amount)
        external
        override
        onlyBoringDAO
    {
        borPledgeInfo[account] = borPledgeInfo[account].add(amount);
        totalPledgeBOR = totalPledgeBOR.add(amount);
        // mint pledge token
        ppTokenMintBurn().mint(account, amount);
        feePool().notifyPTokenAmount(account, amount);
        emit PledgeSuccess(account, amount);
    }

    function redeem(address account, uint256 amount)
        external
        override
        onlyBoringDAO
    {
        require(
            ppTokenERC20().balanceOf(account) >= amount,
            "Tunnel::redeem: not enough pledge provider token"
        );
        require(borPledgeInfo[account] >= amount, "Tunnel:redeem: Not enough bor amount");
        require(lockInfo[account].length < redeemLockTxLimit, "Tunnel::redeem: A user can only redeem at most five redeem, try again after extraction");
        borPledgeInfo[account] = borPledgeInfo[account].sub(amount);
        // send fee and burn ptoken
        // pledge token and fee
        // burn ptoken and tansfer back BOR
        lock(account, amount, block.timestamp.add(lockDuration));
        ppTokenMintBurn().burn(account, amount);
        feePool().withdraw(account, amount);
        emit RedeemSuccess(account, amount);
    }

    function lock(address account, uint amount, uint unlockTime) internal {
        lockInfo[account].push(LockAmount(unlockTime, amount));
    }

    function withdrawUnlock() public {
        uint unlock;
        uint  i = 0;
        while (i!=lockInfo[msg.sender].length) {
            if (block.timestamp >= lockInfo[msg.sender][i].unlockTime) {
                unlock = unlock.add(lockInfo[msg.sender][i].amount);
                lockInfo[msg.sender][i] = lockInfo[msg.sender][lockInfo[msg.sender].length.sub(1)];
                lockInfo[msg.sender].pop();
            } else {
                i++;
            }
        }
        if (unlock > 0 ) {
            totalPledgeBOR = totalPledgeBOR.sub(unlock);
            borERC20().transfer(msg.sender, unlock);
            emit WithdrawUnlockSuccess(
                msg.sender,
                unlock
            );
        }
    }


    // when approved then issue
    function issue(address account, uint256 amount)
        external
        override
        onlyBoringDAO
    {
        //network fee
        uint networkFee = paramBook().params2(tunnelKey, NETWORK_FEE);
        // calculate fee
        uint256 mintFeeRation = getRate(MINT_FEE);
        uint256 mintFeeAmount = amount.multiplyDecimal(mintFeeRation);
        uint256 mintAmount = amount.sub(mintFeeAmount).sub(networkFee);
        otokenMintBurn().mint(account, mintAmount);
        // handle fee
        // trustee fee
        uint256 mintFeeTrusteeRatio = getRate(MINT_FEE_TRUSTEE);
        uint256 mintFeeTrusteeAmount = mintFeeAmount.multiplyDecimal(mintFeeTrusteeRatio).add(networkFee);
        otokenMintBurn().mint(address(trusteeFeePool()), mintFeeTrusteeAmount);
        trusteeFeePool().notifyReward(mintFeeTrusteeAmount);

        // fee to pledger
        uint256 mintFeePledgerRation = getRate(MINT_FEE_PLEDGER);
        uint256 mintFeePledgerAmount = mintFeeAmount.multiplyDecimal(
            mintFeePledgerRation
        );
        address feePoolAddress = address(feePool());
        otokenMintBurn().mint(feePoolAddress, mintFeePledgerAmount);
        feePool().notifyBTokenFeeAmount(mintFeePledgerAmount);


        // to developer team
        uint256 mintFeeDevRation = getRate(MINT_FEE_DEV);
        uint256 mintFeeDevAmount = mintFeeAmount.multiplyDecimal(
            mintFeeDevRation
        );
        address devAddress = addrResolver.key2address(DEV_ADDRESS);

        otokenMintBurn().mint(devAddress, mintFeeDevAmount);
    }


    function burn(address account, uint256 amount, string memory assetAddress) external override onlyBoringDAO{
        require(amount>=burnMiniLimit, "Tunnel::burn: the amount too small");
        uint256 burnFeeAmountBToken = amount.multiplyDecimal(getRate(BURN_FEE));
        // convert to bor amount
        uint burnFeeAmount = oracle().getPrice(tunnelKey).multiplyDecimal(burnFeeAmountBToken).divideDecimal(oracle().getPrice(BOR));

        // insurance apart
        address insurancePoolAddress = addrResolver.requireKKAddrs(tunnelKey, INSURANCE_POOL, "insurancePool not exist");
        uint256 burnFeeAmountInsurance = burnFeeAmount.multiplyDecimal(
            getRate(BURN_FEE_INSURANCE)
        );


        // pledger apart
        uint256 burnFeeAmountPledger = burnFeeAmount.multiplyDecimal(
            getRate(BURN_FEE_PLEDGER)
        );
        borERC20().transferFrom(
            account,
            insurancePoolAddress,
            burnFeeAmountInsurance
        );
        //fee to feepool
        borERC20().transferFrom(
            account,
            address(feePool()),
            burnFeeAmountPledger
        );
        feePool().notifyBORFeeAmount(burnFeeAmountPledger);
        // otoken burn
        otokenMintBurn().burn(account, amount);
        emit BurnOToken(
            account,
            amount,
            assetAddress
        );
    }

    function oldTunnelTVL() public view returns(uint) {
        return oldTunnel.totalTVL();
    }

    function totalTVL() public view returns(uint) {
        uint256 borTVL = totalValuePledge();
        uint satelliteTVL = satellitePoolFactory().satelliteTVL();
        return borTVL.add(satelliteTVL).add(oldTunnelTVL());
    }
    
    function pledgeRatio() public view returns(uint) {
        uint tvl = totalTVL();
        uint btokenValue = otokenERC20().totalSupply().multiplyDecimal(oracle().getPrice(tunnelKey));
        if (btokenValue == 0) {
            return 0;
        }
        return tvl.divideDecimal(btokenValue);
    }

    function canIssueAmount() external override view returns (uint256) {
        // satellite pool tvl
        uint total = totalTVL();
        uint256 pledgeRate = paramBook().params2(tunnelKey, PLEDGE_RATE);
        uint256 canIssueValue = total.divideDecimal(pledgeRate);
        uint256 tunnelKeyPrice = oracle().getPrice(tunnelKey);
        return canIssueValue.divideDecimal(tunnelKeyPrice);
    }

    function liquidate(address account) public override onlyLiquidation {
        borERC20().transfer(account, totalPledgeBOR);
    }

    function unpause() public returns (bool) {
        if (totalPledgeBOR >= 0e18) {
            _unpause();
        } 
        return paused();
    }

    modifier onlyBoringDAO {
        require(msg.sender == addrResolver.key2address(BORINGDAO));
        _;
    }

    modifier onlyLiquidation {
        require(msg.sender == addrResolver.requireKKAddrs(tunnelKey, LIQUIDATION, "Tunnel::liquidation contract no exist"));
        _;
    }

    event BurnOToken(
        address indexed account,
        uint256 amount,
        string assetAddress
    );

    event WithdrawUnlockSuccess(
        address account,
        uint    amount
    );

     event PledgeSuccess(
         address account,
         uint   amount
     );

    event RedeemSuccess(
        address account,
        uint amount
    );
}

File 2 of 17 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

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

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

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

pragma solidity ^0.6.0;

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

File 4 of 17 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

File 5 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

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

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

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

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

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

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

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

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

File 6 of 17 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import "../GSN/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor () internal {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!_paused, "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(_paused, "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 7 of 17 : ParamBook.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.12;

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

contract ParamBook is Ownable {
    mapping(bytes32 => uint256) public params;
    mapping(bytes32 => mapping(bytes32 => uint256)) public params2;

    function setParams(bytes32 name, uint256 value) public onlyOwner {
        params[name] = value;
    }

    function setMultiParams(bytes32[] memory names, uint[] memory values) public onlyOwner {
        require(names.length == values.length, "ParamBook::setMultiParams:param length not match");
        for (uint i=0; i < names.length; i++ ) {
            params[names[i]] = values[i];
        }
    }

    function setParams2(
        bytes32 name1,
        bytes32 name2,
        uint256 value
    ) public onlyOwner {
        params2[name1][name2] = value;
    }

    function setMultiParams2(bytes32[] memory names1, bytes32[] memory names2, uint[] memory values) public onlyOwner {
        require(names1.length == names2.length, "ParamBook::setMultiParams2:param length not match");
        require(names1.length == values.length, "ParamBook::setMultiParams2:param length not match");
        for(uint i=0; i < names1.length; i++) {
            params2[names1[i]][names2[i]] = values[i];
        }
    }
}

File 8 of 17 : IAddressResolver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.12;

interface IAddressResolver {
    
    function key2address(bytes32 key) external view returns(address);
    function address2key(address addr) external view returns(bytes32);
    function requireAndKey2Address(bytes32 name, string calldata reason) external view returns(address);

    function setAddress(bytes32 key, address addr) external;
    function setMultiAddress(bytes32[] memory keys, address[] memory addrs) external;
    
    function setKkAddr(bytes32 k1, bytes32 k2, address addr) external;
    function setMultiKKAddr(bytes32[] memory k1s, bytes32[] memory k2s, address[] memory addrs) external;

    function kk2addr(bytes32 k1, bytes32 k2) external view returns(address);
    function requireKKAddrs(bytes32 k1, bytes32 k2, string calldata reason) external view returns(address);
}

File 9 of 17 : IBoringDAO.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.12;

interface IBoringDAO {
    // function openTunnel(bytes32 tunnelKey) external;

    function pledge(bytes32 tunnelKey, uint _amount) external;
    function redeem(bytes32 tunnelKey, uint _amount) external;

    function approveMint(bytes32 tunnelKey, string memory _txid, uint _amount, address account, string memory assetAddress) external;
    function burnBToken(bytes32 _tunnelKey, uint _amount, string memory assetAddress) external;

    // function getTrustee(uint index) external view returns(address);
    // function getTrusteeCount() external view returns(uint);

}

File 10 of 17 : IFeePool.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.12;

interface IFeePool {

    function earned(address account) external view returns(uint, uint);

    function notifyBORFeeAmount(uint amount) external;
    function notifyBTokenFeeAmount(uint amount) external;
    function notifyPTokenAmount(address account, uint amount) external;
    
    function withdraw(address account, uint amount) external;

}

File 11 of 17 : ILiquidate.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.12;

interface ILiquidate {
    function liquidate(address account) external;
}

interface ILiquidateArray {
    function liquidateArray(address account, uint256[] memory pids) external;
}

File 12 of 17 : IMintBurn.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.12;

interface IMintBurn {

    function burn(address account, uint amount) external;
    function mint(address account, uint amount) external;
}

File 13 of 17 : IOracle.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;

interface IOracle {
    
    function setPrice(bytes32 _symbol, uint _price) external;
    function getPrice(bytes32 _symbol) external view returns (uint);
}

File 14 of 17 : IStakingRewardsFactory.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.12;

interface IStakingRewardsFactory {
    function satelliteTVL() external view returns(uint);
}

File 15 of 17 : ITrusteeFeePool.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.12;

interface ITrusteeFeePool {
    function exit(address account) external;
    function enter(address account) external;
    function notifyReward(uint reward) external;
}

File 16 of 17 : ITunnel.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.12;

interface ITunnel {
    function pledge(address account, uint amount) external;
    function redeem(address account, uint amount) external;
    function issue(address account, uint amount) external;
    function burn(address account, uint amount, string memory assetAddress) external;
    function totalValuePledge() external view  returns(uint);
    function canIssueAmount() external view returns(uint);
    function oTokenKey() external view returns(bytes32);
}

interface ITunnelV2 {
    function pledge(address account, uint amount) external;
    function redeem(address account, uint amount) external;
    function issue(address account, uint amount) external;
    function burn(address account, uint amount, string memory assetAddress) external;
    function totalValuePledge() external view  returns(uint);
    function canIssueAmount() external view returns(uint);
}

interface ITunnelTVL {
    function totalTVL() external view returns(uint);
}

File 17 of 17 : SafeDecimalMath.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.8;

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

// https://docs.synthetix.io/contracts/SafeDecimalMath
library SafeDecimalMath {
    using SafeMath for uint;

    /* Number of decimal places in the representations. */
    uint8 public constant decimals = 18;
    uint8 public constant highPrecisionDecimals = 27;

    /* The number representing 1.0. */
    uint public constant UNIT = 10**uint(decimals);

    /* The number representing 1.0 for higher fidelity numbers. */
    uint public constant PRECISE_UNIT = 10**uint(highPrecisionDecimals);
    uint private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint(highPrecisionDecimals - decimals);

    /**
     * @return Provides an interface to UNIT.
     */
    function unit() external pure returns (uint) {
        return UNIT;
    }

    /**
     * @return Provides an interface to PRECISE_UNIT.
     */
    function preciseUnit() external pure returns (uint) {
        return PRECISE_UNIT;
    }

    /**
     * @return The result of multiplying x and y, interpreting the operands as fixed-point
     * decimals.
     *
     * @dev A unit factor is divided out after the product of x and y is evaluated,
     * so that product must be less than 2**256. As this is an integer division,
     * the internal division always rounds down. This helps save on gas. Rounding
     * is more expensive on gas.
     */
    function multiplyDecimal(uint x, uint y) internal pure returns (uint) {
        /* Divide by UNIT to remove the extra factor introduced by the product. */
        return x.mul(y) / UNIT;
    }

    /**
     * @return The result of safely multiplying x and y, interpreting the operands
     * as fixed-point decimals of the specified precision unit.
     *
     * @dev The operands should be in the form of a the specified unit factor which will be
     * divided out after the product of x and y is evaluated, so that product must be
     * less than 2**256.
     *
     * Unlike multiplyDecimal, this function rounds the result to the nearest increment.
     * Rounding is useful when you need to retain fidelity for small decimal numbers
     * (eg. small fractions or percentages).
     */
    function _multiplyDecimalRound(
        uint x,
        uint y,
        uint precisionUnit
    ) private pure returns (uint) {
        /* Divide by UNIT to remove the extra factor introduced by the product. */
        uint quotientTimesTen = x.mul(y) / (precisionUnit / 10);

        if (quotientTimesTen % 10 >= 5) {
            quotientTimesTen += 10;
        }

        return quotientTimesTen / 10;
    }

    /**
     * @return The result of safely multiplying x and y, interpreting the operands
     * as fixed-point decimals of a precise unit.
     *
     * @dev The operands should be in the precise unit factor which will be
     * divided out after the product of x and y is evaluated, so that product must be
     * less than 2**256.
     *
     * Unlike multiplyDecimal, this function rounds the result to the nearest increment.
     * Rounding is useful when you need to retain fidelity for small decimal numbers
     * (eg. small fractions or percentages).
     */
    function multiplyDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) {
        return _multiplyDecimalRound(x, y, PRECISE_UNIT);
    }

    /**
     * @return The result of safely multiplying x and y, interpreting the operands
     * as fixed-point decimals of a standard unit.
     *
     * @dev The operands should be in the standard unit factor which will be
     * divided out after the product of x and y is evaluated, so that product must be
     * less than 2**256.
     *
     * Unlike multiplyDecimal, this function rounds the result to the nearest increment.
     * Rounding is useful when you need to retain fidelity for small decimal numbers
     * (eg. small fractions or percentages).
     */
    function multiplyDecimalRound(uint x, uint y) internal pure returns (uint) {
        return _multiplyDecimalRound(x, y, UNIT);
    }

    /**
     * @return The result of safely dividing x and y. The return value is a high
     * precision decimal.
     *
     * @dev y is divided after the product of x and the standard precision unit
     * is evaluated, so the product of x and UNIT must be less than 2**256. As
     * this is an integer division, the result is always rounded down.
     * This helps save on gas. Rounding is more expensive on gas.
     */
    function divideDecimal(uint x, uint y) internal pure returns (uint) {
        /* Reintroduce the UNIT factor that will be divided out by y. */
        return x.mul(UNIT).div(y);
    }

    /**
     * @return The result of safely dividing x and y. The return value is as a rounded
     * decimal in the precision unit specified in the parameter.
     *
     * @dev y is divided after the product of x and the specified precision unit
     * is evaluated, so the product of x and the specified precision unit must
     * be less than 2**256. The result is rounded to the nearest increment.
     */
    function _divideDecimalRound(
        uint x,
        uint y,
        uint precisionUnit
    ) private pure returns (uint) {
        uint resultTimesTen = x.mul(precisionUnit * 10).div(y);

        if (resultTimesTen % 10 >= 5) {
            resultTimesTen += 10;
        }

        return resultTimesTen / 10;
    }

    /**
     * @return The result of safely dividing x and y. The return value is as a rounded
     * standard precision decimal.
     *
     * @dev y is divided after the product of x and the standard precision unit
     * is evaluated, so the product of x and the standard precision unit must
     * be less than 2**256. The result is rounded to the nearest increment.
     */
    function divideDecimalRound(uint x, uint y) internal pure returns (uint) {
        return _divideDecimalRound(x, y, UNIT);
    }

    /**
     * @return The result of safely dividing x and y. The return value is as a rounded
     * high precision decimal.
     *
     * @dev y is divided after the product of x and the high precision unit
     * is evaluated, so the product of x and the high precision unit must
     * be less than 2**256. The result is rounded to the nearest increment.
     */
    function divideDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) {
        return _divideDecimalRound(x, y, PRECISE_UNIT);
    }

    /**
     * @dev Convert a standard decimal representation to a high precision one.
     */
    function decimalToPreciseDecimal(uint i) internal pure returns (uint) {
        return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);
    }

    /**
     * @dev Convert a high precision decimal to a standard decimal representation.
     */
    function preciseDecimalToDecimal(uint i) internal pure returns (uint) {
        uint quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);

        if (quotientTimesTen % 10 >= 5) {
            quotientTimesTen += 10;
        }

        return quotientTimesTen / 10;
    }
}

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IAddressResolver","name":"_addrResolver","type":"address"},{"internalType":"bytes32","name":"_tunnelKey","type":"bytes32"},{"internalType":"contract ITunnelTVL","name":"_oldTunnel","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"string","name":"assetAddress","type":"string"}],"name":"BurnOToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PledgeSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RedeemSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawUnlockSuccess","type":"event"},{"inputs":[],"name":"ADDRESS_BOOK","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BORINGDAO","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BURN_FEE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BURN_FEE_INSURANCE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BURN_FEE_PLEDGER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEV_ADDRESS","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_POOL","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INSURANCE_POOL","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LIQUIDATION","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_FEE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_FEE_DEV","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_FEE_PLEDGER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_FEE_TRUSTEE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NETWORK_FEE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ORACLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OTOKEN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PARAM_BOOK","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PLEDGE_RATE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PLEDGE_TOKEN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SATELLITE_POOL_FACTORY","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRUSTEE_FEE_POOL","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"borPledgeInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"string","name":"assetAddress","type":"string"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burnMiniLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canIssueAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"issue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"liquidate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"lockInfo","outputs":[{"internalType":"uint256","name":"unlockTime","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oldTunnel","outputs":[{"internalType":"contract ITunnelTVL","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oldTunnelTVL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"pledge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pledgeRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemLockTxLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setBurnMiniLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"setLockDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"setRedeemLockTxLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalPledgeBOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTVL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalValuePledge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tunnelKey","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"userLockAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"userLockLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawUnlock","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405266038d7ea4c680006005556005600655620151806008553480156200002857600080fd5b5060405162003026380380620030268339810160408190526200004b91620000ea565b600062000057620000e6565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055600180546001600160a01b039485166001600160a01b031991821617909155600292909255600980549190931691161790556200014a565b3390565b600080600060608486031215620000ff578283fd5b83516200010c8162000131565b602085015160408601519194509250620001268162000131565b809150509250925092565b6001600160a01b03811681146200014757600080fd5b50565b612ecc806200015a6000396000f3fe608060405234801561001057600080fd5b50600436106102f15760003560e01c8063743b34521161019d578063b78c0ffb116100e9578063dcc4f684116100a2578063e4886e051161007c578063e4886e051461051c578063eb24e47214610524578063f2fde38b1461052c578063fe07c43b1461053f576102f1565b8063dcc4f68414610504578063dff667bf1461050c578063e34bc6f314610514576102f1565b8063b78c0ffb146104d4578063c01f3a57146104dc578063c544df0c146104e4578063c8915742146104ec578063d751b6cf146104f4578063d7bf81a3146104fc576102f1565b80639416c30f11610156578063a8bc6f7c11610130578063a8bc6f7c146104a9578063a9751665146104b1578063b049e25a146104b9578063b2520a7c146104c1576102f1565b80639416c30f146104915780639be5c02414610499578063a13aed1f146104a1576102f1565b8063743b34521461043e57806378c6b884146104515780637a431b8a146104665780638517fa9c1461046e578063867904b4146104765780638da5cb5b14610489576102f1565b80633c69e26b1161025c57806350a55fe6116102155780635c975abb116101ef5780635c975abb1461041e5780635fc5f4de14610426578063654a864a1461042e578063715018a614610436576102f1565b806350a55fe6146103fb578063537aa33c146104035780635639e8cf14610416576102f1565b80633c69e26b1461039a5780633f4ba83a146103a25780633fce824a146103b7578063480df058146103ca5780634b8dfca2146103d25780634eb665af146103e8576102f1565b806326abdad4116102ae57806326abdad4146103545780632f4f0d1c1461035c5780632f86556814610364578063340b79491461037757806338013f021461037f5780633b0c64f714610387576102f1565b806304554443146102f6578063074e8317146103145780630ccfe3e21461031c5780630dc6ff081461032457806315f570dc1461032c5780631e9a695014610341575b600080fd5b6102fe610552565b60405161030b91906128c5565b60405180910390f35b6102fe610558565b6102fe61055e565b6102fe610570565b61033f61033a366004612717565b610582565b005b61033f61034f3660046126ec565b610abc565b6102fe610dda565b6102fe610de7565b61033f6103723660046126b4565b610ded565b6102fe610f28565b6102fe610f43565b61033f6103953660046127ee565b610f50565b6102fe610f8a565b6103aa6110db565b60405161030b91906128ba565b61033f6103c53660046127ee565b6110f2565b6102fe61112c565b6103da61113b565b60405161030b9291906128ce565b61033f6103f63660046127ee565b61122c565b6102fe611266565b6102fe6104113660046126b4565b611278565b6102fe611293565b6103aa6112a1565b6102fe6112b1565b61033f6112c6565b61033f6114ce565b61033f61044c3660046126ec565b61154d565b610459611741565b60405161030b9190612869565b6102fe611750565b6102fe61175e565b61033f6104843660046126ec565b6117db565b610459611d04565b6102fe611d13565b6102fe611d2a565b6102fe611d3c565b6102fe611d50565b6102fe611df5565b6102fe611e0c565b6103da6104cf3660046126ec565b611e1f565b6102fe611e58565b6102fe611efd565b6102fe611f03565b6102fe611f10565b6102fe611f1e565b6102fe611f24565b6102fe611f33565b6102fe611f4a565b6102fe611f63565b6102fe611f73565b6102fe611f83565b61033f61053a3660046126b4565b612076565b6102fe61054d3660046126b4565b61212c565b60085481565b60065481565b6a41646472657373426f6f6b60a81b81565b6a706c656467655f7261746560a81b81565b60015460405163130852b360e11b81526001600160a01b0390911690632610a566906105be9068426f72696e6744414f60b81b906004016128c5565b60206040518083038186803b1580156105d657600080fd5b505afa1580156105ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060e91906126d0565b6001600160a01b0316336001600160a01b03161461062b57600080fd5b6005548210156106565760405162461bcd60e51b815260040161064d90612dd7565b60405180910390fd5b600061067661066f676275726e5f66656560c01b61213e565b84906121cd565b9050600061079e6106856121f1565b6001600160a01b03166331d98b3f65424f52494e4760d01b6040518263ffffffff1660e01b81526004016106b991906128c5565b60206040518083038186803b1580156106d157600080fd5b505afa1580156106e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107099190612806565b610798846107156121f1565b6001600160a01b03166331d98b3f6002546040518263ffffffff1660e01b815260040161074291906128c5565b60206040518083038186803b15801561075a57600080fd5b505afa15801561076e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107929190612806565b906121cd565b9061227b565b6001546002546040516305ad37e160e11b81529293506000926001600160a01b0390921691630b5a6fc2916107e7916c125b9cdd5c985b98d9541bdbdb609a1b906004016129de565b60206040518083038186803b1580156107ff57600080fd5b505afa158015610813573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083791906126d0565b9050600061085c61066f716275726e5f6665655f696e737572616e636560701b61213e565b9050600061088661087f6f313ab9372fb332b2afb83632b233b2b960811b61213e565b85906121cd565b90506108906122a0565b6001600160a01b03166323b872dd8985856040518463ffffffff1660e01b81526004016108bf93929190612896565b602060405180830381600087803b1580156108d957600080fd5b505af11580156108ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091191906127ce565b5061091a6122a0565b6001600160a01b03166323b872dd896109316122da565b846040518463ffffffff1660e01b815260040161095093929190612896565b602060405180830381600087803b15801561096a57600080fd5b505af115801561097e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a291906127ce565b506109ab6122da565b6001600160a01b0316639bc51d09826040518263ffffffff1660e01b81526004016109d691906128c5565b600060405180830381600087803b1580156109f057600080fd5b505af1158015610a04573d6000803e3d6000fd5b50505050610a10612319565b6001600160a01b0316639dc29fac89896040518363ffffffff1660e01b8152600401610a3d92919061287d565b600060405180830381600087803b158015610a5757600080fd5b505af1158015610a6b573d6000803e3d6000fd5b50505050876001600160a01b03167f48e5f29107742a05f6d9a79767e1c4f5014c2776cae808bd9221eba01c88656a8888604051610aaa929190612e5d565b60405180910390a25050505050505050565b60015460405163130852b360e11b81526001600160a01b0390911690632610a56690610af89068426f72696e6744414f60b81b906004016128c5565b60206040518083038186803b158015610b1057600080fd5b505afa158015610b24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4891906126d0565b6001600160a01b0316336001600160a01b031614610b6557600080fd5b80610b6e612357565b6001600160a01b03166370a08231846040518263ffffffff1660e01b8152600401610b999190612869565b60206040518083038186803b158015610bb157600080fd5b505afa158015610bc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be99190612806565b1015610c075760405162461bcd60e51b815260040161064d90612d87565b6001600160a01b038216600090815260036020526040902054811115610c3f5760405162461bcd60e51b815260040161064d90612e19565b6006546001600160a01b03831660009081526007602052604090205410610c785760405162461bcd60e51b815260040161064d90612c95565b6001600160a01b038216600090815260036020526040902054610c9b9082612396565b6001600160a01b038316600090815260036020526040902055600854610ccf9083908390610cca9042906123d8565b6123fd565b610cd7612357565b6001600160a01b0316639dc29fac83836040518363ffffffff1660e01b8152600401610d0492919061287d565b600060405180830381600087803b158015610d1e57600080fd5b505af1158015610d32573d6000803e3d6000fd5b50505050610d3e6122da565b6001600160a01b031663f3fef3a383836040518363ffffffff1660e01b8152600401610d6b92919061287d565b600060405180830381600087803b158015610d8557600080fd5b505af1158015610d99573d6000803e3d6000fd5b505050507f30bd0eb794bd02c37541f0ad25908537ba61159bb9277ee27364927858a3037b8282604051610dce92919061287d565b60405180910390a15050565b65424f52494e4760d01b81565b60025481565b6001546002546040516305ad37e160e11b81526001600160a01b0390921691630b5a6fc291610e2e916a2634b8bab4b230ba34b7b760a91b90600401612a72565b60206040518083038186803b158015610e4657600080fd5b505afa158015610e5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7e91906126d0565b6001600160a01b0316336001600160a01b031614610e9b57600080fd5b610ea36122a0565b6001600160a01b031663a9059cbb826004546040518363ffffffff1660e01b8152600401610ed292919061287d565b602060405180830381600087803b158015610eec57600080fd5b505af1158015610f00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2491906127ce565b5050565b73536174656c6c697465506f6f6c466163746f727960601b81565b654f7261636c6560d01b81565b610f5861244e565b6000546001600160a01b03908116911614610f855760405162461bcd60e51b815260040161064d90612d52565b600655565b600080610f95611d50565b90506000610fa1612452565b6001600160a01b031663171800cc6002546a706c656467655f7261746560a81b6040518363ffffffff1660e01b8152600401610fde9291906128ce565b60206040518083038186803b158015610ff657600080fd5b505afa15801561100a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102e9190612806565b9050600061103c838361227b565b905060006110486121f1565b6001600160a01b03166331d98b3f6002546040518263ffffffff1660e01b815260040161107591906128c5565b60206040518083038186803b15801561108d57600080fd5b505afa1580156110a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c59190612806565b90506110d1828261227b565b9450505050505b90565b60006110e561248f565b6110ed6112a1565b905090565b6110fa61244e565b6000546001600160a01b039081169116146111275760405162461bcd60e51b815260040161064d90612d52565b600555565b676275726e5f66656560c01b81565b60008060008060005b336000908152600760205260409020548110156112225733600090815260076020526040902080548290811061117657fe5b90600052602060002090600202016000015442106111d65733600090815260076020526040902080546111cf9190839081106111ae57fe5b906000526020600020906002020160010154836123d890919063ffffffff16565b915061121a565b33600090815260076020526040902080546112179190839081106111f657fe5b906000526020600020906002020160010154846123d890919063ffffffff16565b92505b600101611144565b5090925090509091565b61123461244e565b6000546001600160a01b039081169116146112615760405162461bcd60e51b815260040161064d90612d52565b600855565b6a2634b8bab4b230ba34b7b760a91b81565b6001600160a01b031660009081526007602052604090205490565b662232bb2ab9b2b960c91b81565b600054600160a01b900460ff1690565b6d151c9d5cdd1959519959541bdbdb60921b81565b6000805b3360009081526007602052604090205481146113ff573360009081526007602052604090208054829081106112fb57fe5b90600052602060002090600202016000015442106113f65733600090815260076020526040902080546113339190839081106111ae57fe5b336000908152600760205260409020805491935090611353906001612396565b8154811061135d57fe5b906000526020600020906002020160076000336001600160a01b03166001600160a01b03168152602001908152602001600020828154811061139b57fe5b60009182526020808320845460029093020191825560019384015493909101929092553381526007909152604090208054806113d357fe5b6000828152602081206002600019909301928302018181556001015590556113fa565b6001015b6112ca565b8115610f24576004546114129083612396565b60045561141d6122a0565b6001600160a01b031663a9059cbb33846040518363ffffffff1660e01b815260040161144a92919061287d565b602060405180830381600087803b15801561146457600080fd5b505af1158015611478573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149c91906127ce565b507f501b7655c9577753c69704203eb3bb2250da3df505696c12224b2b921edd3def3383604051610dce92919061287d565b6114d661244e565b6000546001600160a01b039081169116146115035760405162461bcd60e51b815260040161064d90612d52565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60015460405163130852b360e11b81526001600160a01b0390911690632610a566906115899068426f72696e6744414f60b81b906004016128c5565b60206040518083038186803b1580156115a157600080fd5b505afa1580156115b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d991906126d0565b6001600160a01b0316336001600160a01b0316146115f657600080fd5b6001600160a01b03821660009081526003602052604090205461161990826123d8565b6001600160a01b03831660009081526003602052604090205560045461163f90826123d8565b60045561164a612357565b6001600160a01b03166340c10f1983836040518363ffffffff1660e01b815260040161167792919061287d565b600060405180830381600087803b15801561169157600080fd5b505af11580156116a5573d6000803e3d6000fd5b505050506116b16122da565b6001600160a01b0316631a63f35c83836040518363ffffffff1660e01b81526004016116de92919061287d565b600060405180830381600087803b1580156116f857600080fd5b505af115801561170c573d6000803e3d6000fd5b505050507f32a61b2165056b6e73e4fec1c47aca82fc048d515138ec897b9226017df1cb7c8282604051610dce92919061287d565b6009546001600160a01b031681565b6638382a37b5b2b760c91b81565b60095460408051632a2f1bdf60e21b815290516000926001600160a01b03169163a8bc6f7c916004808301926020929190829003018186803b1580156117a357600080fd5b505afa1580156117b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ed9190612806565b60015460405163130852b360e11b81526001600160a01b0390911690632610a566906118179068426f72696e6744414f60b81b906004016128c5565b60206040518083038186803b15801561182f57600080fd5b505afa158015611843573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186791906126d0565b6001600160a01b0316336001600160a01b03161461188457600080fd5b600061188e612452565b6001600160a01b031663171800cc6002546a6e6574776f726b5f66656560a81b6040518363ffffffff1660e01b81526004016118cb9291906128ce565b60206040518083038186803b1580156118e357600080fd5b505afa1580156118f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191b9190612806565b90506000611933676d696e745f66656560c01b61213e565b9050600061194184836121cd565b90506000611959846119538785612396565b90612396565b9050611963612319565b6001600160a01b03166340c10f1987836040518363ffffffff1660e01b815260040161199092919061287d565b600060405180830381600087803b1580156119aa57600080fd5b505af11580156119be573d6000803e3d6000fd5b5050505060006119e06f6d696e745f6665655f7472757374656560801b61213e565b905060006119f8866119f286856121cd565b906123d8565b9050611a02612319565b6001600160a01b03166340c10f19611a18612505565b836040518363ffffffff1660e01b8152600401611a3692919061287d565b600060405180830381600087803b158015611a5057600080fd5b505af1158015611a64573d6000803e3d6000fd5b50505050611a70612505565b6001600160a01b03166360993b5b826040518263ffffffff1660e01b8152600401611a9b91906128c5565b600060405180830381600087803b158015611ab557600080fd5b505af1158015611ac9573d6000803e3d6000fd5b505050506000611aeb6f36b4b73a2fb332b2afb83632b233b2b960811b61213e565b90506000611af986836121cd565b90506000611b056122da565b9050611b0f612319565b6001600160a01b03166340c10f1982846040518363ffffffff1660e01b8152600401611b3c92919061287d565b600060405180830381600087803b158015611b5657600080fd5b505af1158015611b6a573d6000803e3d6000fd5b50505050611b766122da565b6001600160a01b0316633328817e836040518263ffffffff1660e01b8152600401611ba191906128c5565b600060405180830381600087803b158015611bbb57600080fd5b505af1158015611bcf573d6000803e3d6000fd5b505050506000611bed6b36b4b73a2fb332b2afb232bb60a11b61213e565b90506000611bfb89836121cd565b60015460405163130852b360e11b81529192506000916001600160a01b0390911690632610a56690611c3b90662232bb2ab9b2b960c91b906004016128c5565b60206040518083038186803b158015611c5357600080fd5b505afa158015611c67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8b91906126d0565b9050611c95612319565b6001600160a01b03166340c10f1982846040518363ffffffff1660e01b8152600401611cc292919061287d565b600060405180830381600087803b158015611cdc57600080fd5b505af1158015611cf0573d6000803e3d6000fd5b505050505050505050505050505050505050565b6000546001600160a01b031690565b6f313ab9372fb332b2afb83632b233b2b960811b81565b6a6e6574776f726b5f66656560a81b81565b6c125b9cdd5c985b98d9541bdbdb609a1b81565b600080611d5b611e58565b90506000611d6761254b565b6001600160a01b031663f7b59acb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d9f57600080fd5b505afa158015611db3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd79190612806565b9050611dee611de461175e565b6119f284846123d8565b9250505090565b6f36b4b73a2fb332b2afb83632b233b2b960811b81565b6b36b4b73a2fb332b2afb232bb60a11b81565b60076020528160005260406000208181548110611e3857fe5b600091825260209091206002909102018054600190910154909250905082565b600080611e636121f1565b6001600160a01b03166331d98b3f65424f52494e4760d01b6040518263ffffffff1660e01b8152600401611e9791906128c5565b60206040518083038186803b158015611eaf57600080fd5b505afa158015611ec3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee79190612806565b600454909150611ef790826121cd565b91505090565b60055481565b6537aa37b5b2b760d11b81565b66119959541bdbdb60ca1b81565b60045481565b676d696e745f66656560c01b81565b6f6d696e745f6665655f7472757374656560801b81565b716275726e5f6665655f696e737572616e636560701b81565b68506172616d426f6f6b60b81b81565b68426f72696e6744414f60b81b81565b600080611f8e611d50565b9050600061205a611f9d6121f1565b6001600160a01b03166331d98b3f6002546040518263ffffffff1660e01b8152600401611fca91906128c5565b60206040518083038186803b158015611fe257600080fd5b505afa158015611ff6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061201a9190612806565b612022612597565b6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561075a57600080fd5b90508061206c576000925050506110d8565b611dee828261227b565b61207e61244e565b6000546001600160a01b039081169116146120ab5760405162461bcd60e51b815260040161064d90612d52565b6001600160a01b0381166120d15760405162461bcd60e51b815260040161064d90612c18565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60036020526000908152604090205481565b6000612148612452565b6001600160a01b031663171800cc600254846040518363ffffffff1660e01b81526004016121779291906128ce565b60206040518083038186803b15801561218f57600080fd5b505afa1580156121a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121c79190612806565b92915050565b6000670de0b6b3a76400006121e284846125d5565b816121e957fe5b049392505050565b60015460405163130852b360e11b81526000916001600160a01b031690632610a5669061222b90654f7261636c6560d01b906004016128c5565b60206040518083038186803b15801561224357600080fd5b505afa158015612257573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ed91906126d0565b60006122998261229385670de0b6b3a76400006125d5565b9061260f565b9392505050565b600154604051635da2251d60e11b81526000916001600160a01b03169063bb444a3a9061222b9065424f52494e4760d01b90600401612b7c565b6001546002546040516305ad37e160e11b81526000926001600160a01b031691630b5a6fc29161222b919066119959541bdbdb60ca1b90600401612a21565b6001546002546040516305ad37e160e11b81526000926001600160a01b031691630b5a6fc29161222b91906537aa37b5b2b760d11b9060040161291f565b6001546002546040516305ad37e160e11b81526000926001600160a01b031691630b5a6fc29161222b91906638382a37b5b2b760c91b90600401612988565b600061229983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612651565b6000828201838110156122995760405162461bcd60e51b815260040161064d90612c5e565b6001600160a01b039092166000908152600760209081526040808320815180830190925294815280820193845284546001818101875595845291909220915160029091029091019081559051910155565b3390565b60015460405163130852b360e11b81526000916001600160a01b031690632610a5669061222b9068506172616d426f6f6b60b81b906004016128c5565b600054600160a01b900460ff166124b85760405162461bcd60e51b815260040161064d90612bea565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6124ee61244e565b6040516124fb9190612869565b60405180910390a1565b6001546002546040516305ad37e160e11b81526000926001600160a01b031691630b5a6fc29161222b91906d151c9d5cdd1959519959541bdbdb60921b90600401612b2c565b6001546002546040516305ad37e160e11b81526000926001600160a01b031691630b5a6fc29161222b919073536174656c6c697465506f6f6c466163746f727960601b906004016128dc565b6001546002546040516305ad37e160e11b81526000926001600160a01b031691630b5a6fc29161222b91906537aa37b5b2b760d11b90600401612ac3565b6000826125e4575060006121c7565b828202828482816125f157fe5b04146122995760405162461bcd60e51b815260040161064d90612d11565b600061229983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061267d565b600081848411156126755760405162461bcd60e51b815260040161064d9190612bd7565b505050900390565b6000818361269e5760405162461bcd60e51b815260040161064d9190612bd7565b5060008385816126aa57fe5b0495945050505050565b6000602082840312156126c5578081fd5b813561229981612e7e565b6000602082840312156126e1578081fd5b815161229981612e7e565b600080604083850312156126fe578081fd5b823561270981612e7e565b946020939093013593505050565b60008060006060848603121561272b578081fd5b833561273681612e7e565b92506020848101359250604085013567ffffffffffffffff8082111561275a578384fd5b818701915087601f83011261276d578384fd5b81358181111561277b578485fd5b604051601f8201601f191681018501838111828210171561279a578687fd5b60405281815283820185018a10156127b0578586fd5b81858501868301378585838301015280955050505050509250925092565b6000602082840312156127df578081fd5b81518015158114612299578182fd5b6000602082840312156127ff578081fd5b5035919050565b600060208284031215612817578081fd5b5051919050565b60008151808452815b8181101561284357602081850181015186830182015201612827565b818111156128545782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b90815260200190565b918252602082015260400190565b9182526020820152606060408201819052601d908201527f54756e6e656c3a3a7370663a3a737066206973206e6f74206578697374000000608082015260a00190565b9182526020820152606060408201819052603b908201527f54756e6e656c3a3a6f746f6b656e4d696e744275726e3a206f546f6b656e206360808201527f6f6e7472616374206e6f7420657869737420696e2054756e6e656c000000000060a082015260c00190565b9182526020820152606060408201819052602a908201527f54756e6e656c3a3a7070546f6b656e4d696e744275726e3a3a7070746f6b656e608082015269081b9bdd08195e1a5cdd60b21b60a082015260c00190565b91825260208201526060604082018190526017908201527f696e737572616e6365506f6f6c206e6f74206578697374000000000000000000608082015260a00190565b91825260208201526060604082018190526025908201527f54756e6e656c3a3a666565506f6f6c3a3a666565506f6f6c206973206e6f7420608082015264195e1a5cdd60da1b60a082015260c00190565b91825260208201526060604082018190526025908201527f54756e6e656c3a3a6c69717569646174696f6e20636f6e7472616374206e6f20608082015264195e1a5cdd60da1b60a082015260c00190565b91825260208201526060604082018190526038908201527f54756e6e656c3a3a6f746f6b656e45524332303a206f546f6b656e20636f6e7460808201527f72616374206e6f7420657869737420696e2054756e6e656c000000000000000060a082015260c00190565b91825260208201526060604082018190526024908201527f54756e6e656c3a3a74727573746565466565506f6f6c206973206164647265736080820152637328302960e01b60a082015260c00190565b9081526040602082018190526034908201527f626f7245524332303a3a626f7245524332303a20424f5220636f6e7472616374606082015273081b9bdd08195e1a5cdd081a5b88151d5b9b995b60621b608082015260a00190565b600060208252612299602083018461281e565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526056908201527f54756e6e656c3a3a72656465656d3a204120757365722063616e206f6e6c792060408201527f72656465656d206174206d6f737420666976652072656465656d2c207472792060608201527530b3b0b4b71030b33a32b91032bc3a3930b1ba34b7b760511b608082015260a00190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526030908201527f54756e6e656c3a3a72656465656d3a206e6f7420656e6f75676820706c65646760408201526f3290383937bb34b232b9103a37b5b2b760811b606082015260800190565b60208082526022908201527f54756e6e656c3a3a6275726e3a2074686520616d6f756e7420746f6f20736d616040820152611b1b60f21b606082015260800190565b60208082526024908201527f54756e6e656c3a72656465656d3a204e6f7420656e6f75676820626f7220616d6040820152631bdd5b9d60e21b606082015260800190565b600083825260406020830152612e76604083018461281e565b949350505050565b6001600160a01b0381168114612e9357600080fd5b5056fea264697066735822122070eb2401f8c7a5729873df68b561d32517820cd74a60fd1d575a81e2a2e8736964736f6c634300060c0033000000000000000000000000ce61e08c01fb6e1ca1bb4d0acf4eb1d5fe66bf794254430000000000000000000000000000000000000000000000000000000000000000000000000000000000258a1eb6537ae84cf612f06b557b6d53f49cc9a1

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102f15760003560e01c8063743b34521161019d578063b78c0ffb116100e9578063dcc4f684116100a2578063e4886e051161007c578063e4886e051461051c578063eb24e47214610524578063f2fde38b1461052c578063fe07c43b1461053f576102f1565b8063dcc4f68414610504578063dff667bf1461050c578063e34bc6f314610514576102f1565b8063b78c0ffb146104d4578063c01f3a57146104dc578063c544df0c146104e4578063c8915742146104ec578063d751b6cf146104f4578063d7bf81a3146104fc576102f1565b80639416c30f11610156578063a8bc6f7c11610130578063a8bc6f7c146104a9578063a9751665146104b1578063b049e25a146104b9578063b2520a7c146104c1576102f1565b80639416c30f146104915780639be5c02414610499578063a13aed1f146104a1576102f1565b8063743b34521461043e57806378c6b884146104515780637a431b8a146104665780638517fa9c1461046e578063867904b4146104765780638da5cb5b14610489576102f1565b80633c69e26b1161025c57806350a55fe6116102155780635c975abb116101ef5780635c975abb1461041e5780635fc5f4de14610426578063654a864a1461042e578063715018a614610436576102f1565b806350a55fe6146103fb578063537aa33c146104035780635639e8cf14610416576102f1565b80633c69e26b1461039a5780633f4ba83a146103a25780633fce824a146103b7578063480df058146103ca5780634b8dfca2146103d25780634eb665af146103e8576102f1565b806326abdad4116102ae57806326abdad4146103545780632f4f0d1c1461035c5780632f86556814610364578063340b79491461037757806338013f021461037f5780633b0c64f714610387576102f1565b806304554443146102f6578063074e8317146103145780630ccfe3e21461031c5780630dc6ff081461032457806315f570dc1461032c5780631e9a695014610341575b600080fd5b6102fe610552565b60405161030b91906128c5565b60405180910390f35b6102fe610558565b6102fe61055e565b6102fe610570565b61033f61033a366004612717565b610582565b005b61033f61034f3660046126ec565b610abc565b6102fe610dda565b6102fe610de7565b61033f6103723660046126b4565b610ded565b6102fe610f28565b6102fe610f43565b61033f6103953660046127ee565b610f50565b6102fe610f8a565b6103aa6110db565b60405161030b91906128ba565b61033f6103c53660046127ee565b6110f2565b6102fe61112c565b6103da61113b565b60405161030b9291906128ce565b61033f6103f63660046127ee565b61122c565b6102fe611266565b6102fe6104113660046126b4565b611278565b6102fe611293565b6103aa6112a1565b6102fe6112b1565b61033f6112c6565b61033f6114ce565b61033f61044c3660046126ec565b61154d565b610459611741565b60405161030b9190612869565b6102fe611750565b6102fe61175e565b61033f6104843660046126ec565b6117db565b610459611d04565b6102fe611d13565b6102fe611d2a565b6102fe611d3c565b6102fe611d50565b6102fe611df5565b6102fe611e0c565b6103da6104cf3660046126ec565b611e1f565b6102fe611e58565b6102fe611efd565b6102fe611f03565b6102fe611f10565b6102fe611f1e565b6102fe611f24565b6102fe611f33565b6102fe611f4a565b6102fe611f63565b6102fe611f73565b6102fe611f83565b61033f61053a3660046126b4565b612076565b6102fe61054d3660046126b4565b61212c565b60085481565b60065481565b6a41646472657373426f6f6b60a81b81565b6a706c656467655f7261746560a81b81565b60015460405163130852b360e11b81526001600160a01b0390911690632610a566906105be9068426f72696e6744414f60b81b906004016128c5565b60206040518083038186803b1580156105d657600080fd5b505afa1580156105ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060e91906126d0565b6001600160a01b0316336001600160a01b03161461062b57600080fd5b6005548210156106565760405162461bcd60e51b815260040161064d90612dd7565b60405180910390fd5b600061067661066f676275726e5f66656560c01b61213e565b84906121cd565b9050600061079e6106856121f1565b6001600160a01b03166331d98b3f65424f52494e4760d01b6040518263ffffffff1660e01b81526004016106b991906128c5565b60206040518083038186803b1580156106d157600080fd5b505afa1580156106e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107099190612806565b610798846107156121f1565b6001600160a01b03166331d98b3f6002546040518263ffffffff1660e01b815260040161074291906128c5565b60206040518083038186803b15801561075a57600080fd5b505afa15801561076e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107929190612806565b906121cd565b9061227b565b6001546002546040516305ad37e160e11b81529293506000926001600160a01b0390921691630b5a6fc2916107e7916c125b9cdd5c985b98d9541bdbdb609a1b906004016129de565b60206040518083038186803b1580156107ff57600080fd5b505afa158015610813573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083791906126d0565b9050600061085c61066f716275726e5f6665655f696e737572616e636560701b61213e565b9050600061088661087f6f313ab9372fb332b2afb83632b233b2b960811b61213e565b85906121cd565b90506108906122a0565b6001600160a01b03166323b872dd8985856040518463ffffffff1660e01b81526004016108bf93929190612896565b602060405180830381600087803b1580156108d957600080fd5b505af11580156108ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091191906127ce565b5061091a6122a0565b6001600160a01b03166323b872dd896109316122da565b846040518463ffffffff1660e01b815260040161095093929190612896565b602060405180830381600087803b15801561096a57600080fd5b505af115801561097e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a291906127ce565b506109ab6122da565b6001600160a01b0316639bc51d09826040518263ffffffff1660e01b81526004016109d691906128c5565b600060405180830381600087803b1580156109f057600080fd5b505af1158015610a04573d6000803e3d6000fd5b50505050610a10612319565b6001600160a01b0316639dc29fac89896040518363ffffffff1660e01b8152600401610a3d92919061287d565b600060405180830381600087803b158015610a5757600080fd5b505af1158015610a6b573d6000803e3d6000fd5b50505050876001600160a01b03167f48e5f29107742a05f6d9a79767e1c4f5014c2776cae808bd9221eba01c88656a8888604051610aaa929190612e5d565b60405180910390a25050505050505050565b60015460405163130852b360e11b81526001600160a01b0390911690632610a56690610af89068426f72696e6744414f60b81b906004016128c5565b60206040518083038186803b158015610b1057600080fd5b505afa158015610b24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4891906126d0565b6001600160a01b0316336001600160a01b031614610b6557600080fd5b80610b6e612357565b6001600160a01b03166370a08231846040518263ffffffff1660e01b8152600401610b999190612869565b60206040518083038186803b158015610bb157600080fd5b505afa158015610bc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be99190612806565b1015610c075760405162461bcd60e51b815260040161064d90612d87565b6001600160a01b038216600090815260036020526040902054811115610c3f5760405162461bcd60e51b815260040161064d90612e19565b6006546001600160a01b03831660009081526007602052604090205410610c785760405162461bcd60e51b815260040161064d90612c95565b6001600160a01b038216600090815260036020526040902054610c9b9082612396565b6001600160a01b038316600090815260036020526040902055600854610ccf9083908390610cca9042906123d8565b6123fd565b610cd7612357565b6001600160a01b0316639dc29fac83836040518363ffffffff1660e01b8152600401610d0492919061287d565b600060405180830381600087803b158015610d1e57600080fd5b505af1158015610d32573d6000803e3d6000fd5b50505050610d3e6122da565b6001600160a01b031663f3fef3a383836040518363ffffffff1660e01b8152600401610d6b92919061287d565b600060405180830381600087803b158015610d8557600080fd5b505af1158015610d99573d6000803e3d6000fd5b505050507f30bd0eb794bd02c37541f0ad25908537ba61159bb9277ee27364927858a3037b8282604051610dce92919061287d565b60405180910390a15050565b65424f52494e4760d01b81565b60025481565b6001546002546040516305ad37e160e11b81526001600160a01b0390921691630b5a6fc291610e2e916a2634b8bab4b230ba34b7b760a91b90600401612a72565b60206040518083038186803b158015610e4657600080fd5b505afa158015610e5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7e91906126d0565b6001600160a01b0316336001600160a01b031614610e9b57600080fd5b610ea36122a0565b6001600160a01b031663a9059cbb826004546040518363ffffffff1660e01b8152600401610ed292919061287d565b602060405180830381600087803b158015610eec57600080fd5b505af1158015610f00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2491906127ce565b5050565b73536174656c6c697465506f6f6c466163746f727960601b81565b654f7261636c6560d01b81565b610f5861244e565b6000546001600160a01b03908116911614610f855760405162461bcd60e51b815260040161064d90612d52565b600655565b600080610f95611d50565b90506000610fa1612452565b6001600160a01b031663171800cc6002546a706c656467655f7261746560a81b6040518363ffffffff1660e01b8152600401610fde9291906128ce565b60206040518083038186803b158015610ff657600080fd5b505afa15801561100a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102e9190612806565b9050600061103c838361227b565b905060006110486121f1565b6001600160a01b03166331d98b3f6002546040518263ffffffff1660e01b815260040161107591906128c5565b60206040518083038186803b15801561108d57600080fd5b505afa1580156110a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c59190612806565b90506110d1828261227b565b9450505050505b90565b60006110e561248f565b6110ed6112a1565b905090565b6110fa61244e565b6000546001600160a01b039081169116146111275760405162461bcd60e51b815260040161064d90612d52565b600555565b676275726e5f66656560c01b81565b60008060008060005b336000908152600760205260409020548110156112225733600090815260076020526040902080548290811061117657fe5b90600052602060002090600202016000015442106111d65733600090815260076020526040902080546111cf9190839081106111ae57fe5b906000526020600020906002020160010154836123d890919063ffffffff16565b915061121a565b33600090815260076020526040902080546112179190839081106111f657fe5b906000526020600020906002020160010154846123d890919063ffffffff16565b92505b600101611144565b5090925090509091565b61123461244e565b6000546001600160a01b039081169116146112615760405162461bcd60e51b815260040161064d90612d52565b600855565b6a2634b8bab4b230ba34b7b760a91b81565b6001600160a01b031660009081526007602052604090205490565b662232bb2ab9b2b960c91b81565b600054600160a01b900460ff1690565b6d151c9d5cdd1959519959541bdbdb60921b81565b6000805b3360009081526007602052604090205481146113ff573360009081526007602052604090208054829081106112fb57fe5b90600052602060002090600202016000015442106113f65733600090815260076020526040902080546113339190839081106111ae57fe5b336000908152600760205260409020805491935090611353906001612396565b8154811061135d57fe5b906000526020600020906002020160076000336001600160a01b03166001600160a01b03168152602001908152602001600020828154811061139b57fe5b60009182526020808320845460029093020191825560019384015493909101929092553381526007909152604090208054806113d357fe5b6000828152602081206002600019909301928302018181556001015590556113fa565b6001015b6112ca565b8115610f24576004546114129083612396565b60045561141d6122a0565b6001600160a01b031663a9059cbb33846040518363ffffffff1660e01b815260040161144a92919061287d565b602060405180830381600087803b15801561146457600080fd5b505af1158015611478573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149c91906127ce565b507f501b7655c9577753c69704203eb3bb2250da3df505696c12224b2b921edd3def3383604051610dce92919061287d565b6114d661244e565b6000546001600160a01b039081169116146115035760405162461bcd60e51b815260040161064d90612d52565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60015460405163130852b360e11b81526001600160a01b0390911690632610a566906115899068426f72696e6744414f60b81b906004016128c5565b60206040518083038186803b1580156115a157600080fd5b505afa1580156115b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d991906126d0565b6001600160a01b0316336001600160a01b0316146115f657600080fd5b6001600160a01b03821660009081526003602052604090205461161990826123d8565b6001600160a01b03831660009081526003602052604090205560045461163f90826123d8565b60045561164a612357565b6001600160a01b03166340c10f1983836040518363ffffffff1660e01b815260040161167792919061287d565b600060405180830381600087803b15801561169157600080fd5b505af11580156116a5573d6000803e3d6000fd5b505050506116b16122da565b6001600160a01b0316631a63f35c83836040518363ffffffff1660e01b81526004016116de92919061287d565b600060405180830381600087803b1580156116f857600080fd5b505af115801561170c573d6000803e3d6000fd5b505050507f32a61b2165056b6e73e4fec1c47aca82fc048d515138ec897b9226017df1cb7c8282604051610dce92919061287d565b6009546001600160a01b031681565b6638382a37b5b2b760c91b81565b60095460408051632a2f1bdf60e21b815290516000926001600160a01b03169163a8bc6f7c916004808301926020929190829003018186803b1580156117a357600080fd5b505afa1580156117b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ed9190612806565b60015460405163130852b360e11b81526001600160a01b0390911690632610a566906118179068426f72696e6744414f60b81b906004016128c5565b60206040518083038186803b15801561182f57600080fd5b505afa158015611843573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186791906126d0565b6001600160a01b0316336001600160a01b03161461188457600080fd5b600061188e612452565b6001600160a01b031663171800cc6002546a6e6574776f726b5f66656560a81b6040518363ffffffff1660e01b81526004016118cb9291906128ce565b60206040518083038186803b1580156118e357600080fd5b505afa1580156118f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191b9190612806565b90506000611933676d696e745f66656560c01b61213e565b9050600061194184836121cd565b90506000611959846119538785612396565b90612396565b9050611963612319565b6001600160a01b03166340c10f1987836040518363ffffffff1660e01b815260040161199092919061287d565b600060405180830381600087803b1580156119aa57600080fd5b505af11580156119be573d6000803e3d6000fd5b5050505060006119e06f6d696e745f6665655f7472757374656560801b61213e565b905060006119f8866119f286856121cd565b906123d8565b9050611a02612319565b6001600160a01b03166340c10f19611a18612505565b836040518363ffffffff1660e01b8152600401611a3692919061287d565b600060405180830381600087803b158015611a5057600080fd5b505af1158015611a64573d6000803e3d6000fd5b50505050611a70612505565b6001600160a01b03166360993b5b826040518263ffffffff1660e01b8152600401611a9b91906128c5565b600060405180830381600087803b158015611ab557600080fd5b505af1158015611ac9573d6000803e3d6000fd5b505050506000611aeb6f36b4b73a2fb332b2afb83632b233b2b960811b61213e565b90506000611af986836121cd565b90506000611b056122da565b9050611b0f612319565b6001600160a01b03166340c10f1982846040518363ffffffff1660e01b8152600401611b3c92919061287d565b600060405180830381600087803b158015611b5657600080fd5b505af1158015611b6a573d6000803e3d6000fd5b50505050611b766122da565b6001600160a01b0316633328817e836040518263ffffffff1660e01b8152600401611ba191906128c5565b600060405180830381600087803b158015611bbb57600080fd5b505af1158015611bcf573d6000803e3d6000fd5b505050506000611bed6b36b4b73a2fb332b2afb232bb60a11b61213e565b90506000611bfb89836121cd565b60015460405163130852b360e11b81529192506000916001600160a01b0390911690632610a56690611c3b90662232bb2ab9b2b960c91b906004016128c5565b60206040518083038186803b158015611c5357600080fd5b505afa158015611c67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8b91906126d0565b9050611c95612319565b6001600160a01b03166340c10f1982846040518363ffffffff1660e01b8152600401611cc292919061287d565b600060405180830381600087803b158015611cdc57600080fd5b505af1158015611cf0573d6000803e3d6000fd5b505050505050505050505050505050505050565b6000546001600160a01b031690565b6f313ab9372fb332b2afb83632b233b2b960811b81565b6a6e6574776f726b5f66656560a81b81565b6c125b9cdd5c985b98d9541bdbdb609a1b81565b600080611d5b611e58565b90506000611d6761254b565b6001600160a01b031663f7b59acb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d9f57600080fd5b505afa158015611db3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd79190612806565b9050611dee611de461175e565b6119f284846123d8565b9250505090565b6f36b4b73a2fb332b2afb83632b233b2b960811b81565b6b36b4b73a2fb332b2afb232bb60a11b81565b60076020528160005260406000208181548110611e3857fe5b600091825260209091206002909102018054600190910154909250905082565b600080611e636121f1565b6001600160a01b03166331d98b3f65424f52494e4760d01b6040518263ffffffff1660e01b8152600401611e9791906128c5565b60206040518083038186803b158015611eaf57600080fd5b505afa158015611ec3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee79190612806565b600454909150611ef790826121cd565b91505090565b60055481565b6537aa37b5b2b760d11b81565b66119959541bdbdb60ca1b81565b60045481565b676d696e745f66656560c01b81565b6f6d696e745f6665655f7472757374656560801b81565b716275726e5f6665655f696e737572616e636560701b81565b68506172616d426f6f6b60b81b81565b68426f72696e6744414f60b81b81565b600080611f8e611d50565b9050600061205a611f9d6121f1565b6001600160a01b03166331d98b3f6002546040518263ffffffff1660e01b8152600401611fca91906128c5565b60206040518083038186803b158015611fe257600080fd5b505afa158015611ff6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061201a9190612806565b612022612597565b6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561075a57600080fd5b90508061206c576000925050506110d8565b611dee828261227b565b61207e61244e565b6000546001600160a01b039081169116146120ab5760405162461bcd60e51b815260040161064d90612d52565b6001600160a01b0381166120d15760405162461bcd60e51b815260040161064d90612c18565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60036020526000908152604090205481565b6000612148612452565b6001600160a01b031663171800cc600254846040518363ffffffff1660e01b81526004016121779291906128ce565b60206040518083038186803b15801561218f57600080fd5b505afa1580156121a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121c79190612806565b92915050565b6000670de0b6b3a76400006121e284846125d5565b816121e957fe5b049392505050565b60015460405163130852b360e11b81526000916001600160a01b031690632610a5669061222b90654f7261636c6560d01b906004016128c5565b60206040518083038186803b15801561224357600080fd5b505afa158015612257573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ed91906126d0565b60006122998261229385670de0b6b3a76400006125d5565b9061260f565b9392505050565b600154604051635da2251d60e11b81526000916001600160a01b03169063bb444a3a9061222b9065424f52494e4760d01b90600401612b7c565b6001546002546040516305ad37e160e11b81526000926001600160a01b031691630b5a6fc29161222b919066119959541bdbdb60ca1b90600401612a21565b6001546002546040516305ad37e160e11b81526000926001600160a01b031691630b5a6fc29161222b91906537aa37b5b2b760d11b9060040161291f565b6001546002546040516305ad37e160e11b81526000926001600160a01b031691630b5a6fc29161222b91906638382a37b5b2b760c91b90600401612988565b600061229983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612651565b6000828201838110156122995760405162461bcd60e51b815260040161064d90612c5e565b6001600160a01b039092166000908152600760209081526040808320815180830190925294815280820193845284546001818101875595845291909220915160029091029091019081559051910155565b3390565b60015460405163130852b360e11b81526000916001600160a01b031690632610a5669061222b9068506172616d426f6f6b60b81b906004016128c5565b600054600160a01b900460ff166124b85760405162461bcd60e51b815260040161064d90612bea565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6124ee61244e565b6040516124fb9190612869565b60405180910390a1565b6001546002546040516305ad37e160e11b81526000926001600160a01b031691630b5a6fc29161222b91906d151c9d5cdd1959519959541bdbdb60921b90600401612b2c565b6001546002546040516305ad37e160e11b81526000926001600160a01b031691630b5a6fc29161222b919073536174656c6c697465506f6f6c466163746f727960601b906004016128dc565b6001546002546040516305ad37e160e11b81526000926001600160a01b031691630b5a6fc29161222b91906537aa37b5b2b760d11b90600401612ac3565b6000826125e4575060006121c7565b828202828482816125f157fe5b04146122995760405162461bcd60e51b815260040161064d90612d11565b600061229983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061267d565b600081848411156126755760405162461bcd60e51b815260040161064d9190612bd7565b505050900390565b6000818361269e5760405162461bcd60e51b815260040161064d9190612bd7565b5060008385816126aa57fe5b0495945050505050565b6000602082840312156126c5578081fd5b813561229981612e7e565b6000602082840312156126e1578081fd5b815161229981612e7e565b600080604083850312156126fe578081fd5b823561270981612e7e565b946020939093013593505050565b60008060006060848603121561272b578081fd5b833561273681612e7e565b92506020848101359250604085013567ffffffffffffffff8082111561275a578384fd5b818701915087601f83011261276d578384fd5b81358181111561277b578485fd5b604051601f8201601f191681018501838111828210171561279a578687fd5b60405281815283820185018a10156127b0578586fd5b81858501868301378585838301015280955050505050509250925092565b6000602082840312156127df578081fd5b81518015158114612299578182fd5b6000602082840312156127ff578081fd5b5035919050565b600060208284031215612817578081fd5b5051919050565b60008151808452815b8181101561284357602081850181015186830182015201612827565b818111156128545782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b90815260200190565b918252602082015260400190565b9182526020820152606060408201819052601d908201527f54756e6e656c3a3a7370663a3a737066206973206e6f74206578697374000000608082015260a00190565b9182526020820152606060408201819052603b908201527f54756e6e656c3a3a6f746f6b656e4d696e744275726e3a206f546f6b656e206360808201527f6f6e7472616374206e6f7420657869737420696e2054756e6e656c000000000060a082015260c00190565b9182526020820152606060408201819052602a908201527f54756e6e656c3a3a7070546f6b656e4d696e744275726e3a3a7070746f6b656e608082015269081b9bdd08195e1a5cdd60b21b60a082015260c00190565b91825260208201526060604082018190526017908201527f696e737572616e6365506f6f6c206e6f74206578697374000000000000000000608082015260a00190565b91825260208201526060604082018190526025908201527f54756e6e656c3a3a666565506f6f6c3a3a666565506f6f6c206973206e6f7420608082015264195e1a5cdd60da1b60a082015260c00190565b91825260208201526060604082018190526025908201527f54756e6e656c3a3a6c69717569646174696f6e20636f6e7472616374206e6f20608082015264195e1a5cdd60da1b60a082015260c00190565b91825260208201526060604082018190526038908201527f54756e6e656c3a3a6f746f6b656e45524332303a206f546f6b656e20636f6e7460808201527f72616374206e6f7420657869737420696e2054756e6e656c000000000000000060a082015260c00190565b91825260208201526060604082018190526024908201527f54756e6e656c3a3a74727573746565466565506f6f6c206973206164647265736080820152637328302960e01b60a082015260c00190565b9081526040602082018190526034908201527f626f7245524332303a3a626f7245524332303a20424f5220636f6e7472616374606082015273081b9bdd08195e1a5cdd081a5b88151d5b9b995b60621b608082015260a00190565b600060208252612299602083018461281e565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526056908201527f54756e6e656c3a3a72656465656d3a204120757365722063616e206f6e6c792060408201527f72656465656d206174206d6f737420666976652072656465656d2c207472792060608201527530b3b0b4b71030b33a32b91032bc3a3930b1ba34b7b760511b608082015260a00190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526030908201527f54756e6e656c3a3a72656465656d3a206e6f7420656e6f75676820706c65646760408201526f3290383937bb34b232b9103a37b5b2b760811b606082015260800190565b60208082526022908201527f54756e6e656c3a3a6275726e3a2074686520616d6f756e7420746f6f20736d616040820152611b1b60f21b606082015260800190565b60208082526024908201527f54756e6e656c3a72656465656d3a204e6f7420656e6f75676820626f7220616d6040820152631bdd5b9d60e21b606082015260800190565b600083825260406020830152612e76604083018461281e565b949350505050565b6001600160a01b0381168114612e9357600080fd5b5056fea264697066735822122070eb2401f8c7a5729873df68b561d32517820cd74a60fd1d575a81e2a2e8736964736f6c634300060c0033

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

000000000000000000000000ce61e08c01fb6e1ca1bb4d0acf4eb1d5fe66bf794254430000000000000000000000000000000000000000000000000000000000000000000000000000000000258a1eb6537ae84cf612f06b557b6d53f49cc9a1

-----Decoded View---------------
Arg [0] : _addrResolver (address): 0xCE61e08C01fb6E1ca1BB4d0ACF4eB1D5Fe66bF79
Arg [1] : _tunnelKey (bytes32): 0x4254430000000000000000000000000000000000000000000000000000000000
Arg [2] : _oldTunnel (address): 0x258a1eb6537Ae84Cf612f06B557B6d53f49cC9A1

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000ce61e08c01fb6e1ca1bb4d0acf4eb1d5fe66bf79
Arg [1] : 4254430000000000000000000000000000000000000000000000000000000000
Arg [2] : 000000000000000000000000258a1eb6537ae84cf612f06b557b6d53f49cc9a1


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  ]

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.