ETH Price: $2,688.06 (-2.34%)

Contract

0x9a32aF1A11D9c937aEa61A3790C2983257eA8Bc0
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60206137157319702022-10-12 12:15:59684 days ago1665576959IN
 Create: Vyper_contract
0 ETH0.0568867218.22458834

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vyper_contract

Compiler Version
vyper:0.3.7

Optimization Enabled:
N/A

Other Settings:
MIT license

Contract Source Code (Vyper language format)

# @version 0.3.7
"""
@title Curve CryptoSwap Registry
@license MIT
@author Curve.Fi
"""

MAX_COINS: constant(int128) = 8
CALC_INPUT_SIZE: constant(int128) = 100


struct CoinInfo:
    index: uint256
    register_count: uint256
    swap_count: uint256
    swap_for: address[max_value(int128)]


struct PoolArray:
    location: uint256
    base_pool: address
    n_coins: uint256
    name: String[64]
    has_positive_rebasing_tokens: bool


interface AddressProvider:
    def admin() -> address: view
    def get_address(_id: uint256) -> address: view
    def get_registry() -> address: view

interface ERC20:
    def balanceOf(_addr: address) -> uint256: view
    def decimals() -> uint256: view
    def totalSupply() -> uint256: view

interface CurvePool:
    def token() -> address: view
    def coins(i: uint256) -> address: view
    def A() -> uint256: view
    def gamma() -> uint256: view
    def fee() -> uint256: view
    def get_virtual_price() -> uint256: view
    def mid_fee() -> uint256: view
    def out_fee() -> uint256: view
    def admin_fee() -> uint256: view
    def balances(i: uint256) -> uint256: view
    def D() -> uint256: view
    def xcp_profit() -> uint256: view
    def xcp_profit_a() -> uint256: view

interface StableSwapLegacy:
    def coins(i: int128) -> address: view
    def underlying_coins(i: int128) -> address: view
    def balances(i: int128) -> uint256: view

interface LiquidityGauge:
    def lp_token() -> address: view
    def is_killed() -> bool: view

interface GaugeController:
    def gauge_types(gauge: address) -> int128: view

interface BasePoolRegistry:
    def get_base_pool_for_lp_token(_lp_token: address) ->  address: view
    def get_n_coins(_pool: address) -> uint256: view
    def get_coins(_pool: address) -> address[MAX_COINS]: view
    def get_lp_token(_pool: address) -> address: view
    def is_legacy(_pool: address) -> bool: view


event PoolAdded:
    pool: indexed(address)

event BasePoolAdded:
    basepool: indexed(address)

event PoolRemoved:
    pool: indexed(address)


GAUGE_CONTROLLER: constant(address) = 0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB

address_provider: public(AddressProvider)
base_pool_registry: public(BasePoolRegistry)
pool_list: public(address[65536])   # master list of pools
pool_count: public(uint256)         # actual length of pool_list
base_pool_count: public(uint256)
coins: HashMap[address, CoinInfo]
get_coin: public(address[65536])  # unique list of registered coins
coin_swap_indexes: HashMap[uint256, uint256]
coin_count: public(uint256)  # total unique coins registered

pool_data: HashMap[address, PoolArray]

# lp token -> pool
get_pool_from_lp_token: public(HashMap[address, address])

# pool -> lp token
get_lp_token: public(HashMap[address, address])

# mapping of coins -> pools for trading
# a mapping key is generated for each pair of addresses via
# `bitwise_xor(convert(a, uint256), convert(b, uint256))`
markets: HashMap[uint256, address[65536]]
market_counts: HashMap[uint256, uint256]

liquidity_gauges: HashMap[address, address[10]]

# mapping of pool -> deposit/exchange zap
get_zap: public(HashMap[address, address])

last_updated: public(uint256)


@external
def __init__(_address_provider: address, _base_pool_registry: address):
    self.address_provider = AddressProvider(_address_provider)
    self.base_pool_registry = BasePoolRegistry(_base_pool_registry)


# internal functionality for getters

@internal
@view
def _get_coins(_pool: address) -> address[MAX_COINS]:
    _coins: address[MAX_COINS] = empty(address[MAX_COINS])
    for i in range(MAX_COINS):
        if i == convert(self.pool_data[_pool].n_coins, int128):
            break
        _coins[i] = CurvePool(_pool).coins(convert(i, uint256))
    return _coins


@view
@internal
def _get_decimals(_coins: address[MAX_COINS]) -> uint256[MAX_COINS]:
    decimals: uint256[MAX_COINS] = empty(uint256[MAX_COINS])
    value: uint256 = 0
    for i in range(MAX_COINS):
        if _coins[i] == empty(address):
            break
        coin: address = _coins[i]
        if coin == 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE:
            value = 18
        else:
            value = ERC20(coin).decimals()
            assert value < 256  # dev: decimal overflow

        decimals[i] = value

    return decimals


@view
@internal
def _get_underlying_coins_for_metapool(_pool: address) -> address[MAX_COINS]:

    base_pool_coins: address[MAX_COINS] = self.base_pool_registry.get_coins(self.pool_data[_pool].base_pool)
    _underlying_coins: address[MAX_COINS] = empty(address[MAX_COINS])
    base_coin_offset: int128 = convert(self.pool_data[_pool].n_coins - 1, int128)
    _coins: address[MAX_COINS] = self._get_coins(_pool)

    for i in range(MAX_COINS):
        if i < base_coin_offset:
            _underlying_coins[i] = _coins[i]
        else:
            _underlying_coins[i] = base_pool_coins[i - base_coin_offset]

    assert _underlying_coins[0] != empty(address)

    return _underlying_coins


@view
@internal
def _get_balances(_pool: address) -> uint256[MAX_COINS]:
    balances: uint256[MAX_COINS] = empty(uint256[MAX_COINS])
    _coins: address[MAX_COINS] = self._get_coins(_pool)
    for i in range(MAX_COINS):
        if _coins[i] == empty(address):
            assert i != 0
            break

        balances[i] = CurvePool(_pool).balances(convert(i, uint256))

    return balances


@view
@internal
def _get_meta_underlying_balances(_pool: address) -> uint256[MAX_COINS]:
    base_coin_idx: uint256 = self.pool_data[_pool].n_coins - 1
    base_pool: address = self.pool_data[_pool].base_pool
    base_total_supply: uint256 = ERC20(self.base_pool_registry.get_lp_token(base_pool)).totalSupply()

    underlying_balances: uint256[MAX_COINS] = empty(uint256[MAX_COINS])
    ul_balance: uint256 = 0
    underlying_pct: uint256 = 0
    if base_total_supply > 0:
        underlying_pct = CurvePool(_pool).balances(base_coin_idx) * 10**36 / base_total_supply

    ul_coins: address[MAX_COINS] = self._get_underlying_coins_for_metapool(_pool)
    for i in range(MAX_COINS):

        if ul_coins[i] == empty(address):
            break

        if i < convert(base_coin_idx, int128):
            ul_balance = CurvePool(_pool).balances(convert(i, uint256))

        else:

            if self.base_pool_registry.is_legacy(base_pool):
                ul_balance = StableSwapLegacy(base_pool).balances(i - convert(base_coin_idx, int128))
            else:
                ul_balance = CurvePool(base_pool).balances(convert(i, uint256) - base_coin_idx)
            ul_balance = ul_balance * underlying_pct / 10**36
        underlying_balances[i] = ul_balance

    return underlying_balances


@view
@internal
def _is_meta(_pool: address) -> bool:
    return self.pool_data[_pool].base_pool != empty(address)


@view
@internal
def _get_coin_indices(
    _pool: address,
    _from: address,
    _to: address
) -> uint256[3]:
    # the return value is stored as `uint256[3]` to reduce gas costs
    # from index, to index, is the market underlying?
    result: uint256[3] = empty(uint256[3])
    _coins: address[MAX_COINS] = self._get_coins(_pool)
    found_market: bool = False

    # check coin markets
    for x in range(MAX_COINS):
        coin: address = _coins[x]
        if coin == empty(address):
            # if we reach the end of the coins, reset `found_market` and try again
            # with the underlying coins
            found_market = False
            break
        if coin == _from:
            result[0] = convert(x, uint256)
        elif coin == _to:
            result[1] = convert(x, uint256)
        else:
            continue

        if found_market:
            # the second time we find a match, break out of the loop
            break
        # the first time we find a match, set `found_market` to True
        found_market = True

    if not found_market and self._is_meta(_pool):
        # check underlying coin markets
        underlying_coins: address[MAX_COINS] = self._get_underlying_coins_for_metapool(_pool)
        for x in range(MAX_COINS):
            coin: address = underlying_coins[x]
            if coin == empty(address):
                raise "No available market"
            if coin == _from:
                result[0] = convert(x, uint256)
            elif coin == _to:
                result[1] = convert(x, uint256)
            else:
                continue

            if found_market:
                result[2] = 1
                break
            found_market = True

    return result


@internal
@view
def _get_gauge_type(_gauge: address) -> int128:

    success: bool = False
    response: Bytes[32] = b""
    success, response = raw_call(
        GAUGE_CONTROLLER,
        concat(
            method_id("gauge_type(address)"),
            convert(_gauge, bytes32),
        ),
        max_outsize=32,
        revert_on_failure=False,
        is_static_call=True
    )

    if success and not LiquidityGauge(_gauge).is_killed():
        return convert(response, int128)

    return 0


# targetted external getters, optimized for on-chain calls


@view
@external
def find_pool_for_coins(_from: address, _to: address, i: uint256 = 0) -> address:
    """
    @notice Find an available pool for exchanging two coins
    @param _from Address of coin to be sent
    @param _to Address of coin to be received
    @param i Index value. When multiple pools are available
            this value is used to return the n'th address.
    @return Pool address
    """
    key: uint256 = convert(_from, uint256) ^ convert(_to, uint256)
    return self.markets[key][i]


@view
@external
def get_n_coins(_pool: address) -> uint256:
    """
    @notice Get the number of coins in a pool
    @dev For non-metapools, both returned values are identical
         even when the pool does not use wrapping/lending
    @param _pool Pool address
    @return uint256 Number of wrapped coins, number of underlying coins
    """
    return self.pool_data[_pool].n_coins


@external
@view
def get_n_underlying_coins(_pool: address) -> uint256:
    """
    @notice Get the number of underlying coins in a pool
    @param _pool Pool address
    @return uint256 Number of underlying coins
    """
    if not self._is_meta(_pool):
        return self.pool_data[_pool].n_coins

    base_pool: address = self.pool_data[_pool].base_pool
    return self.pool_data[_pool].n_coins + self.base_pool_registry.get_n_coins(base_pool) - 1


@view
@external
def get_coins(_pool: address) -> address[MAX_COINS]:
    """
    @notice Get the coins within a pool
    @dev For pools using lending, these are the wrapped coin addresses
    @param _pool Pool address
    @return address[MAX_COINS] List of coin addresses
    """
    return self._get_coins(_pool)


@view
@external
def get_underlying_coins(_pool: address) -> address[MAX_COINS]:
    """
    @notice Get the underlying coins within a pool
    @dev For pools that do not lend, returns the same value as `get_coins`
    @param _pool Pool address
    @return address[MAX_COINS] of coin addresses
    """
    if self._is_meta(_pool):
        return self._get_underlying_coins_for_metapool(_pool)
    return self._get_coins(_pool)


@view
@external
def get_decimals(_pool: address) -> uint256[MAX_COINS]:
    """
    @notice Get decimal places for each coin within a pool
    @dev For pools using lending, these are the wrapped coin decimal places
    @param _pool Pool address
    @return uint256 list of decimals
    """
    _coins: address[MAX_COINS] = self._get_coins(_pool)
    return self._get_decimals(_coins)


