Contract 0xb4c0a71bfa5a5a4b1a096a7addb5025eafada122

 
Txn Hash
Block
From
To
Value [Txn Fee]
0xb6e47b27006794f6b6d23904e98c5aa7806213efcab824285b7b315d3aa9564984617392021-06-20 13:03:025 hrs 19 mins ago0x9725cc9a1e4a814b8b0b8981adfc0484b6a6eb74 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.00163889
0xf0c6e65156aec286e36e5e2a429560836d56c5695ac604f8980b5c1d45fe5cb584611992021-06-20 12:36:025 hrs 46 mins ago0x9725cc9a1e4a814b8b0b8981adfc0484b6a6eb74 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.001452275
0x9684e9e69a840f46080d728ed806a76b844a645bdfd4014f2902605b5fb291a684411542021-06-19 19:52:1922 hrs 30 mins ago0x68a8fb23e6fe18d29da22929c75be33e43bd81b3 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.00108913
0x654ca9920cc7c4934bb71b29c0a851c93caa493327147e2d979cfc2674e842e484331812021-06-19 13:08:421 day 5 hrs ago0x9725cc9a1e4a814b8b0b8981adfc0484b6a6eb74 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.00144841
0xa63235c7e3b6f6ef7598661156aa6fa36a7b767d0e495a80b175a29ed0ed16d584184832021-06-19 0:48:091 day 17 hrs ago0x2303fd39e04cf4d6471df5ee945bd0e2cfb6c7a2 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.001226265
0x3bdea8d9b6150a9b2ad174c309a2efc2ed0db396a4f49b8585dd9ef055bfd70284181542021-06-19 0:31:421 day 17 hrs ago0x2afa5c040873c1181bd3713f7906e2fc325c25d2 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.001556715
0x10671fa487de4408202174c8f3b4556781d6cb55f237901c0235df6206d25be484131512021-06-18 20:16:471 day 22 hrs ago0xf638fdacd17b13494ed38014765c575111fcfd75 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.00108901
0x4faa07d5ad23fb9c077cf0ccdd1a8bd4273e6c2294e9ea6b8d0969d8dac3e61d84092132021-06-18 16:58:352 days 1 hr ago0xa6528eb6737f42180acbb8cb5dd44f66d0c17141 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.001427945
0x6416a73b50af71fa7ecf039dd7d187711c6c277455b8230660bfbdeebbda5aac84066982021-06-18 14:52:102 days 3 hrs ago0x37b917a3670dffba2441ee1773ef9af6257a7d45 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.001226385
0x924f43189ebc40e9180287b5f26310242cbee1afcdc4da0408f925c3a47dcf6684039842021-06-18 12:35:122 days 5 hrs ago0xf638fdacd17b13494ed38014765c575111fcfd75 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.00108913
0x740d310978c7749266ada3e7dabf274a80a6fefdeac77ef67792d7f3d5e6314583838292021-06-17 19:37:572 days 22 hrs ago0x1ed74056e3aeea6d8d6ff718119413de84edc440 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.00137341
0x32fe420d59f8104238bbe8efe3d23ffc5f2d7e30f71aa16d075469820ba7a05883833252021-06-17 19:12:452 days 23 hrs ago0x1d47a34e8f854cb6a5383fa516702b293cff69f6 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.001427825
0xa14c4d18ee97d9ec3b6f12864d1e729f7dbc3644cf9a4f7c7e29b45eca7193df83770912021-06-17 13:59:243 days 4 hrs ago0xf638fdacd17b13494ed38014765c575111fcfd75 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.001427945
0xe7fd798f152bd4af77cb1228ebc4132b417c954840769582bf7aafc04815c26e83705872021-06-17 8:28:563 days 9 hrs ago0xf638fdacd17b13494ed38014765c575111fcfd75 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.00104272
0x1f1a70bfd2c63c9950aea5df22dd666baf5bc31828c438970eed3b63e091b33d83695502021-06-17 7:35:043 days 10 hrs ago0xf638fdacd17b13494ed38014765c575111fcfd75 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.001210905
0x9b598fa68f0dbc03a35a7804d2e35fb19d1e670b5e8c5eeecfcd7c2f82be5c1483624492021-06-17 1:38:483 days 16 hrs ago0x8f2dc6afb0771e9eecc842d71f7599f8b2d33183 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.00160762
0x75b4d8111b9562eeb38720e80aa31789e3560999c2e1dda3c480675f0632375283464092021-06-16 12:12:474 days 6 hrs ago0x4b68ffc0b4a2b75957b6ebb5b8e75e298caf2a16 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.00108925
0x2b408e7299743abdfd55d983ebcb791d38fe133d7e61d469717106468fdd278983458962021-06-16 11:47:084 days 6 hrs ago0xf638fdacd17b13494ed38014765c575111fcfd75 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.001210905
0xe4ea1fe9de47ada4e7492ef0052fb9e58fc1fe75974ebcfd11a229e6317b0f2283445882021-06-16 10:40:574 days 7 hrs ago0x7ea13487202775732636a13f3d62fd8f4ebd94a7 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.00096796
0xfa998659463330aefad82ebf18116427647b2fe7918515cec94ac25ed042ed2483244262021-06-15 17:43:535 days 38 mins ago0xd2d8d0c8781c650d57392dbcfb37b0fbb91ef208 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.001009465
0xe4f5ad483743035a479f4ff55e5615aa56063132802e261b9b0380c249d185d483244102021-06-15 17:43:055 days 39 mins ago0x5a7931ad3d97581743bd755736472370b7794edf IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.001963485
0x8159e85ed6d07aa5fb2d4f7f945f2ca47f23f66861399cf0c93da9e533fffaee83219722021-06-15 15:40:535 days 2 hrs ago0x1d47a34e8f854cb6a5383fa516702b293cff69f6 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.001352945
0x75fd411569e222fde225a65a9fccee37b5473899c41ecff9311e0d6fd69d1ec783201162021-06-15 14:05:535 days 4 hrs ago0x92b7d416c68a700901e6c5e6cecd8f024f7022a3 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.001380525
0x66fc68244de407663baa5d372844b4006598701e6f5910a2d8569b47e8294ad583152052021-06-15 9:53:005 days 8 hrs ago0xf638fdacd17b13494ed38014765c575111fcfd75 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.00108913
0x8ac22d2cb7ccd6d29af3c2661faf52bdc13a7bc4eb7f012893cc73fa216c7e1b83143872021-06-15 9:11:255 days 9 hrs ago0xd2d8d0c8781c650d57392dbcfb37b0fbb91ef208 IN  0xb4c0a71bfa5a5a4b1a096a7addb5025eafada1220 BNB0.00180344
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Similar Match)
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xA71eCd2b1E3e97E0603A1a1183D2Ad98006e7541

