Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Curve_Registry_V2_1
Compiler Version
v0.8.4+commit.c7e474f2
Contract Source Code (Solidity Standard Json-Input format)
// ███████╗░█████╗░██████╗░██████╗░███████╗██████╗░░░░███████╗██╗ // ╚════██║██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗░░░██╔════╝██║ // ░░███╔═╝███████║██████╔╝██████╔╝█████╗░░██████╔╝░░░█████╗░░██║ // ██╔══╝░░██╔══██║██╔═══╝░██╔═══╝░██╔══╝░░██╔══██╗░░░██╔══╝░░██║ // ███████╗██║░░██║██║░░░░░██║░░░░░███████╗██║░░██║██╗██║░░░░░██║ // ╚══════╝╚═╝░░╚═╝╚═╝░░░░░╚═╝░░░░░╚══════╝╚═╝░░╚═╝╚═╝╚═╝░░░░░╚═╝ // Copyright (C) 2020 zapper // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // ///@author Zapper ///@notice Registry for Curve Pools with Utility functions. // SPDX-License-Identifier: GPL-2.0 pragma solidity ^0.8.0; import "../oz/0.8.0/access/Ownable.sol"; import "../oz/0.8.0/token/ERC20/utils/SafeERC20.sol"; interface ICurveAddressProvider { function get_registry() external view returns (address); function get_address(uint256 _id) external view returns (address); } interface ICurveRegistry { function get_pool_from_lp_token(address lpToken) external view returns (address); function get_lp_token(address swapAddress) external view returns (address); function get_n_coins(address _pool) external view returns (uint256[2] memory); function get_coins(address _pool) external view returns (address[8] memory); function get_underlying_coins(address _pool) external view returns (address[8] memory); } interface ICurveFactoryRegistry { function get_n_coins(address _pool) external view returns (uint256); function get_coins(address _pool) external view returns (address[2] memory); function get_underlying_coins(address _pool) external view returns (address[8] memory); } interface ICurveV2Pool { function price_oracle(uint256 k) external view returns (uint256); } contract Curve_Registry_V2_1 is Ownable { using SafeERC20 for IERC20; ICurveAddressProvider private constant CurveAddressProvider = ICurveAddressProvider(0x0000000022D53366457F9d5E68Ec105046FC4383); ICurveRegistry public CurveRegistry; ICurveFactoryRegistry public FactoryRegistry; address private constant wbtcToken = 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599; address private constant sbtcCrvToken = 0x075b1bb99792c9E1041bA13afEf80C91a1e70fB3; address internal constant ETHAddress = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; mapping(address => bool) public shouldAddUnderlying; mapping(address => address) private depositAddresses; constructor() { CurveRegistry = ICurveRegistry(CurveAddressProvider.get_registry()); FactoryRegistry = ICurveFactoryRegistry( CurveAddressProvider.get_address(3) ); } /** @notice Checks if the pool is an original (non-factory) pool @param swapAddress Curve swap address for the pool @return true if pool is a non-factory pool, false otherwise */ function isCurvePool(address swapAddress) public view returns (bool) { if (CurveRegistry.get_lp_token(swapAddress) != address(0)) { return true; } return false; } /** @notice Checks if the pool is a factory pool @param swapAddress Curve swap address for the pool @return true if pool is a factory pool, false otherwise */ function isFactoryPool(address swapAddress) public view returns (bool) { if (FactoryRegistry.get_coins(swapAddress)[0] != address(0)) { return true; } return false; } /** @notice Checks if the Curve pool is a metapool @notice All factory pools are metapools but not all metapools * are factory pools! (e.g. dusd) @param swapAddress Curve swap address for the pool @return true if the pool is a metapool, false otherwise */ function isMetaPool(address swapAddress) public view returns (bool) { if (isCurvePool(swapAddress)) { uint256[2] memory poolTokenCounts = CurveRegistry.get_n_coins(swapAddress); if (poolTokenCounts[0] == poolTokenCounts[1]) return false; else return true; } if (isFactoryPool(swapAddress)) return true; return false; } /** @notice Checks if the pool is a Curve V2 pool @param swapAddress Curve swap address for the pool @return true if pool is a V2 pool, false otherwise */ function isV2Pool(address swapAddress) public view returns (bool) { try ICurveV2Pool(swapAddress).price_oracle(0) { return true; } catch { return false; } } /** @notice Gets the Curve pool deposit address @notice The deposit address is used for pools with wrapped (c, y) tokens @param swapAddress Curve swap address for the pool @return depositAddress Curve pool deposit address or the swap address if not mapped */ function getDepositAddress(address swapAddress) external view returns (address depositAddress) { depositAddress = depositAddresses[swapAddress]; if (depositAddress == address(0)) return swapAddress; } /** @notice Gets the Curve pool swap address @notice The token and swap address is the same for metapool/factory pools @param tokenAddress Curve swap address for the pool @return swapAddress Curve pool swap address or address(0) if pool doesnt exist */ function getSwapAddress(address tokenAddress) external view returns (address swapAddress) { swapAddress = CurveRegistry.get_pool_from_lp_token(tokenAddress); if (swapAddress != address(0)) { return swapAddress; } if (isFactoryPool(tokenAddress)) { return tokenAddress; } return address(0); } /** @notice Gets the Curve pool token address @notice The token and swap address is the same for metapool/factory pools @param swapAddress Curve swap address for the pool @return tokenAddress Curve pool token address or address(0) if pool doesnt exist */ function getTokenAddress(address swapAddress) external view returns (address tokenAddress) { tokenAddress = CurveRegistry.get_lp_token(swapAddress); if (tokenAddress != address(0)) { return tokenAddress; } if (isFactoryPool(swapAddress)) { return swapAddress; } return address(0); } /** @notice Gets the number of non-underlying tokens in a pool @param swapAddress Curve swap address for the pool @return number of underlying tokens in the pool */ function getNumTokens(address swapAddress) public view returns (uint256) { if (isCurvePool(swapAddress)) { return CurveRegistry.get_n_coins(swapAddress)[0]; } else { return FactoryRegistry.get_n_coins(swapAddress); } } /** @notice Gets an array of underlying pool token addresses @param swapAddress Curve swap address for the pool @return poolTokens returns 4 element array containing the * addresses of the pool tokens (0 address if pool contains < 4 tokens) */ function getPoolTokens(address swapAddress) public view returns (address[4] memory poolTokens) { if (isMetaPool(swapAddress)) { if (isFactoryPool(swapAddress)) { address[2] memory poolUnderlyingCoins = FactoryRegistry.get_coins(swapAddress); for (uint256 i = 0; i < 2; i++) { poolTokens[i] = poolUnderlyingCoins[i]; } } else { address[8] memory poolUnderlyingCoins = CurveRegistry.get_coins(swapAddress); for (uint256 i = 0; i < 2; i++) { poolTokens[i] = poolUnderlyingCoins[i]; } } return poolTokens; } else { address[8] memory poolUnderlyingCoins; if (isBtcPool(swapAddress)) { poolUnderlyingCoins = CurveRegistry.get_coins(swapAddress); } else { poolUnderlyingCoins = CurveRegistry.get_underlying_coins( swapAddress ); } for (uint256 i = 0; i < 4; i++) { poolTokens[i] = poolUnderlyingCoins[i]; } } } /** @notice Checks if the Curve pool contains WBTC @param swapAddress Curve swap address for the pool @return true if the pool contains WBTC, false otherwise */ function isBtcPool(address swapAddress) public view returns (bool) { address[8] memory poolTokens = CurveRegistry.get_coins(swapAddress); for (uint256 i = 0; i < 4; i++) { if (poolTokens[i] == wbtcToken || poolTokens[i] == sbtcCrvToken) return true; } return false; } /** @notice Checks if the Curve pool contains ETH @param swapAddress Curve swap address for the pool @return true if the pool contains ETH, false otherwise */ function isEthPool(address swapAddress) external view returns (bool) { address[8] memory poolTokens = CurveRegistry.get_coins(swapAddress); for (uint256 i = 0; i < 4; i++) { if (poolTokens[i] == ETHAddress) { return true; } } return false; } /** @notice Check if the pool contains the toToken @param swapAddress Curve swap address for the pool @param toToken contract address of the token @return true if the pool contains the token, false otherwise @return index of the token in the pool, 0 if pool does not contain the token */ function isUnderlyingToken(address swapAddress, address toToken) external view returns (bool, uint256) { address[4] memory poolTokens = getPoolTokens(swapAddress); for (uint256 i = 0; i < 4; i++) { if (poolTokens[i] == address(0)) return (false, 0); if (poolTokens[i] == toToken) return (true, i); } return (false, 0); } /** @notice Updates to the latest Curve registry from the address provider */ function update_curve_registry() external onlyOwner { address new_address = CurveAddressProvider.get_registry(); require(address(CurveRegistry) != new_address, "Already updated"); CurveRegistry = ICurveRegistry(new_address); } /** @notice Updates to the latest Curve factory registry from the address provider */ function update_factory_registry() external onlyOwner { address new_address = CurveAddressProvider.get_address(3); require(address(FactoryRegistry) != new_address, "Already updated"); FactoryRegistry = ICurveFactoryRegistry(new_address); } /** @notice Add new pools which use the _use_underlying bool @param swapAddresses Curve swap addresses for the pool @param addUnderlying True if underlying tokens are always added */ function updateShouldAddUnderlying( address[] calldata swapAddresses, bool[] calldata addUnderlying ) external onlyOwner { require( swapAddresses.length == addUnderlying.length, "Mismatched arrays" ); for (uint256 i = 0; i < swapAddresses.length; i++) { shouldAddUnderlying[swapAddresses[i]] = addUnderlying[i]; } } /** @notice Add new pools which use uamounts for add_liquidity @param swapAddresses Curve swap addresses to map from @param _depositAddresses Curve deposit addresses to map to */ function updateDepositAddresses( address[] calldata swapAddresses, address[] calldata _depositAddresses ) external onlyOwner { require( swapAddresses.length == _depositAddresses.length, "Mismatched arrays" ); for (uint256 i = 0; i < swapAddresses.length; i++) { depositAddresses[swapAddresses[i]] = _depositAddresses[i]; } } /** //@notice Withdraw stuck tokens */ function withdrawTokens(address[] calldata tokens) external onlyOwner { for (uint256 i = 0; i < tokens.length; i++) { uint256 qty; if (tokens[i] == ETHAddress) { qty = address(this).balance; Address.sendValue(payable(owner()), qty); } else { qty = IERC20(tokens[i]).balanceOf(address(this)); IERC20(tokens[i]).safeTransfer(owner(), qty); } } } }
// SPDX-License-Identifier: MIT 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() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require( newOwner != address(0), "Ownable: new owner is the zero address" ); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval( address indexed owner, address indexed spender, uint256 value ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn( token, abi.encodeWithSelector(token.transfer.selector, to, value) ); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn( token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value) ); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn( token, abi.encodeWithSelector(token.approve.selector, spender, value) ); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn( token, abi.encodeWithSelector( token.approve.selector, spender, newAllowance ) ); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require( oldAllowance >= value, "SafeERC20: decreased allowance below zero" ); uint256 newAllowance = oldAllowance - value; _callOptionalReturn( token, abi.encodeWithSelector( token.approve.selector, spender, newAllowance ) ); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall( data, "SafeERC20: low-level call failed" ); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require( abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed" ); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require( address(this).balance >= amount, "Address: insufficient balance" ); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require( success, "Address: unable to send value, recipient may have reverted" ); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue( target, data, value, "Address: low-level call with value failed" ); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require( address(this).balance >= value, "Address: insufficient balance for call" ); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall( target, data, "Address: low-level static call failed" ); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall( target, data, "Address: low-level delegate call failed" ); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT 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) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
{ "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"CurveRegistry","outputs":[{"internalType":"contract ICurveRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FactoryRegistry","outputs":[{"internalType":"contract ICurveFactoryRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"swapAddress","type":"address"}],"name":"getDepositAddress","outputs":[{"internalType":"address","name":"depositAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"swapAddress","type":"address"}],"name":"getNumTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"swapAddress","type":"address"}],"name":"getPoolTokens","outputs":[{"internalType":"address[4]","name":"poolTokens","type":"address[4]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"getSwapAddress","outputs":[{"internalType":"address","name":"swapAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"swapAddress","type":"address"}],"name":"getTokenAddress","outputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"swapAddress","type":"address"}],"name":"isBtcPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"swapAddress","type":"address"}],"name":"isCurvePool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"swapAddress","type":"address"}],"name":"isEthPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"swapAddress","type":"address"}],"name":"isFactoryPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"swapAddress","type":"address"}],"name":"isMetaPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"swapAddress","type":"address"},{"internalType":"address","name":"toToken","type":"address"}],"name":"isUnderlyingToken","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"swapAddress","type":"address"}],"name":"isV2Pool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"shouldAddUnderlying","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"swapAddresses","type":"address[]"},{"internalType":"address[]","name":"_depositAddresses","type":"address[]"}],"name":"updateDepositAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"swapAddresses","type":"address[]"},{"internalType":"bool[]","name":"addUnderlying","type":"bool[]"}],"name":"updateShouldAddUnderlying","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"update_curve_registry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"update_factory_registry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506f22d53366457f9d5e68ec105046fc43836001600160a01b031663a262904b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200009d57600080fd5b505afa158015620000b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d89190620001a1565b600180546001600160a01b0319166001600160a01b039290921691909117905560405163124fd3dd60e21b8152600360048201526f22d53366457f9d5e68ec105046fc43839063493f4f749060240160206040518083038186803b1580156200014057600080fd5b505afa15801562000155573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200017b9190620001a1565b600280546001600160a01b0319166001600160a01b0392909216919091179055620001d1565b600060208284031215620001b3578081fd5b81516001600160a01b0381168114620001ca578182fd5b9392505050565b611f2080620001e16000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c8063a1761a97116100c3578063d01d6c0e1161007c578063d01d6c0e146102ee578063d83a7f6714610301578063e2ff3e5314610314578063f2fde38b1461031c578063f4c91c1a1461032f578063f8cf01f51461034257600080fd5b8063a1761a971461026f578063a19f017114610282578063b8d7b66914610295578063bbff1a66146102a8578063c0055046146102bb578063ca4f2803146102ce57600080fd5b8063578eaca411610115578063578eaca4146102135780635ecb16cd14610226578063715018a61461023b57806373acb853146102435780638da5cb5b1461024b5780638e5f66a81461025c57600080fd5b80631e09fa301461015257806329a552a4146101815780633aa3eb01146101b45780634c91f2ca146101d55780634e5a33ff146101e8575b600080fd5b610165610160366004611ac5565b610355565b6040805192151583526020830191909152015b60405180910390f35b6101a461018f366004611a8d565b60036020526000908152604090205460ff1681565b6040519015158152602001610178565b6101c76101c2366004611a8d565b610423565b604051908152602001610178565b6101a46101e3366004611a8d565b61053e565b6001546101fb906001600160a01b031681565b6040516001600160a01b039091168152602001610178565b6101a4610221366004611a8d565b61060b565b610239610234366004611bfa565b6106a2565b005b610239610880565b6102396108f4565b6000546001600160a01b03166101fb565b61023961026a366004611c3a565b610a15565b6002546101fb906001600160a01b031681565b6101a4610290366004611a8d565b610b45565b6101fb6102a3366004611a8d565b610c8f565b6101fb6102b6366004611a8d565b610d36565b6101a46102c9366004611a8d565b610d69565b6102e16102dc366004611a8d565b610e5e565b6040516101789190611d94565b6102396102fc366004611ca3565b611207565b6101fb61030f366004611a8d565b611327565b61023961134b565b61023961032a366004611a8d565b61146d565b6101a461033d366004611a8d565b611557565b6101a4610350366004611a8d565b6115d6565b600080600061036385610e5e565b905060005b600481101561041257600082826004811061039357634e487b7160e01b600052603260045260246000fd5b60200201516001600160a01b031614156103b55760008093509350505061041c565b846001600160a01b03168282600481106103df57634e487b7160e01b600052603260045260246000fd5b60200201516001600160a01b031614156104005760019350915061041c9050565b8061040a81611e9d565b915050610368565b5060008092509250505b9250929050565b600061042e826115d6565b156104b65760015460405163940494f160e01b81526001600160a01b0384811660048301529091169063940494f190602401604080518083038186803b15801561047757600080fd5b505afa15801561048b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104af9190611ccf565b5192915050565b60025460405163940494f160e01b81526001600160a01b0384811660048301529091169063940494f19060240160206040518083038186803b1580156104fb57600080fd5b505afa15801561050f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105339190611d60565b92915050565b919050565b6000610549826115d6565b156105ed5760015460405163940494f160e01b81526001600160a01b038481166004830152600092169063940494f190602401604080518083038186803b15801561059357600080fd5b505afa1580156105a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cb9190611ccf565b6020810151815191925014156105e45750600092915050565b50600192915050565b6105f68261060b565b1561060357506001919050565b506000919050565b600254604051639ac90d3d60e01b81526001600160a01b0383811660048301526000928392911690639ac90d3d90602401604080518083038186803b15801561065357600080fd5b505afa158015610667573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068b9190611afd565b516001600160a01b03161461060357506001919050565b6000546001600160a01b031633146106d55760405162461bcd60e51b81526004016106cc90611e01565b60405180910390fd5b60005b8181101561087b57600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee84848481811061071757634e487b7160e01b600052603260045260246000fd5b905060200201602081019061072c9190611a8d565b6001600160a01b0316141561075d5750476107586107526000546001600160a01b031690565b8261166d565b610868565b83838381811061077d57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906107929190611a8d565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b1580156107d357600080fd5b505afa1580156107e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080b9190611d60565b90506108686108226000546001600160a01b031690565b8286868681811061084357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906108589190611a8d565b6001600160a01b03169190611786565b508061087381611e9d565b9150506106d8565b505050565b6000546001600160a01b031633146108aa5760405162461bcd60e51b81526004016106cc90611e01565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461091e5760405162461bcd60e51b81526004016106cc90611e01565b60405163124fd3dd60e21b8152600360048201526000906f22d53366457f9d5e68ec105046fc43839063493f4f749060240160206040518083038186803b15801561096857600080fd5b505afa15801561097c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a09190611aa9565b6002549091506001600160a01b03808316911614156109f35760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e481d5c19185d1959608a1b60448201526064016106cc565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a3f5760405162461bcd60e51b81526004016106cc90611e01565b828114610a825760405162461bcd60e51b81526020600482015260116024820152704d69736d6174636865642061727261797360781b60448201526064016106cc565b60005b83811015610b3e57828282818110610aad57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610ac29190611a8d565b60046000878785818110610ae657634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610afb9190611a8d565b6001600160a01b039081168252602082019290925260400160002080546001600160a01b0319169290911691909117905580610b3681611e9d565b915050610a85565b5050505050565b600154604051639ac90d3d60e01b81526001600160a01b0383811660048301526000928392911690639ac90d3d906024016101006040518083038186803b158015610b8f57600080fd5b505afa158015610ba3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc79190611b6b565b905060005b6004811015610c8557732260fac5e5542a773aa44fbcfedf7c193bc2c599828260088110610c0a57634e487b7160e01b600052603260045260246000fd5b60200201516001600160a01b03161480610c64575073075b1bb99792c9e1041ba13afef80c91a1e70fb3828260088110610c5457634e487b7160e01b600052603260045260246000fd5b60200201516001600160a01b0316145b15610c73575060019392505050565b80610c7d81611e9d565b915050610bcc565b5060009392505050565b600154604051633795104960e01b81526001600160a01b03838116600483015260009216906337951049906024015b60206040518083038186803b158015610cd657600080fd5b505afa158015610cea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0e9190611aa9565b90506001600160a01b03811615610d2457919050565b610d2d8261060b565b15610603575090565b60015460405163bdf475c360e01b81526001600160a01b038381166004830152600092169063bdf475c390602401610cbe565b600154604051639ac90d3d60e01b81526001600160a01b0383811660048301526000928392911690639ac90d3d906024016101006040518083038186803b158015610db357600080fd5b505afa158015610dc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610deb9190611b6b565b905060005b6004811015610c855773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee828260088110610e2e57634e487b7160e01b600052603260045260246000fd5b60200201516001600160a01b03161415610e4c575060019392505050565b80610e5681611e9d565b915050610df0565b610e66611a0d565b610e6f8261053e565b1561107557610e7d8261060b565b15610f7e57600254604051639ac90d3d60e01b81526001600160a01b0384811660048301526000921690639ac90d3d90602401604080518083038186803b158015610ec757600080fd5b505afa158015610edb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eff9190611afd565b905060005b6002811015610f7757818160028110610f2d57634e487b7160e01b600052603260045260246000fd5b6020020151838260048110610f5257634e487b7160e01b600052603260045260246000fd5b6001600160a01b03909216602092909202015280610f6f81611e9d565b915050610f04565b5050919050565b600154604051639ac90d3d60e01b81526001600160a01b0384811660048301526000921690639ac90d3d906024016101006040518083038186803b158015610fc557600080fd5b505afa158015610fd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffd9190611b6b565b905060005b6002811015610f775781816008811061102b57634e487b7160e01b600052603260045260246000fd5b602002015183826004811061105057634e487b7160e01b600052603260045260246000fd5b6001600160a01b0390921660209290920201528061106d81611e9d565b915050611002565b61107d611a2b565b61108683610b45565b1561111057600154604051639ac90d3d60e01b81526001600160a01b03858116600483015290911690639ac90d3d906024016101006040518083038186803b1580156110d157600080fd5b505afa1580156110e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111099190611b6b565b9050611191565b60015460405163a77576ef60e01b81526001600160a01b0385811660048301529091169063a77576ef906024016101006040518083038186803b15801561115657600080fd5b505afa15801561116a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118e9190611b6b565b90505b60005b6004811015610f77578181600881106111bd57634e487b7160e01b600052603260045260246000fd5b60200201518382600481106111e257634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020929092020152806111ff81611e9d565b915050611194565b6000546001600160a01b031633146112315760405162461bcd60e51b81526004016106cc90611e01565b8281146112745760405162461bcd60e51b81526020600482015260116024820152704d69736d6174636865642061727261797360781b60448201526064016106cc565b60005b83811015610b3e5782828281811061129f57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906112b49190611d28565b600360008787858181106112d857634e487b7160e01b600052603260045260246000fd5b90506020020160208101906112ed9190611a8d565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061131f81611e9d565b915050611277565b6001600160a01b038082166000908152600460205260409020541680610539575090565b6000546001600160a01b031633146113755760405162461bcd60e51b81526004016106cc90611e01565b60006f22d53366457f9d5e68ec105046fc43836001600160a01b031663a262904b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113c057600080fd5b505afa1580156113d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f89190611aa9565b6001549091506001600160a01b038083169116141561144b5760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e481d5c19185d1959608a1b60448201526064016106cc565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146114975760405162461bcd60e51b81526004016106cc90611e01565b6001600160a01b0381166114fc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106cc565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b604051636872765360e01b8152600060048201819052906001600160a01b0383169063687276539060240160206040518083038186803b15801561159a57600080fd5b505afa9250505080156115ca575060408051601f3d908101601f191682019092526115c791810190611d60565b60015b6105e457506000919050565b600154604051633795104960e01b81526001600160a01b038381166004830152600092839291169063379510499060240160206040518083038186803b15801561161f57600080fd5b505afa158015611633573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116579190611aa9565b6001600160a01b03161461060357506001919050565b804710156116bd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016106cc565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461170a576040519150601f19603f3d011682016040523d82523d6000602084013e61170f565b606091505b505090508061087b5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016106cc565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649084015261087b92869291600091611816918516908490611893565b80519091501561087b57808060200190518101906118349190611d44565b61087b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106cc565b60606118a284846000856118ac565b90505b9392505050565b60608247101561190d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106cc565b843b61195b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106cc565b600080866001600160a01b031685876040516119779190611d78565b60006040518083038185875af1925050503d80600081146119b4576040519150601f19603f3d011682016040523d82523d6000602084013e6119b9565b606091505b50915091506119c98282866119d4565b979650505050505050565b606083156119e35750816118a5565b8251156119f35782518084602001fd5b8160405162461bcd60e51b81526004016106cc9190611dce565b60405180608001604052806004906020820280368337509192915050565b6040518061010001604052806008906020820280368337509192915050565b60008083601f840112611a5b578182fd5b50813567ffffffffffffffff811115611a72578182fd5b6020830191508360208260051b850101111561041c57600080fd5b600060208284031215611a9e578081fd5b81356118a581611ec4565b600060208284031215611aba578081fd5b81516118a581611ec4565b60008060408385031215611ad7578081fd5b8235611ae281611ec4565b91506020830135611af281611ec4565b809150509250929050565b600060408284031215611b0e578081fd5b82601f830112611b1c578081fd5b611b24611e36565b808385604086011115611b35578384fd5b835b6002811015611b60578151611b4b81611ec4565b84526020938401939190910190600101611b37565b509095945050505050565b6000610100808385031215611b7e578182fd5b83601f840112611b8c578182fd5b60405181810181811067ffffffffffffffff82111715611bba57634e487b7160e01b84526041600452602484fd5b6040528084838101871015611bcd578485fd5b8493505b6008841015611b60578051611be581611ec4565b82526001939093019260209182019101611bd1565b60008060208385031215611c0c578182fd5b823567ffffffffffffffff811115611c22578283fd5b611c2e85828601611a4a565b90969095509350505050565b60008060008060408587031215611c4f578182fd5b843567ffffffffffffffff80821115611c66578384fd5b611c7288838901611a4a565b90965094506020870135915080821115611c8a578384fd5b50611c9787828801611a4a565b95989497509550505050565b60008060008060408587031215611cb8578384fd5b843567ffffffffffffffff80821115611c66578586fd5b600060408284031215611ce0578081fd5b82601f830112611cee578081fd5b611cf6611e36565b808385604086011115611d07578384fd5b835b6002811015611b60578151845260209384019390910190600101611d09565b600060208284031215611d39578081fd5b81356118a581611edc565b600060208284031215611d55578081fd5b81516118a581611edc565b600060208284031215611d71578081fd5b5051919050565b60008251611d8a818460208701611e6d565b9190910192915050565b60808101818360005b6004811015611dc55781516001600160a01b0316835260209283019290910190600101611d9d565b50505092915050565b6020815260008251806020840152611ded816040850160208701611e6d565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6040805190810167ffffffffffffffff81118282101715611e6757634e487b7160e01b600052604160045260246000fd5b60405290565b60005b83811015611e88578181015183820152602001611e70565b83811115611e97576000848401525b50505050565b6000600019821415611ebd57634e487b7160e01b81526011600452602481fd5b5060010190565b6001600160a01b0381168114611ed957600080fd5b50565b8015158114611ed957600080fdfea26469706673582212202c97e425e8d92d25eb09e790b84a1c9228913d2829d75991e72be51caf45fddf64736f6c63430008040033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061014d5760003560e01c8063a1761a97116100c3578063d01d6c0e1161007c578063d01d6c0e146102ee578063d83a7f6714610301578063e2ff3e5314610314578063f2fde38b1461031c578063f4c91c1a1461032f578063f8cf01f51461034257600080fd5b8063a1761a971461026f578063a19f017114610282578063b8d7b66914610295578063bbff1a66146102a8578063c0055046146102bb578063ca4f2803146102ce57600080fd5b8063578eaca411610115578063578eaca4146102135780635ecb16cd14610226578063715018a61461023b57806373acb853146102435780638da5cb5b1461024b5780638e5f66a81461025c57600080fd5b80631e09fa301461015257806329a552a4146101815780633aa3eb01146101b45780634c91f2ca146101d55780634e5a33ff146101e8575b600080fd5b610165610160366004611ac5565b610355565b6040805192151583526020830191909152015b60405180910390f35b6101a461018f366004611a8d565b60036020526000908152604090205460ff1681565b6040519015158152602001610178565b6101c76101c2366004611a8d565b610423565b604051908152602001610178565b6101a46101e3366004611a8d565b61053e565b6001546101fb906001600160a01b031681565b6040516001600160a01b039091168152602001610178565b6101a4610221366004611a8d565b61060b565b610239610234366004611bfa565b6106a2565b005b610239610880565b6102396108f4565b6000546001600160a01b03166101fb565b61023961026a366004611c3a565b610a15565b6002546101fb906001600160a01b031681565b6101a4610290366004611a8d565b610b45565b6101fb6102a3366004611a8d565b610c8f565b6101fb6102b6366004611a8d565b610d36565b6101a46102c9366004611a8d565b610d69565b6102e16102dc366004611a8d565b610e5e565b6040516101789190611d94565b6102396102fc366004611ca3565b611207565b6101fb61030f366004611a8d565b611327565b61023961134b565b61023961032a366004611a8d565b61146d565b6101a461033d366004611a8d565b611557565b6101a4610350366004611a8d565b6115d6565b600080600061036385610e5e565b905060005b600481101561041257600082826004811061039357634e487b7160e01b600052603260045260246000fd5b60200201516001600160a01b031614156103b55760008093509350505061041c565b846001600160a01b03168282600481106103df57634e487b7160e01b600052603260045260246000fd5b60200201516001600160a01b031614156104005760019350915061041c9050565b8061040a81611e9d565b915050610368565b5060008092509250505b9250929050565b600061042e826115d6565b156104b65760015460405163940494f160e01b81526001600160a01b0384811660048301529091169063940494f190602401604080518083038186803b15801561047757600080fd5b505afa15801561048b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104af9190611ccf565b5192915050565b60025460405163940494f160e01b81526001600160a01b0384811660048301529091169063940494f19060240160206040518083038186803b1580156104fb57600080fd5b505afa15801561050f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105339190611d60565b92915050565b919050565b6000610549826115d6565b156105ed5760015460405163940494f160e01b81526001600160a01b038481166004830152600092169063940494f190602401604080518083038186803b15801561059357600080fd5b505afa1580156105a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cb9190611ccf565b6020810151815191925014156105e45750600092915050565b50600192915050565b6105f68261060b565b1561060357506001919050565b506000919050565b600254604051639ac90d3d60e01b81526001600160a01b0383811660048301526000928392911690639ac90d3d90602401604080518083038186803b15801561065357600080fd5b505afa158015610667573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068b9190611afd565b516001600160a01b03161461060357506001919050565b6000546001600160a01b031633146106d55760405162461bcd60e51b81526004016106cc90611e01565b60405180910390fd5b60005b8181101561087b57600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee84848481811061071757634e487b7160e01b600052603260045260246000fd5b905060200201602081019061072c9190611a8d565b6001600160a01b0316141561075d5750476107586107526000546001600160a01b031690565b8261166d565b610868565b83838381811061077d57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906107929190611a8d565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b1580156107d357600080fd5b505afa1580156107e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080b9190611d60565b90506108686108226000546001600160a01b031690565b8286868681811061084357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906108589190611a8d565b6001600160a01b03169190611786565b508061087381611e9d565b9150506106d8565b505050565b6000546001600160a01b031633146108aa5760405162461bcd60e51b81526004016106cc90611e01565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461091e5760405162461bcd60e51b81526004016106cc90611e01565b60405163124fd3dd60e21b8152600360048201526000906f22d53366457f9d5e68ec105046fc43839063493f4f749060240160206040518083038186803b15801561096857600080fd5b505afa15801561097c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a09190611aa9565b6002549091506001600160a01b03808316911614156109f35760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e481d5c19185d1959608a1b60448201526064016106cc565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a3f5760405162461bcd60e51b81526004016106cc90611e01565b828114610a825760405162461bcd60e51b81526020600482015260116024820152704d69736d6174636865642061727261797360781b60448201526064016106cc565b60005b83811015610b3e57828282818110610aad57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610ac29190611a8d565b60046000878785818110610ae657634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610afb9190611a8d565b6001600160a01b039081168252602082019290925260400160002080546001600160a01b0319169290911691909117905580610b3681611e9d565b915050610a85565b5050505050565b600154604051639ac90d3d60e01b81526001600160a01b0383811660048301526000928392911690639ac90d3d906024016101006040518083038186803b158015610b8f57600080fd5b505afa158015610ba3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc79190611b6b565b905060005b6004811015610c8557732260fac5e5542a773aa44fbcfedf7c193bc2c599828260088110610c0a57634e487b7160e01b600052603260045260246000fd5b60200201516001600160a01b03161480610c64575073075b1bb99792c9e1041ba13afef80c91a1e70fb3828260088110610c5457634e487b7160e01b600052603260045260246000fd5b60200201516001600160a01b0316145b15610c73575060019392505050565b80610c7d81611e9d565b915050610bcc565b5060009392505050565b600154604051633795104960e01b81526001600160a01b03838116600483015260009216906337951049906024015b60206040518083038186803b158015610cd657600080fd5b505afa158015610cea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0e9190611aa9565b90506001600160a01b03811615610d2457919050565b610d2d8261060b565b15610603575090565b60015460405163bdf475c360e01b81526001600160a01b038381166004830152600092169063bdf475c390602401610cbe565b600154604051639ac90d3d60e01b81526001600160a01b0383811660048301526000928392911690639ac90d3d906024016101006040518083038186803b158015610db357600080fd5b505afa158015610dc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610deb9190611b6b565b905060005b6004811015610c855773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee828260088110610e2e57634e487b7160e01b600052603260045260246000fd5b60200201516001600160a01b03161415610e4c575060019392505050565b80610e5681611e9d565b915050610df0565b610e66611a0d565b610e6f8261053e565b1561107557610e7d8261060b565b15610f7e57600254604051639ac90d3d60e01b81526001600160a01b0384811660048301526000921690639ac90d3d90602401604080518083038186803b158015610ec757600080fd5b505afa158015610edb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eff9190611afd565b905060005b6002811015610f7757818160028110610f2d57634e487b7160e01b600052603260045260246000fd5b6020020151838260048110610f5257634e487b7160e01b600052603260045260246000fd5b6001600160a01b03909216602092909202015280610f6f81611e9d565b915050610f04565b5050919050565b600154604051639ac90d3d60e01b81526001600160a01b0384811660048301526000921690639ac90d3d906024016101006040518083038186803b158015610fc557600080fd5b505afa158015610fd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffd9190611b6b565b905060005b6002811015610f775781816008811061102b57634e487b7160e01b600052603260045260246000fd5b602002015183826004811061105057634e487b7160e01b600052603260045260246000fd5b6001600160a01b0390921660209290920201528061106d81611e9d565b915050611002565b61107d611a2b565b61108683610b45565b1561111057600154604051639ac90d3d60e01b81526001600160a01b03858116600483015290911690639ac90d3d906024016101006040518083038186803b1580156110d157600080fd5b505afa1580156110e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111099190611b6b565b9050611191565b60015460405163a77576ef60e01b81526001600160a01b0385811660048301529091169063a77576ef906024016101006040518083038186803b15801561115657600080fd5b505afa15801561116a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118e9190611b6b565b90505b60005b6004811015610f77578181600881106111bd57634e487b7160e01b600052603260045260246000fd5b60200201518382600481106111e257634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020929092020152806111ff81611e9d565b915050611194565b6000546001600160a01b031633146112315760405162461bcd60e51b81526004016106cc90611e01565b8281146112745760405162461bcd60e51b81526020600482015260116024820152704d69736d6174636865642061727261797360781b60448201526064016106cc565b60005b83811015610b3e5782828281811061129f57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906112b49190611d28565b600360008787858181106112d857634e487b7160e01b600052603260045260246000fd5b90506020020160208101906112ed9190611a8d565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061131f81611e9d565b915050611277565b6001600160a01b038082166000908152600460205260409020541680610539575090565b6000546001600160a01b031633146113755760405162461bcd60e51b81526004016106cc90611e01565b60006f22d53366457f9d5e68ec105046fc43836001600160a01b031663a262904b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113c057600080fd5b505afa1580156113d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f89190611aa9565b6001549091506001600160a01b038083169116141561144b5760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e481d5c19185d1959608a1b60448201526064016106cc565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146114975760405162461bcd60e51b81526004016106cc90611e01565b6001600160a01b0381166114fc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106cc565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b604051636872765360e01b8152600060048201819052906001600160a01b0383169063687276539060240160206040518083038186803b15801561159a57600080fd5b505afa9250505080156115ca575060408051601f3d908101601f191682019092526115c791810190611d60565b60015b6105e457506000919050565b600154604051633795104960e01b81526001600160a01b038381166004830152600092839291169063379510499060240160206040518083038186803b15801561161f57600080fd5b505afa158015611633573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116579190611aa9565b6001600160a01b03161461060357506001919050565b804710156116bd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016106cc565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461170a576040519150601f19603f3d011682016040523d82523d6000602084013e61170f565b606091505b505090508061087b5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016106cc565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649084015261087b92869291600091611816918516908490611893565b80519091501561087b57808060200190518101906118349190611d44565b61087b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106cc565b60606118a284846000856118ac565b90505b9392505050565b60608247101561190d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106cc565b843b61195b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106cc565b600080866001600160a01b031685876040516119779190611d78565b60006040518083038185875af1925050503d80600081146119b4576040519150601f19603f3d011682016040523d82523d6000602084013e6119b9565b606091505b50915091506119c98282866119d4565b979650505050505050565b606083156119e35750816118a5565b8251156119f35782518084602001fd5b8160405162461bcd60e51b81526004016106cc9190611dce565b60405180608001604052806004906020820280368337509192915050565b6040518061010001604052806008906020820280368337509192915050565b60008083601f840112611a5b578182fd5b50813567ffffffffffffffff811115611a72578182fd5b6020830191508360208260051b850101111561041c57600080fd5b600060208284031215611a9e578081fd5b81356118a581611ec4565b600060208284031215611aba578081fd5b81516118a581611ec4565b60008060408385031215611ad7578081fd5b8235611ae281611ec4565b91506020830135611af281611ec4565b809150509250929050565b600060408284031215611b0e578081fd5b82601f830112611b1c578081fd5b611b24611e36565b808385604086011115611b35578384fd5b835b6002811015611b60578151611b4b81611ec4565b84526020938401939190910190600101611b37565b509095945050505050565b6000610100808385031215611b7e578182fd5b83601f840112611b8c578182fd5b60405181810181811067ffffffffffffffff82111715611bba57634e487b7160e01b84526041600452602484fd5b6040528084838101871015611bcd578485fd5b8493505b6008841015611b60578051611be581611ec4565b82526001939093019260209182019101611bd1565b60008060208385031215611c0c578182fd5b823567ffffffffffffffff811115611c22578283fd5b611c2e85828601611a4a565b90969095509350505050565b60008060008060408587031215611c4f578182fd5b843567ffffffffffffffff80821115611c66578384fd5b611c7288838901611a4a565b90965094506020870135915080821115611c8a578384fd5b50611c9787828801611a4a565b95989497509550505050565b60008060008060408587031215611cb8578384fd5b843567ffffffffffffffff80821115611c66578586fd5b600060408284031215611ce0578081fd5b82601f830112611cee578081fd5b611cf6611e36565b808385604086011115611d07578384fd5b835b6002811015611b60578151845260209384019390910190600101611d09565b600060208284031215611d39578081fd5b81356118a581611edc565b600060208284031215611d55578081fd5b81516118a581611edc565b600060208284031215611d71578081fd5b5051919050565b60008251611d8a818460208701611e6d565b9190910192915050565b60808101818360005b6004811015611dc55781516001600160a01b0316835260209283019290910190600101611d9d565b50505092915050565b6020815260008251806020840152611ded816040850160208701611e6d565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6040805190810167ffffffffffffffff81118282101715611e6757634e487b7160e01b600052604160045260246000fd5b60405290565b60005b83811015611e88578181015183820152602001611e70565b83811115611e97576000848401525b50505050565b6000600019821415611ebd57634e487b7160e01b81526011600452602481fd5b5060010190565b6001600160a01b0381168114611ed957600080fd5b50565b8015158114611ed957600080fdfea26469706673582212202c97e425e8d92d25eb09e790b84a1c9228913d2829d75991e72be51caf45fddf64736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.