@view
@external
def get_underlying_decimals(_pool: address) -> uint256[MAX_COINS]:
    """
    @notice Get decimal places for each underlying coin within a pool
    @dev For pools that do not lend, returns the same value as `get_decimals`
    @param _pool Pool address
    @return uint256 list of decimals
    """
    if self._is_meta(_pool):
        _underlying_coins: address[MAX_COINS] = self._get_underlying_coins_for_metapool(_pool)
        _decimals: uint256[MAX_COINS] = empty(uint256[MAX_COINS])
        for i in range(MAX_COINS):
            if _underlying_coins[i] == empty(address):
                break
            _decimals[i] = ERC20(_underlying_coins[i]).decimals()
        return _decimals

    _coins: address[MAX_COINS] = self._get_coins(_pool)
    return self._get_decimals(_coins)


@view
@external
def get_gauges(_pool: address) -> (address[10], int128[10]):
    """
    @notice Get a list of LiquidityGauge contracts associated with a pool
    @param _pool Pool address
    @return address[10] of gauge addresses, int128[10] of gauge types
    """
    liquidity_gauges: address[10] = empty(address[10])
    gauge_types: int128[10] = empty(int128[10])
    for i in range(10):
        gauge: address = self.liquidity_gauges[_pool][i]
        if gauge == empty(address):
            break
        liquidity_gauges[i] = gauge
        gauge_types[i] = GaugeController(GAUGE_CONTROLLER).gauge_types(gauge)

    return liquidity_gauges, gauge_types


@view
@external
def get_balances(_pool: address) -> uint256[MAX_COINS]:
    """
    @notice Get balances for each coin within a pool
    @dev For pools using lending, these are the wrapped coin balances
    @param _pool Pool address
    @return uint256 list of balances
    """
    return self._get_balances(_pool)


@view
@external
def get_underlying_balances(_pool: address) -> uint256[MAX_COINS]:
    """
    @notice Get balances for each underlying coin within a pool
    @dev  For pools that do not lend, returns the same value as `get_balances`
    @param _pool Pool address
    @return uint256 list of underlyingbalances
    """
    if not self._is_meta(_pool):
        return self._get_balances(_pool)
    return self._get_meta_underlying_balances(_pool)


@view
@external
def get_virtual_price_from_lp_token(_token: address) -> uint256:
    """
    @notice Get the virtual price of a pool LP token
    @param _token LP token address
    @return uint256 Virtual price
    """
    return CurvePool(self.get_pool_from_lp_token[_token]).get_virtual_price()


@view
@external
def get_A(_pool: address) -> uint256:
    """
    @notice Get a pool's amplification factor
    @param _pool Pool address
    @return uint256 Amplification factor
    """
    return CurvePool(_pool).A()


@view
@external
def get_D(_pool: address) -> uint256:
    """
    @notice Get invariant of a pool's curve
    @param _pool Pool address
    @return uint256 Invariant
    """
    return CurvePool(_pool).D()


@view
@external
def get_gamma(_pool: address) -> uint256:
    """
    @notice Get the pool's gamma parameter
    @param _pool Pool address
    @return uint256 Gamma parameter
    """
    return CurvePool(_pool).gamma()


@view
@external
def get_fees(_pool: address) -> uint256[4]:
    """
    @notice Get the fees for a pool
    @dev Fees are expressed as integers
    @param _pool Pool address
    @return Pool fee as uint256 with 1e10 precision
            Admin fee as 1e10 percentage of pool fee
            Mid fee
            Out fee
    """
    return [CurvePool(_pool).fee(), CurvePool(_pool).admin_fee(), CurvePool(_pool).mid_fee(), CurvePool(_pool).out_fee()]


@external
@view
def get_admin_balances(_pool: address) -> uint256[MAX_COINS]:
    """
    @notice Get the admin balances for a pool (accrued fees)
    @dev Cryptoswap pools do not store admin fees in the form of
         admin token balances. Instead, the admin fees are computed
         at the time of claim iff sufficient profits have been made.
         These fees are allocated to the admin by minting LP tokens
         (dilution). The logic to calculate fees are derived from
         cryptopool._claim_admin_fees() method.
    @param _pool Pool address
    @return uint256 list of admin balances
    """
    xcp_profit: uint256 = CurvePool(_pool).xcp_profit()
    xcp_profit_a: uint256 = CurvePool(_pool).xcp_profit_a()
    admin_fee: uint256 = CurvePool(_pool).admin_fee()
    admin_balances: uint256[MAX_COINS] = empty(uint256[MAX_COINS])

    # admin balances are non zero if pool has made more than allowed profits:
    if xcp_profit > xcp_profit_a:

        # calculate admin fees in lp token amounts:
        fees: uint256 = (xcp_profit - xcp_profit_a) * admin_fee / (2 * 10**10)
        if fees > 0:
            vprice: uint256 = CurvePool(_pool).get_virtual_price()
            lp_token: address = self.get_lp_token[_pool]
            frac: uint256 = vprice * 10**18 / (vprice - fees) - 10**18

            # the total supply of lp token is current supply + claimable:
            lp_token_total_supply: uint256 = ERC20(lp_token).totalSupply()
            d_supply: uint256 = lp_token_total_supply * frac / 10**18
            lp_token_total_supply += d_supply
            admin_lp_frac: uint256 = d_supply * 10 ** 18 / lp_token_total_supply

            # get admin balances in individual assets:
            reserves: uint256[MAX_COINS] = self._get_balances(_pool)
            for i in range(MAX_COINS):
                admin_balances[i] = admin_lp_frac * reserves[i] / 10 ** 18

    return admin_balances


@view
@external
def get_coin_indices(
    _pool: address,
    _from: address,
    _to: address
) -> (int128, int128, bool):
    """
    @notice Convert coin addresses to indices for use with pool methods
    @param _pool Pool address
    @param _from Coin address to be used as `i` within a pool
    @param _to Coin address to be used as `j` within a pool
    @return int128 `i`, int128 `j`, boolean indicating if `i` and `j` are underlying coins
    """
    result: uint256[3] = self._get_coin_indices(_pool, _from, _to)
    return convert(result[0], int128), convert(result[1], int128), result[2] > 0


@view
@external
def is_meta(_pool: address) -> bool:
    """
    @notice Verify `_pool` is a metapool
    @param _pool Pool address
    @return True if `_pool` is a metapool
    """
    return self.pool_data[_pool].base_pool != empty(address)


@view
@external
def get_base_pool(_pool: address) -> address:
    """
    @notice Get the base pool of a metapool
    @param _pool Pool address
    @return Base pool address
    """
    return self.pool_data[_pool].base_pool


@view
@external
def get_pool_name(_pool: address) -> String[64]:
    """
    @notice Get the given name for a pool
    @param _pool Pool address
    @return The name of a pool
    """
    return self.pool_data[_pool].name


# internal functionality used in admin setters

@internal
def _register_coin(_coin: address):
    if self.coins[_coin].register_count == 0:
        coin_count: uint256 = self.coin_count
        self.coins[_coin].index = coin_count
        self.get_coin[coin_count] = _coin
        self.coin_count += 1
    self.coins[_coin].register_count += 1


@internal
def _register_coin_pair(_coina: address, _coinb: address, _key: uint256):
    # register _coinb in _coina's array of coins
    coin_b_pos: uint256 = self.coins[_coina].swap_count
    self.coins[_coina].swap_for[coin_b_pos] = _coinb
    self.coins[_coina].swap_count += 1
    # register _coina in _coinb's array of coins
    coin_a_pos: uint256 = self.coins[_coinb].swap_count
    self.coins[_coinb].swap_for[coin_a_pos] = _coina
    self.coins[_coinb].swap_count += 1
    # register indexes (coina pos in coinb array, coinb pos in coina array)
    if convert(_coina, uint256) < convert(_coinb, uint256):
        self.coin_swap_indexes[_key] = shift(coin_a_pos, 128) + coin_b_pos
    else:
        self.coin_swap_indexes[_key] = shift(coin_b_pos, 128) + coin_a_pos


@internal
def _add_coins_to_market(_pool: address, _coin_list: address[MAX_COINS], _is_underlying: bool = False):

    for i in range(MAX_COINS):

        if _coin_list[i] == empty(address):
            break

        # we dont want underlying <> underlying markets
        # since that should be covered by the base_pool
        # and not _pool: underlying <> underlying swaps
        # happen at the base_pool level, not at the _pool
        # level:
        if _is_underlying and i > 0:
            break

        # register coin:
        self._register_coin(_coin_list[i])

        # add pool to markets
        i2: int128 = i + 1
        for x in range(i2, i2 + MAX_COINS):

            if _coin_list[x] == empty(address):
                break

            key: uint256 = (
                convert(_coin_list[i], uint256) ^ convert(_coin_list[x], uint256)
            )
            length: uint256 = self.market_counts[key]
            self.markets[key][length] = _pool
            self.market_counts[key] = length + 1

            # register the coin pair
            if length == 0:
                self._register_coin_pair(_coin_list[x], _coin_list[i], key)


@internal
@view
def _market_exists(_pool: address, _coina: address, _coinb: address) -> bool:
    key: uint256 = convert(_coina, uint256) ^ convert(_coinb, uint256)
    if self.market_counts[key] == 0:
        return False
    return True


@internal
def _unregister_coin(_coin: address):
    self.coins[_coin].register_count -= 1

    if self.coins[_coin].register_count == 0:
        self.coin_count -= 1
        coin_count: uint256 = self.coin_count
        location: uint256 = self.coins[_coin].index

        if location < coin_count:
            coin_b: address = self.get_coin[coin_count]
            self.get_coin[location] = coin_b
            self.coins[coin_b].index = location

        self.coins[_coin].index = 0
        self.get_coin[coin_count] = empty(address)


@internal
def _unregister_coin_pair(_coina: address, _coinb: address, _coinb_idx: uint256):
    """
    @param _coinb_idx the index of _coinb in _coina's array of unique coin's
    """
    # decrement swap counts for both coins
    self.coins[_coina].swap_count -= 1

    # retrieve the last currently occupied index in coina's array
    coina_arr_last_idx: uint256 = self.coins[_coina].swap_count

    # if coinb's index in coina's array is less than the last
    # overwrite it's position with the last coin
    if _coinb_idx < coina_arr_last_idx:
        # here's our last coin in coina's array
        coin_c: address = self.coins[_coina].swap_for[coina_arr_last_idx]
        # get the bitwise_xor of the pair to retrieve their indexes
        key: uint256 = convert(_coina, uint256) ^ convert(coin_c, uint256)
        indexes: uint256 = self.coin_swap_indexes[key]

        # update the pairing's indexes
        if convert(_coina, uint256) < convert(coin_c, uint256):
            # least complicated most readable way of shifting twice to remove the lower order bits
            self.coin_swap_indexes[key] = shift(shift(indexes, -128), 128) + _coinb_idx
        else:
            self.coin_swap_indexes[key] = shift(_coinb_idx, 128) + indexes % 2 ** 128
        # set _coinb_idx in coina's array to coin_c
        self.coins[_coina].swap_for[_coinb_idx] = coin_c

    self.coins[_coina].swap_for[coina_arr_last_idx] = empty(address)