Contract Name:
Vyper_contract

Compiler Version
vyper:0.2.11

Optimization Enabled:
N/A

Other Settings:
, None license

Contract Source Code (Vyper language format)

# @version ^0.2.8
"""
@title "Zap" Depositer for metapool
@author Curve.Fi
@license Copyright (c) Curve.Fi, 2020 - all rights reserved
"""

from vyper.interfaces import ERC20


interface CurveMeta:
    def add_liquidity(amounts: uint256[N_COINS], min_mint_amount: uint256) -> uint256: nonpayable
    def remove_liquidity(_amount: uint256, min_amounts: uint256[N_COINS]) -> uint256[N_COINS]: nonpayable
    def remove_liquidity_one_coin(_token_amount: uint256, i: int128, min_amount: uint256) -> uint256: nonpayable
    def remove_liquidity_imbalance(amounts: uint256[N_COINS], max_burn_amount: uint256) -> uint256: nonpayable
    def calc_withdraw_one_coin(_token_amount: uint256, i: int128) -> uint256: view
    def calc_token_amount(amounts: uint256[N_COINS], deposit: bool) -> uint256: view
    def base_pool() -> address: view
    def coins(i: uint256) -> address: view

interface CurveBase:
    def add_liquidity(amounts: uint256[BASE_N_COINS], min_mint_amount: uint256): nonpayable
    def remove_liquidity(_amount: uint256, min_amounts: uint256[BASE_N_COINS]): nonpayable
    def remove_liquidity_one_coin(_token_amount: uint256, i: int128, min_amount: uint256): nonpayable
    def remove_liquidity_imbalance(amounts: uint256[BASE_N_COINS], max_burn_amount: uint256): nonpayable
    def calc_withdraw_one_coin(_token_amount: uint256, i: int128) -> uint256: view
    def calc_token_amount(amounts: uint256[BASE_N_COINS], deposit: bool) -> uint256: view
    def coins(i: uint256) -> address: view
    def fee() -> uint256: view


N_COINS: constant(int128) = 2
MAX_COIN: constant(int128) = N_COINS-1
BASE_N_COINS: constant(int128) = 3
N_ALL_COINS: constant(int128) = N_COINS + BASE_N_COINS - 1

FEE_DENOMINATOR: constant(uint256) = 10 ** 10
FEE_IMPRECISION: constant(uint256) = 100 * 10 ** 8  # % of the fee


pool: public(address)
token: public(address)
base_pool: public(address)

coins: public(address[N_COINS])
base_coins: public(address[BASE_N_COINS])


