Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 14 from a total of 14 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer Ownersh... | 20269238 | 49 days ago | IN | 0 ETH | 0.00011147 | ||||
Init Pool | 20269229 | 49 days ago | IN | 0 ETH | 0.00189187 | ||||
Init Pool | 20269215 | 49 days ago | IN | 0 ETH | 0.00189507 | ||||
Init Pool | 20269213 | 49 days ago | IN | 0 ETH | 0.00179664 | ||||
Init Pool | 20269210 | 49 days ago | IN | 0 ETH | 0.0018833 | ||||
Init Pool | 20269208 | 49 days ago | IN | 0 ETH | 0.00190471 | ||||
Init Pool | 20269206 | 49 days ago | IN | 0 ETH | 0.00190185 | ||||
Init Pool | 20269204 | 49 days ago | IN | 0 ETH | 0.00192168 | ||||
Init Pool | 20269202 | 49 days ago | IN | 0 ETH | 0.00240201 | ||||
Init Pool | 20269200 | 49 days ago | IN | 0 ETH | 0.00225114 | ||||
Init Pool | 20269199 | 49 days ago | IN | 0 ETH | 0.00187359 | ||||
Init Pool | 20269197 | 49 days ago | IN | 0 ETH | 0.00188493 | ||||
Init Pool | 20269192 | 49 days ago | IN | 0 ETH | 0.0023168 | ||||
0x60806040 | 20269104 | 49 days ago | IN | 0 ETH | 0.01025789 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
CurveRegistryCache
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "../libraries/CurvePoolUtils.sol"; import "../libraries/ArrayExtensions.sol"; import "../interfaces/ICurveRegistryCache.sol"; import "../interfaces/vendor/ICurveMetaRegistry.sol"; import "../interfaces/vendor/ICurvePoolV0.sol"; import "../interfaces/vendor/ICurvePoolV1.sol"; contract CurveRegistryCache is ICurveRegistryCache, Ownable { using ArrayExtensions for address[]; address internal constant _ETH = address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE); address internal constant _WETH = address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2); ICurveMetaRegistry public constant CURVE_REGISTRY = ICurveMetaRegistry(0xF98B45FA17DE75FB1aD0e7aFD971b0ca00e379fC); IBooster public constant BOOSTER = IBooster(0xF403C135812408BFbE8713b5A23a04b3D48AAE31); modifier onlyInitialized(address pool) { require(_isRegistered[pool], "CurveRegistryCache: pool not initialized"); _; } mapping(address => bool) internal _isRegistered; mapping(address => address) internal _lpToken; mapping(address => mapping(address => bool)) internal _hasCoinDirectly; mapping(address => mapping(address => bool)) internal _hasCoinAnywhere; mapping(address => address) internal _basePool; mapping(address => mapping(address => int128)) internal _coinIndex; mapping(address => uint256) internal _nCoins; mapping(address => address[]) internal _coins; mapping(address => uint256[]) internal _decimals; mapping(address => address) internal _poolFromLpToken; mapping(address => CurvePoolUtils.AssetType) internal _assetType; mapping(address => uint256) internal _interfaceVersion; /// Information needed for staking Curve LP tokens on Convex mapping(address => uint256) internal _convexPid; mapping(address => address) internal _convexRewardPool; // curve pool => CRV rewards pool (convex) function initPool(address pool_) external override { _initPool(pool_, false, 0); } function initPool(address pool_, uint256 pid_) external override { _initPool(pool_, true, pid_); } function initPool(address pool_, Types.PoolInfo memory poolInfo_) external override onlyOwner { _initUnregisteredPool(pool_, false, 0, poolInfo_); } function initPool( address pool_, uint256 pid_, Types.PoolInfo memory poolInfo_ ) external override onlyOwner { _initUnregisteredPool(pool_, true, pid_, poolInfo_); } function _initUnregisteredPool( address pool_, bool setPid_, uint256 pid_, Types.PoolInfo memory poolInfo_ ) internal { if (_isRegistered[pool_]) return; _initPool(pool_, setPid_, pid_, poolInfo_); } function _initPool(address pool_, bool setPid_, uint256 pid_) internal { if (_isRegistered[pool_]) return; require(_isCurvePool(pool_), "CurveRegistryCache: invalid curve pool"); Types.PoolInfo memory poolInfo_ = Types.PoolInfo({ lpToken: CURVE_REGISTRY.get_lp_token(pool_), basePool: CURVE_REGISTRY.get_base_pool(pool_), assetType: CURVE_REGISTRY.get_pool_asset_type(pool_) }); _initPool(pool_, setPid_, pid_, poolInfo_); } function _initPool( address pool_, bool setPid_, uint256 pid_, Types.PoolInfo memory poolInfo_ ) internal { address curveLpToken_ = poolInfo_.lpToken; address basePool_ = poolInfo_.basePool; _isRegistered[pool_] = true; _lpToken[pool_] = curveLpToken_; if (setPid_) { _setConvexPid(pool_, curveLpToken_, pid_); } else { pid_ = _setConvexPid(pool_, curveLpToken_); } _poolFromLpToken[curveLpToken_] = pool_; _basePool[pool_] = basePool_; if (basePool_ != address(0)) { _initPool(basePool_, false, 0); address[] memory basePoolCoins_ = _coins[basePool_]; for (uint256 i; i < basePoolCoins_.length; i++) { address coin_ = basePoolCoins_[i]; _hasCoinAnywhere[pool_][coin_] = true; } } _assetType[pool_] = CurvePoolUtils.AssetType(poolInfo_.assetType); uint256 interfaceVersion_ = _getInterfaceVersion(pool_); address[] memory coins_ = _getCoins(pool_, interfaceVersion_); for (uint256 i; i < coins_.length; i++) { address coin_ = coins_[i]; require(coin_ != address(0), "CurveRegistryCache: invalid coin"); _hasCoinDirectly[pool_][coin_] = true; _hasCoinAnywhere[pool_][coin_] = true; _coinIndex[pool_][coin_] = int128(uint128(i)); if (coin_ == _ETH) { coin_ = _WETH; coins_[i] = coin_; _hasCoinDirectly[pool_][coin_] = true; _hasCoinAnywhere[pool_][coin_] = true; _coinIndex[pool_][coin_] = int128(uint128(i)); } _decimals[pool_].push(IERC20Metadata(coin_).decimals()); } _nCoins[pool_] = coins_.length; _coins[pool_] = coins_; _interfaceVersion[pool_] = interfaceVersion_; emit PoolInitialized(pool_, pid_); } function _setConvexPid(address pool_, address lpToken_) internal returns (uint256 pid_) { uint256 length = BOOSTER.poolLength(); address rewardPool; for (uint256 i; i < length; i++) { (address curveToken, , , address rewardPool_, , bool _isShutdown) = BOOSTER.poolInfo(i); if (lpToken_ != curveToken || _isShutdown) continue; rewardPool = rewardPool_; pid_ = i; _convexPid[pool_] = i; break; } /// Only Curve pools that have a valid Convex PID can be added to the cache require(rewardPool != address(0), "no convex pid found"); _convexRewardPool[pool_] = rewardPool; } function _setConvexPid(address pool_, address lpToken_, uint256 pid_) internal { (address curveToken, , , address rewardPool_, , bool _isShutdown) = BOOSTER.poolInfo(pid_); require(lpToken_ == curveToken, "invalid lp token for curve pool"); require(!_isShutdown, "convex pool is shut down"); require(rewardPool_ != address(0), "no convex pid found"); _convexRewardPool[pool_] = rewardPool_; _convexPid[pool_] = pid_; } function isRegistered(address pool_) external view override returns (bool) { return _isRegistered[pool_]; } function lpToken( address pool_ ) external view override onlyInitialized(pool_) returns (address) { return _lpToken[pool_]; } function assetType( address pool_ ) external view override onlyInitialized(pool_) returns (CurvePoolUtils.AssetType) { return _assetType[pool_]; } function hasCoinDirectly( address pool_, address coin_ ) external view override onlyInitialized(pool_) returns (bool) { return _hasCoinDirectly[pool_][coin_]; } function hasCoinAnywhere( address pool_, address coin_ ) external view override onlyInitialized(pool_) returns (bool) { return _hasCoinAnywhere[pool_][coin_]; } function basePool( address pool_ ) external view override onlyInitialized(pool_) returns (address) { return _basePool[pool_]; } function coinIndex( address pool_, address coin_ ) external view override onlyInitialized(pool_) returns (int128) { return _coinIndex[pool_][coin_]; } function nCoins(address pool_) external view override onlyInitialized(pool_) returns (uint256) { return _nCoins[pool_]; } function getAllUnderlyingCoins(address pool) public view returns (address[] memory) { address base = _basePool[pool]; if (base == address(0)) return _coins[pool]; address[] memory result = new address[](_nCoins[pool] - 1); for ((uint256 i, uint256 j) = (0, 0); i < _nCoins[pool]; i++) { address coin = _coins[pool][i]; if (_poolFromLpToken[coin] != base) { result[j++] = coin; } } return result.concat(getAllUnderlyingCoins(base)); } function coinIndices( address pool_, address from_, address to_ ) external view override onlyInitialized(pool_) returns (int128, int128, bool) { return ( _coinIndex[pool_][from_], _coinIndex[pool_][to_], _hasCoinDirectly[pool_][from_] && _hasCoinDirectly[pool_][to_] ); } function decimals( address pool_ ) external view override onlyInitialized(pool_) returns (uint256[] memory) { return _decimals[pool_]; } /// @notice Returns the Curve interface version for a given pool /// @dev Version 0 uses `int128` for `coins` and `balances`, and `int128` for `get_dy` /// Version 1 uses `uint256` for `coins` and `balances`, and `int128` for `get_dy` /// Version 2 uses `uint256` for `coins` and `balances`, and `uint256` for `get_dy` /// They correspond with which interface the pool implements: ICurvePoolV0, ICurvePoolV1, ICurvePoolV2 function interfaceVersion( address pool_ ) external view override onlyInitialized(pool_) returns (uint256) { return _interfaceVersion[pool_]; } function poolFromLpToken(address lpToken_) external view override returns (address) { return _poolFromLpToken[lpToken_]; } function coins( address pool_ ) external view override onlyInitialized(pool_) returns (address[] memory) { return _coins[pool_]; } function getPid(address pool_) external view override onlyInitialized(pool_) returns (uint256) { require(_convexRewardPool[pool_] != address(0), "pid not found"); return _convexPid[pool_]; } function getRewardPool( address pool_ ) external view override onlyInitialized(pool_) returns (address) { return _convexRewardPool[pool_]; } function isShutdownPid(uint256 pid_) external view override returns (bool) { (, , , , , bool _isShutdown) = BOOSTER.poolInfo(pid_); return _isShutdown; } function _isCurvePool(address pool_) internal view returns (bool) { try CURVE_REGISTRY.is_registered(pool_) returns (bool registered_) { return registered_; } catch { return false; } } function _getCoins( address pool_, uint256 interfaceVersion_ ) internal view returns (address[] memory) { uint256 count_; address[] memory coins_ = new address[](8); for (uint256 i; i < 8; i++) { if (interfaceVersion_ == 0) { try ICurvePoolV0(pool_).coins(int128(int256(i))) returns (address coin) { coins_[i] = coin; count_++; } catch { break; } } else { try ICurvePoolV1(pool_).coins(i) returns (address coin) { coins_[i] = coin; count_++; } catch { break; } } } return coins_.trim(count_); } function _getInterfaceVersion(address pool_) internal view returns (uint256) { if (_assetType[pool_] == CurvePoolUtils.AssetType.CRYPTO) return 2; try ICurvePoolV1(pool_).balances(uint256(0)) returns (uint256) { return 1; } catch { return 0; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; import "../interfaces/vendor/ICurvePoolV2.sol"; import "../interfaces/vendor/ICurvePoolV1.sol"; import "./ScaledMath.sol"; library CurvePoolUtils { using ScaledMath for uint256; error NotWithinThreshold(address pool, uint256 assetA, uint256 assetB); /// @dev by default, allow for 30 bps deviation regardless of pool fees uint256 internal constant _DEFAULT_IMBALANCE_BUFFER = 30e14; /// @dev Curve scales the `fee` by 1e10 uint8 internal constant _CURVE_POOL_FEE_DECIMALS = 10; /// @dev allow imbalance to be buffer + 3x the fee, e.g. if fee is 3.6 bps and buffer is 30 bps, allow 40.8 bps uint256 internal constant _FEE_IMBALANCE_MULTIPLIER = 3; enum AssetType { USD, ETH, BTC, OTHER, CRYPTO } struct PoolMeta { address pool; uint256 numberOfCoins; AssetType assetType; uint256[] decimals; uint256[] prices; uint256[] imbalanceBuffers; } function ensurePoolBalanced(PoolMeta memory poolMeta) internal view { uint256 poolFee = ICurvePoolV1(poolMeta.pool).fee().convertScale( _CURVE_POOL_FEE_DECIMALS, 18 ); for (uint256 i = 0; i < poolMeta.numberOfCoins - 1; i++) { uint256 fromDecimals = poolMeta.decimals[i]; uint256 fromBalance = 10 ** fromDecimals; uint256 fromPrice = poolMeta.prices[i]; for (uint256 j = i + 1; j < poolMeta.numberOfCoins; j++) { uint256 toDecimals = poolMeta.decimals[j]; uint256 toPrice = poolMeta.prices[j]; uint256 toExpectedUnscaled = (fromBalance * fromPrice) / toPrice; uint256 toExpected = toExpectedUnscaled.convertScale( uint8(fromDecimals), uint8(toDecimals) ); uint256 toActual; if (poolMeta.assetType == AssetType.CRYPTO) { // Handling crypto pools toActual = ICurvePoolV2(poolMeta.pool).get_dy(i, j, fromBalance); } else { // Handling other pools toActual = ICurvePoolV1(poolMeta.pool).get_dy( int128(uint128(i)), int128(uint128(j)), fromBalance ); } uint256 _maxImbalanceBuffer = poolMeta.imbalanceBuffers[i].max( poolMeta.imbalanceBuffers[j] ); if (!_isWithinThreshold(toExpected, toActual, poolFee, _maxImbalanceBuffer)) revert NotWithinThreshold(poolMeta.pool, i, j); } } } function _isWithinThreshold( uint256 a, uint256 b, uint256 poolFee, uint256 imbalanceBuffer ) internal pure returns (bool) { if (imbalanceBuffer == 0) imbalanceBuffer = _DEFAULT_IMBALANCE_BUFFER; uint256 imbalanceTreshold = imbalanceBuffer + poolFee * _FEE_IMBALANCE_MULTIPLIER; if (a > b) return (a - b).divDown(a) <= imbalanceTreshold; return (b - a).divDown(b) <= imbalanceTreshold; } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; library ArrayExtensions { function copy(uint256[] memory array) internal pure returns (uint256[] memory) { uint256[] memory copy_ = new uint256[](array.length); for (uint256 i = 0; i < array.length; i++) { copy_[i] = array[i]; } return copy_; } function concat( address[] memory a, address[] memory b ) internal pure returns (address[] memory result) { result = new address[](a.length + b.length); for (uint256 i; i < a.length; i++) result[i] = a[i]; for (uint256 i; i < b.length; i++) result[i + a.length] = b[i]; } function includes(address[] memory array, address element) internal pure returns (bool) { return _includes(array, element, array.length); } function _includes( address[] memory array, address element, uint256 until ) internal pure returns (bool) { for (uint256 i; i < until; i++) { if (array[i] == element) return true; } return false; } function removeDuplicates(address[] memory array) internal pure returns (address[] memory) { address[] memory unique = new address[](array.length); uint256 j; for (uint256 i; i < array.length; i++) { if (!_includes(unique, array[i], j)) { unique[j++] = array[i]; } } return trim(unique, j); } function trim( address[] memory array, uint256 length ) internal pure returns (address[] memory trimmed) { trimmed = new address[](length); for (uint256 i; i < length; i++) trimmed[i] = array[i]; } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; import "./vendor/IBooster.sol"; import "../libraries/CurvePoolUtils.sol"; import "../libraries/Types.sol"; interface ICurveRegistryCache { event PoolInitialized(address indexed pool, uint256 indexed pid); function BOOSTER() external view returns (IBooster); function initPool(address pool_) external; function initPool(address pool_, uint256 pid_) external; function initPool(address pool_, Types.PoolInfo memory poolInfo_) external; function initPool(address pool_, uint256 pid_, Types.PoolInfo memory poolInfo_) external; function lpToken(address pool_) external view returns (address); function assetType(address pool_) external view returns (CurvePoolUtils.AssetType); function isRegistered(address pool_) external view returns (bool); function hasCoinDirectly(address pool_, address coin_) external view returns (bool); function hasCoinAnywhere(address pool_, address coin_) external view returns (bool); function basePool(address pool_) external view returns (address); function coinIndex(address pool_, address coin_) external view returns (int128); function nCoins(address pool_) external view returns (uint256); function coinIndices( address pool_, address from_, address to_ ) external view returns (int128, int128, bool); function decimals(address pool_) external view returns (uint256[] memory); function interfaceVersion(address pool_) external view returns (uint256); function poolFromLpToken(address lpToken_) external view returns (address); function coins(address pool_) external view returns (address[] memory); function getPid(address _pool) external view returns (uint256); function getRewardPool(address _pool) external view returns (address); function isShutdownPid(uint256 pid_) external view returns (bool); /// @notice this returns the underlying coins of a pool, including the underlying of the base pool /// if the given pool is a meta pool /// This does not return the LP token of the base pool as an underlying /// e.g. if the pool is 3CrvFrax, this will return FRAX, DAI, USDC, USDT function getAllUnderlyingCoins(address pool) external view returns (address[] memory); }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.17; interface ICurveMetaRegistry { event CommitNewAdmin(uint256 indexed deadline, address indexed admin); event NewAdmin(address indexed admin); function add_registry_handler(address _registry_handler) external; function update_registry_handler(uint256 _index, address _registry_handler) external; function get_registry_handlers_from_pool( address _pool ) external view returns (address[10] memory); function get_base_registry(address registry_handler) external view returns (address); function find_pool_for_coins(address _from, address _to) external view returns (address); function find_pool_for_coins( address _from, address _to, uint256 i ) external view returns (address); function find_pools_for_coins( address _from, address _to ) external view returns (address[] memory); function get_admin_balances(address _pool) external view returns (uint256[8] memory); function get_admin_balances( address _pool, uint256 _handler_id ) external view returns (uint256[8] memory); function get_balances(address _pool) external view returns (uint256[8] memory); function get_balances( address _pool, uint256 _handler_id ) external view returns (uint256[8] memory); function get_base_pool(address _pool) external view returns (address); function get_base_pool(address _pool, uint256 _handler_id) external view returns (address); function get_coin_indices( address _pool, address _from, address _to ) external view returns (int128, int128, bool); function get_coin_indices( address _pool, address _from, address _to, uint256 _handler_id ) external view returns (int128, int128, bool); function get_coins(address _pool) external view returns (address[8] memory); function get_coins( address _pool, uint256 _handler_id ) external view returns (address[8] memory); function get_decimals(address _pool) external view returns (uint256[8] memory); function get_decimals( address _pool, uint256 _handler_id ) external view returns (uint256[8] memory); function get_fees(address _pool) external view returns (uint256[10] memory); function get_fees( address _pool, uint256 _handler_id ) external view returns (uint256[10] memory); function get_gauge(address _pool) external view returns (address); function get_gauge(address _pool, uint256 gauge_idx) external view returns (address); function get_gauge( address _pool, uint256 gauge_idx, uint256 _handler_id ) external view returns (address); function get_gauge_type(address _pool) external view returns (int128); function get_gauge_type(address _pool, uint256 gauge_idx) external view returns (int128); function get_gauge_type( address _pool, uint256 gauge_idx, uint256 _handler_id ) external view returns (int128); function get_lp_token(address _pool) external view returns (address); function get_lp_token(address _pool, uint256 _handler_id) external view returns (address); function get_n_coins(address _pool) external view returns (uint256); function get_n_coins(address _pool, uint256 _handler_id) external view returns (uint256); function get_n_underlying_coins(address _pool) external view returns (uint256); function get_n_underlying_coins( address _pool, uint256 _handler_id ) external view returns (uint256); function get_pool_asset_type(address _pool) external view returns (uint256); function get_pool_asset_type( address _pool, uint256 _handler_id ) external view returns (uint256); function get_pool_from_lp_token(address _token) external view returns (address); function get_pool_from_lp_token( address _token, uint256 _handler_id ) external view returns (address); function get_pool_params(address _pool) external view returns (uint256[20] memory); function get_pool_params( address _pool, uint256 _handler_id ) external view returns (uint256[20] memory); function get_pool_name(address _pool) external view returns (string memory); function get_pool_name( address _pool, uint256 _handler_id ) external view returns (string memory); function get_underlying_balances(address _pool) external view returns (uint256[8] memory); function get_underlying_balances( address _pool, uint256 _handler_id ) external view returns (uint256[8] memory); function get_underlying_coins(address _pool) external view returns (address[8] memory); function get_underlying_coins( address _pool, uint256 _handler_id ) external view returns (address[8] memory); function get_underlying_decimals(address _pool) external view returns (uint256[8] memory); function get_underlying_decimals( address _pool, uint256 _handler_id ) external view returns (uint256[8] memory); function get_virtual_price_from_lp_token(address _token) external view returns (uint256); function get_virtual_price_from_lp_token( address _token, uint256 _handler_id ) external view returns (uint256); function is_meta(address _pool) external view returns (bool); function is_meta(address _pool, uint256 _handler_id) external view returns (bool); function is_registered(address _pool) external view returns (bool); function is_registered(address _pool, uint256 _handler_id) external view returns (bool); function pool_count() external view returns (uint256); function pool_list(uint256 _index) external view returns (address); function address_provider() external view returns (address); function owner() external view returns (address); function get_registry(uint256 arg0) external view returns (address); function registry_length() external view returns (uint256); }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.17; interface ICurvePoolV0 { function get_virtual_price() external view returns (uint256); function add_liquidity(uint256[8] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[7] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[6] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[5] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[4] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[3] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[2] calldata amounts, uint256 min_mint_amount) external; function remove_liquidity_imbalance( uint256[4] calldata amounts, uint256 max_burn_amount ) external; function remove_liquidity_imbalance( uint256[3] calldata amounts, uint256 max_burn_amount ) external; function remove_liquidity_imbalance( uint256[2] calldata amounts, uint256 max_burn_amount ) external; function lp_token() external view returns (address); function A_PRECISION() external view returns (uint256); function A_precise() external view returns (uint256); function remove_liquidity(uint256 _amount, uint256[2] calldata min_amounts) external; function remove_liquidity(uint256 _amount, uint256[3] calldata min_amounts) external; function remove_liquidity(uint256 _amount, uint256[4] calldata min_amounts) external; function remove_liquidity(uint256 _amount, uint256[5] calldata min_amounts) external; function remove_liquidity(uint256 _amount, uint256[6] calldata min_amounts) external; function remove_liquidity(uint256 _amount, uint256[7] calldata min_amounts) external; function remove_liquidity(uint256 _amount, uint256[8] calldata min_amounts) external; function exchange( int128 from, int128 to, uint256 _from_amount, uint256 _min_to_amount ) external; function coins(int128 i) external view returns (address); function balances(int128 i) external view returns (uint256); function get_dy(int128 i, int128 j, uint256 _dx) external view returns (uint256); function calc_token_amount( uint256[4] calldata amounts, bool deposit ) external view returns (uint256); function calc_token_amount( uint256[3] calldata amounts, bool deposit ) external view returns (uint256); function calc_token_amount( uint256[2] calldata amounts, bool deposit ) external view returns (uint256); function calc_withdraw_one_coin( uint256 _token_amount, int128 i ) external view returns (uint256); }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.17; interface ICurvePoolV1 { function get_virtual_price() external view returns (uint256); function add_liquidity(uint256[8] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[7] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[6] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[5] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[4] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[3] calldata amounts, uint256 min_mint_amount) external; function add_liquidity(uint256[2] calldata amounts, uint256 min_mint_amount) external; function remove_liquidity_imbalance( uint256[4] calldata amounts, uint256 max_burn_amount ) external; function remove_liquidity_imbalance( uint256[3] calldata amounts, uint256 max_burn_amount ) external; function remove_liquidity_imbalance( uint256[2] calldata amounts, uint256 max_burn_amount ) external; function lp_token() external view returns (address); function A_PRECISION() external view returns (uint256); function A_precise() external view returns (uint256); function remove_liquidity(uint256 _amount, uint256[3] calldata min_amounts) external; function exchange( int128 from, int128 to, uint256 _from_amount, uint256 _min_to_amount ) external; function coins(uint256 i) external view returns (address); function balances(uint256 i) external view returns (uint256); function get_dy(int128 i, int128 j, uint256 _dx) external view returns (uint256); function calc_token_amount( uint256[4] calldata amounts, bool deposit ) external view returns (uint256); function calc_token_amount( uint256[3] calldata amounts, bool deposit ) external view returns (uint256); function calc_token_amount( uint256[2] calldata amounts, bool deposit ) external view returns (uint256); function calc_withdraw_one_coin( uint256 _token_amount, int128 i ) external view returns (uint256); function remove_liquidity_one_coin( uint256 _token_amount, int128 i, uint256 min_amount ) external; function fee() external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.17; interface ICurvePoolV2 { function token() external view returns (address); function coins(uint256 i) external view returns (address); function factory() external view returns (address); function exchange( uint256 i, uint256 j, uint256 dx, uint256 min_dy, bool use_eth, address receiver ) external returns (uint256); function exchange_underlying( uint256 i, uint256 j, uint256 dx, uint256 min_dy, address receiver ) external returns (uint256); function add_liquidity( uint256[2] memory amounts, uint256 min_mint_amount, bool use_eth, address receiver ) external returns (uint256); function add_liquidity( uint256[2] memory amounts, uint256 min_mint_amount ) external returns (uint256); function add_liquidity( uint256[3] memory amounts, uint256 min_mint_amount, bool use_eth, address receiver ) external returns (uint256); function add_liquidity( uint256[3] memory amounts, uint256 min_mint_amount ) external returns (uint256); function remove_liquidity( uint256 _amount, uint256[2] memory min_amounts, bool use_eth, address receiver ) external; function remove_liquidity(uint256 _amount, uint256[2] memory min_amounts) external; function remove_liquidity( uint256 _amount, uint256[3] memory min_amounts, bool use_eth, address receiver ) external; function remove_liquidity(uint256 _amount, uint256[3] memory min_amounts) external; function remove_liquidity_one_coin( uint256 token_amount, uint256 i, uint256 min_amount, bool use_eth, address receiver ) external returns (uint256); function get_dy(uint256 i, uint256 j, uint256 dx) external view returns (uint256); function calc_token_amount(uint256[] memory amounts) external view returns (uint256); function calc_withdraw_one_coin( uint256 token_amount, uint256 i ) external view returns (uint256); function get_virtual_price() external view returns (uint256); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; library ScaledMath { uint256 internal constant DECIMALS = 18; uint256 internal constant ONE = 10 ** DECIMALS; function mulDown(uint256 a, uint256 b) internal pure returns (uint256) { return (a * b) / ONE; } function mulDown(uint256 a, uint256 b, uint256 decimals) internal pure returns (uint256) { return (a * b) / (10 ** decimals); } function divDown(uint256 a, uint256 b) internal pure returns (uint256) { return (a * ONE) / b; } function divDown(uint256 a, uint256 b, uint256 decimals) internal pure returns (uint256) { return (a * 10 ** decimals) / b; } function divUp(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } return ((a * ONE) - 1) / b + 1; } function mulDown(int256 a, int256 b) internal pure returns (int256) { return (a * b) / int256(ONE); } function mulDownUint128(uint128 a, uint128 b) internal pure returns (uint128) { return (a * b) / uint128(ONE); } function mulDown(int256 a, int256 b, uint256 decimals) internal pure returns (int256) { return (a * b) / int256(10 ** decimals); } function divDown(int256 a, int256 b) internal pure returns (int256) { return (a * int256(ONE)) / b; } function divDownUint128(uint128 a, uint128 b) internal pure returns (uint128) { return (a * uint128(ONE)) / b; } function divDown(int256 a, int256 b, uint256 decimals) internal pure returns (int256) { return (a * int256(10 ** decimals)) / b; } function convertScale( uint256 a, uint8 fromDecimals, uint8 toDecimals ) internal pure returns (uint256) { if (fromDecimals == toDecimals) return a; if (fromDecimals > toDecimals) return downscale(a, fromDecimals, toDecimals); return upscale(a, fromDecimals, toDecimals); } function convertScale( int256 a, uint8 fromDecimals, uint8 toDecimals ) internal pure returns (int256) { if (fromDecimals == toDecimals) return a; if (fromDecimals > toDecimals) return downscale(a, fromDecimals, toDecimals); return upscale(a, fromDecimals, toDecimals); } function upscale( uint256 a, uint8 fromDecimals, uint8 toDecimals ) internal pure returns (uint256) { return a * (10 ** (toDecimals - fromDecimals)); } function downscale( uint256 a, uint8 fromDecimals, uint8 toDecimals ) internal pure returns (uint256) { return a / (10 ** (fromDecimals - toDecimals)); } function upscale( int256 a, uint8 fromDecimals, uint8 toDecimals ) internal pure returns (int256) { return a * int256(10 ** (toDecimals - fromDecimals)); } function downscale( int256 a, uint8 fromDecimals, uint8 toDecimals ) internal pure returns (int256) { return a / int256(10 ** (fromDecimals - toDecimals)); } function intPow(uint256 a, uint256 n) internal pure returns (uint256) { uint256 result = ONE; for (uint256 i; i < n; ) { result = mulDown(result, a); unchecked { ++i; } } return result; } function absSub(uint256 a, uint256 b) internal pure returns (uint256) { unchecked { return a >= b ? a - b : b - a; } } function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } function min(uint256 a, uint256 b) internal pure returns (uint256) { return a <= b ? a : b; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.17; interface IBooster { function poolInfo( uint256 pid ) external view returns ( address lpToken, address token, address gauge, address crvRewards, address stash, bool shutdown ); function poolLength() external view returns (uint256); function deposit(uint256 _pid, uint256 _amount, bool _stake) external returns (bool); function withdraw(uint256 _pid, uint256 _amount) external returns (bool); function withdrawAll(uint256 _pid) external returns (bool); function depositAll(uint256 _pid, bool _stake) external returns (bool); function earmarkRewards(uint256 _pid) external returns (bool); function isShutdown() external view returns (bool); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; library Types { struct Coin { address coinAddress; uint8 decimals; } struct CliffInfo { uint256 currentCliff; bool withinThreshold; } struct PoolInfo { address lpToken; address basePool; uint256 assetType; } }
{ "remappings": [ "@chainlink/contracts/=node_modules/@chainlink/contracts/src/v0.8/", "@openzeppelin/=node_modules/@openzeppelin/", "forge-std/=lib/forge-std/src/", "ds-test/=lib/forge-std/lib/ds-test/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"}],"name":"PoolInitialized","type":"event"},{"inputs":[],"name":"BOOSTER","outputs":[{"internalType":"contract IBooster","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CURVE_REGISTRY","outputs":[{"internalType":"contract ICurveMetaRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"}],"name":"assetType","outputs":[{"internalType":"enum CurvePoolUtils.AssetType","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"}],"name":"basePool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"},{"internalType":"address","name":"coin_","type":"address"}],"name":"coinIndex","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"},{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"}],"name":"coinIndices","outputs":[{"internalType":"int128","name":"","type":"int128"},{"internalType":"int128","name":"","type":"int128"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"}],"name":"coins","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"}],"name":"decimals","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"}],"name":"getAllUnderlyingCoins","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"}],"name":"getPid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"}],"name":"getRewardPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"},{"internalType":"address","name":"coin_","type":"address"}],"name":"hasCoinAnywhere","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"},{"internalType":"address","name":"coin_","type":"address"}],"name":"hasCoinDirectly","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"},{"internalType":"uint256","name":"pid_","type":"uint256"},{"components":[{"internalType":"address","name":"lpToken","type":"address"},{"internalType":"address","name":"basePool","type":"address"},{"internalType":"uint256","name":"assetType","type":"uint256"}],"internalType":"struct Types.PoolInfo","name":"poolInfo_","type":"tuple"}],"name":"initPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"},{"internalType":"uint256","name":"pid_","type":"uint256"}],"name":"initPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"},{"components":[{"internalType":"address","name":"lpToken","type":"address"},{"internalType":"address","name":"basePool","type":"address"},{"internalType":"uint256","name":"assetType","type":"uint256"}],"internalType":"struct Types.PoolInfo","name":"poolInfo_","type":"tuple"}],"name":"initPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"}],"name":"initPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"}],"name":"interfaceVersion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"}],"name":"isRegistered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid_","type":"uint256"}],"name":"isShutdownPid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"}],"name":"lpToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool_","type":"address"}],"name":"nCoins","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lpToken_","type":"address"}],"name":"poolFromLpToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6123ad8061007e6000396000f3fe608060405234801561001057600080fd5b506004361061018c5760003560e01c806376a562a4116100de578063c3c5a54711610097578063effd708111610071578063effd708114610408578063f0d9fb931461041b578063f2fde38b1461042e578063f7d372f11461044157600080fd5b8063c3c5a5471461039c578063d449a832146103c8578063e40ad8ca146103e857600080fd5b806376a562a4146103245780637d0f7a88146103375780638da5cb5b1461034a578063b677560f1461035b578063b942717b1461036e578063bf25d02a1461038957600080fd5b806343b55f351161014b578063715018a611610125578063715018a6146102db57806373282128146102e357806373a2d446146102f657806375b0ffd11461030957600080fd5b806343b55f351461027d578063514a9009146102905780635fd5590a146102a357600080fd5b80622708db14610191578062eb8ba4146101ba5780631760eb5e146101e05780632aa8fdd21461020157806339d8d3ca146102165780634060c02514610239575b600080fd5b6101a461019f366004611f09565b610454565b6040516101b19190611f2d565b60405180910390f35b6101cd6101c8366004611f7a565b610646565b604051600f9190910b81526020016101b1565b6101f36101ee366004611f09565b6106bc565b6040519081526020016101b1565b61021461020f366004612043565b610713565b005b610229610224366004612082565b61072d565b60405190151581526020016101b1565b610265610247366004611f09565b6001600160a01b039081166000908152600a60205260409020541690565b6040516001600160a01b0390911681526020016101b1565b6101f361028b366004611f09565b6107b2565b61026561029e366004611f09565b610860565b6102b66102b136600461209b565b6108ba565b60408051600f94850b81529290930b60208301521515918101919091526060016101b1565b61021461098c565b6102146102f13660046120e6565b6109a0565b610265610304366004611f09565b6109b0565b61026573f403c135812408bfbe8713b5a23a04b3d48aae3181565b610265610332366004611f09565b610a0a565b6101a4610345366004611f09565b610a64565b6000546001600160a01b0316610265565b610229610369366004611f7a565b610b14565b61026573f98b45fa17de75fb1ad0e7afd971b0ca00e379fc81565b6101f3610397366004611f09565b610b7e565b6102296103aa366004611f09565b6001600160a01b031660009081526001602052604090205460ff1690565b6103db6103d6366004611f09565b610bd5565b6040516101b19190612112565b6103fb6103f6366004611f09565b610c7c565b6040516101b19190612160565b610229610416366004611f7a565b610cd6565b610214610429366004612188565b610d40565b61021461043c366004611f09565b610d55565b61021461044f366004611f09565b610dce565b6001600160a01b0380821660009081526005602052604090205460609116806104ec576001600160a01b038316600090815260086020908152604091829020805483518184028101840190945280845290918301828280156104df57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116104c1575b5050505050915050919050565b6001600160a01b038316600090815260076020526040812054610511906001906121d4565b67ffffffffffffffff81111561052957610529611fb3565b604051908082528060200260200182016040528015610552578160200160208202803683370190505b5090506000805b6001600160a01b038616600090815260076020526040902054821015610629576001600160a01b03861660009081526008602052604081208054849081106105a3576105a36121e7565b60009182526020808320909101546001600160a01b03908116808452600a909252604090922054909250811690861614610616578084836105e3816121fd565b9450815181106105f5576105f56121e7565b60200260200101906001600160a01b031690816001600160a01b0316815250505b5081610621816121fd565b925050610559565b505061063e61063783610454565b8290610dda565b949350505050565b6001600160a01b038216600090815260016020526040812054839060ff166106895760405162461bcd60e51b815260040161068090612216565b60405180910390fd5b6001600160a01b03808516600090815260066020908152604080832093871683529290522054600f0b91505b5092915050565b6001600160a01b038116600090815260016020526040812054829060ff166106f65760405162461bcd60e51b815260040161068090612216565b50506001600160a01b03166000908152600c602052604090205490565b61071b610eff565b6107288360018484610f59565b505050565b604051631526fe2760e01b815260048101829052600090819073f403c135812408bfbe8713b5a23a04b3d48aae3190631526fe279060240160c060405180830381865afa158015610782573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a6919061226e565b98975050505050505050565b6001600160a01b038116600090815260016020526040812054829060ff166107ec5760405162461bcd60e51b815260040161068090612216565b6001600160a01b038381166000908152600e6020526040902054166108435760405162461bcd60e51b815260206004820152600d60248201526c1c1a59081b9bdd08199bdd5b99609a1b6044820152606401610680565b50506001600160a01b03166000908152600d602052604090205490565b6001600160a01b038116600090815260016020526040812054829060ff1661089a5760405162461bcd60e51b815260040161068090612216565b50506001600160a01b039081166000908152600e60205260409020541690565b6001600160a01b03831660009081526001602052604081205481908190869060ff166108f85760405162461bcd60e51b815260040161068090612216565b6001600160a01b0387811660008181526006602090815260408083208b861680855290835281842054958b1684528184205494845260038352818420908452909152902054600f92830b929190910b9060ff16801561097c57506001600160a01b03808a166000908152600360209081526040808320938b168352929052205460ff165b9350935093505093509350939050565b610994610eff565b61099e6000610f8b565b565b6109ac82600183610fdb565b5050565b6001600160a01b038116600090815260016020526040812054829060ff166109ea5760405162461bcd60e51b815260040161068090612216565b50506001600160a01b039081166000908152600560205260409020541690565b6001600160a01b038116600090815260016020526040812054829060ff16610a445760405162461bcd60e51b815260040161068090612216565b50506001600160a01b039081166000908152600260205260409020541690565b6001600160a01b038116600090815260016020526040902054606090829060ff16610aa15760405162461bcd60e51b815260040161068090612216565b6001600160a01b038316600090815260086020908152604091829020805483518184028101840190945280845290918301828280156104df576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116104c1575050505050915050919050565b6001600160a01b038216600090815260016020526040812054839060ff16610b4e5760405162461bcd60e51b815260040161068090612216565b50506001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b6001600160a01b038116600090815260016020526040812054829060ff16610bb85760405162461bcd60e51b815260040161068090612216565b50506001600160a01b031660009081526007602052604090205490565b6001600160a01b038116600090815260016020526040902054606090829060ff16610c125760405162461bcd60e51b815260040161068090612216565b6001600160a01b038316600090815260096020908152604091829020805483518184028101840190945280845290918301828280156104df57602002820191906000526020600020905b815481526020019060010190808311610c5c575050505050915050919050565b6001600160a01b038116600090815260016020526040812054829060ff16610cb65760405162461bcd60e51b815260040161068090612216565b50506001600160a01b03166000908152600b602052604090205460ff1690565b6001600160a01b038216600090815260016020526040812054839060ff16610d105760405162461bcd60e51b815260040161068090612216565b50506001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b610d48610eff565b6109ac8260008084610f59565b610d5d610eff565b6001600160a01b038116610dc25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610680565b610dcb81610f8b565b50565b610dcb81600080610fdb565b606081518351610dea91906122f0565b67ffffffffffffffff811115610e0257610e02611fb3565b604051908082528060200260200182016040528015610e2b578160200160208202803683370190505b50905060005b8351811015610e9057838181518110610e4c57610e4c6121e7565b6020026020010151828281518110610e6657610e666121e7565b6001600160a01b039092166020928302919091019091015280610e88816121fd565b915050610e31565b5060005b82518110156106b557828181518110610eaf57610eaf6121e7565b602002602001015182855183610ec591906122f0565b81518110610ed557610ed56121e7565b6001600160a01b039092166020928302919091019091015280610ef7816121fd565b915050610e94565b6000546001600160a01b0316331461099e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610680565b6001600160a01b03841660009081526001602052604090205460ff16610f8557610f858484848461120a565b50505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03831660009081526001602052604090205460ff161561100157505050565b61100a83611733565b6110655760405162461bcd60e51b815260206004820152602660248201527f4375727665526567697374727943616368653a20696e76616c6964206375727660448201526519481c1bdbdb60d21b6064820152608401610680565b604080516060810191829052633795104960e01b9091526001600160a01b03841660648201526000908073f98b45fa17de75fb1ad0e7afd971b0ca00e379fc633795104960848301602060405180830381865afa1580156110ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ee9190612303565b6001600160a01b039081168252604051636f20d6dd60e01b8152908716600482015260209091019073f98b45fa17de75fb1ad0e7afd971b0ca00e379fc90636f20d6dd90602401602060405180830381865afa158015611152573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111769190612303565b6001600160a01b0390811682526040516319b4e59b60e21b8152908716600482015260209091019073f98b45fa17de75fb1ad0e7afd971b0ca00e379fc906366d3966c90602401602060405180830381865afa1580156111da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fe9190612320565b90529050610f85848484845b80516020808301516001600160a01b03878116600090815260018085526040808320805460ff191690921790915560029094529290922080546001600160a01b03191692841692909217909155841561126d576112688683866117c1565b61127a565b6112778683611981565b93505b6001600160a01b038083166000908152600a602090815260408083208054858c166001600160a01b03199182168117909255908452600590925290912080549284169290911682179055156113b6576112d581600080610fdb565b6001600160a01b03811660009081526008602090815260408083208054825181850281018501909352808352919290919083018282801561133f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611321575b5050505050905060005b81518110156113b3576000828281518110611366576113666121e7565b6020908102919091018101516001600160a01b03808c16600090815260048452604080822092909316815292529020805460ff1916600117905550806113ab816121fd565b915050611349565b50505b826040015160048111156113cc576113cc61214a565b6001600160a01b0387166000908152600b60205260409020805460ff191660018360048111156113fe576113fe61214a565b0217905550600061140e87611b73565b9050600061141c8883611c27565b905060005b81518110156116ae57600082828151811061143e5761143e6121e7565b6020026020010151905060006001600160a01b0316816001600160a01b0316036114aa5760405162461bcd60e51b815260206004820181905260248201527f4375727665526567697374727943616368653a20696e76616c696420636f696e6044820152606401610680565b6001600160a01b038a811660008181526003602090815260408083209486168084529482528083208054600160ff199182168117909255858552600484528285208786528452828520805490911690911790559282526006815282822084835290522080546001600160801b0319166001600160801b03851617905573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed19016115fa5773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290508083838151811061156b5761156b6121e7565b6001600160a01b039283166020918202929092018101919091528b821660008181526003835260408082209486168083529484528082208054600160ff199182168117909255848452600486528284208785528652828420805490911690911790559181526006835281812093815292909152902080546001600160801b0319166001600160801b0384161790555b600960008b6001600160a01b03166001600160a01b03168152602001908152602001600020816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561165d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116819190612339565b81546001810183556000928352602090922060ff90911691015550806116a6816121fd565b915050611421565b5080516001600160a01b0389166000908152600760209081526040808320939093556008815291902082516116e592840190611e7a565b506001600160a01b0388166000818152600c6020526040808220859055518892917f865db32d629b778510d2a2bd16751d214bd4a78253e6670dcebb9d1e5e3d632791a35050505050505050565b6040516330cf540360e11b81526001600160a01b038216600482015260009073f98b45fa17de75fb1ad0e7afd971b0ca00e379fc9063619ea80690602401602060405180830381865afa9250505080156117aa575060408051601f3d908101601f191682019092526117a79181019061235c565b60015b6117b657506000919050565b92915050565b919050565b604051631526fe2760e01b8152600481018290526000908190819073f403c135812408bfbe8713b5a23a04b3d48aae3190631526fe279060240160c060405180830381865afa158015611818573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183c919061226e565b955050945050509250826001600160a01b0316856001600160a01b0316146118a65760405162461bcd60e51b815260206004820152601f60248201527f696e76616c6964206c7020746f6b656e20666f7220637572766520706f6f6c006044820152606401610680565b80156118f45760405162461bcd60e51b815260206004820152601860248201527f636f6e76657820706f6f6c206973207368757420646f776e00000000000000006044820152606401610680565b6001600160a01b0382166119405760405162461bcd60e51b81526020600482015260136024820152721b9bc818dbdb9d995e081c1a5908199bdd5b99606a1b6044820152606401610680565b506001600160a01b039485166000908152600e6020908152604080832080546001600160a01b0319169490981693909317909655600d909552909320555050565b60008073f403c135812408bfbe8713b5a23a04b3d48aae316001600160a01b031663081e3eda6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119fa9190612320565b90506000805b82811015611af357604051631526fe2760e01b8152600481018290526000908190819073f403c135812408bfbe8713b5a23a04b3d48aae3190631526fe279060240160c060405180830381865afa158015611a5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a83919061226e565b955050945050509250826001600160a01b0316886001600160a01b0316141580611aaa5750805b15611ab757505050611ae1565b506001600160a01b0388166000908152600d60205260409020839055919450909150839050611af3565b80611aeb816121fd565b915050611a00565b506001600160a01b038116611b405760405162461bcd60e51b81526020600482015260136024820152721b9bc818dbdb9d995e081c1a5908199bdd5b99606a1b6044820152606401610680565b6001600160a01b039485166000908152600e6020526040902080546001600160a01b031916919095161790935592915050565b600060046001600160a01b0383166000908152600b602052604090205460ff166004811115611ba457611ba461214a565b03611bb157506002919050565b604051634903b0d160e01b8152600060048201526001600160a01b03831690634903b0d190602401602060405180830381865afa925050508015611c12575060408051601f3d908101601f19168201909252611c0f91810190612320565b60015b611c1e57506000919050565b50600192915050565b60408051600880825261012082019092526060916000918291602082016101008036833701905050905060005b6008811015611dbe5784600003611d0c5760405163046e8dd760e31b8152600f82900b60048201526001600160a01b038716906323746eb890602401602060405180830381865afa925050508015611cc9575060408051601f3d908101601f19168201909252611cc691810190612303565b60015b15611dbe5780838381518110611ce157611ce16121e7565b6001600160a01b039092166020928302919091019091015283611d03816121fd565b94505050611dac565b60405163c661065760e01b8152600481018290526001600160a01b0387169063c661065790602401602060405180830381865afa925050508015611d6d575060408051601f3d908101601f19168201909252611d6a91810190612303565b60015b15611dbe5780838381518110611d8557611d856121e7565b6001600160a01b039092166020928302919091019091015283611da7816121fd565b945050505b80611db6816121fd565b915050611c54565b50611dc98183611dd2565b95945050505050565b60608167ffffffffffffffff811115611ded57611ded611fb3565b604051908082528060200260200182016040528015611e16578160200160208202803683370190505b50905060005b828110156106b557838181518110611e3657611e366121e7565b6020026020010151828281518110611e5057611e506121e7565b6001600160a01b039092166020928302919091019091015280611e72816121fd565b915050611e1c565b828054828255906000526020600020908101928215611ecf579160200282015b82811115611ecf57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611e9a565b50611edb929150611edf565b5090565b5b80821115611edb5760008155600101611ee0565b6001600160a01b0381168114610dcb57600080fd5b600060208284031215611f1b57600080fd5b8135611f2681611ef4565b9392505050565b6020808252825182820181905260009190848201906040850190845b81811015611f6e5783516001600160a01b031683529284019291840191600101611f49565b50909695505050505050565b60008060408385031215611f8d57600080fd5b8235611f9881611ef4565b91506020830135611fa881611ef4565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600060608284031215611fdb57600080fd5b6040516060810181811067ffffffffffffffff8211171561200c57634e487b7160e01b600052604160045260246000fd5b604052905080823561201d81611ef4565b8152602083013561202d81611ef4565b6020820152604092830135920191909152919050565b600080600060a0848603121561205857600080fd5b833561206381611ef4565b9250602084013591506120798560408601611fc9565b90509250925092565b60006020828403121561209457600080fd5b5035919050565b6000806000606084860312156120b057600080fd5b83356120bb81611ef4565b925060208401356120cb81611ef4565b915060408401356120db81611ef4565b809150509250925092565b600080604083850312156120f957600080fd5b823561210481611ef4565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b81811015611f6e5783518352928401929184019160010161212e565b634e487b7160e01b600052602160045260246000fd5b602081016005831061218257634e487b7160e01b600052602160045260246000fd5b91905290565b6000806080838503121561219b57600080fd5b82356121a681611ef4565b91506121b58460208501611fc9565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b818103818111156117b6576117b66121be565b634e487b7160e01b600052603260045260246000fd5b60006001820161220f5761220f6121be565b5060010190565b60208082526028908201527f4375727665526567697374727943616368653a20706f6f6c206e6f7420696e696040820152671d1a585b1a5e995960c21b606082015260800190565b805180151581146117bc57600080fd5b60008060008060008060c0878903121561228757600080fd5b865161229281611ef4565b60208801519096506122a381611ef4565b60408801519095506122b481611ef4565b60608801519094506122c581611ef4565b60808801519093506122d681611ef4565b91506122e460a0880161225e565b90509295509295509295565b808201808211156117b6576117b66121be565b60006020828403121561231557600080fd5b8151611f2681611ef4565b60006020828403121561233257600080fd5b5051919050565b60006020828403121561234b57600080fd5b815160ff81168114611f2657600080fd5b60006020828403121561236e57600080fd5b611f268261225e56fea2646970667358221220ba544bb032cd0da1e66ba8e85387e5fe4e6783d2bddfd425d1c60a177e50ca5564736f6c63430008110033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061018c5760003560e01c806376a562a4116100de578063c3c5a54711610097578063effd708111610071578063effd708114610408578063f0d9fb931461041b578063f2fde38b1461042e578063f7d372f11461044157600080fd5b8063c3c5a5471461039c578063d449a832146103c8578063e40ad8ca146103e857600080fd5b806376a562a4146103245780637d0f7a88146103375780638da5cb5b1461034a578063b677560f1461035b578063b942717b1461036e578063bf25d02a1461038957600080fd5b806343b55f351161014b578063715018a611610125578063715018a6146102db57806373282128146102e357806373a2d446146102f657806375b0ffd11461030957600080fd5b806343b55f351461027d578063514a9009146102905780635fd5590a146102a357600080fd5b80622708db14610191578062eb8ba4146101ba5780631760eb5e146101e05780632aa8fdd21461020157806339d8d3ca146102165780634060c02514610239575b600080fd5b6101a461019f366004611f09565b610454565b6040516101b19190611f2d565b60405180910390f35b6101cd6101c8366004611f7a565b610646565b604051600f9190910b81526020016101b1565b6101f36101ee366004611f09565b6106bc565b6040519081526020016101b1565b61021461020f366004612043565b610713565b005b610229610224366004612082565b61072d565b60405190151581526020016101b1565b610265610247366004611f09565b6001600160a01b039081166000908152600a60205260409020541690565b6040516001600160a01b0390911681526020016101b1565b6101f361028b366004611f09565b6107b2565b61026561029e366004611f09565b610860565b6102b66102b136600461209b565b6108ba565b60408051600f94850b81529290930b60208301521515918101919091526060016101b1565b61021461098c565b6102146102f13660046120e6565b6109a0565b610265610304366004611f09565b6109b0565b61026573f403c135812408bfbe8713b5a23a04b3d48aae3181565b610265610332366004611f09565b610a0a565b6101a4610345366004611f09565b610a64565b6000546001600160a01b0316610265565b610229610369366004611f7a565b610b14565b61026573f98b45fa17de75fb1ad0e7afd971b0ca00e379fc81565b6101f3610397366004611f09565b610b7e565b6102296103aa366004611f09565b6001600160a01b031660009081526001602052604090205460ff1690565b6103db6103d6366004611f09565b610bd5565b6040516101b19190612112565b6103fb6103f6366004611f09565b610c7c565b6040516101b19190612160565b610229610416366004611f7a565b610cd6565b610214610429366004612188565b610d40565b61021461043c366004611f09565b610d55565b61021461044f366004611f09565b610dce565b6001600160a01b0380821660009081526005602052604090205460609116806104ec576001600160a01b038316600090815260086020908152604091829020805483518184028101840190945280845290918301828280156104df57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116104c1575b5050505050915050919050565b6001600160a01b038316600090815260076020526040812054610511906001906121d4565b67ffffffffffffffff81111561052957610529611fb3565b604051908082528060200260200182016040528015610552578160200160208202803683370190505b5090506000805b6001600160a01b038616600090815260076020526040902054821015610629576001600160a01b03861660009081526008602052604081208054849081106105a3576105a36121e7565b60009182526020808320909101546001600160a01b03908116808452600a909252604090922054909250811690861614610616578084836105e3816121fd565b9450815181106105f5576105f56121e7565b60200260200101906001600160a01b031690816001600160a01b0316815250505b5081610621816121fd565b925050610559565b505061063e61063783610454565b8290610dda565b949350505050565b6001600160a01b038216600090815260016020526040812054839060ff166106895760405162461bcd60e51b815260040161068090612216565b60405180910390fd5b6001600160a01b03808516600090815260066020908152604080832093871683529290522054600f0b91505b5092915050565b6001600160a01b038116600090815260016020526040812054829060ff166106f65760405162461bcd60e51b815260040161068090612216565b50506001600160a01b03166000908152600c602052604090205490565b61071b610eff565b6107288360018484610f59565b505050565b604051631526fe2760e01b815260048101829052600090819073f403c135812408bfbe8713b5a23a04b3d48aae3190631526fe279060240160c060405180830381865afa158015610782573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a6919061226e565b98975050505050505050565b6001600160a01b038116600090815260016020526040812054829060ff166107ec5760405162461bcd60e51b815260040161068090612216565b6001600160a01b038381166000908152600e6020526040902054166108435760405162461bcd60e51b815260206004820152600d60248201526c1c1a59081b9bdd08199bdd5b99609a1b6044820152606401610680565b50506001600160a01b03166000908152600d602052604090205490565b6001600160a01b038116600090815260016020526040812054829060ff1661089a5760405162461bcd60e51b815260040161068090612216565b50506001600160a01b039081166000908152600e60205260409020541690565b6001600160a01b03831660009081526001602052604081205481908190869060ff166108f85760405162461bcd60e51b815260040161068090612216565b6001600160a01b0387811660008181526006602090815260408083208b861680855290835281842054958b1684528184205494845260038352818420908452909152902054600f92830b929190910b9060ff16801561097c57506001600160a01b03808a166000908152600360209081526040808320938b168352929052205460ff165b9350935093505093509350939050565b610994610eff565b61099e6000610f8b565b565b6109ac82600183610fdb565b5050565b6001600160a01b038116600090815260016020526040812054829060ff166109ea5760405162461bcd60e51b815260040161068090612216565b50506001600160a01b039081166000908152600560205260409020541690565b6001600160a01b038116600090815260016020526040812054829060ff16610a445760405162461bcd60e51b815260040161068090612216565b50506001600160a01b039081166000908152600260205260409020541690565b6001600160a01b038116600090815260016020526040902054606090829060ff16610aa15760405162461bcd60e51b815260040161068090612216565b6001600160a01b038316600090815260086020908152604091829020805483518184028101840190945280845290918301828280156104df576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116104c1575050505050915050919050565b6001600160a01b038216600090815260016020526040812054839060ff16610b4e5760405162461bcd60e51b815260040161068090612216565b50506001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b6001600160a01b038116600090815260016020526040812054829060ff16610bb85760405162461bcd60e51b815260040161068090612216565b50506001600160a01b031660009081526007602052604090205490565b6001600160a01b038116600090815260016020526040902054606090829060ff16610c125760405162461bcd60e51b815260040161068090612216565b6001600160a01b038316600090815260096020908152604091829020805483518184028101840190945280845290918301828280156104df57602002820191906000526020600020905b815481526020019060010190808311610c5c575050505050915050919050565b6001600160a01b038116600090815260016020526040812054829060ff16610cb65760405162461bcd60e51b815260040161068090612216565b50506001600160a01b03166000908152600b602052604090205460ff1690565b6001600160a01b038216600090815260016020526040812054839060ff16610d105760405162461bcd60e51b815260040161068090612216565b50506001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b610d48610eff565b6109ac8260008084610f59565b610d5d610eff565b6001600160a01b038116610dc25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610680565b610dcb81610f8b565b50565b610dcb81600080610fdb565b606081518351610dea91906122f0565b67ffffffffffffffff811115610e0257610e02611fb3565b604051908082528060200260200182016040528015610e2b578160200160208202803683370190505b50905060005b8351811015610e9057838181518110610e4c57610e4c6121e7565b6020026020010151828281518110610e6657610e666121e7565b6001600160a01b039092166020928302919091019091015280610e88816121fd565b915050610e31565b5060005b82518110156106b557828181518110610eaf57610eaf6121e7565b602002602001015182855183610ec591906122f0565b81518110610ed557610ed56121e7565b6001600160a01b039092166020928302919091019091015280610ef7816121fd565b915050610e94565b6000546001600160a01b0316331461099e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610680565b6001600160a01b03841660009081526001602052604090205460ff16610f8557610f858484848461120a565b50505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03831660009081526001602052604090205460ff161561100157505050565b61100a83611733565b6110655760405162461bcd60e51b815260206004820152602660248201527f4375727665526567697374727943616368653a20696e76616c6964206375727660448201526519481c1bdbdb60d21b6064820152608401610680565b604080516060810191829052633795104960e01b9091526001600160a01b03841660648201526000908073f98b45fa17de75fb1ad0e7afd971b0ca00e379fc633795104960848301602060405180830381865afa1580156110ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ee9190612303565b6001600160a01b039081168252604051636f20d6dd60e01b8152908716600482015260209091019073f98b45fa17de75fb1ad0e7afd971b0ca00e379fc90636f20d6dd90602401602060405180830381865afa158015611152573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111769190612303565b6001600160a01b0390811682526040516319b4e59b60e21b8152908716600482015260209091019073f98b45fa17de75fb1ad0e7afd971b0ca00e379fc906366d3966c90602401602060405180830381865afa1580156111da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fe9190612320565b90529050610f85848484845b80516020808301516001600160a01b03878116600090815260018085526040808320805460ff191690921790915560029094529290922080546001600160a01b03191692841692909217909155841561126d576112688683866117c1565b61127a565b6112778683611981565b93505b6001600160a01b038083166000908152600a602090815260408083208054858c166001600160a01b03199182168117909255908452600590925290912080549284169290911682179055156113b6576112d581600080610fdb565b6001600160a01b03811660009081526008602090815260408083208054825181850281018501909352808352919290919083018282801561133f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611321575b5050505050905060005b81518110156113b3576000828281518110611366576113666121e7565b6020908102919091018101516001600160a01b03808c16600090815260048452604080822092909316815292529020805460ff1916600117905550806113ab816121fd565b915050611349565b50505b826040015160048111156113cc576113cc61214a565b6001600160a01b0387166000908152600b60205260409020805460ff191660018360048111156113fe576113fe61214a565b0217905550600061140e87611b73565b9050600061141c8883611c27565b905060005b81518110156116ae57600082828151811061143e5761143e6121e7565b6020026020010151905060006001600160a01b0316816001600160a01b0316036114aa5760405162461bcd60e51b815260206004820181905260248201527f4375727665526567697374727943616368653a20696e76616c696420636f696e6044820152606401610680565b6001600160a01b038a811660008181526003602090815260408083209486168084529482528083208054600160ff199182168117909255858552600484528285208786528452828520805490911690911790559282526006815282822084835290522080546001600160801b0319166001600160801b03851617905573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed19016115fa5773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290508083838151811061156b5761156b6121e7565b6001600160a01b039283166020918202929092018101919091528b821660008181526003835260408082209486168083529484528082208054600160ff199182168117909255848452600486528284208785528652828420805490911690911790559181526006835281812093815292909152902080546001600160801b0319166001600160801b0384161790555b600960008b6001600160a01b03166001600160a01b03168152602001908152602001600020816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561165d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116819190612339565b81546001810183556000928352602090922060ff90911691015550806116a6816121fd565b915050611421565b5080516001600160a01b0389166000908152600760209081526040808320939093556008815291902082516116e592840190611e7a565b506001600160a01b0388166000818152600c6020526040808220859055518892917f865db32d629b778510d2a2bd16751d214bd4a78253e6670dcebb9d1e5e3d632791a35050505050505050565b6040516330cf540360e11b81526001600160a01b038216600482015260009073f98b45fa17de75fb1ad0e7afd971b0ca00e379fc9063619ea80690602401602060405180830381865afa9250505080156117aa575060408051601f3d908101601f191682019092526117a79181019061235c565b60015b6117b657506000919050565b92915050565b919050565b604051631526fe2760e01b8152600481018290526000908190819073f403c135812408bfbe8713b5a23a04b3d48aae3190631526fe279060240160c060405180830381865afa158015611818573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183c919061226e565b955050945050509250826001600160a01b0316856001600160a01b0316146118a65760405162461bcd60e51b815260206004820152601f60248201527f696e76616c6964206c7020746f6b656e20666f7220637572766520706f6f6c006044820152606401610680565b80156118f45760405162461bcd60e51b815260206004820152601860248201527f636f6e76657820706f6f6c206973207368757420646f776e00000000000000006044820152606401610680565b6001600160a01b0382166119405760405162461bcd60e51b81526020600482015260136024820152721b9bc818dbdb9d995e081c1a5908199bdd5b99606a1b6044820152606401610680565b506001600160a01b039485166000908152600e6020908152604080832080546001600160a01b0319169490981693909317909655600d909552909320555050565b60008073f403c135812408bfbe8713b5a23a04b3d48aae316001600160a01b031663081e3eda6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119fa9190612320565b90506000805b82811015611af357604051631526fe2760e01b8152600481018290526000908190819073f403c135812408bfbe8713b5a23a04b3d48aae3190631526fe279060240160c060405180830381865afa158015611a5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a83919061226e565b955050945050509250826001600160a01b0316886001600160a01b0316141580611aaa5750805b15611ab757505050611ae1565b506001600160a01b0388166000908152600d60205260409020839055919450909150839050611af3565b80611aeb816121fd565b915050611a00565b506001600160a01b038116611b405760405162461bcd60e51b81526020600482015260136024820152721b9bc818dbdb9d995e081c1a5908199bdd5b99606a1b6044820152606401610680565b6001600160a01b039485166000908152600e6020526040902080546001600160a01b031916919095161790935592915050565b600060046001600160a01b0383166000908152600b602052604090205460ff166004811115611ba457611ba461214a565b03611bb157506002919050565b604051634903b0d160e01b8152600060048201526001600160a01b03831690634903b0d190602401602060405180830381865afa925050508015611c12575060408051601f3d908101601f19168201909252611c0f91810190612320565b60015b611c1e57506000919050565b50600192915050565b60408051600880825261012082019092526060916000918291602082016101008036833701905050905060005b6008811015611dbe5784600003611d0c5760405163046e8dd760e31b8152600f82900b60048201526001600160a01b038716906323746eb890602401602060405180830381865afa925050508015611cc9575060408051601f3d908101601f19168201909252611cc691810190612303565b60015b15611dbe5780838381518110611ce157611ce16121e7565b6001600160a01b039092166020928302919091019091015283611d03816121fd565b94505050611dac565b60405163c661065760e01b8152600481018290526001600160a01b0387169063c661065790602401602060405180830381865afa925050508015611d6d575060408051601f3d908101601f19168201909252611d6a91810190612303565b60015b15611dbe5780838381518110611d8557611d856121e7565b6001600160a01b039092166020928302919091019091015283611da7816121fd565b945050505b80611db6816121fd565b915050611c54565b50611dc98183611dd2565b95945050505050565b60608167ffffffffffffffff811115611ded57611ded611fb3565b604051908082528060200260200182016040528015611e16578160200160208202803683370190505b50905060005b828110156106b557838181518110611e3657611e366121e7565b6020026020010151828281518110611e5057611e506121e7565b6001600160a01b039092166020928302919091019091015280611e72816121fd565b915050611e1c565b828054828255906000526020600020908101928215611ecf579160200282015b82811115611ecf57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611e9a565b50611edb929150611edf565b5090565b5b80821115611edb5760008155600101611ee0565b6001600160a01b0381168114610dcb57600080fd5b600060208284031215611f1b57600080fd5b8135611f2681611ef4565b9392505050565b6020808252825182820181905260009190848201906040850190845b81811015611f6e5783516001600160a01b031683529284019291840191600101611f49565b50909695505050505050565b60008060408385031215611f8d57600080fd5b8235611f9881611ef4565b91506020830135611fa881611ef4565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600060608284031215611fdb57600080fd5b6040516060810181811067ffffffffffffffff8211171561200c57634e487b7160e01b600052604160045260246000fd5b604052905080823561201d81611ef4565b8152602083013561202d81611ef4565b6020820152604092830135920191909152919050565b600080600060a0848603121561205857600080fd5b833561206381611ef4565b9250602084013591506120798560408601611fc9565b90509250925092565b60006020828403121561209457600080fd5b5035919050565b6000806000606084860312156120b057600080fd5b83356120bb81611ef4565b925060208401356120cb81611ef4565b915060408401356120db81611ef4565b809150509250925092565b600080604083850312156120f957600080fd5b823561210481611ef4565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b81811015611f6e5783518352928401929184019160010161212e565b634e487b7160e01b600052602160045260246000fd5b602081016005831061218257634e487b7160e01b600052602160045260246000fd5b91905290565b6000806080838503121561219b57600080fd5b82356121a681611ef4565b91506121b58460208501611fc9565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b818103818111156117b6576117b66121be565b634e487b7160e01b600052603260045260246000fd5b60006001820161220f5761220f6121be565b5060010190565b60208082526028908201527f4375727665526567697374727943616368653a20706f6f6c206e6f7420696e696040820152671d1a585b1a5e995960c21b606082015260800190565b805180151581146117bc57600080fd5b60008060008060008060c0878903121561228757600080fd5b865161229281611ef4565b60208801519096506122a381611ef4565b60408801519095506122b481611ef4565b60608801519094506122c581611ef4565b60808801519093506122d681611ef4565b91506122e460a0880161225e565b90509295509295509295565b808201808211156117b6576117b66121be565b60006020828403121561231557600080fd5b8151611f2681611ef4565b60006020828403121561233257600080fd5b5051919050565b60006020828403121561234b57600080fd5b815160ff81168114611f2657600080fd5b60006020828403121561236e57600080fd5b611f268261225e56fea2646970667358221220ba544bb032cd0da1e66ba8e85387e5fe4e6783d2bddfd425d1c60a177e50ca5564736f6c63430008110033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.