@internal
def _remove_market(_pool: address, _coina: address, _coinb: address):

    key: uint256 = convert(_coina, uint256) ^ convert(_coinb, uint256)
    length: uint256 = self.market_counts[key] - 1

    if length == 0:
        indexes: uint256 = self.coin_swap_indexes[key]
        if convert(_coina, uint256) < convert(_coinb, uint256):
            self._unregister_coin_pair(_coina, _coinb, indexes % 2 ** 128)
            self._unregister_coin_pair(_coinb, _coina, shift(indexes, -128))
        else:
            self._unregister_coin_pair(_coina, _coinb, shift(indexes, -128))
            self._unregister_coin_pair(_coinb, _coina, indexes % 2 ** 128)
        self.coin_swap_indexes[key] = 0

    for i in range(65536):
        if i > length:
            break
        if self.markets[key][i] == _pool:
            if i < length:
                self.markets[key][i] = self.markets[key][length]
            self.markets[key][length] = empty(address)
            self.market_counts[key] = length
            break


@internal
def _remove_liquidity_gauges(_pool: address):
    for i in range(10):
        if self.liquidity_gauges[_pool][i] != empty(address):
            self.liquidity_gauges[_pool][i] = empty(address)
        else:
            break


# admin functions


@external
def add_pool(
    _pool: address,
    _lp_token: address,
    _gauge: address,
    _zap: address,
    _n_coins: uint256,
    _name: String[64],
    _base_pool: address = empty(address),
    _has_positive_rebasing_tokens: bool = False
):
    """
    @notice Add a pool to the registry
    @dev Only callable by admin
    @param _pool Pool address to add
    @param _lp_token Pool deposit token address
    @param _gauge Gauge address
    @param _zap Zap address
    @param _n_coins Number of coins in the pool
    @param _name The name of the pool
    @param _base_pool Address of base pool
    @param _has_positive_rebasing_tokens pool contains positive rebasing tokens
    """
    assert msg.sender == self.address_provider.admin()  # dev: admin-only function
    assert _lp_token != empty(address)
    assert self.get_pool_from_lp_token[_lp_token] == empty(address)  # dev: pool exists

    # initialise PoolArray struct
    length: uint256 = self.pool_count
    self.pool_list[length] = _pool
    self.pool_count = length + 1
    self.pool_data[_pool].location = length
    self.pool_data[_pool].name = _name
    self.pool_data[_pool].n_coins = _n_coins

    # update public mappings
    if _zap != empty(address):
        self.get_zap[_pool] = _zap

    if _gauge != empty(address):
        self.liquidity_gauges[_pool][0] = _gauge

    self.get_pool_from_lp_token[_lp_token] = _pool
    self.get_lp_token[_pool] = _lp_token

    # add coins mappings:
    _coins: address[MAX_COINS] = empty(address[MAX_COINS])
    for i in range(MAX_COINS):
        if i == convert(_n_coins, int128):
            break
        _coins[i] = CurvePool(_pool).coins(convert(i, uint256))
    self._add_coins_to_market(_pool, _coins)

    # the following does not add basepool_lp_token <> underlying_coin mapping
    # since that is redundant:
    if _base_pool != empty(address):
        assert self.base_pool_registry.get_lp_token(_base_pool) != empty(address)
        self.pool_data[_pool].base_pool = _base_pool

        _underlying_coins: address[MAX_COINS] = self._get_underlying_coins_for_metapool(_pool)
        assert _underlying_coins[0] != empty(address)

        self._add_coins_to_market(_pool, _underlying_coins, True)

    if _has_positive_rebasing_tokens:
        self.pool_data[_pool].has_positive_rebasing_tokens = True

    # log pool added:
    self.last_updated = block.timestamp
    log PoolAdded(_pool)


@external
def remove_pool(_pool: address):
    """
    @notice Remove a pool to the registry
    @dev Only callable by admin
    @param _pool Pool address to remove
    """
    assert msg.sender == self.address_provider.admin()  # dev: admin-only function
    assert self.get_lp_token[_pool] != empty(address)  # dev: pool does not exist

    self.get_pool_from_lp_token[self.get_lp_token[_pool]] = empty(address)
    self.get_lp_token[_pool] = empty(address)

    # remove _pool from pool_list
    location: uint256 = self.pool_data[_pool].location
    length: uint256 = self.pool_count - 1

    # because self.pool_list is a static array,
    # we can replace the last index with empty(address)
    # and replace the first index with the pool
    # that was previously in the last index.
    # we skip this step if location == last index
    if location < length:
        # replace _pool with final value in pool_list
        addr: address = self.pool_list[length]
        self.pool_list[location] = addr
        self.pool_data[addr].location = location

    # delete final pool_list value
    self.pool_list[length] = empty(address)
    self.pool_count = length

    coins: address[MAX_COINS] = self._get_coins(_pool)
    ucoins: address[MAX_COINS] = empty(address[MAX_COINS])
    is_meta: bool = self._is_meta(_pool)
    if is_meta:
        ucoins = self._get_underlying_coins_for_metapool(_pool)

    for i in range(MAX_COINS):

        if coins[i] == empty(address) and ucoins[i] == empty(address):
            break

        if coins[i] != empty(address):
            self._unregister_coin(coins[i])

        if ucoins[i] != empty(address):
            if self.coins[ucoins[i]].register_count != 0:
                self._unregister_coin(ucoins[i])

        for j in range(MAX_COINS):

            if not j > i:
                continue

            if empty(address) not in [coins[i], coins[j]] and self._market_exists(_pool, coins[i], coins[j]):
                self._remove_market(_pool, coins[i], coins[j])

            if empty(address) not in [coins[i], ucoins[j]] and self._market_exists(_pool, coins[i], ucoins[j]):
                self._remove_market(_pool, coins[i], ucoins[j])

    # reset remaining mappings:
    self.pool_data[_pool].base_pool = empty(address)
    self.pool_data[_pool].n_coins = 0
    self.pool_data[_pool].name = ""
    self.get_zap[_pool] = empty(address)
    self._remove_liquidity_gauges(_pool)

    self.last_updated = block.timestamp
    log PoolRemoved(_pool)


@external
def set_liquidity_gauges(_pool: address, _liquidity_gauges: address[10]):
    """
    @notice Set liquidity gauge contracts
    @param _pool Pool address
    @param _liquidity_gauges Liquidity gauge address
    """
    assert msg.sender == self.address_provider.admin()  # dev: admin-only function

    _lp_token: address = self.get_lp_token[_pool]
    for i in range(10):
        _gauge: address = _liquidity_gauges[i]
        if _gauge != empty(address):
            assert LiquidityGauge(_gauge).lp_token() == _lp_token  # dev: wrong token
            self.liquidity_gauges[_pool][i] = _gauge
        elif self.liquidity_gauges[_pool][i] != empty(address):
            self.liquidity_gauges[_pool][i] = empty(address)
        else:
            break
    self.last_updated = block.timestamp


@external
def batch_set_liquidity_gauges(_pools: address[10], _liquidity_gauges: address[10]):
    """
    @notice Set many liquidity gauge contracts
    @param _pools List of pool addresses
    @param _liquidity_gauges List of liquidity gauge addresses
    """
    assert msg.sender == self.address_provider.admin()  # dev: admin-only function

    for i in range(10):
        _pool: address = _pools[i]
        if _pool == empty(address):
            break
        _gauge: address = _liquidity_gauges[i]
        assert LiquidityGauge(_gauge).lp_token() == self.get_lp_token[_pool]  # dev: wrong token
        self.liquidity_gauges[_pool][0] = _gauge

    self.last_updated = block.timestamp

Contract Security Audit

Contract ABI