@external
def __init__(_pool: address, _token: address):
    """
    @notice Contract constructor
    @param _pool Metapool address
    @param _token Pool LP token address
    """
    self.pool = _pool
    self.token = _token
    base_pool: address = CurveMeta(_pool).base_pool()
    self.base_pool = base_pool

    for i in range(N_COINS):
        coin: address = CurveMeta(_pool).coins(convert(i, uint256))
        self.coins[i] = coin
        # approve coins for infinite transfers
        _response: Bytes[32] = raw_call(
            coin,
            concat(
                method_id("approve(address,uint256)"),
                convert(_pool, bytes32),
                convert(MAX_UINT256, bytes32),
            ),
            max_outsize=32,
        )
        if len(_response) > 0:
            assert convert(_response, bool)

    for i in range(BASE_N_COINS):
        coin: address = CurveBase(base_pool).coins(i)
        self.base_coins[i] = coin
        # approve underlying coins for infinite transfers
        _response: Bytes[32] = raw_call(
            coin,
            concat(
                method_id("approve(address,uint256)"),
                convert(base_pool, bytes32),
                convert(MAX_UINT256, bytes32),
            ),
            max_outsize=32,
        )
        if len(_response) > 0:
            assert convert(_response, bool)


@external
def add_liquidity(_amounts: uint256[N_ALL_COINS], _min_mint_amount: uint256) -> uint256:
    """
    @notice Wrap underlying coins and deposit them in the pool
    @param _amounts List of amounts of underlying coins to deposit
    @param _min_mint_amount Minimum amount of LP tokens to mint from the deposit
    @return Amount of LP tokens received by depositing
    """
    meta_amounts: uint256[N_COINS] = empty(uint256[N_COINS])
    base_amounts: uint256[BASE_N_COINS] = empty(uint256[BASE_N_COINS])
    deposit_base: bool = False

    # Transfer all coins in
    for i in range(N_ALL_COINS):
        amount: uint256 = _amounts[i]
        if amount == 0:
            continue
        coin: address = ZERO_ADDRESS
        if i < MAX_COIN:
            coin = self.coins[i]
            meta_amounts[i] = amount
        else:
            x: int128 = i - MAX_COIN
            coin = self.base_coins[x]
            base_amounts[x] = amount
            deposit_base = True
        # "safeTransferFrom" which works for ERC20s which return bool or not
        _response: Bytes[32] = raw_call(
            coin,
            concat(
                method_id("transferFrom(address,address,uint256)"),
                convert(msg.sender, bytes32),
                convert(self, bytes32),
                convert(amount, bytes32),
            ),
            max_outsize=32,
        )  # dev: failed transfer
        if len(_response) > 0:
            assert convert(_response, bool)  # dev: failed transfer

    # Deposit to the base pool
    if deposit_base:
        CurveBase(self.base_pool).add_liquidity(base_amounts, 0)
        meta_amounts[MAX_COIN] = ERC20(self.coins[MAX_COIN]).balanceOf(self)

    # Deposit to the meta pool
    CurveMeta(self.pool).add_liquidity(meta_amounts, _min_mint_amount)

    # Transfer meta token back
    lp_token: address = self.token
    lp_amount: uint256 = ERC20(lp_token).balanceOf(self)
    assert ERC20(lp_token).transfer(msg.sender, lp_amount)

    return lp_amount


@external
def remove_liquidity(_amount: uint256, _min_amounts: uint256[N_ALL_COINS]) -> uint256[N_ALL_COINS]:
    """
    @notice Withdraw and unwrap coins from the pool
    @dev Withdrawal amounts are based on current deposit ratios
    @param _amount Quantity of LP tokens to burn in the withdrawal
    @param _min_amounts Minimum amounts of underlying coins to receive
    @return List of amounts of underlying coins that were withdrawn
    """
    _token: address = self.token
    assert ERC20(_token).transferFrom(msg.sender, self, _amount)

    min_amounts_meta: uint256[N_COINS] = empty(uint256[N_COINS])
    min_amounts_base: uint256[BASE_N_COINS] = empty(uint256[BASE_N_COINS])
    amounts: uint256[N_ALL_COINS] = empty(uint256[N_ALL_COINS])

    # Withdraw from meta
    for i in range(MAX_COIN):
        min_amounts_meta[i] = _min_amounts[i]
    CurveMeta(self.pool).remove_liquidity(_amount, min_amounts_meta)

    # Withdraw from base
    _base_amount: uint256 = ERC20(self.coins[MAX_COIN]).balanceOf(self)
    for i in range(BASE_N_COINS):
        min_amounts_base[i] = _min_amounts[MAX_COIN+i]
    CurveBase(self.base_pool).remove_liquidity(_base_amount, min_amounts_base)

    # Transfer all coins out
    for i in range(N_ALL_COINS):
        coin: address = ZERO_ADDRESS
        if i < MAX_COIN:
            coin = self.coins[i]
        else:
            coin = self.base_coins[i - MAX_COIN]
        amounts[i] = ERC20(coin).balanceOf(self)
        # "safeTransfer" which works for ERC20s which return bool or not
        _response: Bytes[32] = raw_call(
            coin,
            concat(
                method_id("transfer(address,uint256)"),
                convert(msg.sender, bytes32),
                convert(amounts[i], bytes32),
            ),
            max_outsize=32,
        )  # dev: failed transfer
        if len(_response) > 0:
            assert convert(_response, bool)  # dev: failed transfer
        # end "safeTransfer"

    return amounts


