Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x6020610e | 15732038 | 720 days ago | IN | 0 ETH | 0.01515257 |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x22ceb131...fcfC86E56 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Vyper_contract
Compiler Version
vyper:0.3.4
Contract Source Code (Vyper language format)
# @version 0.3.4 """ @title Curve Registry Handler for v2 Crypto Registry @license MIT """ # ---- interfaces --- # interface BaseRegistry: def find_pool_for_coins(_from: address, _to: address, i: uint256 = 0) -> address: view def get_admin_balances(_pool: address) -> uint256[MAX_COINS]: view def get_balances(_pool: address) -> uint256[MAX_COINS]: view def get_base_pool(_pool: address) -> address: view def get_coins(_pool: address) -> address[MAX_COINS]: view def get_coin_indices(_pool: address, _from: address, _to: address) -> (int128, int128, bool): view def get_decimals(_pool: address) -> uint256[MAX_COINS]: view def get_fees(_pool: address) -> uint256[4]: view def get_gauges(_pool: address) -> (address[10], int128[10]): view def get_lp_token(_pool: address) -> address: view def get_n_coins(_pool: address) -> uint256: view def get_pool_from_lp_token(_lp_token: address) -> address: view def get_pool_name(_pool: address) -> String[64]: view def get_n_underlying_coins(_pool: address) -> uint256: view def get_underlying_balances(_pool: address) -> uint256[MAX_COINS]: view def get_underlying_coins(_pool: address) -> address[MAX_COINS]: view def get_underlying_decimals(_pool: address) -> uint256[MAX_COINS]: view def get_virtual_price_from_lp_token(_token: address) -> uint256: view def is_meta(_pool: address) -> bool: view def pool_count() -> uint256: view def pool_list(pool_id: uint256) -> address: view interface CurvePool: def adjustment_step() -> uint256: view def admin_fee() -> uint256: view def allowed_extra_profit() -> uint256: view def A() -> uint256: view def D() -> uint256: view def fee() -> uint256: view def fee_gamma() -> uint256: view def gamma() -> uint256: view def get_virtual_price() -> uint256: view def ma_half_time() -> uint256: view def mid_fee() -> uint256: view def out_fee() -> uint256: view def virtual_price() -> uint256: view def xcp_profit() -> uint256: view def xcp_profit_a() -> uint256: view interface ERC20: def name() -> String[64]: view def balanceOf(_addr: address) -> uint256: view def totalSupply() -> uint256: view interface MetaRegistry: def registry_length() -> uint256: view # ---- constants ---- # MAX_COINS: constant(uint256) = 8 # ---- storage variables ---- # base_registry: public(BaseRegistry) # ---- constructor ---- # @external def __init__(_base_registry: address): self.base_registry = BaseRegistry(_base_registry) # ---- internal methods ---- # @internal @view def _get_lp_token(_pool: address) -> address: return self.base_registry.get_lp_token(_pool) # ---- view methods (API) of the contract ---- # @external @view def find_pool_for_coins(_from: address, _to: address, i: uint256 = 0) -> address: """ @notice Find the pool that has the given coins. @param _from The address of the coin holder. @param _to The address of the coin holder. @param i The index of the pool in the list of pools containing the two coins. @return The address of the pool. """ return self.base_registry.find_pool_for_coins(_from, _to, i) @external @view def get_admin_balances(_pool: address) -> uint256[MAX_COINS]: """ @notice Get the admin balances of the given pool. @param _pool The address of the pool. @return The admin balances of the pool. """ return self.base_registry.get_admin_balances(_pool) @external @view def get_balances(_pool: address) -> uint256[MAX_COINS]: """ @notice Get the balances of the given pool. @param _pool The address of the pool. @return The balances of the pool. """ return self.base_registry.get_balances(_pool) @external @view def get_base_pool(_pool: address) -> address: """ @notice Get the base pool of the given pool. @param _pool The address of the pool. @return The base pool of the pool. """ return self.base_registry.get_base_pool(_pool) @view @external def get_coin_indices(_pool: address, _from: address, _to: address) -> (int128, int128, bool): """ @notice Get the indices of the coins in the given pool. @param _pool The address of the pool. @param _from The _from coin address. @param _to The _to coin address. @return The indices of the coins in the pool. """ return self.base_registry.get_coin_indices(_pool, _from, _to) @external @view def get_coins(_pool: address) -> address[MAX_COINS]: """ @notice Get the coins of the given pool. @param _pool The address of the pool. @return address[MAX_COINS] list of coins in the pool. """ return self.base_registry.get_coins(_pool) @external @view def get_decimals(_pool: address) -> uint256[MAX_COINS]: """ @notice Get the decimals of the given pool. @param _pool The address of the pool. @return uint256[MAX_COINS] list of decimals of the coins in the pool. """ return self.base_registry.get_decimals(_pool) @external @view def get_fees(_pool: address) -> uint256[10]: """ @notice Get the fees of the given pool. @param _pool The address of the pool. @return Pool fee as uint256 with 1e10 precision Admin fee as 1e10 percentage of pool fee Mid fee Out fee """ fees: uint256[10] = empty(uint256[10]) pool_fees: uint256[4] = self.base_registry.get_fees(_pool) for i in range(4): fees[i] = pool_fees[i] return fees @external @view def get_gauges(_pool: address) -> (address[10], int128[10]): """ @notice Get the gauges and gauge_types for a given pool. @param _pool The address of the pool. @return The gauges of the pool. """ return self.base_registry.get_gauges(_pool) @external @view def get_lp_token(_pool: address) -> address: """ @notice Get the LP token of the given pool. @param _pool The address of the pool. @return The LP token of the pool. """ return self._get_lp_token(_pool) @external @view def get_n_coins(_pool: address) -> uint256: """ @notice Get the number of coins in the given pool. @param _pool The address of the pool. @return The number of coins in the pool. """ return self.base_registry.get_n_coins(_pool) @external @view def get_n_underlying_coins(_pool: address) -> uint256: """ @notice Get the number of underlying coins in the given pool. @param _pool The address of the pool. @return The number of underlying coins in the pool. """ return self.base_registry.get_n_underlying_coins(_pool) @external @view def get_pool_asset_type(_pool: address) -> uint256: """ @notice Get the asset type of the given pool. @dev Returns 4: 0 = USD, 1 = ETH, 2 = BTC, 3 = Other @param _pool The address of the pool. @return The asset type of the pool. """ return 4 @external @view def get_pool_from_lp_token(_lp_token: address) -> address: """ @notice Get the pool of the given LP token. @param _lp_token The address of the LP token. @return The address of the pool. """ return self.base_registry.get_pool_from_lp_token(_lp_token) @external @view def get_pool_name(_pool: address) -> String[64]: """ @notice Get the name of the given pool. @param _pool The address of the pool. @return The name of the pool. """ return self.base_registry.get_pool_name(_pool) @external @view def get_pool_params(_pool: address) -> uint256[20]: """ @notice returns pool params given a cryptopool address @dev contains all settable parameter that alter the pool's performance @dev only applicable for cryptopools @param _pool Address of the pool for which data is being queried. """ pool_params: uint256[20] = empty(uint256[20]) pool_params[0] = CurvePool(_pool).A() pool_params[1] = CurvePool(_pool).D() pool_params[2] = CurvePool(_pool).gamma() pool_params[3] = CurvePool(_pool).allowed_extra_profit() pool_params[4] = CurvePool(_pool).fee_gamma() pool_params[5] = CurvePool(_pool).adjustment_step() pool_params[6] = CurvePool(_pool).ma_half_time() return pool_params @external @view def get_underlying_balances(_pool: address) -> uint256[MAX_COINS]: """ @notice Get the underlying balances of the given pool. @param _pool The address of the pool. @return The underlying balances of the pool. """ return self.base_registry.get_underlying_balances(_pool) @external @view def get_underlying_coins(_pool: address) -> address[MAX_COINS]: """ @notice Get the underlying coins of the given pool. @param _pool The address of the pool. @return The underlying coins of the pool. """ return self.base_registry.get_underlying_coins(_pool) @external @view def get_underlying_decimals(_pool: address) -> uint256[MAX_COINS]: """ @notice Get the underlying decimals of coins in a given pool. @param _pool The address of the pool. @return The underlying decimals of coins in the pool. """ return self.base_registry.get_underlying_decimals(_pool) @external @view def get_virtual_price_from_lp_token(_token: address) -> uint256: """ @notice Get the virtual price of the given LP token. @param _token The address of the LP token. @return uint256 The virtual price of the LP token. """ return self.base_registry.get_virtual_price_from_lp_token(_token) @external @view def is_meta(_pool: address) -> bool: """ @notice Check if the given pool is a meta pool. @param _pool The address of the pool. @return True if the pool is a meta pool, false otherwise. """ return self.base_registry.is_meta(_pool) @external @view def is_registered(_pool: address) -> bool: """ @notice Check if a pool belongs to the registry using get_n_coins @param _pool The address of the pool @return A bool corresponding to whether the pool belongs or not """ return self.base_registry.get_n_coins(_pool) > 0 @external @view def pool_count() -> uint256: """ @notice Get the number of pools in the registry. @return The number of pools in the registry. """ return self.base_registry.pool_count() @external @view def pool_list(_index: uint256) -> address: """ @notice Get the address of the pool at the given index. @param _index The index of the pool. @return The address of the pool. """ return self.base_registry.pool_list(_index)
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_base_registry","type":"address"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"find_pool_for_coins","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"find_pool_for_coins","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"i","type":"uint256"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"get_admin_balances","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256[8]"}]},{"stateMutability":"view","type":"function","name":"get_balances","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256[8]"}]},{"stateMutability":"view","type":"function","name":"get_base_pool","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"get_coin_indices","inputs":[{"name":"_pool","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"}],"outputs":[{"name":"","type":"int128"},{"name":"","type":"int128"},{"name":"","type":"bool"}]},{"stateMutability":"view","type":"function","name":"get_coins","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"address[8]"}]},{"stateMutability":"view","type":"function","name":"get_decimals","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256[8]"}]},{"stateMutability":"view","type":"function","name":"get_fees","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256[10]"}]},{"stateMutability":"view","type":"function","name":"get_gauges","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"address[10]"},{"name":"","type":"int128[10]"}]},{"stateMutability":"view","type":"function","name":"get_lp_token","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"get_n_coins","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_n_underlying_coins","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_pool_asset_type","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_pool_from_lp_token","inputs":[{"name":"_lp_token","type":"address"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"get_pool_name","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"string"}]},{"stateMutability":"view","type":"function","name":"get_pool_params","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256[20]"}]},{"stateMutability":"view","type":"function","name":"get_underlying_balances","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256[8]"}]},{"stateMutability":"view","type":"function","name":"get_underlying_coins","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"address[8]"}]},{"stateMutability":"view","type":"function","name":"get_underlying_decimals","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256[8]"}]},{"stateMutability":"view","type":"function","name":"get_virtual_price_from_lp_token","inputs":[{"name":"_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"is_meta","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"view","type":"function","name":"is_registered","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"view","type":"function","name":"pool_count","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"pool_list","inputs":[{"name":"_index","type":"uint256"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"base_registry","inputs":[],"outputs":[{"name":"","type":"address"}]}]
Deployed Bytecode
0x6003361161000c57610df5565b60003560e01c34610e465763a87df06c81186100345760443618610e4657600060805261004e565b636982eb0b81186100c25760643618610e46576044356080525b6004358060a01c610e46576040526024358060a01c610e46576060526020600054636982eb0b60a05260405160c05260605160e05260805161010052602060a0606460bc845afa6100a4573d600060003e3d6000fd5b60203d10610e465760a0518060a01c610e4657610120526101209050f35b63c11e45b881186101215760243618610e46576004358060a01c610e465760405261010060005463c11e45b860605260405160805261010060606024607c845afa610112573d600060003e3d6000fd5b6101003d10610e465760609050f35b6392e3cc2d81186101805760243618610e46576004358060a01c610e46576040526101006000546392e3cc2d60605260405160805261010060606024607c845afa610171573d600060003e3d6000fd5b6101003d10610e465760609050f35b636f20d6dd81186101ea5760243618610e46576004358060a01c610e46576040526020600054636f20d6dd606052604051608052602060606024607c845afa6101ce573d600060003e3d6000fd5b60203d10610e46576060518060a01c610e465760a05260a09050f35b63eb85226d81186102a15760643618610e46576004358060a01c610e46576040526024358060a01c610e46576060526044358060a01c610e4657608052606060005463eb85226d60a05260405160c05260605160e05260805161010052606060a0606460bc845afa610261573d600060003e3d6000fd5b60603d10610e465760a05180600f0b8118610e46576101205260c05180600f0b8118610e46576101405260e0518060011c610e4657610160526101209050f35b639ac90d3d811861037c5760243618610e46576004358060a01c610e4657604052610100600054639ac90d3d60605260405160805261010060606024607c845afa6102f1573d600060003e3d6000fd5b6101003d10610e46576060518060a01c610e4657610180526080518060a01c610e46576101a05260a0518060a01c610e46576101c05260c0518060a01c610e46576101e05260e0518060a01c610e465761020052610100518060a01c610e465761022052610120518060a01c610e465761024052610140518060a01c610e4657610260526101809050f35b6352b5155581186103db5760243618610e46576004358060a01c610e46576040526101006000546352b5155560605260405160805261010060606024607c845afa6103cc573d600060003e3d6000fd5b6101003d10610e465760609050f35b637cdb72b081186104a65760243618610e46576004358060a01c610e465760405261014036606037600054637cdb72b061022052604051610240526080610220602461023c845afa610432573d600060003e3d6000fd5b60803d10610e4657610220905080516101a05260208101516101c05260408101516101e0526060810151610200525060006004905b80610220526102205160038111610e465760051b6101a001516102205160098111610e465760051b606001526001018181186104675750506101406060f35b6356059ffb81186106555760243618610e46576004358060a01c610e46576040526102806000546356059ffb60605260405160805261028060606024607c845afa6104f6573d600060003e3d6000fd5b6102803d10610e46576060518060a01c610e4657610300526080518060a01c610e46576103205260a0518060a01c610e46576103405260c0518060a01c610e46576103605260e0518060a01c610e465761038052610100518060a01c610e46576103a052610120518060a01c610e46576103c052610140518060a01c610e46576103e052610160518060a01c610e465761040052610180518060a01c610e4657610420526101a05180600f0b8118610e4657610440526101c05180600f0b8118610e4657610460526101e05180600f0b8118610e4657610480526102005180600f0b8118610e46576104a0526102205180600f0b8118610e46576104c0526102405180600f0b8118610e46576104e0526102605180600f0b8118610e4657610500526102805180600f0b8118610e4657610520526102a05180600f0b8118610e4657610540526102c05180600f0b8118610e4657610560526103009050f35b6337951049811861068c5760243618610e46576004358060a01c610e465760c052602060c05160405261068860e0610dfb565b60e0f35b63940494f181186106e85760243618610e46576004358060a01c610e4657604052602060005463940494f1606052604051608052602060606024607c845afa6106da573d600060003e3d6000fd5b60203d10610e465760609050f35b630a700c0881186107445760243618610e46576004358060a01c610e46576040526020600054630a700c08606052604051608052602060606024607c845afa610736573d600060003e3d6000fd5b60203d10610e465760609050f35b6366d3966c81186107705760243618610e46576004358060a01c610e4657604052600460605260206060f35b63bdf475c381186107da5760243618610e46576004358060a01c610e4657604052602060005463bdf475c3606052604051608052602060606024607c845afa6107be573d600060003e3d6000fd5b60203d10610e46576060518060a01c610e465760a05260a09050f35b635c91174181186108ad5760243618610e46576004358060a01c610e465760405260208061016052600054635c911741606052604051608052608060606024607c845afa61082d573d600060003e3d6000fd5b60403d10610e46576060516060016040815111610e4657805180610100526020820181610120838360045afa5050505061010090508161016001815180825260208301602083018281848460045afa505050508051806020830101601f82600003163682375050601f19601f825160200101169050905081019050610160f35b63688532aa8118610a6d5760243618610e46576004358060a01c610e46576040526102803660603760405163f446c1d06102e05260206102e060046102fc845afa6108fd573d600060003e3d6000fd5b60203d10610e46576102e0905051606052604051630f529ba26102e05260206102e060046102fc845afa610936573d600060003e3d6000fd5b60203d10610e46576102e090505160805260405163b13739296102e05260206102e060046102fc845afa61096f573d600060003e3d6000fd5b60203d10610e46576102e090505160a0526040516349fe9e776102e05260206102e060046102fc845afa6109a8573d600060003e3d6000fd5b60203d10610e46576102e090505160c0526040516372d4f0e26102e05260206102e060046102fc845afa6109e1573d600060003e3d6000fd5b60203d10610e46576102e090505160e05260405163083812e56102e05260206102e060046102fc845afa610a1a573d600060003e3d6000fd5b60203d10610e46576102e09050516101005260405163662b62746102e05260206102e060046102fc845afa610a54573d600060003e3d6000fd5b60203d10610e46576102e0905051610120526102806060f35b6359f4f3518118610acc5760243618610e46576004358060a01c610e46576040526101006000546359f4f35160605260405160805261010060606024607c845afa610abd573d600060003e3d6000fd5b6101003d10610e465760609050f35b63a77576ef8118610ba75760243618610e46576004358060a01c610e465760405261010060005463a77576ef60605260405160805261010060606024607c845afa610b1c573d600060003e3d6000fd5b6101003d10610e46576060518060a01c610e4657610180526080518060a01c610e46576101a05260a0518060a01c610e46576101c05260c0518060a01c610e46576101e05260e0518060a01c610e465761020052610100518060a01c610e465761022052610120518060a01c610e465761024052610140518060a01c610e4657610260526101809050f35b634cb088f18118610c065760243618610e46576004358060a01c610e4657604052610100600054634cb088f160605260405160805261010060606024607c845afa610bf7573d600060003e3d6000fd5b6101003d10610e465760609050f35b63c5b7074a8118610c625760243618610e46576004358060a01c610e4657604052602060005463c5b7074a606052604051608052602060606024607c845afa610c54573d600060003e3d6000fd5b60203d10610e465760609050f35b63e4d332a98118610ccc5760243618610e46576004358060a01c610e4657604052602060005463e4d332a9606052604051608052602060606024607c845afa610cb0573d600060003e3d6000fd5b60203d10610e46576060518060011c610e465760a05260a09050f35b63619ea8068118610d305760243618610e46576004358060a01c610e465760405260005463940494f1606052604051608052602060606024607c845afa610d18573d600060003e3d6000fd5b60203d10610e46576060905051151560a052602060a0f35b63956aae3a8118610d785760043618610e4657602060005463956aae3a604052602060406004605c845afa610d6a573d600060003e3d6000fd5b60203d10610e465760409050f35b633a1d5d8e8118610dd45760243618610e46576020600054633a1d5d8e604052600435606052602060406024605c845afa610db8573d600060003e3d6000fd5b60203d10610e46576040518060a01c610e465760805260809050f35b63b229777c8118610df35760043618610e465760005460405260206040f35b505b60006000fd5b6000546337951049606052604051608052602060606024607c845afa610e26573d600060003e3d6000fd5b60203d10610e46576060518060a01c610e465760a05260a0905051815250565b600080fda165767970657283000304
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 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.