[{"name":"PoolAdded","inputs":[{"name":"pool","type":"address","indexed":true}],"anonymous":false,"type":"event"},{"name":"BasePoolAdded","inputs":[{"name":"basepool","type":"address","indexed":true}],"anonymous":false,"type":"event"},{"name":"PoolRemoved","inputs":[{"name":"pool","type":"address","indexed":true}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_address_provider","type":"address"},{"name":"_base_pool_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_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_coins","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"address[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_decimals","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256[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_gauges","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"address[10]"},{"name":"","type":"int128[10]"}]},{"stateMutability":"view","type":"function","name":"get_balances","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256[8]"}]},{"stateMutability":"view","type":"function","name":"get_underlying_balances","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":"get_A","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_D","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_gamma","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_fees","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256[4]"}]},{"stateMutability":"view","type":"function","name":"get_admin_balances","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"uint256[8]"}]},{"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":"is_meta","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"view","type":"function","name":"get_base_pool","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"get_pool_name","inputs":[{"name":"_pool","type":"address"}],"outputs":[{"name":"","type":"string"}]},{"stateMutability":"nonpayable","type":"function","name":"add_pool","inputs":[{"name":"_pool","type":"address"},{"name":"_lp_token","type":"address"},{"name":"_gauge","type":"address"},{"name":"_zap","type":"address"},{"name":"_n_coins","type":"uint256"},{"name":"_name","type":"string"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"add_pool","inputs":[{"name":"_pool","type":"address"},{"name":"_lp_token","type":"address"},{"name":"_gauge","type":"address"},{"name":"_zap","type":"address"},{"name":"_n_coins","type":"uint256"},{"name":"_name","type":"string"},{"name":"_base_pool","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"add_pool","inputs":[{"name":"_pool","type":"address"},{"name":"_lp_token","type":"address"},{"name":"_gauge","type":"address"},{"name":"_zap","type":"address"},{"name":"_n_coins","type":"uint256"},{"name":"_name","type":"string"},{"name":"_base_pool","type":"address"},{"name":"_has_positive_rebasing_tokens","type":"bool"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"remove_pool","inputs":[{"name":"_pool","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"set_liquidity_gauges","inputs":[{"name":"_pool","type":"address"},{"name":"_liquidity_gauges","type":"address[10]"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"batch_set_liquidity_gauges","inputs":[{"name":"_pools","type":"address[10]"},{"name":"_liquidity_gauges","type":"address[10]"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"address_provider","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"base_pool_registry","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"pool_list","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"pool_count","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"base_pool_count","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_coin","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"coin_count","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"get_pool_from_lp_token","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"get_lp_token","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"get_zap","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"last_updated","inputs":[],"outputs":[{"name":"","type":"uint256"}]}]

60206137136000396000518060a01c61370e5760405260206137336000396000518060a01c61370e576060523461370e576040516000556060516001556136bf61004e610000396136bf610000f36003361161000c57612070565b60003560e01c346136ad5763a87df06c811861003457604436106136ad57600060805261004e565b636982eb0b81186100a057606436106136ad576044356080525b6004358060a01c6136ad576040526024358060a01c6136ad576060526060516040511860a0526202000a60a051602052600052604060002060805161ffff81116136ad57810190505460c052602060c0f35b63940494f181186100e357602436106136ad576004358060a01c6136ad576040526202000760405160205260005260406000206002810190505460605260206060f35b630a700c0881186101d257602436106136ad576004358060a01c6136ad576060526060516040526101146080612a68565b608051610140576202000760605160205260005260406000206002810190505460a052602060a06101d0565b620200076060516020526000526040600020600181019050546080526202000760605160205260005260406000206002810190505460015463940494f160a05260805160c052602060a0602460bc845afa6101a0573d600060003e3d6000fd5b60203d106136ad5760a09050518082018281106136ad5790509050600181038181116136ad57905060e052602060e05bf35b639ac90d3d811861020e57602436106136ad576004358060a01c6136ad576101e0526101006101e051604052610209610200612076565b610200f35b63a77576ef811861028457602436106136ad576004358060a01c6136ad576106205261062051604052610242610640612a68565b610640511561026957610100610620516101e052610261610660612293565b610660610282565b6101006106205160405261027e610640612076565b6106405bf35b6352b51555811861034e57602436106136ad576004358060a01c6136ad576102e0526102e0516040526102b8610400612076565b61040080516103005260208101516103205260408101516103405260608101516103605260808101516103805260a08101516103a05260c08101516103c05260e08101516103e052506101006103005160405261032051606052610340516080526103605160a0526103805160c0526103a05160e0526103c051610100526103e05161012052610349610400612170565b610400f35b634cb088f1811861053357602436106136ad576004358060a01c6136ad576106205261062051604052610382610640612a68565b610640511561048a57610620516101e05261039e610760612293565b61076080516106605260208101516106805260408101516106a05260608101516106c05260808101516106e05260a08101516107005260c08101516107205260e08101516107405250610100366107603760006008905b806108605261086051600781116136ad5760051b61066001516104175761047d565b61086051600781116136ad5760051b610660015163313ce567610880526020610880600461089c845afa610450573d600060003e3d6000fd5b60203d106136ad5761088090505161086051600781116136ad5760051b61076001526001018181186103f5575b5050610100610760610531565b6106205160405261049c610740612076565b61074080516106405260208101516106605260408101516106805260608101516106a05260808101516106c05260a08101516106e05260c08101516107005260e081015161072052506101006106405160405261066051606052610680516080526106a05160a0526106c05160c0526106e05160e0526107005161010052610720516101205261052d610740612170565b6107405bf35b6356059ffb81186106d457602436106136ad576004358060a01c6136ad57604052610280366060376000600a905b806102e0526202000c60405160205260005260406000206102e051600981116136ad578101905054610300526103005161059a5761062f565b610300516102e051600981116136ad5760051b60600152633f9095b76103205261030051610340526020610320602461033c732f50d538606fa9edd2b11e2446beb18c9d5846bb5afa6105f2573d600060003e3d6000fd5b60203d106136ad576103205180600f0b81186136ad5761036052610360516102e051600981116136ad5760051b6101a00152600101818118610561575b50506060516102e0526080516103005260a0516103205260c0516103405260e051610360526101005161038052610120516103a052610140516103c052610160516103e05261018051610400526101a051610420526101c051610440526101e051610460526102005161048052610220516104a052610240516104c052610260516104e05261028051610500526102a051610520526102c051610540526102806102e0f35b6392e3cc2d811861071157602436106136ad576004358060a01c6136ad5761050052610100610500516101e05261070c610520612524565b610520f35b6359f4f351811861078757602436106136ad576004358060a01c6136ad576109e0526109e051604052610745610a00612a68565b610a005161076b576101006109e0516101e052610763610a20612524565b610a20610785565b6101006109e05161062052610781610a00612668565b610a005bf35b63c5b7074a81186107ed57602436106136ad576004358060a01c6136ad5760405260206202000860405160205260005260406000205463bb7b8b80606052602060606004607c845afa6107df573d600060003e3d6000fd5b60203d106136ad5760609050f35b6355b30b19811861084357602436106136ad576004358060a01c6136ad57604052602060405163f446c1d0606052602060606004607c845afa610835573d600060003e3d6000fd5b60203d106136ad5760609050f35b63e3663c99811861089957602436106136ad576004358060a01c6136ad576040526020604051630f529ba2606052602060606004607c845afa61088b573d600060003e3d6000fd5b60203d106136ad5760609050f35b637c400ccf81186108ef57602436106136ad576004358060a01c6136ad57604052602060405163b1373929606052602060606004607c845afa6108e1573d600060003e3d6000fd5b60203d106136ad5760609050f35b637cdb72b081186109f357602436106136ad576004358060a01c6136ad5760405260405163ddca3f43606052602060606004607c845afa610935573d600060003e3d6000fd5b60203d106136ad5760609050516101605260405163fee3f7f960a052602060a0600460bc845afa61096b573d600060003e3d6000fd5b60203d106136ad5760a0905051610180526040516392526c0c60e052602060e0600460fc845afa6109a1573d600060003e3d6000fd5b60203d106136ad5760e09050516101a05260405163ee8de675610120526020610120600461013c845afa6109da573d600060003e3d6000fd5b60203d106136ad576101209050516101c0526080610160f35b63c11e45b88118610d5357602436106136ad576004358060a01c6136ad576105005261050051637ba1a74d610540526020610540600461055c845afa610a3e573d600060003e3d6000fd5b60203d106136ad576105409050516105205261050051630b7b594b610560526020610560600461057c845afa610a79573d600060003e3d6000fd5b60203d106136ad57610560905051610540526105005163fee3f7f9610580526020610580600461059c845afa610ab4573d600060003e3d6000fd5b60203d106136ad5761058090505161056052610100366105803761054051610520511115610d4b5761052051610540518082038281116136ad5790509050610560518082028115838383041417156136ad57905090506404a817c80081049050610680526106805115610d4b576105005163bb7b8b806106c05260206106c060046106dc845afa610b4a573d600060003e3d6000fd5b60203d106136ad576106c09050516106a05262020009610500516020526000526040600020546106c0526106a051670de0b6b3a7640000810281670de0b6b3a76400008204186136ad5790506106a051610680518082038281116136ad579050905080156136ad5780820490509050670de0b6b3a764000081038181116136ad5790506106e0526106c0516318160ddd610720526020610720600461073c845afa610bfa573d600060003e3d6000fd5b60203d106136ad5761072090505161070052610700516106e0518082028115838383041417156136ad5790509050670de0b6b3a7640000810490506107205261070051610720518082018281106136ad57905090506107005261072051670de0b6b3a7640000810281670de0b6b3a76400008204186136ad5790506107005180156136ad578082049050905061074052610500516101e052610c9d610860612524565b61086080516107605260208101516107805260408101516107a05260608101516107c05260808101516107e05260a08101516108005260c08101516108205260e0810151610840525060006008905b80610860526107405161086051600781116136ad5760051b61076001518082028115838383041417156136ad5790509050670de0b6b3a76400008104905061086051600781116136ad5760051b6105800152600101818118610cec5750505b610100610580f35b63eb85226d8118610e0357606436106136ad576004358060a01c6136ad57610a20526024358060a01c6136ad57610a40526044358060a01c6136ad57610a6052610a205161062052610a405161064052610a605161066052610db6610ae0612a88565b610ae08051610a80526020810151610aa0526040810151610ac05250610a805180607f1c6136ad57610ae052610aa05180607f1c6136ad57610b0052610ac0511515610b20526060610ae0f35b63e4d332a98118610e4857602436106136ad576004358060a01c6136ad5760405262020007604051602052600052604060002060018101905054151560605260206060f35b636f20d6dd8118610e8b57602436106136ad576004358060a01c6136ad576040526202000760405160205260005260406000206001810190505460605260206060f35b635c9117418118610f3b57602436106136ad576004358060a01c6136ad576040526020806060526202000760405160205260005260406000206003810190508160600181548082526001830160208301600083601f0160051c600281116136ad578015610f0a57905b808401548160051b840152600101818118610ef4575b50505050508051806020830101601f82600003163682375050601f19601f8251602001011690509050810190506060f35b633fe0276e8118610f5a5760e436106136ad5760403661070037610fbb565b634e724dfc8118610f885761010436106136ad5760c4358060a01c6136ad5761070052600061072052610fbb565b632ec86273811861145a5761012436106136ad5760c4358060a01c6136ad576107005260e4358060011c6136ad57610720525b6004358060a01c6136ad57610620526024358060a01c6136ad57610640526044358060a01c6136ad57610660526064358060a01c6136ad576106805260a43560040160408135116136ad578035806106a0526020820181816106c03750505060005463f851a440610740526020610740600461075c845afa611042573d600060003e3d6000fd5b60203d106136ad57610740518060a01c6136ad576107805261078090505133186136ad5761064051156136ad5762020008610640516020526000526040600020546136ad57620100025461074052610620516107405161ffff81116136ad576002015561074051600181018181106136ad57905062010002556107405162020007610620516020526000526040600020556106a05180620200076106205160205260005260406000206003810190505560016202000761062051602052600052604060002060038101905001600082601f0160051c600281116136ad57801561113f57905b8060051b6106c0015181840155600101818118611127575b505050506084356202000761062051602052600052604060002060028101905055610680511561118257610680516202000d610620516020526000526040600020555b61066051156111a457610660516202000c610620516020526000526040600020555b610620516202000861064051602052600052604060002055610640516202000961062051602052600052604060002055610100366107603760006008905b806108605260843580607f1c6136ad57610860511861120057611276565b6106205163c66106576108805261086051600081126136ad576108a0526020610880602461089c845afa611239573d600060003e3d6000fd5b60203d106136ad57610880518060a01c6136ad576108c0526108c090505161086051600781116136ad5760051b61076001526001018181186111e2575b50506106205160e052610760516101005261078051610120526107a051610140526107c051610160526107e05161018052610800516101a052610820516101c052610840516101e0526000610200526112cd612faf565b61070051156114015760015463379510496108605261070051610880526020610860602461087c845afa611306573d600060003e3d6000fd5b60203d106136ad57610860518060a01c6136ad576108a0526108a0905051156136ad57610700516202000761062051602052600052604060002060018101905055610620516101e05261135a610960612293565b61096080516108605260208101516108805260408101516108a05260608101516108c05260808101516108e05260a08101516109005260c08101516109205260e0810151610940525061086051156136ad576106205160e052610860516101005261088051610120526108a051610140526108c051610160526108e05161018052610900516101a052610920516101c052610940516101e052600161020052611401612faf565b610720511561142757600162020007610620516020526000526040600020600681019050555b426202000e55610620517f73cca62ab1b520c9715bf4e6c71e3e518c754e7148f65102f43289a7df0efea66000610860a2005b63474932b08118611a0a57602436106136ad576004358060a01c6136ad576106205260005463f851a440610640526020610640600461065c845afa6114a4573d600060003e3d6000fd5b60203d106136ad57610640518060a01c6136ad576106805261068090505133186136ad576202000961062051602052600052604060002054156136ad576000620200086202000961062051602052600052604060002054602052600052604060002055600062020009610620516020526000526040600020556202000761062051602052600052604060002054610640526201000254600181038181116136ad579050610660526106605161064051101561159c576106605161ffff81116136ad576002015461068052610680516106405161ffff81116136ad57600201556106405162020007610680516020526000526040600020555b60006106605161ffff81116136ad5760020155610660516201000255610620516040526115ca610780612076565b61078080516106805260208101516106a05260408101516106c05260608101516106e05260808101516107005260a08101516107205260c08101516107405260e0810151610760525061010036610780376106205160405261162d6108a0612a68565b6108a05161088052610880511561169b57610620516101e0526116516108a0612293565b6108a080516107805260208101516107a05260408101516107c05260608101516107e05260808101516108005260a08101516108205260c08101516108405260e081015161086052505b60006008905b806108a0526108a051600781116136ad5760051b61068001516116d8576108a051600781116136ad5760051b6107800151156116db565b60005b156116e557611950565b6108a051600781116136ad5760051b61068001511561171d576108a051600781116136ad5760051b610680015160405261171d613182565b6108a051600781116136ad5760051b61078001511561178457620100046108a051600781116136ad5760051b610780015160205260005260406000206001810190505415611784576108a051600781116136ad5760051b6107800151604052611784613182565b60006008905b806108c0526108a0516108c051136117a157611939565b6108a051600781116136ad5760051b6106800151156117d5576108c051600781116136ad5760051b610680015115156117d8565b60005b6117e3576000611828565b610620516040526108a051600781116136ad5760051b61068001516060526108c051600781116136ad5760051b610680015160805261182361090061314f565b610900515b1561186d5761062051610120526108a051600781116136ad5760051b6106800151610140526108c051600781116136ad5760051b61068001516101605261186d613422565b6108a051600781116136ad5760051b6106800151156118a1576108c051600781116136ad5760051b610780015115156118a4565b60005b6118af5760006118f4565b610620516040526108a051600781116136ad5760051b61068001516060526108c051600781116136ad5760051b61078001516080526118ef61090061314f565b610900515b156119395761062051610120526108a051600781116136ad5760051b6106800151610140526108c051600781116136ad5760051b610780015161016052611939613422565b60010181811861178a5750506001018181186116a1575b5050600062020007610620516020526000526040600020600181019050556000620200076106205160205260005260406000206002810190505560006108a0526108a08051806202000761062051602052600052604060002060038101905055505060006202000d61062051602052600052604060002055610620516040526119d7613640565b426202000e55610620517f4106dfdaa577573db51c0ca93f766dbedfa0758faa2e7f5bcdb7c142be803c3f60006108a0a2005b63ef6b97888118611c355761016436106136ad576004358060a01c6136ad576040526024358060a01c6136ad576060526044358060a01c6136ad576080526064358060a01c6136ad5760a0526084358060a01c6136ad5760c05260a4358060a01c6136ad5760e05260c4358060a01c6136ad576101005260e4358060a01c6136ad5761012052610104358060a01c6136ad5761014052610124358060a01c6136ad5761016052610144358060a01c6136ad576101805260005463f851a4406101a05260206101a060046101bc845afa611ae8573d600060003e3d6000fd5b60203d106136ad576101a0518060a01c6136ad576101e0526101e090505133186136ad57620200096040516020526000526040600020546101a0526000600a905b806101c0526101c051600981116136ad5760051b606001516101e0526101e05115611bca576101a0516101e0516382c63066610200526020610200600461021c845afa611b7b573d600060003e3d6000fd5b60203d106136ad57610200518060a01c6136ad5761024052610240905051186136ad576101e0516202000c60405160205260005260406000206101c051600981116136ad578101905055611c20565b6202000c60405160205260005260406000206101c051600981116136ad57810190505415611c2b5760006202000c60405160205260005260406000206101c051600981116136ad578101905055611c2056611c2b565b600101818118611b29575b5050426202000e55005b63fec61ef58118611e9b5761028436106136ad576004358060a01c6136ad576040526024358060a01c6136ad576060526044358060a01c6136ad576080526064358060a01c6136ad5760a0526084358060a01c6136ad5760c05260a4358060a01c6136ad5760e05260c4358060a01c6136ad576101005260e4358060a01c6136ad5761012052610104358060a01c6136ad5761014052610124358060a01c6136ad5761016052610144358060a01c6136ad5761018052610164358060a01c6136ad576101a052610184358060a01c6136ad576101c0526101a4358060a01c6136ad576101e0526101c4358060a01c6136ad57610200526101e4358060a01c6136ad5761022052610204358060a01c6136ad5761024052610224358060a01c6136ad5761026052610244358060a01c6136ad5761028052610264358060a01c6136ad576102a05260005463f851a4406102c05260206102c060046102dc845afa611da3573d600060003e3d6000fd5b60203d106136ad576102c0518060a01c6136ad576103005261030090505133186136ad576000600a905b806102c0526102c051600981116136ad5760051b604001516102e0526102e051611df657611e91565b6102c051600981116136ad5760051b610180015161030052620200096102e051602052600052604060002054610300516382c63066610320526020610320600461033c845afa611e4b573d600060003e3d6000fd5b60203d106136ad57610320518060a01c6136ad5761036052610360905051186136ad57610300516202000c6102e051602052600052604060002055600101818118611dcd575b5050426202000e55005b63ce50c2e78118611eba57600436106136ad5760005460405260206040f35b63243e48d78118611ed957600436106136ad5760015460405260206040f35b633a1d5d8e8118611f0557602436106136ad5760043561ffff81116136ad576002015460405260206040f35b63956aae3a8118611f2657600436106136ad57620100025460405260206040f35b63de5e4a3b8118611f4757600436106136ad57620100035460405260206040f35b6345f0db248118611f7557602436106136ad5760043561ffff81116136ad5762010005015460405260206040f35b635075770f8118611f9657600436106136ad57620200065460405260206040f35b63bdf475c38118611fd357602436106136ad576004358060a01c6136ad576040526202000860405160205260005260406000205460605260206060f35b6337951049811861201057602436106136ad576004358060a01c6136ad576040526202000960405160205260005260406000205460605260206060f35b6355335d7b811861204d57602436106136ad576004358060a01c6136ad576040526202000d60405160205260005260406000205460605260206060f35b6368900961811861206e57600436106136ad576202000e5460405260206040f35b505b60006000fd5b6101003660603760006008905b80610160526202000760405160205260005260406000206002810190505480607f1c6136ad5761016051186120b75761212b565b60405163c66106576101805261016051600081126136ad576101a0526020610180602461019c845afa6120ef573d600060003e3d6000fd5b60203d106136ad57610180518060a01c6136ad576101c0526101c090505161016051600781116136ad5760051b60600152600101818118612083575b50506060518152608051602082015260a051604082015260c051606082015260e05160808201526101005160a08201526101205160c08201526101405160e082015250565b610120366101403760006008905b806102605261026051600781116136ad5760051b6040015161219f57612249565b61026051600781116136ad5760051b604001516102805273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee61028051186121df57601261024052612226565b6102805163313ce5676102a05260206102a060046102bc845afa612208573d600060003e3d6000fd5b60203d106136ad576102a09050516102405260ff61024051116136ad575b6102405161026051600781116136ad5760051b610140015260010181811861217e575b50506101405181526101605160208201526101805160408201526101a05160608201526101c05160808201526101e05160a08201526102005160c08201526102205160e082015250565b600154639ac90d3d61030052620200076101e05160205260005260406000206001810190505461032052610100610300602461031c845afa6122da573d600060003e3d6000fd5b6101003d106136ad57610300518060a01c6136ad5761042052610320518060a01c6136ad5761044052610340518060a01c6136ad5761046052610360518060a01c6136ad5761048052610380518060a01c6136ad576104a0526103a0518060a01c6136ad576104c0526103c0518060a01c6136ad576104e0526103e0518060a01c6136ad5761050052610420905080516102005260208101516102205260408101516102405260608101516102605260808101516102805260a08101516102a05260c08101516102c05260e08101516102e052506101003661030037620200076101e051602052600052604060002060028101905054600181038181116136ad57905080607f1c6136ad57610400526101e0516040526123fb610520612076565b61052080516104205260208101516104405260408101516104605260608101516104805260808101516104a05260a08101516104c05260c08101516104e05260e0810151610500525060006008905b806105205261040051610520511261249e57610520516104005180820380600f0b81186136ad5790509050600781116136ad5760051b610200015161052051600781116136ad5760051b61030001526124c7565b61052051600781116136ad5760051b610420015161052051600781116136ad5760051b61030001525b60010181811861244a57505061030051156136ad576103005181526103205160208201526103405160408201526103605160608201526103805160808201526103a05160a08201526103c05160c08201526103e05160e082015250565b61010036610200376101e05160405261253e610400612076565b61040080516103005260208101516103205260408101516103405260608101516103605260808101516103805260a08101516103a05260c08101516103c05260e08101516103e0525060006008905b806104005261040051600781116136ad5760051b61030001516125b85761040051156136ad5761261e565b6101e051634903b0d16104205261040051600081126136ad57610440526020610420602461043c845afa6125f1573d600060003e3d6000fd5b60203d106136ad5761042090505161040051600781116136ad5760051b610200015260010181811861258d575b50506102005181526102205160208201526102405160408201526102605160608201526102805160808201526102a05160a08201526102c05160c08201526102e05160e082015250565b6202000761062051602052600052604060002060028101905054600181038181116136ad5790506106405262020007610620516020526000526040600020600181019050546106605260015463379510496106a052610660516106c05260206106a060246106bc845afa6126e1573d600060003e3d6000fd5b60203d106136ad576106a0518060a01c6136ad576106e0526106e09050516318160ddd610700526020610700600461071c845afa612724573d600060003e3d6000fd5b60203d106136ad5761070090505161068052610140366106a03761068051156127c85761062051634903b0d16107e052610640516108005260206107e060246107fc845afa612778573d600060003e3d6000fd5b60203d106136ad576107e09050516ec097ce7bc90715b34b9f10000000008102816ec097ce7bc90715b34b9f10000000008204186136ad5790506106805180156136ad57808204905090506107c0525b610620516101e0526127db6108e0612293565b6108e080516107e05260208101516108005260408101516108205260608101516108405260808101516108605260a08101516108805260c08101516108a05260e08101516108c0525060006008905b806108e0526108e051600781116136ad5760051b6107e0015161284c57612a1e565b6106405180607f1c6136ad576108e051126129af57600154639d52c0b66109005261066051610920526020610900602461091c845afa612891573d600060003e3d6000fd5b60203d106136ad57610900518060011c6136ad57610940526109409050516129155761066051634903b0d1610900526108e051600081126136ad57610640518082038281116136ad5790509050610920526020610900602461091c845afa6128fe573d600060003e3d6000fd5b60203d106136ad576109009050516107a052612976565b6106605163065a80d8610960526108e0516106405180607f1c6136ad5780820380600f0b81186136ad5790509050610980526020610960602461097c845afa612963573d600060003e3d6000fd5b60203d106136ad576109609050516107a0525b6107a0516107c0518082028115838383041417156136ad57905090506ec097ce7bc90715b34b9f1000000000810490506107a0526129fb565b61062051634903b0d1610900526108e051600081126136ad57610920526020610900602461091c845afa6129e8573d600060003e3d6000fd5b60203d106136ad576109009050516107a0525b6107a0516108e051600781116136ad5760051b6106a0015260010181811861282a575b50506106a05181526106c05160208201526106e05160408201526107005160608201526107205160808201526107405160a08201526107605160c08201526107805160e082015250565b620200076040516020526000526040600020600181019050541515815250565b6060366106803761062051604052612aa16107e0612076565b6107e080516106e05260208101516107005260408101516107205260608101516107405260808101516107605260a08101516107805260c08101516107a05260e08101516107c0525060006107e05260006008905b806108005261080051600781116136ad5760051b6106e001516108205261082051612b265760006107e052612b8e565b610640516108205118612b485761080051600081126136ad5761068052612b6e565b610660516108205118612b835761080051600081126136ad576106a052612b6e56612b83565b6107e05115612b7c57612b8e565b60016107e0525b600101818118612af6575b50506107e051612bb35761062051604052612baa610800612a68565b61080051612bb6565b60005b15612d1957610620516101e052612bce610920612293565b61092080516108205260208101516108405260408101516108605260608101516108805260808101516108a05260a08101516108c05260c08101516108e05260e0810151610900525060006008905b806109205261092051600781116136ad5760051b61082001516109405261094051612ca8576013610960527f4e6f20617661696c61626c65206d61726b6574000000000000000000000000006109805261096050610960518061098001601f826000031636823750506308c379a061092052602061094052601f19601f61096051011660440161093cfd5b610640516109405118612cca5761092051600081126136ad5761068052612cf0565b610660516109405118612d0b5761092051600081126136ad576106a052612cf056612d0b565b6107e05115612d045760016106c052612d16565b60016107e0525b600101818118612c1d575b50505b6106805181526106a05160208201526106c05160408201525056612d3e576000612d82565b604051639c868ac060c052602060c0600460dc845afa612d63573d600060003e3d6000fd5b60203d106136ad5760c0518060011c6136ad5761010052610100905051155b15612da65760a05160805160200360031b1d80600f0b81186136ad57815250612dac565b60008152505b565b62010004604051602052600052604060002060018101905054612e165762020006546060526060516201000460405160205260005260406000205560405160605161ffff81116136ad576201000501556202000654600181018181106136ad57905062020006555b6201000460405160205260005260406000206001810190508054600181018181106136ad579050815550565b6201000460405160205260005260406000206002810190505460a05260605162010004604051602052600052604060002060038101905060a0516f7ffffffffffffffffffffffffffffffe81116136ad5781019050556201000460405160205260005260406000206002810190508054600181018181106136ad5790508155506201000460605160205260005260406000206002810190505460c05260405162010004606051602052600052604060002060038101905060c0516f7ffffffffffffffffffffffffffffffe81116136ad5781019050556201000460605160205260005260406000206002810190508054600181018181106136ad57905081555060605160405110612f7f5760a0518060801b905060c0518082018281106136ad579050905062020005608051602052600052604060002055612fad565b60c0518060801b905060a0518082018281106136ad5790509050620200056080516020526000526040600020555b565b60006008905b806102205261022051600781116136ad5760051b6101000151612fd75761314b565b61020051612fe6576000612fef565b60016102205112155b15612ff95761314b565b61022051600781116136ad5760051b6101000151604052613018612dae565b610220516001810180600f0b81186136ad579050610240526102405160088101905b806102605261026051600781116136ad5760051b610100015161305c5761313e565b61026051600781116136ad5760051b610100015161022051600781116136ad5760051b610100015118610280526202000b610280516020526000526040600020546102a05260e0516202000a6102805160205260005260406000206102a05161ffff81116136ad5781019050556102a051600181018181106136ad5790506202000b610280516020526000526040600020556102a0516131335761026051600781116136ad5760051b610100015160405261022051600781116136ad5760051b610100015160605261028051608052613133612e42565b60010181811861303a575b5050600101818118612fb5575b5050565b6080516060511860a0526202000b60a05160205260005260406000205461317a576000815250613180565b60018152505b565b6201000460405160205260005260406000206001810190508054600181038181116136ad57905081555062010004604051602052600052604060002060018101905054613275576202000654600181038181116136ad5790506202000655620200065460605262010004604051602052600052604060002054608052606051608051101561324b5760605161ffff81116136ad5762010005015460a05260a05160805161ffff81116136ad576201000501556080516201000460a0516020526000526040600020555b600062010004604051602052600052604060002055600060605161ffff81116136ad576201000501555b565b6201000460405160205260005260406000206002810190508054600181038181116136ad5790508155506201000460405160205260005260406000206002810190505460a05260a05160805110156133e75762010004604051602052600052604060002060038101905060a0516f7ffffffffffffffffffffffffffffffe81116136ad57810190505460c05260c0516040511860e0526202000560e0516020526000526040600020546101005260c05160405110613377576080518060801b9050610100516fffffffffffffffffffffffffffffffff811690508082018281106136ad57905090506202000560e0516020526000526040600020556133ac565b610100518060801c90508060801b90506080518082018281106136ad57905090506202000560e0516020526000526040600020555b60c0516201000460405160205260005260406000206003810190506080516f7ffffffffffffffffffffffffffffffe81116136ad5781019050555b600062010004604051602052600052604060002060038101905060a0516f7ffffffffffffffffffffffffffffffe81116136ad578101905055565b610160516101405118610180526202000b61018051602052600052604060002054600181038181116136ad5790506101a0526101a0516135465762020005610180516020526000526040600020546101c0526101605161014051106134da5761014051604052610160516060526101c0518060801c90506080526134a4613277565b61016051604052610140516060526101c0516fffffffffffffffffffffffffffffffff8116905060805261352f6132775661352f565b61014051604052610160516060526101c0516fffffffffffffffffffffffffffffffff8116905060805261350c613277565b61016051604052610140516060526101c0518060801c905060805261352f613277565b600062020005610180516020526000526040600020555b600062010000905b806101c0526101a0516101c05111156135665761363c565b610120516202000a6101805160205260005260406000206101c05161ffff81116136ad57810190505418613631576101a0516101c05110156135ed576202000a6101805160205260005260406000206101a05161ffff81116136ad5781019050546202000a6101805160205260005260406000206101c05161ffff81116136ad5781019050555b60006202000a6101805160205260005260406000206101a05161ffff81116136ad5781019050556101a0516202000b6101805160205260005260406000205561363c565b60010181811861354e575b5050565b6000600a905b806060526202000c6040516020526000526040600020606051600981116136ad578101905054156136a95760006202000c6040516020526000526040600020606051600981116136ad57810190505561369e566136a9565b600101818118613646575b5050565b600080fda165767970657283000307000b005b600080fd0000000000000000000000000000000022d53366457f9d5e68ec105046fc4383000000000000000000000000de3ead9b2145bba2eb74007e58ed07308716b725

Deployed Bytecode

0x6003361161000c57612070565b60003560e01c346136ad5763a87df06c811861003457604436106136ad57600060805261004e565b636982eb0b81186100a057606436106136ad576044356080525b6004358060a01c6136ad576040526024358060a01c6136ad576060526060516040511860a0526202000a60a051602052600052604060002060805161ffff81116136ad57810190505460c052602060c0f35b63940494f181186100e357602436106136ad576004358060a01c6136ad576040526202000760405160205260005260406000206002810190505460605260206060f35b630a700c0881186101d257602436106136ad576004358060a01c6136ad576060526060516040526101146080612a68565b608051610140576202000760605160205260005260406000206002810190505460a052602060a06101d0565b620200076060516020526000526040600020600181019050546080526202000760605160205260005260406000206002810190505460015463940494f160a05260805160c052602060a0602460bc845afa6101a0573d600060003e3d6000fd5b60203d106136ad5760a09050518082018281106136ad5790509050600181038181116136ad57905060e052602060e05bf35b639ac90d3d811861020e57602436106136ad576004358060a01c6136ad576101e0526101006101e051604052610209610200612076565b610200f35b63a77576ef811861028457602436106136ad576004358060a01c6136ad576106205261062051604052610242610640612a68565b610640511561026957610100610620516101e052610261610660612293565b610660610282565b6101006106205160405261027e610640612076565b6106405bf35b6352b51555811861034e57602436106136ad576004358060a01c6136ad576102e0526102e0516040526102b8610400612076565b61040080516103005260208101516103205260408101516103405260608101516103605260808101516103805260a08101516103a05260c08101516103c05260e08101516103e052506101006103005160405261032051606052610340516080526103605160a0526103805160c0526103a05160e0526103c051610100526103e05161012052610349610400612170565b610400f35b634cb088f1811861053357602436106136ad576004358060a01c6136ad576106205261062051604052610382610640612a68565b610640511561048a57610620516101e05261039e610760612293565b61076080516106605260208101516106805260408101516106a05260608101516106c05260808101516106e05260a08101516107005260c08101516107205260e08101516107405250610100366107603760006008905b806108605261086051600781116136ad5760051b61066001516104175761047d565b61086051600781116136ad5760051b610660015163313ce567610880526020610880600461089c845afa610450573d600060003e3d6000fd5b60203d106136ad5761088090505161086051600781116136ad5760051b61076001526001018181186103f5575b5050610100610760610531565b6106205160405261049c610740612076565b61074080516106405260208101516106605260408101516106805260608101516106a05260808101516106c05260a08101516106e05260c08101516107005260e081015161072052506101006106405160405261066051606052610680516080526106a05160a0526106c05160c0526106e05160e0526107005161010052610720516101205261052d610740612170565b6107405bf35b6356059ffb81186106d457602436106136ad576004358060a01c6136ad57604052610280366060376000600a905b806102e0526202000c60405160205260005260406000206102e051600981116136ad578101905054610300526103005161059a5761062f565b610300516102e051600981116136ad5760051b60600152633f9095b76103205261030051610340526020610320602461033c732f50d538606fa9edd2b11e2446beb18c9d5846bb5afa6105f2573d600060003e3d6000fd5b60203d106136ad576103205180600f0b81186136ad5761036052610360516102e051600981116136ad5760051b6101a00152600101818118610561575b50506060516102e0526080516103005260a0516103205260c0516103405260e051610360526101005161038052610120516103a052610140516103c052610160516103e05261018051610400526101a051610420526101c051610440526101e051610460526102005161048052610220516104a052610240516104c052610260516104e05261028051610500526102a051610520526102c051610540526102806102e0f35b6392e3cc2d811861071157602436106136ad576004358060a01c6136ad5761050052610100610500516101e05261070c610520612524565b610520f35b6359f4f351811861078757602436106136ad576004358060a01c6136ad576109e0526109e051604052610745610a00612a68565b610a005161076b576101006109e0516101e052610763610a20612524565b610a20610785565b6101006109e05161062052610781610a00612668565b610a005bf35b63c5b7074a81186107ed57602436106136ad576004358060a01c6136ad5760405260206202000860405160205260005260406000205463bb7b8b80606052602060606004607c845afa6107df573d600060003e3d6000fd5b60203d106136ad5760609050f35b6355b30b19811861084357602436106136ad576004358060a01c6136ad57604052602060405163f446c1d0606052602060606004607c845afa610835573d600060003e3d6000fd5b60203d106136ad5760609050f35b63e3663c99811861089957602436106136ad576004358060a01c6136ad576040526020604051630f529ba2606052602060606004607c845afa61088b573d600060003e3d6000fd5b60203d106136ad5760609050f35b637c400ccf81186108ef57602436106136ad576004358060a01c6136ad57604052602060405163b1373929606052602060606004607c845afa6108e1573d600060003e3d6000fd5b60203d106136ad5760609050f35b637cdb72b081186109f357602436106136ad576004358060a01c6136ad5760405260405163ddca3f43606052602060606004607c845afa610935573d600060003e3d6000fd5b60203d106136ad5760609050516101605260405163fee3f7f960a052602060a0600460bc845afa61096b573d600060003e3d6000fd5b60203d106136ad5760a0905051610180526040516392526c0c60e052602060e0600460fc845afa6109a1573d600060003e3d6000fd5b60203d106136ad5760e09050516101a05260405163ee8de675610120526020610120600461013c845afa6109da573d600060003e3d6000fd5b60203d106136ad576101209050516101c0526080610160f35b63c11e45b88118610d5357602436106136ad576004358060a01c6136ad576105005261050051637ba1a74d610540526020610540600461055c845afa610a3e573d600060003e3d6000fd5b60203d106136ad576105409050516105205261050051630b7b594b610560526020610560600461057c845afa610a79573d600060003e3d6000fd5b60203d106136ad57610560905051610540526105005163fee3f7f9610580526020610580600461059c845afa610ab4573d600060003e3d6000fd5b60203d106136ad5761058090505161056052610100366105803761054051610520511115610d4b5761052051610540518082038281116136ad5790509050610560518082028115838383041417156136ad57905090506404a817c80081049050610680526106805115610d4b576105005163bb7b8b806106c05260206106c060046106dc845afa610b4a573d600060003e3d6000fd5b60203d106136ad576106c09050516106a05262020009610500516020526000526040600020546106c0526106a051670de0b6b3a7640000810281670de0b6b3a76400008204186136ad5790506106a051610680518082038281116136ad579050905080156136ad5780820490509050670de0b6b3a764000081038181116136ad5790506106e0526106c0516318160ddd610720526020610720600461073c845afa610bfa573d600060003e3d6000fd5b60203d106136ad5761072090505161070052610700516106e0518082028115838383041417156136ad5790509050670de0b6b3a7640000810490506107205261070051610720518082018281106136ad57905090506107005261072051670de0b6b3a7640000810281670de0b6b3a76400008204186136ad5790506107005180156136ad578082049050905061074052610500516101e052610c9d610860612524565b61086080516107605260208101516107805260408101516107a05260608101516107c05260808101516107e05260a08101516108005260c08101516108205260e0810151610840525060006008905b80610860526107405161086051600781116136ad5760051b61076001518082028115838383041417156136ad5790509050670de0b6b3a76400008104905061086051600781116136ad5760051b6105800152600101818118610cec5750505b610100610580f35b63eb85226d8118610e0357606436106136ad576004358060a01c6136ad57610a20526024358060a01c6136ad57610a40526044358060a01c6136ad57610a6052610a205161062052610a405161064052610a605161066052610db6610ae0612a88565b610ae08051610a80526020810151610aa0526040810151610ac05250610a805180607f1c6136ad57610ae052610aa05180607f1c6136ad57610b0052610ac0511515610b20526060610ae0f35b63e4d332a98118610e4857602436106136ad576004358060a01c6136ad5760405262020007604051602052600052604060002060018101905054151560605260206060f35b636f20d6dd8118610e8b57602436106136ad576004358060a01c6136ad576040526202000760405160205260005260406000206001810190505460605260206060f35b635c9117418118610f3b57602436106136ad576004358060a01c6136ad576040526020806060526202000760405160205260005260406000206003810190508160600181548082526001830160208301600083601f0160051c600281116136ad578015610f0a57905b808401548160051b840152600101818118610ef4575b50505050508051806020830101601f82600003163682375050601f19601f8251602001011690509050810190506060f35b633fe0276e8118610f5a5760e436106136ad5760403661070037610fbb565b634e724dfc8118610f885761010436106136ad5760c4358060a01c6136ad5761070052600061072052610fbb565b632ec86273811861145a5761012436106136ad5760c4358060a01c6136ad576107005260e4358060011c6136ad57610720525b6004358060a01c6136ad57610620526024358060a01c6136ad57610640526044358060a01c6136ad57610660526064358060a01c6136ad576106805260a43560040160408135116136ad578035806106a0526020820181816106c03750505060005463f851a440610740526020610740600461075c845afa611042573d600060003e3d6000fd5b60203d106136ad57610740518060a01c6136ad576107805261078090505133186136ad5761064051156136ad5762020008610640516020526000526040600020546136ad57620100025461074052610620516107405161ffff81116136ad576002015561074051600181018181106136ad57905062010002556107405162020007610620516020526000526040600020556106a05180620200076106205160205260005260406000206003810190505560016202000761062051602052600052604060002060038101905001600082601f0160051c600281116136ad57801561113f57905b8060051b6106c0015181840155600101818118611127575b505050506084356202000761062051602052600052604060002060028101905055610680511561118257610680516202000d610620516020526000526040600020555b61066051156111a457610660516202000c610620516020526000526040600020555b610620516202000861064051602052600052604060002055610640516202000961062051602052600052604060002055610100366107603760006008905b806108605260843580607f1c6136ad57610860511861120057611276565b6106205163c66106576108805261086051600081126136ad576108a0526020610880602461089c845afa611239573d600060003e3d6000fd5b60203d106136ad57610880518060a01c6136ad576108c0526108c090505161086051600781116136ad5760051b61076001526001018181186111e2575b50506106205160e052610760516101005261078051610120526107a051610140526107c051610160526107e05161018052610800516101a052610820516101c052610840516101e0526000610200526112cd612faf565b61070051156114015760015463379510496108605261070051610880526020610860602461087c845afa611306573d600060003e3d6000fd5b60203d106136ad57610860518060a01c6136ad576108a0526108a0905051156136ad57610700516202000761062051602052600052604060002060018101905055610620516101e05261135a610960612293565b61096080516108605260208101516108805260408101516108a05260608101516108c05260808101516108e05260a08101516109005260c08101516109205260e0810151610940525061086051156136ad576106205160e052610860516101005261088051610120526108a051610140526108c051610160526108e05161018052610900516101a052610920516101c052610940516101e052600161020052611401612faf565b610720511561142757600162020007610620516020526000526040600020600681019050555b426202000e55610620517f73cca62ab1b520c9715bf4e6c71e3e518c754e7148f65102f43289a7df0efea66000610860a2005b63474932b08118611a0a57602436106136ad576004358060a01c6136ad576106205260005463f851a440610640526020610640600461065c845afa6114a4573d600060003e3d6000fd5b60203d106136ad57610640518060a01c6136ad576106805261068090505133186136ad576202000961062051602052600052604060002054156136ad576000620200086202000961062051602052600052604060002054602052600052604060002055600062020009610620516020526000526040600020556202000761062051602052600052604060002054610640526201000254600181038181116136ad579050610660526106605161064051101561159c576106605161ffff81116136ad576002015461068052610680516106405161ffff81116136ad57600201556106405162020007610680516020526000526040600020555b60006106605161ffff81116136ad5760020155610660516201000255610620516040526115ca610780612076565b61078080516106805260208101516106a05260408101516106c05260608101516106e05260808101516107005260a08101516107205260c08101516107405260e0810151610760525061010036610780376106205160405261162d6108a0612a68565b6108a05161088052610880511561169b57610620516101e0526116516108a0612293565b6108a080516107805260208101516107a05260408101516107c05260608101516107e05260808101516108005260a08101516108205260c08101516108405260e081015161086052505b60006008905b806108a0526108a051600781116136ad5760051b61068001516116d8576108a051600781116136ad5760051b6107800151156116db565b60005b156116e557611950565b6108a051600781116136ad5760051b61068001511561171d576108a051600781116136ad5760051b610680015160405261171d613182565b6108a051600781116136ad5760051b61078001511561178457620100046108a051600781116136ad5760051b610780015160205260005260406000206001810190505415611784576108a051600781116136ad5760051b6107800151604052611784613182565b60006008905b806108c0526108a0516108c051136117a157611939565b6108a051600781116136ad5760051b6106800151156117d5576108c051600781116136ad5760051b610680015115156117d8565b60005b6117e3576000611828565b610620516040526108a051600781116136ad5760051b61068001516060526108c051600781116136ad5760051b610680015160805261182361090061314f565b610900515b1561186d5761062051610120526108a051600781116136ad5760051b6106800151610140526108c051600781116136ad5760051b61068001516101605261186d613422565b6108a051600781116136ad5760051b6106800151156118a1576108c051600781116136ad5760051b610780015115156118a4565b60005b6118af5760006118f4565b610620516040526108a051600781116136ad5760051b61068001516060526108c051600781116136ad5760051b61078001516080526118ef61090061314f565b610900515b156119395761062051610120526108a051600781116136ad5760051b6106800151610140526108c051600781116136ad5760051b610780015161016052611939613422565b60010181811861178a5750506001018181186116a1575b5050600062020007610620516020526000526040600020600181019050556000620200076106205160205260005260406000206002810190505560006108a0526108a08051806202000761062051602052600052604060002060038101905055505060006202000d61062051602052600052604060002055610620516040526119d7613640565b426202000e55610620517f4106dfdaa577573db51c0ca93f766dbedfa0758faa2e7f5bcdb7c142be803c3f60006108a0a2005b63ef6b97888118611c355761016436106136ad576004358060a01c6136ad576040526024358060a01c6136ad576060526044358060a01c6136ad576080526064358060a01c6136ad5760a0526084358060a01c6136ad5760c05260a4358060a01c6136ad5760e05260c4358060a01c6136ad576101005260e4358060a01c6136ad5761012052610104358060a01c6136ad5761014052610124358060a01c6136ad5761016052610144358060a01c6136ad576101805260005463f851a4406101a05260206101a060046101bc845afa611ae8573d600060003e3d6000fd5b60203d106136ad576101a0518060a01c6136ad576101e0526101e090505133186136ad57620200096040516020526000526040600020546101a0526000600a905b806101c0526101c051600981116136ad5760051b606001516101e0526101e05115611bca576101a0516101e0516382c63066610200526020610200600461021c845afa611b7b573d600060003e3d6000fd5b60203d106136ad57610200518060a01c6136ad5761024052610240905051186136ad576101e0516202000c60405160205260005260406000206101c051600981116136ad578101905055611c20565b6202000c60405160205260005260406000206101c051600981116136ad57810190505415611c2b5760006202000c60405160205260005260406000206101c051600981116136ad578101905055611c2056611c2b565b600101818118611b29575b5050426202000e55005b63fec61ef58118611e9b5761028436106136ad576004358060a01c6136ad576040526024358060a01c6136ad576060526044358060a01c6136ad576080526064358060a01c6136ad5760a0526084358060a01c6136ad5760c05260a4358060a01c6136ad5760e05260c4358060a01c6136ad576101005260e4358060a01c6136ad5761012052610104358060a01c6136ad5761014052610124358060a01c6136ad5761016052610144358060a01c6136ad5761018052610164358060a01c6136ad576101a052610184358060a01c6136ad576101c0526101a4358060a01c6136ad576101e0526101c4358060a01c6136ad57610200526101e4358060a01c6136ad5761022052610204358060a01c6136ad5761024052610224358060a01c6136ad5761026052610244358060a01c6136ad5761028052610264358060a01c6136ad576102a05260005463f851a4406102c05260206102c060046102dc845afa611da3573d600060003e3d6000fd5b60203d106136ad576102c0518060a01c6136ad576103005261030090505133186136ad576000600a905b806102c0526102c051600981116136ad5760051b604001516102e0526102e051611df657611e91565b6102c051600981116136ad5760051b610180015161030052620200096102e051602052600052604060002054610300516382c63066610320526020610320600461033c845afa611e4b573d600060003e3d6000fd5b60203d106136ad57610320518060a01c6136ad5761036052610360905051186136ad57610300516202000c6102e051602052600052604060002055600101818118611dcd575b5050426202000e55005b63ce50c2e78118611eba57600436106136ad5760005460405260206040f35b63243e48d78118611ed957600436106136ad5760015460405260206040f35b633a1d5d8e8118611f0557602436106136ad5760043561ffff81116136ad576002015460405260206040f35b63956aae3a8118611f2657600436106136ad57620100025460405260206040f35b63de5e4a3b8118611f4757600436106136ad57620100035460405260206040f35b6345f0db248118611f7557602436106136ad5760043561ffff81116136ad5762010005015460405260206040f35b635075770f8118611f9657600436106136ad57620200065460405260206040f35b63bdf475c38118611fd357602436106136ad576004358060a01c6136ad576040526202000860405160205260005260406000205460605260206060f35b6337951049811861201057602436106136ad576004358060a01c6136ad576040526202000960405160205260005260406000205460605260206060f35b6355335d7b811861204d57602436106136ad576004358060a01c6136ad576040526202000d60405160205260005260406000205460605260206060f35b6368900961811861206e57600436106136ad576202000e5460405260206040f35b505b60006000fd5b6101003660603760006008905b80610160526202000760405160205260005260406000206002810190505480607f1c6136ad5761016051186120b75761212b565b60405163c66106576101805261016051600081126136ad576101a0526020610180602461019c845afa6120ef573d600060003e3d6000fd5b60203d106136ad57610180518060a01c6136ad576101c0526101c090505161016051600781116136ad5760051b60600152600101818118612083575b50506060518152608051602082015260a051604082015260c051606082015260e05160808201526101005160a08201526101205160c08201526101405160e082015250565b610120366101403760006008905b806102605261026051600781116136ad5760051b6040015161219f57612249565b61026051600781116136ad5760051b604001516102805273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee61028051186121df57601261024052612226565b6102805163313ce5676102a05260206102a060046102bc845afa612208573d600060003e3d6000fd5b60203d106136ad576102a09050516102405260ff61024051116136ad575b6102405161026051600781116136ad5760051b610140015260010181811861217e575b50506101405181526101605160208201526101805160408201526101a05160608201526101c05160808201526101e05160a08201526102005160c08201526102205160e082015250565b600154639ac90d3d61030052620200076101e05160205260005260406000206001810190505461032052610100610300602461031c845afa6122da573d600060003e3d6000fd5b6101003d106136ad57610300518060a01c6136ad5761042052610320518060a01c6136ad5761044052610340518060a01c6136ad5761046052610360518060a01c6136ad5761048052610380518060a01c6136ad576104a0526103a0518060a01c6136ad576104c0526103c0518060a01c6136ad576104e0526103e0518060a01c6136ad5761050052610420905080516102005260208101516102205260408101516102405260608101516102605260808101516102805260a08101516102a05260c08101516102c05260e08101516102e052506101003661030037620200076101e051602052600052604060002060028101905054600181038181116136ad57905080607f1c6136ad57610400526101e0516040526123fb610520612076565b61052080516104205260208101516104405260408101516104605260608101516104805260808101516104a05260a08101516104c05260c08101516104e05260e0810151610500525060006008905b806105205261040051610520511261249e57610520516104005180820380600f0b81186136ad5790509050600781116136ad5760051b610200015161052051600781116136ad5760051b61030001526124c7565b61052051600781116136ad5760051b610420015161052051600781116136ad5760051b61030001525b60010181811861244a57505061030051156136ad576103005181526103205160208201526103405160408201526103605160608201526103805160808201526103a05160a08201526103c05160c08201526103e05160e082015250565b61010036610200376101e05160405261253e610400612076565b61040080516103005260208101516103205260408101516103405260608101516103605260808101516103805260a08101516103a05260c08101516103c05260e08101516103e0525060006008905b806104005261040051600781116136ad5760051b61030001516125b85761040051156136ad5761261e565b6101e051634903b0d16104205261040051600081126136ad57610440526020610420602461043c845afa6125f1573d600060003e3d6000fd5b60203d106136ad5761042090505161040051600781116136ad5760051b610200015260010181811861258d575b50506102005181526102205160208201526102405160408201526102605160608201526102805160808201526102a05160a08201526102c05160c08201526102e05160e082015250565b6202000761062051602052600052604060002060028101905054600181038181116136ad5790506106405262020007610620516020526000526040600020600181019050546106605260015463379510496106a052610660516106c05260206106a060246106bc845afa6126e1573d600060003e3d6000fd5b60203d106136ad576106a0518060a01c6136ad576106e0526106e09050516318160ddd610700526020610700600461071c845afa612724573d600060003e3d6000fd5b60203d106136ad5761070090505161068052610140366106a03761068051156127c85761062051634903b0d16107e052610640516108005260206107e060246107fc845afa612778573d600060003e3d6000fd5b60203d106136ad576107e09050516ec097ce7bc90715b34b9f10000000008102816ec097ce7bc90715b34b9f10000000008204186136ad5790506106805180156136ad57808204905090506107c0525b610620516101e0526127db6108e0612293565b6108e080516107e05260208101516108005260408101516108205260608101516108405260808101516108605260a08101516108805260c08101516108a05260e08101516108c0525060006008905b806108e0526108e051600781116136ad5760051b6107e0015161284c57612a1e565b6106405180607f1c6136ad576108e051126129af57600154639d52c0b66109005261066051610920526020610900602461091c845afa612891573d600060003e3d6000fd5b60203d106136ad57610900518060011c6136ad57610940526109409050516129155761066051634903b0d1610900526108e051600081126136ad57610640518082038281116136ad5790509050610920526020610900602461091c845afa6128fe573d600060003e3d6000fd5b60203d106136ad576109009050516107a052612976565b6106605163065a80d8610960526108e0516106405180607f1c6136ad5780820380600f0b81186136ad5790509050610980526020610960602461097c845afa612963573d600060003e3d6000fd5b60203d106136ad576109609050516107a0525b6107a0516107c0518082028115838383041417156136ad57905090506ec097ce7bc90715b34b9f1000000000810490506107a0526129fb565b61062051634903b0d1610900526108e051600081126136ad57610920526020610900602461091c845afa6129e8573d600060003e3d6000fd5b60203d106136ad576109009050516107a0525b6107a0516108e051600781116136ad5760051b6106a0015260010181811861282a575b50506106a05181526106c05160208201526106e05160408201526107005160608201526107205160808201526107405160a08201526107605160c08201526107805160e082015250565b620200076040516020526000526040600020600181019050541515815250565b6060366106803761062051604052612aa16107e0612076565b6107e080516106e05260208101516107005260408101516107205260608101516107405260808101516107605260a08101516107805260c08101516107a05260e08101516107c0525060006107e05260006008905b806108005261080051600781116136ad5760051b6106e001516108205261082051612b265760006107e052612b8e565b610640516108205118612b485761080051600081126136ad5761068052612b6e565b610660516108205118612b835761080051600081126136ad576106a052612b6e56612b83565b6107e05115612b7c57612b8e565b60016107e0525b600101818118612af6575b50506107e051612bb35761062051604052612baa610800612a68565b61080051612bb6565b60005b15612d1957610620516101e052612bce610920612293565b61092080516108205260208101516108405260408101516108605260608101516108805260808101516108a05260a08101516108c05260c08101516108e05260e0810151610900525060006008905b806109205261092051600781116136ad5760051b61082001516109405261094051612ca8576013610960527f4e6f20617661696c61626c65206d61726b6574000000000000000000000000006109805261096050610960518061098001601f826000031636823750506308c379a061092052602061094052601f19601f61096051011660440161093cfd5b610640516109405118612cca5761092051600081126136ad5761068052612cf0565b610660516109405118612d0b5761092051600081126136ad576106a052612cf056612d0b565b6107e05115612d045760016106c052612d16565b60016107e0525b600101818118612c1d575b50505b6106805181526106a05160208201526106c05160408201525056612d3e576000612d82565b604051639c868ac060c052602060c0600460dc845afa612d63573d600060003e3d6000fd5b60203d106136ad5760c0518060011c6136ad5761010052610100905051155b15612da65760a05160805160200360031b1d80600f0b81186136ad57815250612dac565b60008152505b565b62010004604051602052600052604060002060018101905054612e165762020006546060526060516201000460405160205260005260406000205560405160605161ffff81116136ad576201000501556202000654600181018181106136ad57905062020006555b6201000460405160205260005260406000206001810190508054600181018181106136ad579050815550565b6201000460405160205260005260406000206002810190505460a05260605162010004604051602052600052604060002060038101905060a0516f7ffffffffffffffffffffffffffffffe81116136ad5781019050556201000460405160205260005260406000206002810190508054600181018181106136ad5790508155506201000460605160205260005260406000206002810190505460c05260405162010004606051602052600052604060002060038101905060c0516f7ffffffffffffffffffffffffffffffe81116136ad5781019050556201000460605160205260005260406000206002810190508054600181018181106136ad57905081555060605160405110612f7f5760a0518060801b905060c0518082018281106136ad579050905062020005608051602052600052604060002055612fad565b60c0518060801b905060a0518082018281106136ad5790509050620200056080516020526000526040600020555b565b60006008905b806102205261022051600781116136ad5760051b6101000151612fd75761314b565b61020051612fe6576000612fef565b60016102205112155b15612ff95761314b565b61022051600781116136ad5760051b6101000151604052613018612dae565b610220516001810180600f0b81186136ad579050610240526102405160088101905b806102605261026051600781116136ad5760051b610100015161305c5761313e565b61026051600781116136ad5760051b610100015161022051600781116136ad5760051b610100015118610280526202000b610280516020526000526040600020546102a05260e0516202000a6102805160205260005260406000206102a05161ffff81116136ad5781019050556102a051600181018181106136ad5790506202000b610280516020526000526040600020556102a0516131335761026051600781116136ad5760051b610100015160405261022051600781116136ad5760051b610100015160605261028051608052613133612e42565b60010181811861303a575b5050600101818118612fb5575b5050565b6080516060511860a0526202000b60a05160205260005260406000205461317a576000815250613180565b60018152505b565b6201000460405160205260005260406000206001810190508054600181038181116136ad57905081555062010004604051602052600052604060002060018101905054613275576202000654600181038181116136ad5790506202000655620200065460605262010004604051602052600052604060002054608052606051608051101561324b5760605161ffff81116136ad5762010005015460a05260a05160805161ffff81116136ad576201000501556080516201000460a0516020526000526040600020555b600062010004604051602052600052604060002055600060605161ffff81116136ad576201000501555b565b6201000460405160205260005260406000206002810190508054600181038181116136ad5790508155506201000460405160205260005260406000206002810190505460a05260a05160805110156133e75762010004604051602052600052604060002060038101905060a0516f7ffffffffffffffffffffffffffffffe81116136ad57810190505460c05260c0516040511860e0526202000560e0516020526000526040600020546101005260c05160405110613377576080518060801b9050610100516fffffffffffffffffffffffffffffffff811690508082018281106136ad57905090506202000560e0516020526000526040600020556133ac565b610100518060801c90508060801b90506080518082018281106136ad57905090506202000560e0516020526000526040600020555b60c0516201000460405160205260005260406000206003810190506080516f7ffffffffffffffffffffffffffffffe81116136ad5781019050555b600062010004604051602052600052604060002060038101905060a0516f7ffffffffffffffffffffffffffffffe81116136ad578101905055565b610160516101405118610180526202000b61018051602052600052604060002054600181038181116136ad5790506101a0526101a0516135465762020005610180516020526000526040600020546101c0526101605161014051106134da5761014051604052610160516060526101c0518060801c90506080526134a4613277565b61016051604052610140516060526101c0516fffffffffffffffffffffffffffffffff8116905060805261352f6132775661352f565b61014051604052610160516060526101c0516fffffffffffffffffffffffffffffffff8116905060805261350c613277565b61016051604052610140516060526101c0518060801c905060805261352f613277565b600062020005610180516020526000526040600020555b600062010000905b806101c0526101a0516101c05111156135665761363c565b610120516202000a6101805160205260005260406000206101c05161ffff81116136ad57810190505418613631576101a0516101c05110156135ed576202000a6101805160205260005260406000206101a05161ffff81116136ad5781019050546202000a6101805160205260005260406000206101c05161ffff81116136ad5781019050555b60006202000a6101805160205260005260406000206101a05161ffff81116136ad5781019050556101a0516202000b6101805160205260005260406000205561363c565b60010181811861354e575b5050565b6000600a905b806060526202000c6040516020526000526040600020606051600981116136ad578101905054156136a95760006202000c6040516020526000526040600020606051600981116136ad57810190505561369e566136a9565b600101818118613646575b5050565b600080fda165767970657283000307000b

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000000000000022d53366457f9d5e68ec105046fc4383000000000000000000000000de3ead9b2145bba2eb74007e58ed07308716b725

-----Decoded View---------------
Arg [0] : _address_provider (address): 0x0000000022D53366457F9d5E68Ec105046FC4383
Arg [1] : _base_pool_registry (address): 0xDE3eAD9B2145bBA2EB74007e58ED07308716B725

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000022d53366457f9d5e68ec105046fc4383
Arg [1] : 000000000000000000000000de3ead9b2145bba2eb74007e58ed07308716b725


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.