@external
def remove_liquidity_one_coin(_token_amount: uint256, i: int128, _min_amount: uint256) -> uint256:
    """
    @notice Withdraw and unwrap a single coin from the pool
    @param _token_amount Amount of LP tokens to burn in the withdrawal
    @param i Index value of the coin to withdraw
    @param _min_amount Minimum amount of underlying coin to receive
    @return Amount of underlying coin received
    """
    assert ERC20(self.token).transferFrom(msg.sender, self, _token_amount)

    coin: address = ZERO_ADDRESS
    if i < MAX_COIN:
        coin = self.coins[i]
        # Withdraw a metapool coin
        CurveMeta(self.pool).remove_liquidity_one_coin(_token_amount, i, _min_amount)
    else:
        coin = self.base_coins[i - MAX_COIN]
        # Withdraw a base pool coin
        CurveMeta(self.pool).remove_liquidity_one_coin(_token_amount, MAX_COIN, 0)
        CurveBase(self.base_pool).remove_liquidity_one_coin(
            ERC20(self.coins[MAX_COIN]).balanceOf(self), i-MAX_COIN, _min_amount
        )

    # Tranfer the coin out
    coin_amount: uint256 = ERC20(coin).balanceOf(self)
    # "safeTransfer" which works for ERC20s which return bool or not
    _response: Bytes[32] = raw_call(
        coin,
        concat(
            method_id("transfer(address,uint256)"),
            convert(msg.sender, bytes32),
            convert(coin_amount, bytes32),
        ),
        max_outsize=32,
    )  # dev: failed transfer
    if len(_response) > 0:
        assert convert(_response, bool)  # dev: failed transfer
    # end "safeTransfer"

    return coin_amount


@external
def remove_liquidity_imbalance(_amounts: uint256[N_ALL_COINS], _max_burn_amount: uint256) -> uint256:
    """
    @notice Withdraw coins from the pool in an imbalanced amount
    @param _amounts List of amounts of underlying coins to withdraw
    @param _max_burn_amount Maximum amount of LP token to burn in the withdrawal
    @return Actual amount of the LP token burned in the withdrawal
    """
    base_pool: address = self.base_pool
    meta_pool: address = self.pool
    base_coins: address[BASE_N_COINS] = self.base_coins
    meta_coins: address[N_COINS] = self.coins
    lp_token: address = self.token

    fee: uint256 = CurveBase(base_pool).fee() * BASE_N_COINS / (4 * (BASE_N_COINS - 1))
    fee += fee * FEE_IMPRECISION / FEE_DENOMINATOR  # Overcharge to account for imprecision

    # Transfer the LP token in
    assert ERC20(lp_token).transferFrom(msg.sender, self, _max_burn_amount)

    withdraw_base: bool = False
    amounts_base: uint256[BASE_N_COINS] = empty(uint256[BASE_N_COINS])
    amounts_meta: uint256[N_COINS] = empty(uint256[N_COINS])
    leftover_amounts: uint256[N_COINS] = empty(uint256[N_COINS])

    # Prepare quantities
    for i in range(MAX_COIN):
        amounts_meta[i] = _amounts[i]

    for i in range(BASE_N_COINS):
        amount: uint256 = _amounts[MAX_COIN + i]
        if amount != 0:
            amounts_base[i] = amount
            withdraw_base = True

    if withdraw_base:
        amounts_meta[MAX_COIN] = CurveBase(self.base_pool).calc_token_amount(amounts_base, False)
        amounts_meta[MAX_COIN] += amounts_meta[MAX_COIN] * fee / FEE_DENOMINATOR + 1

    # Remove liquidity and deposit leftovers back
    CurveMeta(meta_pool).remove_liquidity_imbalance(amounts_meta, _max_burn_amount)
    if withdraw_base:
        CurveBase(base_pool).remove_liquidity_imbalance(amounts_base, amounts_meta[MAX_COIN])
        leftover_amounts[MAX_COIN] = ERC20(meta_coins[MAX_COIN]).balanceOf(self)
        if leftover_amounts[MAX_COIN] > 0:
            CurveMeta(meta_pool).add_liquidity(leftover_amounts, 0)

    # Transfer all coins out
    for i in range(N_ALL_COINS):
        coin: address = ZERO_ADDRESS
        amount: uint256 = 0
        if i < MAX_COIN:
            coin = meta_coins[i]
            amount = amounts_meta[i]
        else:
            coin = base_coins[i - MAX_COIN]
            amount = amounts_base[i - MAX_COIN]
        # "safeTransfer" which works for ERC20s which return bool or not
        if amount > 0:
            _response: Bytes[32] = raw_call(
                coin,
                concat(
                    method_id("transfer(address,uint256)"),
                    convert(msg.sender, bytes32),
                    convert(amount, bytes32),
                ),
                max_outsize=32,
            )  # dev: failed transfer
            if len(_response) > 0:
                assert convert(_response, bool)  # dev: failed transfer
            # end "safeTransfer"

    # Transfer the leftover LP token out
    leftover: uint256 = ERC20(lp_token).balanceOf(self)
    if leftover > 0:
        assert ERC20(lp_token).transfer(msg.sender, leftover)

    return _max_burn_amount - leftover


