More Info
Private Name Tags
ContractCreator
TokenTracker
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
1735316 | 12 days ago | Contract Creation | 0 S |
Loading...
Loading
Contract Name:
Collateral
Compiler Version
v0.5.16+commit.9c3226ce
Optimization Enabled:
Yes with 999999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// File: contracts\libraries\SafeMath.sol pragma solidity =0.5.16; // From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol // Subject to the MIT license. /** * @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 addition of two unsigned integers, reverting with custom message on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, errorMessage); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on underflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot underflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction underflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot underflow. */ 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 multiplication of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b, string memory errorMessage) 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, errorMessage); 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) { // Solidity only automatically asserts when dividing by 0 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: contracts\ImpermaxERC20.sol pragma solidity =0.5.16; // This contract is basically UniswapV2ERC20 with small modifications // src: https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol contract ImpermaxERC20 { using SafeMath for uint; string public name; string public symbol; uint8 public decimals = 18; uint public totalSupply; mapping(address => uint) public balanceOf; mapping(address => mapping(address => uint)) public allowance; bytes32 public DOMAIN_SEPARATOR; mapping(address => uint) public nonces; event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); constructor() public {} function _setName(string memory _name, string memory _symbol) internal { name = _name; symbol = _symbol; uint chainId; assembly { chainId := chainid } DOMAIN_SEPARATOR = keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(_name)), keccak256(bytes("1")), chainId, address(this) ) ); } function _mint(address to, uint value) internal { totalSupply = totalSupply.add(value); balanceOf[to] = balanceOf[to].add(value); emit Transfer(address(0), to, value); } function _burn(address from, uint value) internal { balanceOf[from] = balanceOf[from].sub(value); totalSupply = totalSupply.sub(value); emit Transfer(from, address(0), value); } function _approve(address owner, address spender, uint value) private { allowance[owner][spender] = value; emit Approval(owner, spender, value); } function _transfer(address from, address to, uint value) internal { balanceOf[from] = balanceOf[from].sub(value, "Impermax: TRANSFER_TOO_HIGH"); balanceOf[to] = balanceOf[to].add(value); emit Transfer(from, to, value); } function approve(address spender, uint value) external returns (bool) { _approve(msg.sender, spender, value); return true; } function transfer(address to, uint value) external returns (bool) { _transfer(msg.sender, to, value); return true; } function transferFrom(address from, address to, uint value) external returns (bool) { if (allowance[from][msg.sender] != uint(-1)) { allowance[from][msg.sender] = allowance[from][msg.sender].sub(value, "Impermax: TRANSFER_NOT_ALLOWED"); } _transfer(from, to, value); return true; } function _checkSignature(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s, bytes32 typehash) internal { require(deadline >= block.timestamp, "Impermax: EXPIRED"); bytes32 digest = keccak256( abi.encodePacked( '\x19\x01', DOMAIN_SEPARATOR, keccak256(abi.encode(typehash, owner, spender, value, nonces[owner]++, deadline)) ) ); address recoveredAddress = ecrecover(digest, v, r, s); require(recoveredAddress != address(0) && recoveredAddress == owner, "Impermax: INVALID_SIGNATURE"); } // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9; function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external { _checkSignature(owner, spender, value, deadline, v, r, s, PERMIT_TYPEHASH); _approve(owner, spender, value); } } // File: contracts\interfaces\IERC20.sol pragma solidity >=0.5.0; interface IERC20 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); } // File: contracts\interfaces\IPoolToken.sol pragma solidity >=0.5.0; interface IPoolToken { /*** Impermax ERC20 ***/ event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; /*** Pool Token ***/ event Mint(address indexed sender, address indexed minter, uint mintAmount, uint mintTokens); event Redeem(address indexed sender, address indexed redeemer, uint redeemAmount, uint redeemTokens); event Sync(uint totalBalance); function underlying() external view returns (address); function factory() external view returns (address); function totalBalance() external view returns (uint); function MINIMUM_LIQUIDITY() external pure returns (uint); function exchangeRate() external returns (uint); function mint(address minter) external returns (uint mintTokens); function redeem(address redeemer) external returns (uint redeemAmount); function skim(address to) external; function sync() external; function _setFactory() external; } // File: contracts\PoolToken.sol pragma solidity =0.5.16; contract PoolToken is IPoolToken, ImpermaxERC20 { uint internal constant initialExchangeRate = 1e18; address public underlying; address public factory; uint public totalBalance; uint public constant MINIMUM_LIQUIDITY = 1000; event Mint(address indexed sender, address indexed minter, uint mintAmount, uint mintTokens); event Redeem(address indexed sender, address indexed redeemer, uint redeemAmount, uint redeemTokens); event Sync(uint totalBalance); /*** Initialize ***/ // called once by the factory function _setFactory() external { require(factory == address(0), "Impermax: FACTORY_ALREADY_SET"); factory = msg.sender; } /*** PoolToken ***/ function _update() internal { totalBalance = IERC20(underlying).balanceOf(address(this)); emit Sync(totalBalance); } function exchangeRate() public returns (uint) { uint _totalSupply = totalSupply; // gas savings uint _totalBalance = totalBalance; // gas savings if (_totalSupply == 0 || _totalBalance == 0) return initialExchangeRate; return _totalBalance.mul(1e18).div(_totalSupply); } // this low-level function should be called from another contract function mint(address minter) external nonReentrant update returns (uint mintTokens) { uint balance = IERC20(underlying).balanceOf(address(this)); uint mintAmount = balance.sub(totalBalance); mintTokens = mintAmount.mul(1e18).div(exchangeRate()); if(totalSupply == 0) { // permanently lock the first MINIMUM_LIQUIDITY tokens mintTokens = mintTokens.sub(MINIMUM_LIQUIDITY); _mint(address(0), MINIMUM_LIQUIDITY); } require(mintTokens > 0, "Impermax: MINT_AMOUNT_ZERO"); _mint(minter, mintTokens); emit Mint(msg.sender, minter, mintAmount, mintTokens); } // this low-level function should be called from another contract function redeem(address redeemer) external nonReentrant update returns (uint redeemAmount) { uint redeemTokens = balanceOf[address(this)]; redeemAmount = redeemTokens.mul(exchangeRate()).div(1e18); require(redeemAmount > 0, "Impermax: REDEEM_AMOUNT_ZERO"); require(redeemAmount <= totalBalance, "Impermax: INSUFFICIENT_CASH"); _burn(address(this), redeemTokens); _safeTransfer(redeemer, redeemAmount); emit Redeem(msg.sender, redeemer, redeemAmount, redeemTokens); } // force real balance to match totalBalance function skim(address to) external nonReentrant { _safeTransfer(to, IERC20(underlying).balanceOf(address(this)).sub(totalBalance)); } // force totalBalance to match real balance function sync() external nonReentrant update {} /*** Utilities ***/ // same safe transfer function used by UniSwapV2 (with fixed underlying) bytes4 private constant SELECTOR = bytes4(keccak256(bytes("transfer(address,uint256)"))); function _safeTransfer(address to, uint amount) internal { (bool success, bytes memory data) = underlying.call(abi.encodeWithSelector(SELECTOR, to, amount)); require(success && (data.length == 0 || abi.decode(data, (bool))), "Impermax: TRANSFER_FAILED"); } // prevents a contract from calling itself, directly or indirectly. bool internal _notEntered = true; modifier nonReentrant() { require(_notEntered, "Impermax: REENTERED"); _notEntered = false; _; _notEntered = true; } // update totalBalance with current balance modifier update() { _; _update(); } } // File: contracts\CStorage.sol pragma solidity =0.5.16; contract CStorage { address public borrowable0; address public borrowable1; uint public safetyMarginSqrt = 1.58113883e18; //safetyMargin: 250% uint public liquidationIncentive = 1.02e18; //2% uint public liquidationFee = 0.02e18; //2% function liquidationPenalty() public view returns (uint) { return liquidationIncentive + liquidationFee; } function safe112(uint n) internal pure returns (uint112) { require(n < 2**112, "Impermax: SAFE112"); return uint112(n); } } // File: contracts\interfaces\IFactory.sol pragma solidity >=0.5.0; interface IFactory { event LendingPoolInitialized(address indexed uniswapV2Pair, address indexed token0, address indexed token1, address collateral, address borrowable0, address borrowable1, uint lendingPoolId); event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin); event NewAdmin(address oldAdmin, address newAdmin); event NewReservesPendingAdmin(address oldReservesPendingAdmin, address newReservesPendingAdmin); event NewReservesAdmin(address oldReservesAdmin, address newReservesAdmin); event NewReservesManager(address oldReservesManager, address newReservesManager); function admin() external view returns (address); function pendingAdmin() external view returns (address); function reservesAdmin() external view returns (address); function reservesPendingAdmin() external view returns (address); function reservesManager() external view returns (address); function getLendingPool(address uniswapV2Pair) external view returns ( bool initialized, uint24 lendingPoolId, address collateral, address borrowable0, address borrowable1 ); function allLendingPools(uint) external view returns (address uniswapV2Pair); function allLendingPoolsLength() external view returns (uint); function bDeployer() external view returns (address); function cDeployer() external view returns (address); function createCollateral(address uniswapV2Pair) external returns (address collateral); function createBorrowable0(address uniswapV2Pair) external returns (address borrowable0); function createBorrowable1(address uniswapV2Pair) external returns (address borrowable1); function initializeLendingPool(address uniswapV2Pair) external; function _setPendingAdmin(address newPendingAdmin) external; function _acceptAdmin() external; function _setReservesPendingAdmin(address newPendingAdmin) external; function _acceptReservesAdmin() external; function _setReservesManager(address newReservesManager) external; } // File: contracts\CSetter.sol pragma solidity =0.5.16; contract CSetter is PoolToken, CStorage { uint public constant SAFETY_MARGIN_SQRT_MIN = 1.00e18; //safetyMargin: 100% uint public constant SAFETY_MARGIN_SQRT_MAX = 1.58113884e18; //safetyMargin: 250% uint public constant LIQUIDATION_INCENTIVE_MIN = 1.00e18; //100% uint public constant LIQUIDATION_INCENTIVE_MAX = 1.05e18; //105% uint public constant LIQUIDATION_FEE_MAX = 0.08e18; //8% event NewSafetyMargin(uint newSafetyMarginSqrt); event NewLiquidationIncentive(uint newLiquidationIncentive); event NewLiquidationFee(uint newLiquidationFee); // called once by the factory at the time of deployment function _initialize ( string calldata _name, string calldata _symbol, address _underlying, address _borrowable0, address _borrowable1 ) external { require(msg.sender == factory, "Impermax: UNAUTHORIZED"); // sufficient check _setName(_name, _symbol); underlying = _underlying; borrowable0 = _borrowable0; borrowable1 = _borrowable1; } function _setSafetyMarginSqrt(uint newSafetyMarginSqrt) external nonReentrant { _checkSetting(newSafetyMarginSqrt, SAFETY_MARGIN_SQRT_MIN, SAFETY_MARGIN_SQRT_MAX); safetyMarginSqrt = newSafetyMarginSqrt; emit NewSafetyMargin(newSafetyMarginSqrt); } function _setLiquidationIncentive(uint newLiquidationIncentive) external nonReentrant { _checkSetting(newLiquidationIncentive, LIQUIDATION_INCENTIVE_MIN, LIQUIDATION_INCENTIVE_MAX); liquidationIncentive = newLiquidationIncentive; emit NewLiquidationIncentive(newLiquidationIncentive); } function _setLiquidationFee(uint newLiquidationFee) external nonReentrant { _checkSetting(newLiquidationFee, 0, LIQUIDATION_FEE_MAX); liquidationFee = newLiquidationFee; emit NewLiquidationFee(newLiquidationFee); } function _checkSetting(uint parameter, uint min, uint max) internal view { _checkAdmin(); require(parameter >= min, "Impermax: INVALID_SETTING"); require(parameter <= max, "Impermax: INVALID_SETTING"); } function _checkAdmin() internal view { require(msg.sender == IFactory(factory).admin(), "Impermax: UNAUTHORIZED"); } } // File: contracts\interfaces\IBorrowable.sol pragma solidity >=0.5.0; interface IBorrowable { /*** Impermax ERC20 ***/ event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; /*** Pool Token ***/ event Mint(address indexed sender, address indexed minter, uint mintAmount, uint mintTokens); event Redeem(address indexed sender, address indexed redeemer, uint redeemAmount, uint redeemTokens); event Sync(uint totalBalance); function underlying() external view returns (address); function factory() external view returns (address); function totalBalance() external view returns (uint); function MINIMUM_LIQUIDITY() external pure returns (uint); function exchangeRate() external returns (uint); function mint(address minter) external returns (uint mintTokens); function redeem(address redeemer) external returns (uint redeemAmount); function skim(address to) external; function sync() external; function _setFactory() external; /*** Borrowable ***/ event BorrowApproval(address indexed owner, address indexed spender, uint value); event Borrow(address indexed sender, address indexed borrower, address indexed receiver, uint borrowAmount, uint repayAmount, uint accountBorrowsPrior, uint accountBorrows, uint totalBorrows); event Liquidate(address indexed sender, address indexed borrower, address indexed liquidator, uint seizeTokens, uint repayAmount, uint accountBorrowsPrior, uint accountBorrows, uint totalBorrows); function BORROW_FEE() external pure returns (uint); function collateral() external view returns (address); function reserveFactor() external view returns (uint); function exchangeRateLast() external view returns (uint); function borrowIndex() external view returns (uint); function totalBorrows() external view returns (uint); function borrowAllowance(address owner, address spender) external view returns (uint); function borrowBalance(address borrower) external view returns (uint); function borrowTracker() external view returns (address); function BORROW_PERMIT_TYPEHASH() external pure returns (bytes32); function borrowApprove(address spender, uint256 value) external returns (bool); function borrowPermit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; function borrow(address borrower, address receiver, uint borrowAmount, bytes calldata data) external; function liquidate(address borrower, address liquidator) external returns (uint seizeTokens); function trackBorrow(address borrower) external; /*** Borrowable Interest Rate Model ***/ event AccrueInterest(uint interestAccumulated, uint borrowIndex, uint totalBorrows); event CalculateKink(uint kinkRate); event CalculateBorrowRate(uint borrowRate); function KINK_BORROW_RATE_MAX() external pure returns (uint); function KINK_BORROW_RATE_MIN() external pure returns (uint); function KINK_MULTIPLIER() external pure returns (uint); function borrowRate() external view returns (uint); function kinkBorrowRate() external view returns (uint); function kinkUtilizationRate() external view returns (uint); function adjustSpeed() external view returns (uint); function rateUpdateTimestamp() external view returns (uint32); function accrualTimestamp() external view returns (uint32); function accrueInterest() external; /*** Borrowable Setter ***/ event NewReserveFactor(uint newReserveFactor); event NewKinkUtilizationRate(uint newKinkUtilizationRate); event NewAdjustSpeed(uint newAdjustSpeed); event NewBorrowTracker(address newBorrowTracker); function RESERVE_FACTOR_MAX() external pure returns (uint); function KINK_UR_MIN() external pure returns (uint); function KINK_UR_MAX() external pure returns (uint); function ADJUST_SPEED_MIN() external pure returns (uint); function ADJUST_SPEED_MAX() external pure returns (uint); function _initialize ( string calldata _name, string calldata _symbol, address _underlying, address _collateral ) external; function _setReserveFactor(uint newReserveFactor) external; function _setKinkUtilizationRate(uint newKinkUtilizationRate) external; function _setAdjustSpeed(uint newAdjustSpeed) external; function _setBorrowTracker(address newBorrowTracker) external; } // File: contracts\interfaces\ICollateral.sol pragma solidity >=0.5.0; interface ICollateral { /*** Impermax ERC20 ***/ event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; /*** Pool Token ***/ event Mint(address indexed sender, address indexed minter, uint mintAmount, uint mintTokens); event Redeem(address indexed sender, address indexed redeemer, uint redeemAmount, uint redeemTokens); event Sync(uint totalBalance); function underlying() external view returns (address); function factory() external view returns (address); function totalBalance() external view returns (uint); function MINIMUM_LIQUIDITY() external pure returns (uint); function exchangeRate() external returns (uint); function mint(address minter) external returns (uint mintTokens); function redeem(address redeemer) external returns (uint redeemAmount); function skim(address to) external; function sync() external; function _setFactory() external; /*** Collateral ***/ function borrowable0() external view returns (address); function borrowable1() external view returns (address); function safetyMarginSqrt() external view returns (uint); function liquidationIncentive() external view returns (uint); function liquidationFee() external view returns (uint); function liquidationPenalty() external view returns (uint); function getTwapPrice112x112() external returns(uint224 twapPrice112x112); function getPrices() external returns (uint price0, uint price1); function tokensUnlocked(address from, uint value) external returns (bool); function accountLiquidityAmounts(address account, uint amount0, uint amount1) external returns (uint liquidity, uint shortfall); function accountLiquidity(address account) external returns (uint liquidity, uint shortfall); function canBorrow(address account, address borrowable, uint accountBorrows) external returns (bool); function seize(address liquidator, address borrower, uint repayAmount) external returns (uint seizeTokens); function flashRedeem(address redeemer, uint redeemAmount, bytes calldata data) external; /*** Collateral Setter ***/ event NewSafetyMargin(uint newSafetyMarginSqrt); event NewLiquidationIncentive(uint newLiquidationIncentive); event NewLiquidationFee(uint newLiquidationFee); function SAFETY_MARGIN_SQRT_MIN() external pure returns (uint); function SAFETY_MARGIN_SQRT_MAX() external pure returns (uint); function LIQUIDATION_INCENTIVE_MIN() external pure returns (uint); function LIQUIDATION_INCENTIVE_MAX() external pure returns (uint); function LIQUIDATION_FEE_MAX() external pure returns (uint); function _initialize ( string calldata _name, string calldata _symbol, address _underlying, address _borrowable0, address _borrowable1 ) external; function _setSafetyMarginSqrt(uint newSafetyMarginSqrt) external; function _setLiquidationIncentive(uint newLiquidationIncentive) external; function _setLiquidationFee(uint newLiquidationFee) external; } // File: contracts\interfaces\IImpermaxCallee.sol pragma solidity >=0.5.0; interface IImpermaxCallee { function impermaxBorrow(address sender, address borrower, uint borrowAmount, bytes calldata data) external; function impermaxRedeem(address sender, uint redeemAmount, bytes calldata data) external; } // File: contracts\interfaces\IUniswapV2Pair.sol pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function observationLength() external view returns (uint); function observations(uint) external view returns ( uint timestamp, uint reserve0Cumulative, uint reserve1Cumulative ); function currentCumulativePrices() external view returns ( uint reserve0Cumulative, uint reserve1Cumulative, uint timestamp ); } // File: contracts\libraries\UQ112x112.sol pragma solidity =0.5.16; // a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format)) // src: https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/libraries/UQ112x112.sol // range: [0, 2**112 - 1] // resolution: 1 / 2**112 library UQ112x112 { uint224 constant Q112 = 2**112; // encode a uint112 as a UQ112x112 function encode(uint112 y) internal pure returns (uint224 z) { z = uint224(y) * Q112; // never overflows } // divide a UQ112x112 by a uint112, returning a UQ112x112 function uqdiv(uint224 x, uint112 y) internal pure returns (uint224 z) { z = x / uint224(y); } } // File: contracts\libraries\Math.sol pragma solidity =0.5.16; // a library for performing various math operations // forked from: https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/libraries/Math.sol library Math { function min(uint x, uint y) internal pure returns (uint z) { z = x < y ? x : y; } // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) function sqrt(uint y) internal pure returns (uint z) { if (y > 3) { z = y; uint x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } } else if (y != 0) { z = 1; } } } // File: contracts\Collateral.sol pragma solidity =0.5.16; contract Collateral is ICollateral, PoolToken, CStorage, CSetter { using UQ112x112 for uint224; constructor() public {} /*** Collateralization Model ***/ function getTwapPrice112x112() public returns(uint224 twapPrice112x112) { uint length = IUniswapV2Pair(underlying).observationLength(); (uint lastTimestamp, uint lastReserve0Cumulative, uint lastReserve1Cumulative) = IUniswapV2Pair(underlying).observations(length-2); (uint reserve0Cumulative, uint reserve1Cumulative, uint timestamp) = IUniswapV2Pair(underlying).currentCumulativePrices(); uint timeElapsed = timestamp - lastTimestamp; uint112 twapReserve0 = safe112((reserve0Cumulative - lastReserve0Cumulative) / timeElapsed); uint112 twapReserve1 = safe112((reserve1Cumulative - lastReserve1Cumulative) / timeElapsed); twapPrice112x112 = UQ112x112.encode(twapReserve1).uqdiv(twapReserve0); } function getPrices() public returns (uint price0, uint price1) { uint224 twapPrice112x112 = getTwapPrice112x112(); (uint112 reserve0, uint112 reserve1,) = IUniswapV2Pair(underlying).getReserves(); uint256 collateralTotalSupply = IUniswapV2Pair(underlying).totalSupply(); uint224 currentPrice112x112 = UQ112x112.encode(reserve1).uqdiv(reserve0); uint256 adjustmentSquared = uint256(twapPrice112x112).mul(2**32).div(currentPrice112x112); uint256 adjustment = Math.sqrt(adjustmentSquared.mul(2**32)); uint256 currentBorrowable0Price = uint256(collateralTotalSupply).mul(1e18).div(reserve0*2); uint256 currentBorrowable1Price = uint256(collateralTotalSupply).mul(1e18).div(reserve1*2); price0 = currentBorrowable0Price.mul(adjustment).div(2**32); price1 = currentBorrowable1Price.mul(2**32).div(adjustment); /* * Price calculation errors may happen in some edge pairs where * reserve0 / reserve1 is close to 2**112 or 1/2**112 * We're going to prevent users from using pairs at risk from the UI */ require(price0 > 100, "Impermax: PRICE_CALCULATION_ERROR"); require(price1 > 100, "Impermax: PRICE_CALCULATION_ERROR"); } // returns liquidity in collateral's underlying function _calculateLiquidity(uint amountCollateral, uint amount0, uint amount1) internal returns (uint liquidity, uint shortfall) { uint _safetyMarginSqrt = safetyMarginSqrt; (uint price0, uint price1) = getPrices(); uint a = amount0.mul(price0).div(1e18); uint b = amount1.mul(price1).div(1e18); if(a < b) (a, b) = (b, a); a = a.mul(_safetyMarginSqrt).div(1e18); b = b.mul(1e18).div(_safetyMarginSqrt); uint collateralNeeded = a.add(b).mul(liquidationPenalty()).div(1e18); if(amountCollateral >= collateralNeeded){ return (amountCollateral - collateralNeeded, 0); } else { return (0, collateralNeeded - amountCollateral); } } /*** ERC20 ***/ function _transfer(address from, address to, uint value) internal { require(tokensUnlocked(from, value), "Impermax: INSUFFICIENT_LIQUIDITY"); super._transfer(from, to, value); } function tokensUnlocked(address from, uint value) public returns (bool) { uint _balance = balanceOf[from]; if (value > _balance) return false; uint finalBalance = _balance - value; uint amountCollateral = finalBalance.mul(exchangeRate()).div(1e18); uint amount0 = IBorrowable(borrowable0).borrowBalance(from); uint amount1 = IBorrowable(borrowable1).borrowBalance(from); (, uint shortfall) = _calculateLiquidity(amountCollateral, amount0, amount1); return shortfall == 0; } /*** Collateral ***/ function accountLiquidityAmounts(address borrower, uint amount0, uint amount1) public returns (uint liquidity, uint shortfall) { if (amount0 == uint(-1)) amount0 = IBorrowable(borrowable0).borrowBalance(borrower); if (amount1 == uint(-1)) amount1 = IBorrowable(borrowable1).borrowBalance(borrower); uint amountCollateral = balanceOf[borrower].mul(exchangeRate()).div(1e18); return _calculateLiquidity(amountCollateral, amount0, amount1); } function accountLiquidity(address borrower) public returns (uint liquidity, uint shortfall) { return accountLiquidityAmounts(borrower, uint(-1), uint(-1)); } function canBorrow(address borrower, address borrowable, uint accountBorrows) public returns (bool) { address _borrowable0 = borrowable0; address _borrowable1 = borrowable1; require(borrowable == _borrowable0 || borrowable == _borrowable1, "Impermax: INVALID_BORROWABLE" ); uint amount0 = borrowable == _borrowable0 ? accountBorrows : uint(-1); uint amount1 = borrowable == _borrowable1 ? accountBorrows : uint(-1); (, uint shortfall) = accountLiquidityAmounts(borrower, amount0, amount1); return shortfall == 0; } // this function must be called from borrowable0 or borrowable1 function seize(address liquidator, address borrower, uint repayAmount) external returns (uint seizeTokens) { require(msg.sender == borrowable0 || msg.sender == borrowable1, "Impermax: UNAUTHORIZED"); (, uint shortfall) = accountLiquidity(borrower); require(shortfall > 0, "Impermax: INSUFFICIENT_SHORTFALL"); uint price; if (msg.sender == borrowable0) (price, ) = getPrices(); else (, price) = getPrices(); uint collateralEquivalent = repayAmount.mul(price).div( exchangeRate() ); seizeTokens = collateralEquivalent.mul(liquidationIncentive).div(1e18); balanceOf[borrower] = balanceOf[borrower].sub(seizeTokens, "Impermax: LIQUIDATING_TOO_MUCH"); balanceOf[liquidator] = balanceOf[liquidator].add(seizeTokens); emit Transfer(borrower, liquidator, seizeTokens); if (liquidationFee > 0) { uint seizeFee = collateralEquivalent.mul(liquidationFee).div(1e18); address reservesManager = IFactory(factory).reservesManager(); balanceOf[borrower] = balanceOf[borrower].sub(seizeFee, "Impermax: LIQUIDATING_TOO_MUCH"); balanceOf[reservesManager] = balanceOf[reservesManager].add(seizeFee); emit Transfer(borrower, reservesManager, seizeFee); } } // this low-level function should be called from another contract function flashRedeem(address redeemer, uint redeemAmount, bytes calldata data) external nonReentrant update { require(redeemAmount <= totalBalance, "Impermax: INSUFFICIENT_CASH"); // optimistically transfer funds _safeTransfer(redeemer, redeemAmount); if (data.length > 0) IImpermaxCallee(redeemer).impermaxRedeem(msg.sender, redeemAmount, data); uint redeemTokens = balanceOf[address(this)]; uint declaredRedeemTokens = redeemAmount.mul(1e18).div( exchangeRate() ).add(1); // rounded up require(redeemTokens >= declaredRedeemTokens, "Impermax: INSUFFICIENT_REDEEM_TOKENS"); _burn(address(this), redeemTokens); emit Redeem(msg.sender, redeemer, redeemAmount, redeemTokens); } } // File: contracts\interfaces\ICDeployer.sol pragma solidity >=0.5.0; interface ICDeployer { function deployCollateral(address uniswapV2Pair) external returns (address collateral); } // File: contracts\CDeployer.sol pragma solidity =0.5.16; /* * This contract is used by the Factory to deploy Collateral(s) * The bytecode would be too long to fit in the Factory */ contract CDeployer is ICDeployer { constructor () public {} function deployCollateral(address uniswapV2Pair) external returns (address collateral) { bytes memory bytecode = type(Collateral).creationCode; bytes32 salt = keccak256(abi.encodePacked(msg.sender, uniswapV2Pair)); assembly { collateral := create2(0, add(bytecode, 32), mload(bytecode), salt) } } }
{ "optimizer": { "enabled": true, "runs": 999999 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"mintAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mintTokens","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newLiquidationFee","type":"uint256"}],"name":"NewLiquidationFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newLiquidationIncentive","type":"uint256"}],"name":"NewLiquidationIncentive","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newSafetyMarginSqrt","type":"uint256"}],"name":"NewSafetyMargin","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"redeemer","type":"address"},{"indexed":false,"internalType":"uint256","name":"redeemAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"redeemTokens","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"totalBalance","type":"uint256"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"LIQUIDATION_FEE_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"LIQUIDATION_INCENTIVE_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"LIQUIDATION_INCENTIVE_MIN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SAFETY_MARGIN_SQRT_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"SAFETY_MARGIN_SQRT_MIN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_underlying","type":"address"},{"internalType":"address","name":"_borrowable0","type":"address"},{"internalType":"address","name":"_borrowable1","type":"address"}],"name":"_initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"_setFactory","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"newLiquidationFee","type":"uint256"}],"name":"_setLiquidationFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"newLiquidationIncentive","type":"uint256"}],"name":"_setLiquidationIncentive","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"newSafetyMarginSqrt","type":"uint256"}],"name":"_setSafetyMarginSqrt","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"borrower","type":"address"}],"name":"accountLiquidity","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"shortfall","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"accountLiquidityAmounts","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"shortfall","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"borrowable0","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"borrowable1","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"borrower","type":"address"},{"internalType":"address","name":"borrowable","type":"address"},{"internalType":"uint256","name":"accountBorrows","type":"uint256"}],"name":"canBorrow","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"exchangeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"redeemer","type":"address"},{"internalType":"uint256","name":"redeemAmount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"flashRedeem","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"getPrices","outputs":[{"internalType":"uint256","name":"price0","type":"uint256"},{"internalType":"uint256","name":"price1","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"getTwapPrice112x112","outputs":[{"internalType":"uint224","name":"twapPrice112x112","type":"uint224"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"liquidationFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"liquidationIncentive","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"liquidationPenalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"mintTokens","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"redeemer","type":"address"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"redeemAmount","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"safetyMarginSqrt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"liquidator","type":"address"},{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"repayAmount","type":"uint256"}],"name":"seize","outputs":[{"internalType":"uint256","name":"seizeTokens","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"sync","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"tokensUnlocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526002805460ff19908116601217909155600b805490911660011790556715f155637eba0c00600d55670e27c49886e60000600e5566470de4df820000600f5534801561004f57600080fd5b506140cb8061005f6000396000f3fe608060405234801561001057600080fd5b506004361061030a5760003560e01c80637ecebe001161019c578063bb6ff386116100ee578063d490e7e011610097578063dd62ed3e11610071578063dd62ed3e146109d2578063e22e013c14610a0d578063fff6cae914610a465761030a565b8063d490e7e014610964578063d505accf1461096c578063daf88818146109ca5761030a565b8063bd9a548b116100c8578063bd9a548b1461086a578063c45a015514610872578063c548e3c51461087a5761030a565b8063bb6ff3861461081a578063bc25cf7714610837578063bc9bd12a146103d95761030a565b8063a36a363011610150578063afc8276c1161012a578063afc8276c146107c7578063b2a02ff1146107cf578063ba9a7a56146108125761030a565b8063a36a36301461077e578063a9059cbb14610786578063ad7a672f146107bf5761030a565b806395a2251f1161018157806395a2251f1461070057806395d89b41146107335780639aac2c531461073b5761030a565b80637ecebe00146106c55780638c765e94146106f85761030a565b806333fabfd1116102605780635a0f03c6116102095780636f13cb83116101e35780636f13cb831461064b5780636f307dc31461068a57806370a08231146106925761030a565b80635a0f03c6146105935780636a627842146105df5780636e01be10146106125761030a565b80633ba0b9a91161023a5780633ba0b9a9146105665780634a5d316c1461056e5780634fd42e17146105765761030a565b806333fabfd11461054e578063356c571f146105565780633644e5151461055e5761030a565b80631ef63a79116102c25780632fa5ae1b1161029c5780632fa5ae1b146104f757806330adf81f14610528578063313ce567146105305761030a565b80631ef63a791461048f57806323b872dd146104ac57806323f5589a146104ef5761030a565b80630fb60fef116102f35780630fb60fef146103d957806318160ddd146103f357806319f3400d146103fb5761030a565b806306fdde031461030f578063095ea7b31461038c575b600080fd5b610317610a4e565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610351578181015183820152602001610339565b50505050905090810190601f16801561037e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103c5600480360360408110156103a257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610afa565b604080519115158252519081900360200190f35b6103e1610b11565b60408051918252519081900360200190f35b6103e1610b1d565b61048d6004803603606081101561041157600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101359181019060608101604082013564010000000081111561044e57600080fd5b82018360208201111561046057600080fd5b8035906020019184600183028401116401000000008311171561048257600080fd5b509092509050610b23565b005b61048d600480360360208110156104a557600080fd5b5035610e49565b6103c5600480360360608110156104c257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610f5c565b6103e1611070565b6104ff61107b565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6103e161109c565b6105386110c0565b6040805160ff9092168252519081900360200190f35b6103e16110c9565b6103e16110d5565b6103e16110db565b6103e16110e1565b61048d611130565b61048d6004803603602081101561058c57600080fd5b50356111e1565b6105c6600480360360208110156105a957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166112fb565b6040805192835260208301919091528051918290030190f35b6103e1600480360360208110156105f557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611332565b6103c56004803603604081101561062857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356115e0565b6105c66004803603606081101561066157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602081013590604001356117d3565b6104ff6119d6565b6103e1600480360360208110156106a857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166119f2565b6103e1600480360360208110156106db57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a04565b6103e1611a16565b6103e16004803603602081101561071657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a1c565b610317611c40565b6103c56004803603606081101561075157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135611cb8565b6103e1611e52565b6103c56004803603604081101561079c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611e58565b6103e1611e65565b6103e1611e6b565b6103e1600480360360608110156107e557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135611e77565b6103e1612341565b61048d6004803603602081101561083057600080fd5b5035612347565b61048d6004803603602081101561084d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16612461565b6105c66125e4565b6104ff612925565b61048d600480360360a081101561089057600080fd5b8101906020810181356401000000008111156108ab57600080fd5b8201836020820111156108bd57600080fd5b803590602001918460018302840111640100000000831117156108df57600080fd5b9193909290916020810190356401000000008111156108fd57600080fd5b82018360208201111561090f57600080fd5b8035906020019184600183028401116401000000008311171561093157600080fd5b919350915073ffffffffffffffffffffffffffffffffffffffff8135811691602081013582169160409091013516612941565b6103e1612ac7565b61048d600480360360e081101561098257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135612ad3565b6104ff612b17565b6103e1600480360360408110156109e857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516612b33565b610a15612b50565b604080517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61048d612dba565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610af25780601f10610ac757610100808354040283529160200191610af2565b820191906000526020600020905b815481529060010190602001808311610ad557829003601f168201915b505050505081565b6000610b07338484612e88565b5060015b92915050565b670de0b6b3a764000081565b60035481565b600b5460ff16610b9457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600a54831115610c2d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f496d7065726d61783a20494e53554646494349454e545f434153480000000000604482015290519081900360640190fd5b610c378484612ef7565b8015610d03576040517facb86cbb0000000000000000000000000000000000000000000000000000000081523360048201818152602483018690526060604484019081526064840185905273ffffffffffffffffffffffffffffffffffffffff88169363acb86cbb93928892889288929190608401848480828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b158015610cea57600080fd5b505af1158015610cfe573d6000803e3d6000fd5b505050505b3060009081526004602052604081205490610d546001610d48610d246110e1565b610d3c89670de0b6b3a764000063ffffffff61310316565b9063ffffffff61317d16565b9063ffffffff6131bf16565b905080821015610daf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180613fdf6024913960400191505060405180910390fd5b610db93083613233565b6040805186815260208101849052815173ffffffffffffffffffffffffffffffffffffffff89169233927f3f693fff038bb8a046aa76d9516190ac7444f7d69cf952c4cbdc086fdef2d6fc929081900390910190a35050610e186132f7565b5050600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555050565b600b5460ff16610eba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055610ef681600067011c37937e0800006133cd565b600f8190556040805182815290517f21e5451a492a87031e8324e7e1e2ba821fdec0c40972393c9f74dd38bd88a6af9181900360200190a150600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1461105b57604080518082018252601e81527f496d7065726d61783a205452414e534645525f4e4f545f414c4c4f574544000060208083019190915273ffffffffffffffffffffffffffffffffffffffff8716600090815260058252838120338252909152919091205461102991849063ffffffff6134b816565b73ffffffffffffffffffffffffffffffffffffffff851660009081526005602090815260408083203384529091529020555b611066848484613569565b5060019392505050565b600f54600e54015b90565b600b54610100900473ffffffffffffffffffffffffffffffffffffffff1681565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60025460ff1681565b67011c37937e08000081565b600d5481565b60065481565b600354600a54600091908115806110f6575080155b1561110d57670de0b6b3a764000092505050611078565b61112982610d3c83670de0b6b3a764000063ffffffff61310316565b9250505090565b60095473ffffffffffffffffffffffffffffffffffffffff16156111b557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f496d7065726d61783a20464143544f52595f414c52454144595f534554000000604482015290519081900360640190fd5b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055565b600b5460ff1661125257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905561129581670de0b6b3a7640000670e92596fd62900006133cd565b600e8190556040805182815290517f8a9bb9067f9ecb13a322b548e6df3dd1bd10a54698834dac43ed8f0e765bf94d9181900360200190a150600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b600080611329837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff806117d3565b91509150915091565b600b5460009060ff166113a657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561143f57600080fd5b505afa158015611453573d6000803e3d6000fd5b505050506040513d602081101561146957600080fd5b5051600a5490915060009061148590839063ffffffff6135e916565b90506114aa6114926110e1565b610d3c83670de0b6b3a764000063ffffffff61310316565b9250600354600014156114d8576114c9836103e863ffffffff6135e916565b92506114d860006103e861362b565b6000831161154757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f496d7065726d61783a204d494e545f414d4f554e545f5a45524f000000000000604482015290519081900360640190fd5b611551848461362b565b6040805182815260208101859052815173ffffffffffffffffffffffffffffffffffffffff87169233927f2f00e3cdd69a77be7ed215ec7b2a36784dd158f921fca79ac29deffa353fe6ee929081900390910190a350506115b06132f7565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055919050565b73ffffffffffffffffffffffffffffffffffffffff821660009081526004602052604081205480831115611618576000915050610b0b565b8281036000611641670de0b6b3a7640000610d3c6116346110e1565b859063ffffffff61310316565b90506000600b60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634d73e9ba886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156116e457600080fd5b505afa1580156116f8573d6000803e3d6000fd5b505050506040513d602081101561170e57600080fd5b5051600c54604080517f4d73e9ba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015291519394506000939190921691634d73e9ba916024808301926020929190829003018186803b15801561178957600080fd5b505afa15801561179d573d6000803e3d6000fd5b505050506040513d60208110156117b357600080fd5b5051905060006117c48484846136dc565b159a9950505050505050505050565b6000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8414156118a657600b54604080517f4d73e9ba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152915161010090930490911691634d73e9ba91602480820192602092909190829003018186803b15801561187757600080fd5b505afa15801561188b573d6000803e3d6000fd5b505050506040513d60208110156118a157600080fd5b505193505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83141561197057600c54604080517f4d73e9ba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015291519190921691634d73e9ba916024808301926020929190829003018186803b15801561194157600080fd5b505afa158015611955573d6000803e3d6000fd5b505050506040513d602081101561196b57600080fd5b505192505b60006119bb670de0b6b3a7640000610d3c6119896110e1565b73ffffffffffffffffffffffffffffffffffffffff8a166000908152600460205260409020549063ffffffff61310316565b90506119c88186866136dc565b92509250505b935093915050565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b60046020526000908152604090205481565b60076020526000908152604090205481565b600e5481565b600b5460009060ff16611a9057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905530600090815260046020526040902054611aec670de0b6b3a7640000610d3c611adf6110e1565b849063ffffffff61310316565b915060008211611b5d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496d7065726d61783a2052454445454d5f414d4f554e545f5a45524f00000000604482015290519081900360640190fd5b600a54821115611bce57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f496d7065726d61783a20494e53554646494349454e545f434153480000000000604482015290519081900360640190fd5b611bd83082613233565b611be28383612ef7565b6040805183815260208101839052815173ffffffffffffffffffffffffffffffffffffffff86169233927f3f693fff038bb8a046aa76d9516190ac7444f7d69cf952c4cbdc086fdef2d6fc929081900390910190a3506115b06132f7565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610af25780601f10610ac757610100808354040283529160200191610af2565b600b54600c5460009173ffffffffffffffffffffffffffffffffffffffff6101009091048116918116908516821480611d1c57508073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b611d8757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496d7065726d61783a20494e56414c49445f424f52524f5741424c4500000000604482015290519081900360640190fd5b60008273ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614611de2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611de4565b845b905060008273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614611e41577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611e43565b855b905060006117c48984846117d3565b600f5481565b6000610b07338484613569565b600a5481565b670e92596fd629000081565b600b54600090610100900473ffffffffffffffffffffffffffffffffffffffff16331480611ebc5750600c5473ffffffffffffffffffffffffffffffffffffffff1633145b611f2757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496d7065726d61783a20554e415554484f52495a454400000000000000000000604482015290519081900360640190fd5b6000611f32846112fb565b91505060008111611fa457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f496d7065726d61783a20494e53554646494349454e545f53484f525446414c4c604482015290519081900360640190fd5b600b54600090610100900473ffffffffffffffffffffffffffffffffffffffff16331415611fdc57611fd46125e4565b509050611fe8565b611fe46125e4565b9150505b6000612005611ff56110e1565b610d3c878563ffffffff61310316565b9050612028670de0b6b3a7640000610d3c600e548461310390919063ffffffff16565b93506120b3846040518060400160405280601e81526020017f496d7065726d61783a204c49515549444154494e475f544f4f5f4d5543480000815250600460008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546134b89092919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff80881660009081526004602052604080822093909355908916815220546120f5908563ffffffff6131bf16565b73ffffffffffffffffffffffffffffffffffffffff80891660008181526004602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3600f5415612337576000612184670de0b6b3a7640000610d3c600f548561310390919063ffffffff16565b90506000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663345ef9416040518163ffffffff1660e01b815260040160206040518083038186803b1580156121f057600080fd5b505afa158015612204573d6000803e3d6000fd5b505050506040513d602081101561221a57600080fd5b5051604080518082018252601e81527f496d7065726d61783a204c49515549444154494e475f544f4f5f4d554348000060208281019190915273ffffffffffffffffffffffffffffffffffffffff8c1660009081526004909152919091205491925061228e9190849063ffffffff6134b816565b73ffffffffffffffffffffffffffffffffffffffff808a1660009081526004602052604080822093909355908316815220546122d0908363ffffffff6131bf16565b73ffffffffffffffffffffffffffffffffffffffff80831660008181526004602090815260409182902094909455805186815290519193928c16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350505b5050509392505050565b6103e881565b600b5460ff166123b857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556123fb81670de0b6b3a76400006715f15565d2c5f0006133cd565b600d8190556040805182815290517fdff9a61839be6f6ce5ea77311cc351786a39a9f337c507ff35e7b358fd39c0439181900360200190a150600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b600b5460ff166124d257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600a54600854604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290516125b69385936125b193919273ffffffffffffffffffffffffffffffffffffffff909116916370a08231916024808301926020929190829003018186803b15801561257957600080fd5b505afa15801561258d573d6000803e3d6000fd5b505050506040513d60208110156125a357600080fd5b50519063ffffffff6135e916565b612ef7565b50600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60008060006125f1612b50565b9050600080600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561265e57600080fd5b505afa158015612672573d6000803e3d6000fd5b505050506040513d606081101561268857600080fd5b508051602091820151600854604080517f18160ddd000000000000000000000000000000000000000000000000000000008152905193965091945060009373ffffffffffffffffffffffffffffffffffffffff909116926318160ddd926004808201939291829003018186803b15801561270157600080fd5b505afa158015612715573d6000803e3d6000fd5b505050506040513d602081101561272b57600080fd5b5051905060006127688461273e856137de565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169063ffffffff61380216565b905060006127a77bffffffffffffffffffffffffffffffffffffffffffffffffffffffff80841690610d3c90891664010000000063ffffffff61310316565b905060006127c86127c38364010000000063ffffffff61310316565b613843565b905060006127fb6dffffffffffffffffffffffffffff6002890216610d3c87670de0b6b3a764000063ffffffff61310316565b9050600061282e6dffffffffffffffffffffffffffff6002890216610d3c88670de0b6b3a764000063ffffffff61310316565b9050612849640100000000610d3c848663ffffffff61310316565b9a5061286483610d3c8364010000000063ffffffff61310316565b995060648b116128bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806140036021913960400191505060405180910390fd5b60648a11612918576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806140036021913960400191505060405180910390fd5b5050505050505050509091565b60095473ffffffffffffffffffffffffffffffffffffffff1681565b60095473ffffffffffffffffffffffffffffffffffffffff1633146129c757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496d7065726d61783a20554e415554484f52495a454400000000000000000000604482015290519081900360640190fd5b612a3a87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b01819004810282018101909252898152925089915088908190840183828082843760009201919091525061389592505050565b6008805473ffffffffffffffffffffffffffffffffffffffff9485167fffffffffffffffffffffffff000000000000000000000000000000000000000091821617909155600b8054938516610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff90941693909317909255600c805491909316911617905550505050565b6715f15565d2c5f00081565b612b03878787878787877f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9613979565b612b0e878787612e88565b50505050505050565b600c5473ffffffffffffffffffffffffffffffffffffffff1681565b600560209081526000928352604080842090915290825290205481565b600080600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ebeb31db6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bbb57600080fd5b505afa158015612bcf573d6000803e3d6000fd5b505050506040513d6020811015612be557600080fd5b5051600854604080517f252c09d70000000000000000000000000000000000000000000000000000000081527ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe8401600482015290519293506000928392839273ffffffffffffffffffffffffffffffffffffffff9091169163252c09d791602480820192606092909190829003018186803b158015612c8457600080fd5b505afa158015612c98573d6000803e3d6000fd5b505050506040513d6060811015612cae57600080fd5b508051602082015160409283015160085484517f1df8c717000000000000000000000000000000000000000000000000000000008152945193975091955093506000928392839273ffffffffffffffffffffffffffffffffffffffff1691631df8c717916004808301926060929190829003018186803b158015612d3157600080fd5b505afa158015612d45573d6000803e3d6000fd5b505050506040513d6060811015612d5b57600080fd5b508051602082015160409092015190945090925090508581036000612d8a8288870381612d8457fe5b04613c1c565b90506000612d9c8388870381612d8457fe5b9050612dab8261273e836137de565b9a505050505050505050505090565b600b5460ff16612e2b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055612e5b6132f7565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260056020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600854604080518082018252601981527f7472616e7366657228616464726573732c75696e743235362900000000000000602091820152815173ffffffffffffffffffffffffffffffffffffffff86811660248301526044808301879052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251815160009560609594169382918083835b60208310612ffd57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101612fc0565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461305f576040519150601f19603f3d011682016040523d82523d6000602084013e613064565b606091505b5091509150818015613092575080511580613092575080806020019051602081101561308f57600080fd5b50515b6130fd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f496d7065726d61783a205452414e534645525f4641494c454400000000000000604482015290519081900360640190fd5b50505050565b60008261311257506000610b0b565b8282028284828161311f57fe5b0414613176576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806140766021913960400191505060405180910390fd5b9392505050565b600061317683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613c9f565b60008282018381101561317657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054613269908263ffffffff6135e916565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600460205260409020556003546132a2908263ffffffff6135e916565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b15801561336857600080fd5b505afa15801561337c573d6000803e3d6000fd5b505050506040513d602081101561339257600080fd5b5051600a81905560408051918252517f8a0df8ef054fae2c3d2d19a7b322e864870cc9fd3cb07fb9526309c596244bf49181900360200190a1565b6133d5613d1e565b8183101561344457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f496d7065726d61783a20494e56414c49445f53455454494e4700000000000000604482015290519081900360640190fd5b808311156134b357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f496d7065726d61783a20494e56414c49445f53455454494e4700000000000000604482015290519081900360640190fd5b505050565b60008184841115613561576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561352657818101518382015260200161350e565b50505050905090810190601f1680156135535780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b61357383826115e0565b6135de57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f496d7065726d61783a20494e53554646494349454e545f4c4951554944495459604482015290519081900360640190fd5b6134b3838383613e37565b600061317683836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f77008152506134b8565b60035461363e908263ffffffff6131bf16565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054613677908263ffffffff6131bf16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526004602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600d54600090819081806136ee6125e4565b90925090506000613711670de0b6b3a7640000610d3c8a8663ffffffff61310316565b90506000613731670de0b6b3a7640000610d3c8a8663ffffffff61310316565b90508082101561373d57905b613759670de0b6b3a7640000610d3c848863ffffffff61310316565b915061377785610d3c83670de0b6b3a764000063ffffffff61310316565b905060006137ae670de0b6b3a7640000610d3c613792611070565b6137a2878763ffffffff6131bf16565b9063ffffffff61310316565b9050808b106137ca578a039650600095506119ce945050505050565b600097508a900395506119ce945050505050565b6dffffffffffffffffffffffffffff166e0100000000000000000000000000000290565b60006dffffffffffffffffffffffffffff82167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff84168161383b57fe5b049392505050565b60006003821115613886575080600160028204015b818110156138805780915060028182858161386f57fe5b04018161387857fe5b049050613858565b50613890565b8115613890575060015b919050565b81516138a8906000906020850190613f50565b5080516138bc906001906020840190613f50565b50604051469080605261402482396040805191829003605201822086516020978801208383018352600184527f310000000000000000000000000000000000000000000000000000000000000093880193909352815180880191909152808201929092527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606083015260808201939093523060a0808301919091528351808303909101815260c090910190925250805192019190912060065550565b428510156139e857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496d7065726d61783a2045585049524544000000000000000000000000000000604482015290519081900360640190fd5b60065473ffffffffffffffffffffffffffffffffffffffff808a1660008181526007602090815260408083208054600180820190925582518085018a905280840196909652958e166060860152608085018d905260a085019590955260c08085018c90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff8a166101828501526101a284018990526101c28401889052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa158015613b2a573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590613ba557508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b613c1057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f496d7065726d61783a20494e56414c49445f5349474e41545552450000000000604482015290519081900360640190fd5b50505050505050505050565b60006e0100000000000000000000000000008210613c9b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496d7065726d61783a2053414645313132000000000000000000000000000000604482015290519081900360640190fd5b5090565b60008183613d08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561352657818101518382015260200161350e565b506000838581613d1457fe5b0495945050505050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f851a4406040518163ffffffff1660e01b815260040160206040518083038186803b158015613d8657600080fd5b505afa158015613d9a573d6000803e3d6000fd5b505050506040513d6020811015613db057600080fd5b505173ffffffffffffffffffffffffffffffffffffffff163314613e3557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496d7065726d61783a20554e415554484f52495a454400000000000000000000604482015290519081900360640190fd5b565b604080518082018252601b81527f496d7065726d61783a205452414e534645525f544f4f5f48494748000000000060208083019190915273ffffffffffffffffffffffffffffffffffffffff8616600090815260049091529190912054613ea591839063ffffffff6134b816565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600460205260408082209390935590841681522054613ee7908263ffffffff6131bf16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526004602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613f9157805160ff1916838001178555613fbe565b82800160010185558215613fbe579182015b82811115613fbe578251825591602001919060010190613fa3565b50613c9b926110789250905b80821115613c9b5760008155600101613fca56fe496d7065726d61783a20494e53554646494349454e545f52454445454d5f544f4b454e53496d7065726d61783a2050524943455f43414c43554c4154494f4e5f4552524f52454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a72315820d1350107bfa7145761f0a0dd1eb4e1c50f0b469e2308ae8bdb071929b994f62564736f6c63430005100032
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061030a5760003560e01c80637ecebe001161019c578063bb6ff386116100ee578063d490e7e011610097578063dd62ed3e11610071578063dd62ed3e146109d2578063e22e013c14610a0d578063fff6cae914610a465761030a565b8063d490e7e014610964578063d505accf1461096c578063daf88818146109ca5761030a565b8063bd9a548b116100c8578063bd9a548b1461086a578063c45a015514610872578063c548e3c51461087a5761030a565b8063bb6ff3861461081a578063bc25cf7714610837578063bc9bd12a146103d95761030a565b8063a36a363011610150578063afc8276c1161012a578063afc8276c146107c7578063b2a02ff1146107cf578063ba9a7a56146108125761030a565b8063a36a36301461077e578063a9059cbb14610786578063ad7a672f146107bf5761030a565b806395a2251f1161018157806395a2251f1461070057806395d89b41146107335780639aac2c531461073b5761030a565b80637ecebe00146106c55780638c765e94146106f85761030a565b806333fabfd1116102605780635a0f03c6116102095780636f13cb83116101e35780636f13cb831461064b5780636f307dc31461068a57806370a08231146106925761030a565b80635a0f03c6146105935780636a627842146105df5780636e01be10146106125761030a565b80633ba0b9a91161023a5780633ba0b9a9146105665780634a5d316c1461056e5780634fd42e17146105765761030a565b806333fabfd11461054e578063356c571f146105565780633644e5151461055e5761030a565b80631ef63a79116102c25780632fa5ae1b1161029c5780632fa5ae1b146104f757806330adf81f14610528578063313ce567146105305761030a565b80631ef63a791461048f57806323b872dd146104ac57806323f5589a146104ef5761030a565b80630fb60fef116102f35780630fb60fef146103d957806318160ddd146103f357806319f3400d146103fb5761030a565b806306fdde031461030f578063095ea7b31461038c575b600080fd5b610317610a4e565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610351578181015183820152602001610339565b50505050905090810190601f16801561037e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103c5600480360360408110156103a257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610afa565b604080519115158252519081900360200190f35b6103e1610b11565b60408051918252519081900360200190f35b6103e1610b1d565b61048d6004803603606081101561041157600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101359181019060608101604082013564010000000081111561044e57600080fd5b82018360208201111561046057600080fd5b8035906020019184600183028401116401000000008311171561048257600080fd5b509092509050610b23565b005b61048d600480360360208110156104a557600080fd5b5035610e49565b6103c5600480360360608110156104c257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610f5c565b6103e1611070565b6104ff61107b565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6103e161109c565b6105386110c0565b6040805160ff9092168252519081900360200190f35b6103e16110c9565b6103e16110d5565b6103e16110db565b6103e16110e1565b61048d611130565b61048d6004803603602081101561058c57600080fd5b50356111e1565b6105c6600480360360208110156105a957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166112fb565b6040805192835260208301919091528051918290030190f35b6103e1600480360360208110156105f557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611332565b6103c56004803603604081101561062857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356115e0565b6105c66004803603606081101561066157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602081013590604001356117d3565b6104ff6119d6565b6103e1600480360360208110156106a857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166119f2565b6103e1600480360360208110156106db57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a04565b6103e1611a16565b6103e16004803603602081101561071657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611a1c565b610317611c40565b6103c56004803603606081101561075157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135611cb8565b6103e1611e52565b6103c56004803603604081101561079c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611e58565b6103e1611e65565b6103e1611e6b565b6103e1600480360360608110156107e557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135611e77565b6103e1612341565b61048d6004803603602081101561083057600080fd5b5035612347565b61048d6004803603602081101561084d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16612461565b6105c66125e4565b6104ff612925565b61048d600480360360a081101561089057600080fd5b8101906020810181356401000000008111156108ab57600080fd5b8201836020820111156108bd57600080fd5b803590602001918460018302840111640100000000831117156108df57600080fd5b9193909290916020810190356401000000008111156108fd57600080fd5b82018360208201111561090f57600080fd5b8035906020019184600183028401116401000000008311171561093157600080fd5b919350915073ffffffffffffffffffffffffffffffffffffffff8135811691602081013582169160409091013516612941565b6103e1612ac7565b61048d600480360360e081101561098257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135612ad3565b6104ff612b17565b6103e1600480360360408110156109e857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516612b33565b610a15612b50565b604080517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61048d612dba565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610af25780601f10610ac757610100808354040283529160200191610af2565b820191906000526020600020905b815481529060010190602001808311610ad557829003601f168201915b505050505081565b6000610b07338484612e88565b5060015b92915050565b670de0b6b3a764000081565b60035481565b600b5460ff16610b9457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600a54831115610c2d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f496d7065726d61783a20494e53554646494349454e545f434153480000000000604482015290519081900360640190fd5b610c378484612ef7565b8015610d03576040517facb86cbb0000000000000000000000000000000000000000000000000000000081523360048201818152602483018690526060604484019081526064840185905273ffffffffffffffffffffffffffffffffffffffff88169363acb86cbb93928892889288929190608401848480828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b158015610cea57600080fd5b505af1158015610cfe573d6000803e3d6000fd5b505050505b3060009081526004602052604081205490610d546001610d48610d246110e1565b610d3c89670de0b6b3a764000063ffffffff61310316565b9063ffffffff61317d16565b9063ffffffff6131bf16565b905080821015610daf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180613fdf6024913960400191505060405180910390fd5b610db93083613233565b6040805186815260208101849052815173ffffffffffffffffffffffffffffffffffffffff89169233927f3f693fff038bb8a046aa76d9516190ac7444f7d69cf952c4cbdc086fdef2d6fc929081900390910190a35050610e186132f7565b5050600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555050565b600b5460ff16610eba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055610ef681600067011c37937e0800006133cd565b600f8190556040805182815290517f21e5451a492a87031e8324e7e1e2ba821fdec0c40972393c9f74dd38bd88a6af9181900360200190a150600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1461105b57604080518082018252601e81527f496d7065726d61783a205452414e534645525f4e4f545f414c4c4f574544000060208083019190915273ffffffffffffffffffffffffffffffffffffffff8716600090815260058252838120338252909152919091205461102991849063ffffffff6134b816565b73ffffffffffffffffffffffffffffffffffffffff851660009081526005602090815260408083203384529091529020555b611066848484613569565b5060019392505050565b600f54600e54015b90565b600b54610100900473ffffffffffffffffffffffffffffffffffffffff1681565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60025460ff1681565b67011c37937e08000081565b600d5481565b60065481565b600354600a54600091908115806110f6575080155b1561110d57670de0b6b3a764000092505050611078565b61112982610d3c83670de0b6b3a764000063ffffffff61310316565b9250505090565b60095473ffffffffffffffffffffffffffffffffffffffff16156111b557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f496d7065726d61783a20464143544f52595f414c52454144595f534554000000604482015290519081900360640190fd5b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055565b600b5460ff1661125257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905561129581670de0b6b3a7640000670e92596fd62900006133cd565b600e8190556040805182815290517f8a9bb9067f9ecb13a322b548e6df3dd1bd10a54698834dac43ed8f0e765bf94d9181900360200190a150600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b600080611329837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff806117d3565b91509150915091565b600b5460009060ff166113a657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561143f57600080fd5b505afa158015611453573d6000803e3d6000fd5b505050506040513d602081101561146957600080fd5b5051600a5490915060009061148590839063ffffffff6135e916565b90506114aa6114926110e1565b610d3c83670de0b6b3a764000063ffffffff61310316565b9250600354600014156114d8576114c9836103e863ffffffff6135e916565b92506114d860006103e861362b565b6000831161154757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f496d7065726d61783a204d494e545f414d4f554e545f5a45524f000000000000604482015290519081900360640190fd5b611551848461362b565b6040805182815260208101859052815173ffffffffffffffffffffffffffffffffffffffff87169233927f2f00e3cdd69a77be7ed215ec7b2a36784dd158f921fca79ac29deffa353fe6ee929081900390910190a350506115b06132f7565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055919050565b73ffffffffffffffffffffffffffffffffffffffff821660009081526004602052604081205480831115611618576000915050610b0b565b8281036000611641670de0b6b3a7640000610d3c6116346110e1565b859063ffffffff61310316565b90506000600b60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634d73e9ba886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156116e457600080fd5b505afa1580156116f8573d6000803e3d6000fd5b505050506040513d602081101561170e57600080fd5b5051600c54604080517f4d73e9ba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015291519394506000939190921691634d73e9ba916024808301926020929190829003018186803b15801561178957600080fd5b505afa15801561179d573d6000803e3d6000fd5b505050506040513d60208110156117b357600080fd5b5051905060006117c48484846136dc565b159a9950505050505050505050565b6000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8414156118a657600b54604080517f4d73e9ba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152915161010090930490911691634d73e9ba91602480820192602092909190829003018186803b15801561187757600080fd5b505afa15801561188b573d6000803e3d6000fd5b505050506040513d60208110156118a157600080fd5b505193505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83141561197057600c54604080517f4d73e9ba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015291519190921691634d73e9ba916024808301926020929190829003018186803b15801561194157600080fd5b505afa158015611955573d6000803e3d6000fd5b505050506040513d602081101561196b57600080fd5b505192505b60006119bb670de0b6b3a7640000610d3c6119896110e1565b73ffffffffffffffffffffffffffffffffffffffff8a166000908152600460205260409020549063ffffffff61310316565b90506119c88186866136dc565b92509250505b935093915050565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b60046020526000908152604090205481565b60076020526000908152604090205481565b600e5481565b600b5460009060ff16611a9057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905530600090815260046020526040902054611aec670de0b6b3a7640000610d3c611adf6110e1565b849063ffffffff61310316565b915060008211611b5d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496d7065726d61783a2052454445454d5f414d4f554e545f5a45524f00000000604482015290519081900360640190fd5b600a54821115611bce57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f496d7065726d61783a20494e53554646494349454e545f434153480000000000604482015290519081900360640190fd5b611bd83082613233565b611be28383612ef7565b6040805183815260208101839052815173ffffffffffffffffffffffffffffffffffffffff86169233927f3f693fff038bb8a046aa76d9516190ac7444f7d69cf952c4cbdc086fdef2d6fc929081900390910190a3506115b06132f7565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610af25780601f10610ac757610100808354040283529160200191610af2565b600b54600c5460009173ffffffffffffffffffffffffffffffffffffffff6101009091048116918116908516821480611d1c57508073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b611d8757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496d7065726d61783a20494e56414c49445f424f52524f5741424c4500000000604482015290519081900360640190fd5b60008273ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614611de2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611de4565b845b905060008273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614611e41577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611e43565b855b905060006117c48984846117d3565b600f5481565b6000610b07338484613569565b600a5481565b670e92596fd629000081565b600b54600090610100900473ffffffffffffffffffffffffffffffffffffffff16331480611ebc5750600c5473ffffffffffffffffffffffffffffffffffffffff1633145b611f2757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496d7065726d61783a20554e415554484f52495a454400000000000000000000604482015290519081900360640190fd5b6000611f32846112fb565b91505060008111611fa457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f496d7065726d61783a20494e53554646494349454e545f53484f525446414c4c604482015290519081900360640190fd5b600b54600090610100900473ffffffffffffffffffffffffffffffffffffffff16331415611fdc57611fd46125e4565b509050611fe8565b611fe46125e4565b9150505b6000612005611ff56110e1565b610d3c878563ffffffff61310316565b9050612028670de0b6b3a7640000610d3c600e548461310390919063ffffffff16565b93506120b3846040518060400160405280601e81526020017f496d7065726d61783a204c49515549444154494e475f544f4f5f4d5543480000815250600460008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546134b89092919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff80881660009081526004602052604080822093909355908916815220546120f5908563ffffffff6131bf16565b73ffffffffffffffffffffffffffffffffffffffff80891660008181526004602090815260409182902094909455805188815290519193928a16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3600f5415612337576000612184670de0b6b3a7640000610d3c600f548561310390919063ffffffff16565b90506000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663345ef9416040518163ffffffff1660e01b815260040160206040518083038186803b1580156121f057600080fd5b505afa158015612204573d6000803e3d6000fd5b505050506040513d602081101561221a57600080fd5b5051604080518082018252601e81527f496d7065726d61783a204c49515549444154494e475f544f4f5f4d554348000060208281019190915273ffffffffffffffffffffffffffffffffffffffff8c1660009081526004909152919091205491925061228e9190849063ffffffff6134b816565b73ffffffffffffffffffffffffffffffffffffffff808a1660009081526004602052604080822093909355908316815220546122d0908363ffffffff6131bf16565b73ffffffffffffffffffffffffffffffffffffffff80831660008181526004602090815260409182902094909455805186815290519193928c16927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350505b5050509392505050565b6103e881565b600b5460ff166123b857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556123fb81670de0b6b3a76400006715f15565d2c5f0006133cd565b600d8190556040805182815290517fdff9a61839be6f6ce5ea77311cc351786a39a9f337c507ff35e7b358fd39c0439181900360200190a150600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b600b5460ff166124d257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600a54600854604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290516125b69385936125b193919273ffffffffffffffffffffffffffffffffffffffff909116916370a08231916024808301926020929190829003018186803b15801561257957600080fd5b505afa15801561258d573d6000803e3d6000fd5b505050506040513d60208110156125a357600080fd5b50519063ffffffff6135e916565b612ef7565b50600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60008060006125f1612b50565b9050600080600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561265e57600080fd5b505afa158015612672573d6000803e3d6000fd5b505050506040513d606081101561268857600080fd5b508051602091820151600854604080517f18160ddd000000000000000000000000000000000000000000000000000000008152905193965091945060009373ffffffffffffffffffffffffffffffffffffffff909116926318160ddd926004808201939291829003018186803b15801561270157600080fd5b505afa158015612715573d6000803e3d6000fd5b505050506040513d602081101561272b57600080fd5b5051905060006127688461273e856137de565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169063ffffffff61380216565b905060006127a77bffffffffffffffffffffffffffffffffffffffffffffffffffffffff80841690610d3c90891664010000000063ffffffff61310316565b905060006127c86127c38364010000000063ffffffff61310316565b613843565b905060006127fb6dffffffffffffffffffffffffffff6002890216610d3c87670de0b6b3a764000063ffffffff61310316565b9050600061282e6dffffffffffffffffffffffffffff6002890216610d3c88670de0b6b3a764000063ffffffff61310316565b9050612849640100000000610d3c848663ffffffff61310316565b9a5061286483610d3c8364010000000063ffffffff61310316565b995060648b116128bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806140036021913960400191505060405180910390fd5b60648a11612918576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806140036021913960400191505060405180910390fd5b5050505050505050509091565b60095473ffffffffffffffffffffffffffffffffffffffff1681565b60095473ffffffffffffffffffffffffffffffffffffffff1633146129c757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496d7065726d61783a20554e415554484f52495a454400000000000000000000604482015290519081900360640190fd5b612a3a87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b01819004810282018101909252898152925089915088908190840183828082843760009201919091525061389592505050565b6008805473ffffffffffffffffffffffffffffffffffffffff9485167fffffffffffffffffffffffff000000000000000000000000000000000000000091821617909155600b8054938516610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff90941693909317909255600c805491909316911617905550505050565b6715f15565d2c5f00081565b612b03878787878787877f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9613979565b612b0e878787612e88565b50505050505050565b600c5473ffffffffffffffffffffffffffffffffffffffff1681565b600560209081526000928352604080842090915290825290205481565b600080600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ebeb31db6040518163ffffffff1660e01b815260040160206040518083038186803b158015612bbb57600080fd5b505afa158015612bcf573d6000803e3d6000fd5b505050506040513d6020811015612be557600080fd5b5051600854604080517f252c09d70000000000000000000000000000000000000000000000000000000081527ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe8401600482015290519293506000928392839273ffffffffffffffffffffffffffffffffffffffff9091169163252c09d791602480820192606092909190829003018186803b158015612c8457600080fd5b505afa158015612c98573d6000803e3d6000fd5b505050506040513d6060811015612cae57600080fd5b508051602082015160409283015160085484517f1df8c717000000000000000000000000000000000000000000000000000000008152945193975091955093506000928392839273ffffffffffffffffffffffffffffffffffffffff1691631df8c717916004808301926060929190829003018186803b158015612d3157600080fd5b505afa158015612d45573d6000803e3d6000fd5b505050506040513d6060811015612d5b57600080fd5b508051602082015160409092015190945090925090508581036000612d8a8288870381612d8457fe5b04613c1c565b90506000612d9c8388870381612d8457fe5b9050612dab8261273e836137de565b9a505050505050505050505090565b600b5460ff16612e2b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055612e5b6132f7565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260056020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600854604080518082018252601981527f7472616e7366657228616464726573732c75696e743235362900000000000000602091820152815173ffffffffffffffffffffffffffffffffffffffff86811660248301526044808301879052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251815160009560609594169382918083835b60208310612ffd57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101612fc0565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461305f576040519150601f19603f3d011682016040523d82523d6000602084013e613064565b606091505b5091509150818015613092575080511580613092575080806020019051602081101561308f57600080fd5b50515b6130fd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f496d7065726d61783a205452414e534645525f4641494c454400000000000000604482015290519081900360640190fd5b50505050565b60008261311257506000610b0b565b8282028284828161311f57fe5b0414613176576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806140766021913960400191505060405180910390fd5b9392505050565b600061317683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613c9f565b60008282018381101561317657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054613269908263ffffffff6135e916565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600460205260409020556003546132a2908263ffffffff6135e916565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b15801561336857600080fd5b505afa15801561337c573d6000803e3d6000fd5b505050506040513d602081101561339257600080fd5b5051600a81905560408051918252517f8a0df8ef054fae2c3d2d19a7b322e864870cc9fd3cb07fb9526309c596244bf49181900360200190a1565b6133d5613d1e565b8183101561344457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f496d7065726d61783a20494e56414c49445f53455454494e4700000000000000604482015290519081900360640190fd5b808311156134b357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f496d7065726d61783a20494e56414c49445f53455454494e4700000000000000604482015290519081900360640190fd5b505050565b60008184841115613561576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561352657818101518382015260200161350e565b50505050905090810190601f1680156135535780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b61357383826115e0565b6135de57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f496d7065726d61783a20494e53554646494349454e545f4c4951554944495459604482015290519081900360640190fd5b6134b3838383613e37565b600061317683836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f77008152506134b8565b60035461363e908263ffffffff6131bf16565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054613677908263ffffffff6131bf16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526004602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600d54600090819081806136ee6125e4565b90925090506000613711670de0b6b3a7640000610d3c8a8663ffffffff61310316565b90506000613731670de0b6b3a7640000610d3c8a8663ffffffff61310316565b90508082101561373d57905b613759670de0b6b3a7640000610d3c848863ffffffff61310316565b915061377785610d3c83670de0b6b3a764000063ffffffff61310316565b905060006137ae670de0b6b3a7640000610d3c613792611070565b6137a2878763ffffffff6131bf16565b9063ffffffff61310316565b9050808b106137ca578a039650600095506119ce945050505050565b600097508a900395506119ce945050505050565b6dffffffffffffffffffffffffffff166e0100000000000000000000000000000290565b60006dffffffffffffffffffffffffffff82167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff84168161383b57fe5b049392505050565b60006003821115613886575080600160028204015b818110156138805780915060028182858161386f57fe5b04018161387857fe5b049050613858565b50613890565b8115613890575060015b919050565b81516138a8906000906020850190613f50565b5080516138bc906001906020840190613f50565b50604051469080605261402482396040805191829003605201822086516020978801208383018352600184527f310000000000000000000000000000000000000000000000000000000000000093880193909352815180880191909152808201929092527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606083015260808201939093523060a0808301919091528351808303909101815260c090910190925250805192019190912060065550565b428510156139e857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496d7065726d61783a2045585049524544000000000000000000000000000000604482015290519081900360640190fd5b60065473ffffffffffffffffffffffffffffffffffffffff808a1660008181526007602090815260408083208054600180820190925582518085018a905280840196909652958e166060860152608085018d905260a085019590955260c08085018c90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff8a166101828501526101a284018990526101c28401889052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa158015613b2a573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590613ba557508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b613c1057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f496d7065726d61783a20494e56414c49445f5349474e41545552450000000000604482015290519081900360640190fd5b50505050505050505050565b60006e0100000000000000000000000000008210613c9b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496d7065726d61783a2053414645313132000000000000000000000000000000604482015290519081900360640190fd5b5090565b60008183613d08576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561352657818101518382015260200161350e565b506000838581613d1457fe5b0495945050505050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f851a4406040518163ffffffff1660e01b815260040160206040518083038186803b158015613d8657600080fd5b505afa158015613d9a573d6000803e3d6000fd5b505050506040513d6020811015613db057600080fd5b505173ffffffffffffffffffffffffffffffffffffffff163314613e3557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496d7065726d61783a20554e415554484f52495a454400000000000000000000604482015290519081900360640190fd5b565b604080518082018252601b81527f496d7065726d61783a205452414e534645525f544f4f5f48494748000000000060208083019190915273ffffffffffffffffffffffffffffffffffffffff8616600090815260049091529190912054613ea591839063ffffffff6134b816565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600460205260408082209390935590841681522054613ee7908263ffffffff6131bf16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526004602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613f9157805160ff1916838001178555613fbe565b82800160010185558215613fbe579182015b82811115613fbe578251825591602001919060010190613fa3565b50613c9b926110789250905b80821115613c9b5760008155600101613fca56fe496d7065726d61783a20494e53554646494349454e545f52454445454d5f544f4b454e53496d7065726d61783a2050524943455f43414c43554c4154494f4e5f4552524f52454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a72315820d1350107bfa7145761f0a0dd1eb4e1c50f0b469e2308ae8bdb071929b994f62564736f6c63430005100032
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.