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
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x6120b261 | 9253804 | 321 days ago | IN | 0 ETH | 0.01026565 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
CurveCryptoViews3Optimized
Compiler Version
vyper:0.3.10
Contract Source Code (Vyper language format)
# pragma version 0.3.10 # pragma optimize gas # pragma evm-version paris """ @title CurveCryptoViews3Optimized @author Curve.Fi @license Copyright (c) Curve.Fi, 2020-2023 - all rights reserved @notice This contract contains view-only external methods which can be gas-inefficient when called from smart contracts. """ from vyper.interfaces import ERC20 interface Curve: def MATH() -> Math: view def A() -> uint256: view def gamma() -> uint256: view def price_scale(i: uint256) -> uint256: view def price_oracle(i: uint256) -> uint256: view def get_virtual_price() -> uint256: view def balances(i: uint256) -> uint256: view def D() -> uint256: view def fee_calc(xp: uint256[N_COINS]) -> uint256: view def calc_token_fee( amounts: uint256[N_COINS], xp: uint256[N_COINS] ) -> uint256: view def future_A_gamma_time() -> uint256: view def totalSupply() -> uint256: view def precisions() -> uint256[N_COINS]: view def packed_fee_params() -> uint256: view interface Math: def newton_D( ANN: uint256, gamma: uint256, x_unsorted: uint256[N_COINS], K0_prev: uint256 ) -> uint256: view def get_y( ANN: uint256, gamma: uint256, x: uint256[N_COINS], D: uint256, i: uint256, ) -> uint256[2]: view def cbrt(x: uint256) -> uint256: view def reduction_coefficient( x: uint256[N_COINS], fee_gamma: uint256 ) -> uint256: view N_COINS: constant(uint256) = 3 PRECISION: constant(uint256) = 10**18 @external @view def get_dy( i: uint256, j: uint256, dx: uint256, swap: address ) -> uint256: dy: uint256 = 0 xp: uint256[N_COINS] = empty(uint256[N_COINS]) # dy = (get_y(x + dx) - y) * (1 - fee) dy, xp = self._get_dy_nofee(i, j, dx, swap) dy -= Curve(swap).fee_calc(xp) * dy / 10**10 return dy @view @external def get_dx( i: uint256, j: uint256, dy: uint256, swap: address ) -> uint256: dx: uint256 = 0 xp: uint256[N_COINS] = empty(uint256[N_COINS]) fee_dy: uint256 = 0 _dy: uint256 = dy # for more precise dx (but never exact), increase num loops for k in range(5): dx, xp = self._get_dx_fee(i, j, _dy, swap) fee_dy = Curve(swap).fee_calc(xp) * _dy / 10**10 _dy = dy + fee_dy + 1 return dx @view @external def calc_withdraw_one_coin( token_amount: uint256, i: uint256, swap: address ) -> uint256: return self._calc_withdraw_one_coin(token_amount, i, swap)[0] @view @external def calc_token_amount( amounts: uint256[N_COINS], deposit: bool, swap: address ) -> uint256: d_token: uint256 = 0 amountsp: uint256[N_COINS] = empty(uint256[N_COINS]) xp: uint256[N_COINS] = empty(uint256[N_COINS]) d_token, amountsp, xp = self._calc_dtoken_nofee(amounts, deposit, swap) d_token -= ( Curve(swap).calc_token_fee(amountsp, xp) * d_token / 10**10 + 1 ) return d_token @external @view def calc_fee_get_dy(i: uint256, j: uint256, dx: uint256, swap: address ) -> uint256: dy: uint256 = 0 xp: uint256[N_COINS] = empty(uint256[N_COINS]) dy, xp = self._get_dy_nofee(i, j, dx, swap) return Curve(swap).fee_calc(xp) * dy / 10**10 @external @view def calc_fee_withdraw_one_coin( token_amount: uint256, i: uint256, swap: address ) -> uint256: return self._calc_withdraw_one_coin(token_amount, i, swap)[1] @view @external def calc_fee_token_amount( amounts: uint256[N_COINS], deposit: bool, swap: address ) -> uint256: d_token: uint256 = 0 amountsp: uint256[N_COINS] = empty(uint256[N_COINS]) xp: uint256[N_COINS] = empty(uint256[N_COINS]) d_token, amountsp, xp = self._calc_dtoken_nofee(amounts, deposit, swap) return Curve(swap).calc_token_fee(amountsp, xp) * d_token / 10**10 + 1 @internal @view def _calc_D_ramp( A: uint256, gamma: uint256, xp: uint256[N_COINS], precisions: uint256[N_COINS], price_scale: uint256[N_COINS - 1], swap: address ) -> uint256: math: Math = Curve(swap).MATH() D: uint256 = Curve(swap).D() if Curve(swap).future_A_gamma_time() > block.timestamp: _xp: uint256[N_COINS] = xp _xp[0] *= precisions[0] for k in range(N_COINS - 1): _xp[k + 1] = ( _xp[k + 1] * price_scale[k] * precisions[k + 1] / PRECISION ) D = math.newton_D(A, gamma, _xp, 0) return D @internal @view def _get_dx_fee( i: uint256, j: uint256, dy: uint256, swap: address ) -> (uint256, uint256[N_COINS]): # here, dy must include fees (and 1 wei offset) assert i != j and i < N_COINS and j < N_COINS, "coin index out of range" assert dy > 0, "do not exchange out 0 coins" math: Math = Curve(swap).MATH() xp: uint256[N_COINS] = empty(uint256[N_COINS]) precisions: uint256[N_COINS] = empty(uint256[N_COINS]) price_scale: uint256[N_COINS-1] = empty(uint256[N_COINS-1]) D: uint256 = 0 token_supply: uint256 = 0 A: uint256 = 0 gamma: uint256 = 0 xp, D, token_supply, price_scale, A, gamma, precisions = self._prep_calc(swap) # adjust xp with output dy. dy contains fee element, which we handle later # (hence this internal method is called _get_dx_fee) xp[j] -= dy xp[0] *= precisions[0] for k in range(N_COINS - 1): xp[k + 1] = xp[k + 1] * price_scale[k] * precisions[k + 1] / PRECISION x_out: uint256[2] = math.get_y(A, gamma, xp, D, i) dx: uint256 = x_out[0] - xp[i] xp[i] = x_out[0] if i > 0: dx = dx * PRECISION / price_scale[i - 1] dx /= precisions[i] return dx, xp @internal @view def _get_dy_nofee( i: uint256, j: uint256, dx: uint256, swap: address ) -> (uint256, uint256[N_COINS]): assert i != j and i < N_COINS and j < N_COINS, "coin index out of range" assert dx > 0, "do not exchange 0 coins" math: Math = Curve(swap).MATH() xp: uint256[N_COINS] = empty(uint256[N_COINS]) precisions: uint256[N_COINS] = empty(uint256[N_COINS]) price_scale: uint256[N_COINS-1] = empty(uint256[N_COINS-1]) D: uint256 = 0 token_supply: uint256 = 0 A: uint256 = 0 gamma: uint256 = 0 xp, D, token_supply, price_scale, A, gamma, precisions = self._prep_calc(swap) # adjust xp with input dx xp[i] += dx xp[0] *= precisions[0] for k in range(N_COINS - 1): xp[k + 1] = xp[k + 1] * price_scale[k] * precisions[k + 1] / PRECISION y_out: uint256[2] = math.get_y(A, gamma, xp, D, j) dy: uint256 = xp[j] - y_out[0] - 1 xp[j] = y_out[0] if j > 0: dy = dy * PRECISION / price_scale[j - 1] dy /= precisions[j] return dy, xp @internal @view def _calc_dtoken_nofee( amounts: uint256[N_COINS], deposit: bool, swap: address ) -> (uint256, uint256[N_COINS], uint256[N_COINS]): math: Math = Curve(swap).MATH() xp: uint256[N_COINS] = empty(uint256[N_COINS]) precisions: uint256[N_COINS] = empty(uint256[N_COINS]) price_scale: uint256[N_COINS-1] = empty(uint256[N_COINS-1]) D0: uint256 = 0 token_supply: uint256 = 0 A: uint256 = 0 gamma: uint256 = 0 xp, D0, token_supply, price_scale, A, gamma, precisions = self._prep_calc(swap) amountsp: uint256[N_COINS] = amounts if deposit: for k in range(N_COINS): xp[k] += amounts[k] else: for k in range(N_COINS): xp[k] -= amounts[k] xp[0] *= precisions[0] amountsp[0] *= precisions[0] for k in range(N_COINS - 1): p: uint256 = price_scale[k] * precisions[k + 1] xp[k + 1] = xp[k + 1] * p / PRECISION amountsp[k + 1] = amountsp[k + 1] * p / PRECISION D: uint256 = math.newton_D(A, gamma, xp, 0) d_token: uint256 = token_supply * D / D0 if deposit: d_token -= token_supply else: d_token = token_supply - d_token return d_token, amountsp, xp @internal @view def _calc_withdraw_one_coin( token_amount: uint256, i: uint256, swap: address ) -> (uint256, uint256): token_supply: uint256 = Curve(swap).totalSupply() assert token_amount <= token_supply # dev: token amount more than supply assert i < N_COINS # dev: coin out of range math: Math = Curve(swap).MATH() xx: uint256[N_COINS] = empty(uint256[N_COINS]) price_scale: uint256[N_COINS-1] = empty(uint256[N_COINS-1]) for k in range(N_COINS): xx[k] = Curve(swap).balances(k) if k > 0: price_scale[k - 1] = Curve(swap).price_scale(k - 1) precisions: uint256[N_COINS] = Curve(swap).precisions() A: uint256 = Curve(swap).A() gamma: uint256 = Curve(swap).gamma() xp: uint256[N_COINS] = precisions D0: uint256 = 0 p: uint256 = 0 price_scale_i: uint256 = PRECISION * precisions[0] xp[0] *= xx[0] for k in range(1, N_COINS): p = price_scale[k-1] if i == k: price_scale_i = p * xp[i] xp[k] = xp[k] * xx[k] * p / PRECISION if Curve(swap).future_A_gamma_time() > block.timestamp: D0 = math.newton_D(A, gamma, xp, 0) else: D0 = Curve(swap).D() D: uint256 = D0 fee: uint256 = self._fee(xp, swap) dD: uint256 = token_amount * D / token_supply D_fee: uint256 = fee * dD / (2 * 10**10) + 1 approx_fee: uint256 = N_COINS * D_fee * xx[i] / D D -= (dD - D_fee) y_out: uint256[2] = math.get_y(A, gamma, xp, D, i) dy: uint256 = (xp[i] - y_out[0]) * PRECISION / price_scale_i xp[i] = y_out[0] return dy, approx_fee @internal @view def _fee(xp: uint256[N_COINS], swap: address) -> uint256: math: Math = Curve(swap).MATH() packed_fee_params: uint256 = Curve(swap).packed_fee_params() fee_params: uint256[3] = self._unpack(packed_fee_params) f: uint256 = math.reduction_coefficient(xp, fee_params[2]) return (fee_params[0] * f + fee_params[1] * (10**18 - f)) / 10**18 @internal @view def _prep_calc(swap: address) -> ( uint256[N_COINS], uint256, uint256, uint256[N_COINS-1], uint256, uint256, uint256[N_COINS] ): precisions: uint256[N_COINS] = Curve(swap).precisions() token_supply: uint256 = Curve(swap).totalSupply() xp: uint256[N_COINS] = empty(uint256[N_COINS]) for k in range(N_COINS): xp[k] = Curve(swap).balances(k) price_scale: uint256[N_COINS - 1] = empty(uint256[N_COINS - 1]) for k in range(N_COINS - 1): price_scale[k] = Curve(swap).price_scale(k) A: uint256 = Curve(swap).A() gamma: uint256 = Curve(swap).gamma() D: uint256 = self._calc_D_ramp( A, gamma, xp, precisions, price_scale, swap ) return xp, D, token_supply, price_scale, A, gamma, precisions @internal @view def _unpack(_packed: uint256) -> uint256[3]: """ @notice Unpacks a uint256 into 3 integers (values must be <= 10**18) @param val The uint256 to unpack @return The unpacked uint256[3] """ return [ (_packed >> 128) & 18446744073709551615, (_packed >> 64) & 18446744073709551615, _packed & 18446744073709551615, ]
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"stateMutability":"view","type":"function","name":"get_dy","inputs":[{"name":"i","type":"uint256"},{"name":"j","type":"uint256"},{"name":"dx","type":"uint256"},{"name":"swap","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_dx","inputs":[{"name":"i","type":"uint256"},{"name":"j","type":"uint256"},{"name":"dy","type":"uint256"},{"name":"swap","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"calc_withdraw_one_coin","inputs":[{"name":"token_amount","type":"uint256"},{"name":"i","type":"uint256"},{"name":"swap","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"calc_token_amount","inputs":[{"name":"amounts","type":"uint256[3]"},{"name":"deposit","type":"bool"},{"name":"swap","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"calc_fee_get_dy","inputs":[{"name":"i","type":"uint256"},{"name":"j","type":"uint256"},{"name":"dx","type":"uint256"},{"name":"swap","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"calc_fee_withdraw_one_coin","inputs":[{"name":"token_amount","type":"uint256"},{"name":"i","type":"uint256"},{"name":"swap","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"calc_fee_token_amount","inputs":[{"name":"amounts","type":"uint256[3]"},{"name":"deposit","type":"bool"},{"name":"swap","type":"address"}],"outputs":[{"name":"","type":"uint256"}]}]
Contract Creation Code
6120b2610011610000396120b2610000f360003560e01c60026005820660011b6120a801601e39600051565b633bb1f8c18118610115576084361034176120a3576064358060a01c6120a3576108c0526080366108e03760606004610520376108c05161058052610060610960610b51565b61096080516108e0526020810180516109005260208101516109205260408101516109405250506108e0516108c05163572e5625610960526109005161098052610920516109a052610940516109c0526020610960606461097c845afa6100cc573d600060003e3d6000fd5b60203d106120a3576109609050516108e0518082028115838383041417156120a357905090506402540be400810490508082038281116120a357905090506108e05260206108e0f35b63ca7a433d8118610667576084361034176120a3576064358060a01c6120a3576108c0526080366108e03760606004610520376108c0516105805261015b610960610b51565b61096080516108e0526020810180516109005260208101516109205260408101516109405250506108c05163572e5625610960526109005161098052610920516109a052610940516109c0526020610960606461097c845afa6101c3573d600060003e3d6000fd5b60203d106120a3576109609050516108e0518082028115838383041417156120a357905090506402540be400810490506109e05260206109e0f3610667565b6399bf0b768118610337576084361034176120a3576064358060a01c6120a3576108c05260a0366108e0376044356109805260006005905b806109a052604060046105203761098051610560526108c051610580526102626109c0610fb9565b6109c080516108e0526020810180516109005260208101516109205260408101516109405250506108c05163572e56256109c052610900516109e05261092051610a005261094051610a205260206109c060646109dc845afa6102ca573d600060003e3d6000fd5b60203d106120a3576109c0905051610980518082028115838383041417156120a357905090506402540be4008104905061096052604435610960518082018281106120a35790509050600181018181106120a35790506109805260010181811861023a57505060206108e0f35b63a71c3e658118610667576064361034176120a3576044358060a01c6120a3576106c052602060406004610240376106c051610280526103786106e06115cc565b6106e0602081019050f3610667565b6341477cfb8118610667576064361034176120a3576044358060a01c6120a3576106c052602060406004610240376106c051610280526103c86106e06115cc565b6106e0f3610667565b638585c4b181186105255760a4361034176120a3576064358060011c6120a3576108e0526084358060a01c6120a3576109005260e0366109203760606004610520376108e05161058052610900516105a05261042e610a00611c71565b610a0080516109205260208101805161094052602081015161096052604081015161098052506080810180516109a05260208101516109c05260408101516109e0525050610920516109005163cde699fa610a005261094051610a205261096051610a405261098051610a60526109a051610a80526109c051610aa0526109e051610ac0526020610a0060c4610a1c845afa6104cf573d600060003e3d6000fd5b60203d106120a357610a00905051610920518082028115838383041417156120a357905090506402540be40081049050600181018181106120a35790508082038281116120a35790509050610920526020610920f35b630f6da6a481186106675760a4361034176120a3576064358060011c6120a3576108e0526084358060a01c6120a3576109005260e0366109203760606004610520376108e05161058052610900516105a052610582610a00611c71565b610a0080516109205260208101805161094052602081015161096052604081015161098052506080810180516109a05260208101516109c05260408101516109e05250506109005163cde699fa610a005261094051610a205261096051610a405261098051610a60526109a051610a80526109c051610aa0526109e051610ac0526020610a0060c4610a1c845afa61061f573d600060003e3d6000fd5b60203d106120a357610a00905051610920518082028115838383041417156120a357905090506402540be40081049050600181018181106120a3579050610ae0526020610ae0f35b60006000fd5b6101805163ed6c15466101c05260206101c060046101dc845afa610696573d600060003e3d6000fd5b60203d106120a3576101c0518060a01c6120a357610200526102009050516101a05261018051630f529ba26101e05260206101e060046101fc845afa6106e1573d600060003e3d6000fd5b60203d106120a3576101e09050516101c052426101805163f9ed95976101e05260206101e060046101fc845afa61071d573d600060003e3d6000fd5b60203d106120a3576101e0905051111561088f576080516102205260a0516102405260c051610260526102205160e0518082028115838383041417156120a357905090506102205260006002905b806102805261028051600181018181106120a3579050600281116120a35760051b610220015161028051600181116120a35760051b61014001518082028115838383041417156120a3579050905061028051600181018181106120a3579050600281116120a35760051b60e001518082028115838383041417156120a35790509050670de0b6b3a76400008104905061028051600181018181106120a3579050600281116120a35760051b610220015260010181811861076b5750506101a051637b12e009610280526040516102a0526060516102c052610220516102e05261024051610300526102605161032052600061034052602061028060c461029c845afa61087c573d600060003e3d6000fd5b60203d106120a3576102809050516101c0525b6101c051815250565b61036051633620604b6103e05260606103e060046103fc845afa6108c1573d600060003e3d6000fd5b60603d106120a3576103e0905080516103805260208101516103a05260408101516103c05250610360516318160ddd610400526020610400600461041c845afa610910573d600060003e3d6000fd5b60203d106120a3576104009050516103e0526060366104003760006003905b806104605261036051634903b0d161048052610460516104a0526020610480602461049c845afa610965573d600060003e3d6000fd5b60203d106120a35761048090505161046051600281116120a35760051b610400015260010181811861092f5750506040366104603760006002905b806104a0526103605163a3f7cdd56104c0526104a0516104e05260206104c060246104dc845afa6109d6573d600060003e3d6000fd5b60203d106120a3576104c09050516104a051600181116120a35760051b61046001526001018181186109a05750506103605163f446c1d06104c05260206104c060046104dc845afa610a2d573d600060003e3d6000fd5b60203d106120a3576104c09050516104a0526103605163b13739296104e05260206104e060046104fc845afa610a68573d600060003e3d6000fd5b60203d106120a3576104e09050516104c0526104a0516040526104c051606052610400516080526104205160a0526104405160c0526103805160e0526103a051610100526103c05161012052610460516101405261048051610160526103605161018052610ad761050061066d565b610500516104e0526104005181526104205160208201526104405160408201526104e05160608201526103e051608082015260a08101610460518152610480516020820152506104a05160e08201526104c05161010082015261012081016103805181526103a05160208201526103c05160408201525050565b610540516105205114610b7e576002610520511115610b71576000610b81565b6002610540511115610b81565b60005b610beb5760176105a0527f636f696e20696e646578206f7574206f662072616e67650000000000000000006105c0526105a0506105a051806105c001601f826000031636823750506308c379a061056052602061058052601f19601f6105a051011660440161057cfd5b61056051610c595760176105a0527f646f206e6f742065786368616e6765203020636f696e730000000000000000006105c0526105a0506105a051806105c001601f826000031636823750506308c379a061056052602061058052601f19601f6105a051011660440161057cfd5b6105805163ed6c15466105c05260206105c060046105dc845afa610c82573d600060003e3d6000fd5b60203d106120a3576105c0518060a01c6120a357610600526106009050516105a052610180366105c0376105805161036052610cbf610740610898565b61074080516105c05260208101516105e05260408101516106005260608101516106c05260808101516106e05260a0810180516106805260208101516106a0525060e081015161070052610100810151610720526101208101805161062052602081015161064052604081015161066052505061052051600281116120a35760051b6105c0018051610560518082018281106120a357905090508152506105c051610620518082028115838383041417156120a357905090506105c05260006002905b806107405261074051600181018181106120a3579050600281116120a35760051b6105c0015161074051600181116120a35760051b61068001518082028115838383041417156120a3579050905061074051600181018181106120a3579050600281116120a35760051b61062001518082028115838383041417156120a35790509050670de0b6b3a76400008104905061074051600181018181106120a3579050600281116120a35760051b6105c00152600101818118610d825750506105a051634a2ab3be61078052610700516107a052610720516107c0526105c0516107e0526105e0516108005261060051610820526106c051610840526105405161086052604061078060e461079c845afa610ea0573d600060003e3d6000fd5b60403d106120a35761078090508051610740526020810151610760525061054051600281116120a35760051b6105c00151610740518082038281116120a35790509050600181038181116120a3579050610780526107405161054051600281116120a35760051b6105c001526105405115610f6a5761078051670de0b6b3a7640000810281670de0b6b3a76400008204186120a357905061054051600181038181116120a3579050600181116120a35760051b610680015180156120a35780820490509050610780525b6107805161054051600281116120a35760051b610620015180156120a3578082049050905061078052610780518152602081016105c05181526105e05160208201526106005160408201525050565b610540516105205114610fe6576002610520511115610fd9576000610fe9565b6002610540511115610fe9565b60005b6110535760176105a0527f636f696e20696e646578206f7574206f662072616e67650000000000000000006105c0526105a0506105a051806105c001601f826000031636823750506308c379a061056052602061058052601f19601f6105a051011660440161057cfd5b610560516110c157601b6105a0527f646f206e6f742065786368616e6765206f7574203020636f696e7300000000006105c0526105a0506105a051806105c001601f826000031636823750506308c379a061056052602061058052601f19601f6105a051011660440161057cfd5b6105805163ed6c15466105c05260206105c060046105dc845afa6110ea573d600060003e3d6000fd5b60203d106120a3576105c0518060a01c6120a357610600526106009050516105a052610180366105c0376105805161036052611127610740610898565b61074080516105c05260208101516105e05260408101516106005260608101516106c05260808101516106e05260a0810180516106805260208101516106a0525060e081015161070052610100810151610720526101208101805161062052602081015161064052604081015161066052505061054051600281116120a35760051b6105c0018051610560518082038281116120a357905090508152506105c051610620518082028115838383041417156120a357905090506105c05260006002905b806107405261074051600181018181106120a3579050600281116120a35760051b6105c0015161074051600181116120a35760051b61068001518082028115838383041417156120a3579050905061074051600181018181106120a3579050600281116120a35760051b61062001518082028115838383041417156120a35790509050670de0b6b3a76400008104905061074051600181018181106120a3579050600281116120a35760051b6105c001526001018181186111ea5750506105a051634a2ab3be61078052610700516107a052610720516107c0526105c0516107e0526105e0516108005261060051610820526106c051610840526105205161086052604061078060e461079c845afa611308573d600060003e3d6000fd5b60403d106120a3576107809050805161074052602081015161076052506107405161052051600281116120a35760051b6105c001518082038281116120a35790509050610780526107405161052051600281116120a35760051b6105c0015261052051156113c55761078051670de0b6b3a7640000810281670de0b6b3a76400008204186120a357905061052051600181038181116120a3579050600181116120a35760051b610680015180156120a35780820490509050610780525b6107805161052051600281116120a35760051b610620015180156120a3578082049050905061078052610780518152602081016105c05181526105e05160208201526106005160408201525050565b67ffffffffffffffff60405160801c16815267ffffffffffffffff60405160401c16602082015267ffffffffffffffff60405116604082015250565b60c05163ed6c1546610100526020610100600461011c845afa611478573d600060003e3d6000fd5b60203d106120a357610100518060a01c6120a3576101405261014090505160e05260c05163e3616405610120526020610120600461013c845afa6114c1573d600060003e3d6000fd5b60203d106120a35761012090505161010052610100516040526114e5610180611414565b6101808051610120526020810151610140526040810151610160525060e05163fa18042d6101a0526060516101c0526080516101e05260a05161020052610160516102205260206101a060846101bc845afa611546573d600060003e3d6000fd5b60203d106120a3576101a09050516101805261012051610180518082028115838383041417156120a35790509050610140516101805180670de0b6b3a764000003670de0b6b3a764000081116120a35790508082028115838383041417156120a357905090508082018281106120a35790509050670de0b6b3a764000081049050815250565b610280516318160ddd6102c05260206102c060046102dc845afa6115f5573d600060003e3d6000fd5b60203d106120a3576102c09050516102a0526102a05161024051116120a357600261026051116120a3576102805163ed6c15466102e05260206102e060046102fc845afa611648573d600060003e3d6000fd5b60203d106120a3576102e0518060a01c6120a357610320526103209050516102c05260a0366102e03760006003905b806103805261028051634903b0d16103a052610380516103c05260206103a060246103bc845afa6116ad573d600060003e3d6000fd5b60203d106120a3576103a090505161038051600281116120a35760051b6102e001526103805115611746576102805163a3f7cdd56103a05261038051600181038181116120a35790506103c05260206103a060246103bc845afa611716573d600060003e3d6000fd5b60203d106120a3576103a090505161038051600181038181116120a3579050600181116120a35760051b61034001525b60010181811861167757505061028051633620604b6103e05260606103e060046103fc845afa61177b573d600060003e3d6000fd5b60603d106120a3576103e0905080516103805260208101516103a05260408101516103c052506102805163f446c1d0610400526020610400600461041c845afa6117ca573d600060003e3d6000fd5b60203d106120a3576104009050516103e0526102805163b1373929610420526020610420600461043c845afa611805573d600060003e3d6000fd5b60203d106120a3576104209050516104005261038051610420526103a051610440526103c051610460526040366104803761038051670de0b6b3a7640000810281670de0b6b3a76400008204186120a35790506104c052610420516102e0518082028115838383041417156120a3579050905061042052600160028101905b806104e0526104e051600181038181116120a3579050600181116120a35760051b61034001516104a0526104e05161026051186118ec576104a05161026051600281116120a35760051b61042001518082028115838383041417156120a357905090506104c0525b6104e051600281116120a35760051b61042001516104e051600281116120a35760051b6102e001518082028115838383041417156120a357905090506104a0518082028115838383041417156120a35790509050670de0b6b3a7640000810490506104e051600281116120a35760051b6104200152600101818118611884575050426102805163f9ed95976104e05260206104e060046104fc845afa611997573d600060003e3d6000fd5b60203d106120a3576104e0905051116119ea5761028051630f529ba26104e05260206104e060046104fc845afa6119d3573d600060003e3d6000fd5b60203d106120a3576104e090505161048052611a54565b6102c051637b12e009610520526103e0516105405261040051610560526104205161058052610440516105a052610460516105c05260006105e052602061052060c461053c845afa611a41573d600060003e3d6000fd5b60203d106120a357610520905051610480525b610480516104e05261042051606052610440516080526104605160a0526102805160c052611a83610520611450565b6105205161050052610240516104e0518082028115838383041417156120a357905090506102a05180156120a357808204905090506105205261050051610520518082028115838383041417156120a357905090506404a817c80081049050600181018181106120a35790506105405261054051600381028160038204186120a357905061026051600281116120a35760051b6102e001518082028115838383041417156120a357905090506104e05180156120a35780820490509050610560526104e05161052051610540518082038281116120a357905090508082038281116120a357905090506104e0526102c051634a2ab3be6105c0526103e0516105e05261040051610600526104205161062052610440516106405261046051610660526104e05161068052610260516106a05260406105c060e46105dc845afa611bd1573d600060003e3d6000fd5b60403d106120a3576105c0905080516105805260208101516105a0525061026051600281116120a35760051b6104200151610580518082038281116120a35790509050670de0b6b3a7640000810281670de0b6b3a76400008204186120a35790506104c05180156120a357808204905090506105c0526105805161026051600281116120a35760051b61042001526105c051815261056051602082015250565b6105a05163ed6c15466105e05260206105e060046105fc845afa611c9a573d600060003e3d6000fd5b60203d106120a3576105e0518060a01c6120a357610620526106209050516105c052610180366105e0376105a05161036052611cd7610760610898565b61076080516105e05260208101516106005260408101516106205260608101516106e05260808101516107005260a0810180516106a05260208101516106c0525060e081015161072052610100810151610740526101208101805161064052602081015161066052604081015161068052505061052051610760526105405161078052610560516107a05261058051611dc05760006003905b806107c0526107c051600281116120a35760051b6105e00180516107c051600281116120a35760051b61052001518082038281116120a35790509050815250600101818118611d70575050611e12565b60006003905b806107c0526107c051600281116120a35760051b6105e00180516107c051600281116120a35760051b61052001518082018281106120a35790509050815250600101818118611dc65750505b6105e051610640518082028115838383041417156120a357905090506105e05261076051610640518082028115838383041417156120a357905090506107605260006002905b806107c0526107c051600181116120a35760051b6106a001516107c051600181018181106120a3579050600281116120a35760051b61064001518082028115838383041417156120a357905090506107e0526107c051600181018181106120a3579050600281116120a35760051b6105e001516107e0518082028115838383041417156120a35790509050670de0b6b3a7640000810490506107c051600181018181106120a3579050600281116120a35760051b6105e001526107c051600181018181106120a3579050600281116120a35760051b61076001516107e0518082028115838383041417156120a35790509050670de0b6b3a7640000810490506107c051600181018181106120a3579050600281116120a35760051b6107600152600101818118611e585750506105c051637b12e0096107e052610720516108005261074051610820526105e051610840526106005161086052610620516108805260006108a05260206107e060c46107fc845afa611fdb573d600060003e3d6000fd5b60203d106120a3576107e09050516107c052610700516107c0518082028115838383041417156120a357905090506106e05180156120a357808204905090506107e0526105805161204557610700516107e0518082038281116120a357905090506107e052612060565b6107e051610700518082038281116120a357905090506107e0525b6107e0518152602081016107605181526107805160208201526107a051604082015250608081016105e05181526106005160208201526106205160408201525050565b600080fd06670387001a020203d1841920b2810a00a16576797065728300030a0014
Deployed Bytecode
0x60003560e01c60026005820660011b6120a801601e39600051565b633bb1f8c18118610115576084361034176120a3576064358060a01c6120a3576108c0526080366108e03760606004610520376108c05161058052610060610960610b51565b61096080516108e0526020810180516109005260208101516109205260408101516109405250506108e0516108c05163572e5625610960526109005161098052610920516109a052610940516109c0526020610960606461097c845afa6100cc573d600060003e3d6000fd5b60203d106120a3576109609050516108e0518082028115838383041417156120a357905090506402540be400810490508082038281116120a357905090506108e05260206108e0f35b63ca7a433d8118610667576084361034176120a3576064358060a01c6120a3576108c0526080366108e03760606004610520376108c0516105805261015b610960610b51565b61096080516108e0526020810180516109005260208101516109205260408101516109405250506108c05163572e5625610960526109005161098052610920516109a052610940516109c0526020610960606461097c845afa6101c3573d600060003e3d6000fd5b60203d106120a3576109609050516108e0518082028115838383041417156120a357905090506402540be400810490506109e05260206109e0f3610667565b6399bf0b768118610337576084361034176120a3576064358060a01c6120a3576108c05260a0366108e0376044356109805260006005905b806109a052604060046105203761098051610560526108c051610580526102626109c0610fb9565b6109c080516108e0526020810180516109005260208101516109205260408101516109405250506108c05163572e56256109c052610900516109e05261092051610a005261094051610a205260206109c060646109dc845afa6102ca573d600060003e3d6000fd5b60203d106120a3576109c0905051610980518082028115838383041417156120a357905090506402540be4008104905061096052604435610960518082018281106120a35790509050600181018181106120a35790506109805260010181811861023a57505060206108e0f35b63a71c3e658118610667576064361034176120a3576044358060a01c6120a3576106c052602060406004610240376106c051610280526103786106e06115cc565b6106e0602081019050f3610667565b6341477cfb8118610667576064361034176120a3576044358060a01c6120a3576106c052602060406004610240376106c051610280526103c86106e06115cc565b6106e0f3610667565b638585c4b181186105255760a4361034176120a3576064358060011c6120a3576108e0526084358060a01c6120a3576109005260e0366109203760606004610520376108e05161058052610900516105a05261042e610a00611c71565b610a0080516109205260208101805161094052602081015161096052604081015161098052506080810180516109a05260208101516109c05260408101516109e0525050610920516109005163cde699fa610a005261094051610a205261096051610a405261098051610a60526109a051610a80526109c051610aa0526109e051610ac0526020610a0060c4610a1c845afa6104cf573d600060003e3d6000fd5b60203d106120a357610a00905051610920518082028115838383041417156120a357905090506402540be40081049050600181018181106120a35790508082038281116120a35790509050610920526020610920f35b630f6da6a481186106675760a4361034176120a3576064358060011c6120a3576108e0526084358060a01c6120a3576109005260e0366109203760606004610520376108e05161058052610900516105a052610582610a00611c71565b610a0080516109205260208101805161094052602081015161096052604081015161098052506080810180516109a05260208101516109c05260408101516109e05250506109005163cde699fa610a005261094051610a205261096051610a405261098051610a60526109a051610a80526109c051610aa0526109e051610ac0526020610a0060c4610a1c845afa61061f573d600060003e3d6000fd5b60203d106120a357610a00905051610920518082028115838383041417156120a357905090506402540be40081049050600181018181106120a3579050610ae0526020610ae0f35b60006000fd5b6101805163ed6c15466101c05260206101c060046101dc845afa610696573d600060003e3d6000fd5b60203d106120a3576101c0518060a01c6120a357610200526102009050516101a05261018051630f529ba26101e05260206101e060046101fc845afa6106e1573d600060003e3d6000fd5b60203d106120a3576101e09050516101c052426101805163f9ed95976101e05260206101e060046101fc845afa61071d573d600060003e3d6000fd5b60203d106120a3576101e0905051111561088f576080516102205260a0516102405260c051610260526102205160e0518082028115838383041417156120a357905090506102205260006002905b806102805261028051600181018181106120a3579050600281116120a35760051b610220015161028051600181116120a35760051b61014001518082028115838383041417156120a3579050905061028051600181018181106120a3579050600281116120a35760051b60e001518082028115838383041417156120a35790509050670de0b6b3a76400008104905061028051600181018181106120a3579050600281116120a35760051b610220015260010181811861076b5750506101a051637b12e009610280526040516102a0526060516102c052610220516102e05261024051610300526102605161032052600061034052602061028060c461029c845afa61087c573d600060003e3d6000fd5b60203d106120a3576102809050516101c0525b6101c051815250565b61036051633620604b6103e05260606103e060046103fc845afa6108c1573d600060003e3d6000fd5b60603d106120a3576103e0905080516103805260208101516103a05260408101516103c05250610360516318160ddd610400526020610400600461041c845afa610910573d600060003e3d6000fd5b60203d106120a3576104009050516103e0526060366104003760006003905b806104605261036051634903b0d161048052610460516104a0526020610480602461049c845afa610965573d600060003e3d6000fd5b60203d106120a35761048090505161046051600281116120a35760051b610400015260010181811861092f5750506040366104603760006002905b806104a0526103605163a3f7cdd56104c0526104a0516104e05260206104c060246104dc845afa6109d6573d600060003e3d6000fd5b60203d106120a3576104c09050516104a051600181116120a35760051b61046001526001018181186109a05750506103605163f446c1d06104c05260206104c060046104dc845afa610a2d573d600060003e3d6000fd5b60203d106120a3576104c09050516104a0526103605163b13739296104e05260206104e060046104fc845afa610a68573d600060003e3d6000fd5b60203d106120a3576104e09050516104c0526104a0516040526104c051606052610400516080526104205160a0526104405160c0526103805160e0526103a051610100526103c05161012052610460516101405261048051610160526103605161018052610ad761050061066d565b610500516104e0526104005181526104205160208201526104405160408201526104e05160608201526103e051608082015260a08101610460518152610480516020820152506104a05160e08201526104c05161010082015261012081016103805181526103a05160208201526103c05160408201525050565b610540516105205114610b7e576002610520511115610b71576000610b81565b6002610540511115610b81565b60005b610beb5760176105a0527f636f696e20696e646578206f7574206f662072616e67650000000000000000006105c0526105a0506105a051806105c001601f826000031636823750506308c379a061056052602061058052601f19601f6105a051011660440161057cfd5b61056051610c595760176105a0527f646f206e6f742065786368616e6765203020636f696e730000000000000000006105c0526105a0506105a051806105c001601f826000031636823750506308c379a061056052602061058052601f19601f6105a051011660440161057cfd5b6105805163ed6c15466105c05260206105c060046105dc845afa610c82573d600060003e3d6000fd5b60203d106120a3576105c0518060a01c6120a357610600526106009050516105a052610180366105c0376105805161036052610cbf610740610898565b61074080516105c05260208101516105e05260408101516106005260608101516106c05260808101516106e05260a0810180516106805260208101516106a0525060e081015161070052610100810151610720526101208101805161062052602081015161064052604081015161066052505061052051600281116120a35760051b6105c0018051610560518082018281106120a357905090508152506105c051610620518082028115838383041417156120a357905090506105c05260006002905b806107405261074051600181018181106120a3579050600281116120a35760051b6105c0015161074051600181116120a35760051b61068001518082028115838383041417156120a3579050905061074051600181018181106120a3579050600281116120a35760051b61062001518082028115838383041417156120a35790509050670de0b6b3a76400008104905061074051600181018181106120a3579050600281116120a35760051b6105c00152600101818118610d825750506105a051634a2ab3be61078052610700516107a052610720516107c0526105c0516107e0526105e0516108005261060051610820526106c051610840526105405161086052604061078060e461079c845afa610ea0573d600060003e3d6000fd5b60403d106120a35761078090508051610740526020810151610760525061054051600281116120a35760051b6105c00151610740518082038281116120a35790509050600181038181116120a3579050610780526107405161054051600281116120a35760051b6105c001526105405115610f6a5761078051670de0b6b3a7640000810281670de0b6b3a76400008204186120a357905061054051600181038181116120a3579050600181116120a35760051b610680015180156120a35780820490509050610780525b6107805161054051600281116120a35760051b610620015180156120a3578082049050905061078052610780518152602081016105c05181526105e05160208201526106005160408201525050565b610540516105205114610fe6576002610520511115610fd9576000610fe9565b6002610540511115610fe9565b60005b6110535760176105a0527f636f696e20696e646578206f7574206f662072616e67650000000000000000006105c0526105a0506105a051806105c001601f826000031636823750506308c379a061056052602061058052601f19601f6105a051011660440161057cfd5b610560516110c157601b6105a0527f646f206e6f742065786368616e6765206f7574203020636f696e7300000000006105c0526105a0506105a051806105c001601f826000031636823750506308c379a061056052602061058052601f19601f6105a051011660440161057cfd5b6105805163ed6c15466105c05260206105c060046105dc845afa6110ea573d600060003e3d6000fd5b60203d106120a3576105c0518060a01c6120a357610600526106009050516105a052610180366105c0376105805161036052611127610740610898565b61074080516105c05260208101516105e05260408101516106005260608101516106c05260808101516106e05260a0810180516106805260208101516106a0525060e081015161070052610100810151610720526101208101805161062052602081015161064052604081015161066052505061054051600281116120a35760051b6105c0018051610560518082038281116120a357905090508152506105c051610620518082028115838383041417156120a357905090506105c05260006002905b806107405261074051600181018181106120a3579050600281116120a35760051b6105c0015161074051600181116120a35760051b61068001518082028115838383041417156120a3579050905061074051600181018181106120a3579050600281116120a35760051b61062001518082028115838383041417156120a35790509050670de0b6b3a76400008104905061074051600181018181106120a3579050600281116120a35760051b6105c001526001018181186111ea5750506105a051634a2ab3be61078052610700516107a052610720516107c0526105c0516107e0526105e0516108005261060051610820526106c051610840526105205161086052604061078060e461079c845afa611308573d600060003e3d6000fd5b60403d106120a3576107809050805161074052602081015161076052506107405161052051600281116120a35760051b6105c001518082038281116120a35790509050610780526107405161052051600281116120a35760051b6105c0015261052051156113c55761078051670de0b6b3a7640000810281670de0b6b3a76400008204186120a357905061052051600181038181116120a3579050600181116120a35760051b610680015180156120a35780820490509050610780525b6107805161052051600281116120a35760051b610620015180156120a3578082049050905061078052610780518152602081016105c05181526105e05160208201526106005160408201525050565b67ffffffffffffffff60405160801c16815267ffffffffffffffff60405160401c16602082015267ffffffffffffffff60405116604082015250565b60c05163ed6c1546610100526020610100600461011c845afa611478573d600060003e3d6000fd5b60203d106120a357610100518060a01c6120a3576101405261014090505160e05260c05163e3616405610120526020610120600461013c845afa6114c1573d600060003e3d6000fd5b60203d106120a35761012090505161010052610100516040526114e5610180611414565b6101808051610120526020810151610140526040810151610160525060e05163fa18042d6101a0526060516101c0526080516101e05260a05161020052610160516102205260206101a060846101bc845afa611546573d600060003e3d6000fd5b60203d106120a3576101a09050516101805261012051610180518082028115838383041417156120a35790509050610140516101805180670de0b6b3a764000003670de0b6b3a764000081116120a35790508082028115838383041417156120a357905090508082018281106120a35790509050670de0b6b3a764000081049050815250565b610280516318160ddd6102c05260206102c060046102dc845afa6115f5573d600060003e3d6000fd5b60203d106120a3576102c09050516102a0526102a05161024051116120a357600261026051116120a3576102805163ed6c15466102e05260206102e060046102fc845afa611648573d600060003e3d6000fd5b60203d106120a3576102e0518060a01c6120a357610320526103209050516102c05260a0366102e03760006003905b806103805261028051634903b0d16103a052610380516103c05260206103a060246103bc845afa6116ad573d600060003e3d6000fd5b60203d106120a3576103a090505161038051600281116120a35760051b6102e001526103805115611746576102805163a3f7cdd56103a05261038051600181038181116120a35790506103c05260206103a060246103bc845afa611716573d600060003e3d6000fd5b60203d106120a3576103a090505161038051600181038181116120a3579050600181116120a35760051b61034001525b60010181811861167757505061028051633620604b6103e05260606103e060046103fc845afa61177b573d600060003e3d6000fd5b60603d106120a3576103e0905080516103805260208101516103a05260408101516103c052506102805163f446c1d0610400526020610400600461041c845afa6117ca573d600060003e3d6000fd5b60203d106120a3576104009050516103e0526102805163b1373929610420526020610420600461043c845afa611805573d600060003e3d6000fd5b60203d106120a3576104209050516104005261038051610420526103a051610440526103c051610460526040366104803761038051670de0b6b3a7640000810281670de0b6b3a76400008204186120a35790506104c052610420516102e0518082028115838383041417156120a3579050905061042052600160028101905b806104e0526104e051600181038181116120a3579050600181116120a35760051b61034001516104a0526104e05161026051186118ec576104a05161026051600281116120a35760051b61042001518082028115838383041417156120a357905090506104c0525b6104e051600281116120a35760051b61042001516104e051600281116120a35760051b6102e001518082028115838383041417156120a357905090506104a0518082028115838383041417156120a35790509050670de0b6b3a7640000810490506104e051600281116120a35760051b6104200152600101818118611884575050426102805163f9ed95976104e05260206104e060046104fc845afa611997573d600060003e3d6000fd5b60203d106120a3576104e0905051116119ea5761028051630f529ba26104e05260206104e060046104fc845afa6119d3573d600060003e3d6000fd5b60203d106120a3576104e090505161048052611a54565b6102c051637b12e009610520526103e0516105405261040051610560526104205161058052610440516105a052610460516105c05260006105e052602061052060c461053c845afa611a41573d600060003e3d6000fd5b60203d106120a357610520905051610480525b610480516104e05261042051606052610440516080526104605160a0526102805160c052611a83610520611450565b6105205161050052610240516104e0518082028115838383041417156120a357905090506102a05180156120a357808204905090506105205261050051610520518082028115838383041417156120a357905090506404a817c80081049050600181018181106120a35790506105405261054051600381028160038204186120a357905061026051600281116120a35760051b6102e001518082028115838383041417156120a357905090506104e05180156120a35780820490509050610560526104e05161052051610540518082038281116120a357905090508082038281116120a357905090506104e0526102c051634a2ab3be6105c0526103e0516105e05261040051610600526104205161062052610440516106405261046051610660526104e05161068052610260516106a05260406105c060e46105dc845afa611bd1573d600060003e3d6000fd5b60403d106120a3576105c0905080516105805260208101516105a0525061026051600281116120a35760051b6104200151610580518082038281116120a35790509050670de0b6b3a7640000810281670de0b6b3a76400008204186120a35790506104c05180156120a357808204905090506105c0526105805161026051600281116120a35760051b61042001526105c051815261056051602082015250565b6105a05163ed6c15466105e05260206105e060046105fc845afa611c9a573d600060003e3d6000fd5b60203d106120a3576105e0518060a01c6120a357610620526106209050516105c052610180366105e0376105a05161036052611cd7610760610898565b61076080516105e05260208101516106005260408101516106205260608101516106e05260808101516107005260a0810180516106a05260208101516106c0525060e081015161072052610100810151610740526101208101805161064052602081015161066052604081015161068052505061052051610760526105405161078052610560516107a05261058051611dc05760006003905b806107c0526107c051600281116120a35760051b6105e00180516107c051600281116120a35760051b61052001518082038281116120a35790509050815250600101818118611d70575050611e12565b60006003905b806107c0526107c051600281116120a35760051b6105e00180516107c051600281116120a35760051b61052001518082018281106120a35790509050815250600101818118611dc65750505b6105e051610640518082028115838383041417156120a357905090506105e05261076051610640518082028115838383041417156120a357905090506107605260006002905b806107c0526107c051600181116120a35760051b6106a001516107c051600181018181106120a3579050600281116120a35760051b61064001518082028115838383041417156120a357905090506107e0526107c051600181018181106120a3579050600281116120a35760051b6105e001516107e0518082028115838383041417156120a35790509050670de0b6b3a7640000810490506107c051600181018181106120a3579050600281116120a35760051b6105e001526107c051600181018181106120a3579050600281116120a35760051b61076001516107e0518082028115838383041417156120a35790509050670de0b6b3a7640000810490506107c051600181018181106120a3579050600281116120a35760051b6107600152600101818118611e585750506105c051637b12e0096107e052610720516108005261074051610820526105e051610840526106005161086052610620516108805260006108a05260206107e060c46107fc845afa611fdb573d600060003e3d6000fd5b60203d106120a3576107e09050516107c052610700516107c0518082028115838383041417156120a357905090506106e05180156120a357808204905090506107e0526105805161204557610700516107e0518082038281116120a357905090506107e052612060565b6107e051610700518082038281116120a357905090506107e0525b6107e0518152602081016107605181526107805160208201526107a051604082015250608081016105e05181526106005160208201526106205160408201525050565b600080fd06670387001a020203d1
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.