@view
@external
def calc_withdraw_one_coin(_token_amount: uint256, i: int128) -> uint256:
    """
    @notice Calculate the amount received when withdrawing and unwrapping a single coin
    @param _token_amount Amount of LP tokens to burn in the withdrawal
    @param i Index value of the underlying coin to withdraw
    @return Amount of coin received
    """
    if i < MAX_COIN:
        return CurveMeta(self.pool).calc_withdraw_one_coin(_token_amount, i)
    else:
        base_tokens: uint256 = CurveMeta(self.pool).calc_withdraw_one_coin(_token_amount, MAX_COIN)
        return CurveBase(self.base_pool).calc_withdraw_one_coin(base_tokens, i-MAX_COIN)


@view
@external
def calc_token_amount(_amounts: uint256[N_ALL_COINS], _is_deposit: bool) -> uint256:
    """
    @notice Calculate addition or reduction in token supply from a deposit or withdrawal
    @dev This calculation accounts for slippage, but not fees.
         Needed to prevent front-running, not for precise calculations!
    @param _amounts Amount of each underlying coin being deposited
    @param _is_deposit set True for deposits, False for withdrawals
    @return Expected amount of LP tokens received
    """
    meta_amounts: uint256[N_COINS] = empty(uint256[N_COINS])
    base_amounts: uint256[BASE_N_COINS] = empty(uint256[BASE_N_COINS])

    for i in range(MAX_COIN):
        meta_amounts[i] = _amounts[i]

    for i in range(BASE_N_COINS):
        base_amounts[i] = _amounts[i + MAX_COIN]

    base_tokens: uint256 = CurveBase(self.base_pool).calc_token_amount(base_amounts, _is_deposit)
    meta_amounts[MAX_COIN] = base_tokens

    return CurveMeta(self.pool).calc_token_amount(meta_amounts, _is_deposit)

Contract ABI

[{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_pool","type":"address"},{"name":"_token","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"add_liquidity","inputs":[{"name":"_amounts","type":"uint256[4]"},{"name":"_min_mint_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":31168},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity","inputs":[{"name":"_amount","type":"uint256"},{"name":"_min_amounts","type":"uint256[4]"}],"outputs":[{"name":"","type":"uint256[4]"}],"gas":32946},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity_one_coin","inputs":[{"name":"_token_amount","type":"uint256"},{"name":"i","type":"int128"},{"name":"_min_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":14494},{"stateMutability":"nonpayable","type":"function","name":"remove_liquidity_imbalance","inputs":[{"name":"_amounts","type":"uint256[4]"},{"name":"_max_burn_amount","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":38227},{"stateMutability":"view","type":"function","name":"calc_withdraw_one_coin","inputs":[{"name":"_token_amount","type":"uint256"},{"name":"i","type":"int128"}],"outputs":[{"name":"","type":"uint256"}],"gas":3174},{"stateMutability":"view","type":"function","name":"calc_token_amount","inputs":[{"name":"_amounts","type":"uint256[4]"},{"name":"_is_deposit","type":"bool"}],"outputs":[{"name":"","type":"uint256"}],"gas":4441},{"stateMutability":"view","type":"function","name":"pool","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":1268},{"stateMutability":"view","type":"function","name":"token","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":1298},{"stateMutability":"view","type":"function","name":"base_pool","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":1328},{"stateMutability":"view","type":"function","name":"coins","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}],"gas":1467},{"stateMutability":"view","type":"function","name":"base_coins","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}],"gas":1497}]

6040611bb5610140396020611bb560c03960c05160a01c1561002057600080fd5b60206020611bb50160c03960c05160a01c1561003b57600080fd5b610140516000556101605160015560206102006004635d6362bb6101a0526101bc610140515afa61006b57600080fd5b601f3d1161007857600080fd5b6000506102005161018052610180516002556101a060006002818352015b6020610260602463c66106576101e0526101a05160008112156100b857600080fd5b610200526101fc610140515afa6100ce57600080fd5b601f3d116100db57600080fd5b600050610260516101c0526101c0516101a051600281106100fb57600080fd5b600360c052602060c020015560006004610240527f095ea7b300000000000000000000000000000000000000000000000000000000610260526102406004806020846102a001018260208501600060045af1505080518201915050610140516020826102a00101526020810190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6020826102a0010152602081019050806102a0526102a090508051602001806103408284600060045af16101bd57600080fd5b505060206104006103405161036060006101c0515af16101dc57600080fd5b60203d808211156101ed57806101ef565b815b905090506103e0526103e08051602001806101e08284600060045af161021457600080fd5b505060006101e0511115610266576101e080602001516000825180602090131561023d57600080fd5b809190121561024b57600080fd5b806020036101000a8204905090509050151561026657600080fd5b8151600101808352811415610096575b50506101a060006003818352015b6020610260602463c66106576101e0526101a051610200526101fc610180515afa6102ae57600080fd5b601f3d116102bb57600080fd5b600050610260516101c0526101c0516101a051600381106102db57600080fd5b600460c052602060c020015560006004610240527f095ea7b300000000000000000000000000000000000000000000000000000000610260526102406004806020846102a001018260208501600060045af1505080518201915050610180516020826102a00101526020810190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6020826102a0010152602081019050806102a0526102a090508051602001806103408284600060045af161039d57600080fd5b505060206104006103405161036060006101c0515af16103bc57600080fd5b60203d808211156103cd57806103cf565b815b905090506103e0526103e08051602001806101e08284600060045af16103f457600080fd5b505060006101e0511115610446576101e080602001516000825180602090131561041d57600080fd5b809190121561042b57600080fd5b806020036101000a8204905090509050151561044657600080fd5b8151600101808352811415610284575b5050611b9d56600436101561000d5761173a565b600035601c52600051341561002157600080fd5b63029b2f348114156104225760c0366101403761020060006004818352015b6004610200516004811061005357600080fd5b60200201356102205261022051151561006b57610281565b60006102405260016102005112156100c057610200516002811061008e57600080fd5b600360c052602060c0200154610240526102205161014061020051600281106100b657600080fd5b6020020152610132565b610200516001808203808060008112156100d657195b607f1c156100e357600080fd5b9050905090506102605261026051600381106100fe57600080fd5b600460c052602060c02001546102405261022051610180610260516003811061012657600080fd5b602002015260016101e0525b600060046102c0527f23b872dd000000000000000000000000000000000000000000000000000000006102e0526102c060048060208461032001018260208501600060045af1505080518201915050336020826103200101526020810190503060208261032001015260208101905061022051602082610320010152602081019050806103205261032090508051602001806103e08284600060045af16101d857600080fd5b505060206104c06103e0516104006000610240515af16101f757600080fd5b60203d80821115610208578061020a565b815b905090506104a0526104a08051602001806102608284600060045af161022f57600080fd5b505060006102605111156102815761026080602001516000825180602090131561025857600080fd5b809190121561026657600080fd5b806020036101000a8204905090509050151561028157600080fd5b8151600101808352811415610040575b50506101e05115610333576002543b6102a957600080fd5b600060006084634515cef36102005261018051610220526101a051610240526101c0516102605260006102805261021c60006002545af16102e957600080fd5b602061028060246370a0823161020052306102205261021c6001600360c052602060c02001545afa61031a57600080fd5b601f3d1161032757600080fd5b60005061028051610160525b60206102c06064630b4c7e4d61020052610140516102205261016051610240526084356102605261021c60006000545af161036d57600080fd5b601f3d1161037a57600080fd5b6000506102c0506001546102005260206102c060246370a0823161024052306102605261025c610200515afa6103af57600080fd5b601f3d116103bc57600080fd5b6000506102c0516102205260206102e0604463a9059cbb610240523361026052610220516102805261025c6000610200515af16103f857600080fd5b601f3d1161040557600080fd5b6000506102e05161041557600080fd5b6102205160005260206000f35b637d49d8758114156108865760015461014052602061022060646323b872dd610160523361018052306101a0526004356101c05261017c6000610140515af161046a57600080fd5b601f3d1161047757600080fd5b6000506102205161048757600080fd5b610120366101603761028060006001818352015b602461028051600481106104ae57600080fd5b602002013561016061028051600281106104c757600080fd5b60200201525b815160010180835281141561049b575b505060406103406064635b36389c610280526004356102a052610160516102c052610180516102e05261029c60006000545af161051957600080fd5b603f3d1161052657600080fd5b60005061034050602061032060246370a082316102a052306102c0526102bc6001600360c052602060c02001545afa61055e57600080fd5b601f3d1161056b57600080fd5b60005061032051610280526102a060006003818352015b602460016102a0518082018080600081121561059a57195b607f1c156105a757600080fd5b905090509050600481106105ba57600080fd5b60200201356101a06102a051600381106105d357600080fd5b60200201525b8151600101808352811415610582575b50506002543b6105f857600080fd5b60006000608463ecb586a56102a052610280516102c0526101a0516102e0526101c051610300526101e051610320526102bc60006002545af161063a57600080fd5b6102a060006004818352015b60006102c05260016102a051121561067e576102a0516002811061066957600080fd5b600360c052602060c02001546102c0526106c5565b6102a05160018082038080600081121561069457195b607f1c156106a157600080fd5b905090509050600381106106b457600080fd5b600460c052602060c02001546102c0525b602061036060246370a082316102e05230610300526102fc6102c0515afa6106ec57600080fd5b601f3d116106f957600080fd5b600050610360516102006102a0516004811061071457600080fd5b602002015260006004610340527fa9059cbb00000000000000000000000000000000000000000000000000000000610360526103406004806020846103a001018260208501600060045af1505080518201915050336020826103a00101526020810190506102006102a0516004811061078c57600080fd5b60200201516020826103a0010152602081019050806103a0526103a090508051602001806104408284600060045af16107c457600080fd5b505060206105006104405161046060006102c0515af16107e357600080fd5b60203d808211156107f457806107f6565b815b905090506104e0526104e08051602001806102e08284600060045af161081b57600080fd5b505060006102e051111561086d576102e080602001516000825180602090131561084457600080fd5b809190121561085257600080fd5b806020036101000a8204905090509050151561086d57600080fd5b8151600101808352811415610646575b50506080610200f35b631a4d01d2811415610c4a57602435808060008112156108a257195b607f1c156108af57600080fd5b905050602061020060646323b872dd61014052336101605230610180526004356101a05261015c60006001545af16108e657600080fd5b601f3d116108f357600080fd5b6000506102005161090357600080fd5b60006101405260016024351215610985576024356002811061092457600080fd5b600360c052602060c02001546101405260206102206064631a4d01d261016052600435610180526024356101a0526044356101c05261017c60006000545af161096c57600080fd5b601f3d1161097957600080fd5b60005061022050610abf565b60243560018082038080600081121561099a57195b607f1c156109a757600080fd5b905090509050600381106109ba57600080fd5b600460c052602060c02001546101405260206102206064631a4d01d2610160526004356101805260016101a05260006101c05261017c60006000545af1610a0057600080fd5b601f3d11610a0d57600080fd5b600050610220506002543b610a2157600080fd5b600060006064631a4d01d26102005260206101e060246370a0823161016052306101805261017c6001600360c052602060c02001545afa610a6157600080fd5b601f3d11610a6e57600080fd5b6000506101e05161022052602435600180820380806000811215610a8e57195b607f1c15610a9b57600080fd5b905090509050610240526044356102605261021c60006002545af1610abf57600080fd5b602061020060246370a0823161018052306101a05261019c610140515afa610ae657600080fd5b601f3d11610af357600080fd5b6000506102005161016052600060046101e0527fa9059cbb00000000000000000000000000000000000000000000000000000000610200526101e060048060208461024001018260208501600060045af15050805182019150503360208261024001015260208101905061016051602082610240010152602081019050806102405261024090508051602001806102e08284600060045af1610b9457600080fd5b505060206103a06102e0516103006000610140515af1610bb357600080fd5b60203d80821115610bc45780610bc6565b815b90509050610380526103808051602001806101808284600060045af1610beb57600080fd5b50506000610180511115610c3d57610180806020015160008251806020901315610c1457600080fd5b8091901215610c2257600080fd5b806020036101000a82049050905090501515610c3d57600080fd5b6101605160005260206000f35b6318a7bd768114156113b057600254610140526000546101605260048060c052602060c020546101805260018160c052602060c02001546101a05260028160c052602060c02001546101c0525060038060c052602060c020546101e05260018160c052602060c020015461020052506001546102205260206102c0600463ddca3f436102605261027c610140515afa610ce257600080fd5b601f3d11610cef57600080fd5b6000506102c05160038082028215828483041417610d0c57600080fd5b80905090509050600880820490509050610240526102408051610240516402540be4008082028215828483041417610d4357600080fd5b809050905090506402540be40080820490509050818183011015610d6657600080fd5b80820190509050815250602061032060646323b872dd610260523361028052306102a0526084356102c05261027c6000610220515af1610da557600080fd5b601f3d11610db257600080fd5b60005061032051610dc257600080fd5b610100366102603761036060006001818352015b60046103605160048110610de957600080fd5b60200201356102e06103605160028110610e0257600080fd5b60200201525b8151600101808352811415610dd6575b505061036060006003818352015b600460016103605180820180806000811215610e3e57195b607f1c15610e4b57600080fd5b90509050905060048110610e5e57600080fd5b6020020135610380526000610380511815610e9757610380516102806103605160038110610e8b57600080fd5b60200201526001610260525b8151600101808352811415610e26575b50506102605115610f705760206104406084633883e1196103605261028051610380526102a0516103a0526102c0516103c05260006103e05261037c6002545afa610ef157600080fd5b601f3d11610efe57600080fd5b6000506104405161030052610300805161030051610240518082028215828483041417610f2a57600080fd5b809050905090506402540be400808204905090506001818183011015610f4f57600080fd5b80820190509050818183011015610f6557600080fd5b808201905090508152505b6020610420606463e3103273610360526102e05161038052610300516103a0526084356103c05261037c6000610160515af1610fab57600080fd5b601f3d11610fb857600080fd5b6000506104205061026051156110b357610140513b610fd657600080fd5b600060006084639fdaea0c6103605261028051610380526102a0516103a0526102c0516103c052610300516103e05261037c6000610140515af161101957600080fd5b60206103e060246370a0823161036052306103805261037c610200515afa61104057600080fd5b601f3d1161104d57600080fd5b6000506103e0516103405260006103405111156110b35760206104206064630b4c7e4d610360526103205161038052610340516103a05260006103c05261037c6000610160515af161109e57600080fd5b601f3d116110ab57600080fd5b600050610420505b61036060006004818352015b604036610380376001610360511215611111576101e061036051600281106110e657600080fd5b6020020151610380526102e0610360516002811061110357600080fd5b60200201516103a052611196565b6101806103605160018082038080600081121561112a57195b607f1c1561113757600080fd5b9050905090506003811061114a57600080fd5b6020020151610380526102806103605160018082038080600081121561116c57195b607f1c1561117957600080fd5b9050905090506003811061118c57600080fd5b60200201516103a0525b60006103a05111156112e15760006004610420527fa9059cbb000000000000000000000000000000000000000000000000000000006104405261042060048060208461048001018260208501600060045af1505080518201915050336020826104800101526020810190506103a051602082610480010152602081019050806104805261048090508051602001806105208284600060045af161123857600080fd5b505060206105e0610520516105406000610380515af161125757600080fd5b60203d80821115611268578061126a565b815b905090506105c0526105c08051602001806103c08284600060045af161128f57600080fd5b505060006103c05111156112e1576103c08060200151600082518060209013156112b857600080fd5b80919012156112c657600080fd5b806020036101000a820490509050905015156112e157600080fd5b81516001018083528114156110bf575b5050602061040060246370a0823161038052306103a05261039c610220515afa61131a57600080fd5b601f3d1161132757600080fd5b6000506104005161036052600061036051111561138c576020610420604463a9059cbb61038052336103a052610360516103c05261039c6000610220515af161136f57600080fd5b601f3d1161137c57600080fd5b6000506104205161138c57600080fd5b60843561036051808210156113a057600080fd5b8082039050905060005260206000f35b63cc2b27d78114156114f157602435808060008112156113cc57195b607f1c156113d957600080fd5b905050600160243512156114375760206101e0604463cc2b27d761014052600435610160526024356101805261015c6000545afa61141657600080fd5b601f3d1161142357600080fd5b6000506101e05160005260206000f36114ef565b6020610200604463cc2b27d7610160526004356101805260016101a05261017c6000545afa61146557600080fd5b601f3d1161147257600080fd5b60005061020051610140526020610200604463cc2b27d76101605261014051610180526024356001808203808060008112156114aa57195b607f1c156114b757600080fd5b9050905090506101a05261017c6002545afa6114d257600080fd5b601f3d116114df57600080fd5b6000506102005160005260206000f35b005b63cf701ff781141561168e5760843560011c1561150d57600080fd5b60a036610140376101e060006001818352015b60046101e0516004811061153357600080fd5b60200201356101406101e0516002811061154c57600080fd5b60200201525b8151600101808352811415611520575b50506101e060006003818352015b60046101e05160018082018080600081121561158857195b607f1c1561159557600080fd5b905090509050600481106115a857600080fd5b60200201356101806101e051600381106115c157600080fd5b60200201525b8151600101808352811415611570575b505060206102e06084633883e1196102005261018051610220526101a051610240526101c051610260526084356102805261021c6002545afa61161957600080fd5b601f3d1161162657600080fd5b6000506102e0516101e0526101e0516101605260206102c0606463ed8e84f361020052610140516102205261016051610240526084356102605261021c6000545afa61167157600080fd5b601f3d1161167e57600080fd5b6000506102c05160005260206000f35b6316f0115b8114156116a65760005460005260206000f35b63fc0c546a8114156116be5760015460005260206000f35b635d6362bb8114156116d65760025460005260206000f35b63c661065781141561170757600435600281106116f257600080fd5b600360c052602060c020015460005260206000f35b6387cb4f57811415611738576004356003811061172357600080fd5b600460c052602060c020015460005260206000f35b505b60006000fd5b61045d611b9d0361045d60003961045d611b9d036000f30000000000000000000000008866c9f1cea0dd633e41208f23dd19430d1ed30600000000000000000000000018796c878f6b38b1f1bf31bc2dfeed4e1d8e033a

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.