ETH Price: $2,071.53 (+2.40%)

Contract

0x2A86e1B39B9FA919EE72fc220f39A4cD6Aefac90
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

ContractCreator

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Account Earnings145147012022-04-03 18:14:301436 days ago1649009670IN
0x2A86e1B3...D6Aefac90
0 ETH0.0052902951.38705555
Account Earnings145082342022-04-02 18:14:531437 days ago1648923293IN
0x2A86e1B3...D6Aefac90
0 ETH0.0062720860.92361088
Redeem Earnings ...145061402022-04-02 10:15:161438 days ago1648894516IN
0x2A86e1B3...D6Aefac90
0 ETH0.0043853430
Account Earnings145061012022-04-02 10:07:411438 days ago1648894061IN
0x2A86e1B3...D6Aefac90
0 ETH0.0035762734.73801621
Redeem Earnings ...145060402022-04-02 9:54:231438 days ago1648893263IN
0x2A86e1B3...D6Aefac90
0 ETH0.0177978946.77808749
Account Earnings144955632022-03-31 18:26:301439 days ago1648751190IN
0x2A86e1B3...D6Aefac90
0 ETH0.0054362952.80515898
Redeem Earnings ...144955152022-03-31 18:15:351439 days ago1648750535IN
0x2A86e1B3...D6Aefac90
0 ETH0.0273298871.83094816
Account Earnings144946982022-03-31 15:15:281440 days ago1648739728IN
0x2A86e1B3...D6Aefac90
0 ETH0.0100954398.06153199
Account Earnings144514122022-03-24 21:33:461446 days ago1648157626IN
0x2A86e1B3...D6Aefac90
0 ETH0.0063030961.22483451
Redeem Earnings ...144513542022-03-24 21:20:211446 days ago1648156821IN
0x2A86e1B3...D6Aefac90
0 ETH0.0242342863.69482186
Redeem Earnings ...144481032022-03-24 9:20:041447 days ago1648113604IN
0x2A86e1B3...D6Aefac90
0 ETH0.0020118528.45214212
Account Earnings144447802022-03-23 20:40:171447 days ago1648068017IN
0x2A86e1B3...D6Aefac90
0 ETH0.0041178440
Redeem Earnings ...144447372022-03-23 20:30:171447 days ago1648067417IN
0x2A86e1B3...D6Aefac90
0 ETH0.012487132.81977492
Account Earnings144371842022-03-22 16:28:361448 days ago1647966516IN
0x2A86e1B3...D6Aefac90
0 ETH0.0048386547
Account Earnings144370992022-03-22 16:14:191448 days ago1647965659IN
0x2A86e1B3...D6Aefac90
0 ETH0.0069657872
Redeem Earnings ...144370932022-03-22 16:13:021448 days ago1647965582IN
0x2A86e1B3...D6Aefac90
0 ETH0.0262527769
Account Earnings143889532022-03-15 4:14:331456 days ago1647317673IN
0x2A86e1B3...D6Aefac90
0 ETH0.0021829621.20409584
Redeem Earnings ...143889112022-03-15 4:05:311456 days ago1647317131IN
0x2A86e1B3...D6Aefac90
0 ETH0.0146611638.53384107
Account Earnings143608082022-03-10 18:48:511460 days ago1646938131IN
0x2A86e1B3...D6Aefac90
0 ETH0.0025445824.71768623
Redeem Earnings ...143607672022-03-10 18:42:341460 days ago1646937754IN
0x2A86e1B3...D6Aefac90
0 ETH0.0096851525.45543006
Account Earnings143542782022-03-09 18:45:291461 days ago1646851529IN
0x2A86e1B3...D6Aefac90
0 ETH0.0039698538.56250453
Redeem Earnings ...143541742022-03-09 18:22:191461 days ago1646850139IN
0x2A86e1B3...D6Aefac90
0 ETH0.0136792835.95318786
Account Earnings143541662022-03-09 18:21:111461 days ago1646850071IN
0x2A86e1B3...D6Aefac90
0 ETH0.0036709837.94413885
Redeem Earnings ...143534712022-03-09 15:46:351462 days ago1646840795IN
0x2A86e1B3...D6Aefac90
0 ETH0.0033940848
Redeem Earnings ...143501172022-03-09 3:11:061462 days ago1646795466IN
0x2A86e1B3...D6Aefac90
0 ETH0.0022858132.32659853
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
USTMiddleLayer

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license

Contract Source Code (Solidity Multiple files format)

File 1 of 5: USTMiddleLayer.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// solhint-disable const-name-snakecase, not-rely-on-time

pragma solidity 0.8.7;

import "SafeTransferLib.sol";
import "ERC20.sol";
import "IStrategy.sol";
import "IBentoBoxMinimal.sol";

interface IExchangeRateFeeder {
    function exchangeRateOf(address _token, bool _simulate) external view returns (uint256);
}

interface IUSTStrategy {
    function feeder() external view returns (IExchangeRateFeeder);

    function safeWithdraw(uint256 amount) external;

    function safeHarvest(
        uint256 maxBalance,
        bool rebalance,
        uint256 maxChangeAmount,
        bool harvestRewards
    ) external;
}

contract USTMiddleLayer {
    using SafeTransferLib for ERC20;

    error RedeemingNotReady();
    error StrategyWouldAccountLoss();

    ERC20 public constant UST = ERC20(0xa47c8bf37f92aBed4A126BDA807A7b7498661acD);
    ERC20 public constant aUST = ERC20(0xa8De3e3c934e2A1BB08B010104CcaBBD4D6293ab);
    IUSTStrategy private constant strategy = IUSTStrategy(0xE6191aA754F9a881e0a73F2028eDF324242F39E2);
    IBentoBoxMinimal private constant bentoBox = IBentoBoxMinimal(0xd96f48665a1410C0cd669A88898ecA36B9Fc2cce);

    uint256 public lastWithdraw;

    function accountEarnings() external {
        uint256 balanceToKeep = IBentoBoxMinimal(bentoBox).strategyData(address(UST)).balance;
        uint256 exchangeRate = strategy.feeder().exchangeRateOf(address(UST), true);
        uint256 liquid = UST.balanceOf(address(strategy));
        uint256 total = toUST(aUST.balanceOf(address(strategy)), exchangeRate) + liquid;

        if (total <= balanceToKeep) {
            revert StrategyWouldAccountLoss();
        }

        strategy.safeHarvest(type(uint256).max, false, type(uint256).max, false);
    }

    function redeemEarningsImproved() external {
        if (lastWithdraw + 20 minutes > block.timestamp) {
            revert RedeemingNotReady();
        }

        uint256 balanceToKeep = IBentoBoxMinimal(bentoBox).strategyData(address(UST)).balance;
        uint256 exchangeRate = strategy.feeder().exchangeRateOf(address(UST), true);
        uint256 liquid = UST.balanceOf(address(strategy));
        uint256 total = toUST(aUST.balanceOf(address(strategy)), exchangeRate) + liquid;

        lastWithdraw = block.timestamp;

        if (total > balanceToKeep) {
            strategy.safeWithdraw(total - balanceToKeep - liquid);
        }
    }

    function toUST(uint256 amount, uint256 exchangeRate) public pure returns (uint256) {
        return (amount * exchangeRate) / 1e18;
    }

    function toAUST(uint256 amount, uint256 exchangeRate) public pure returns (uint256) {
        return (amount * 1e18) / exchangeRate;
    }
}

File 2 of 5: ERC20.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
    /*///////////////////////////////////////////////////////////////
                                  EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 amount);

    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /*///////////////////////////////////////////////////////////////
                             METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    uint8 public immutable decimals;

    /*///////////////////////////////////////////////////////////////
                              ERC20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    /*///////////////////////////////////////////////////////////////
                             EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 internal immutable INITIAL_CHAIN_ID;

    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;

    mapping(address => uint256) public nonces;

    /*///////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;

        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
    }

    /*///////////////////////////////////////////////////////////////
                              ERC20 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 amount) public virtual returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) public virtual returns (bool) {
        balanceOf[msg.sender] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.

        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(from, to, amount);

        return true;
    }

    /*///////////////////////////////////////////////////////////////
                              EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");

        // Unchecked because the only math done is incrementing
        // the owner's nonce which cannot realistically overflow.
        unchecked {
            address recoveredAddress = ecrecover(
                keccak256(
                    abi.encodePacked(
                        "\x19\x01",
                        DOMAIN_SEPARATOR(),
                        keccak256(
                            abi.encode(
                                keccak256(
                                    "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
                                ),
                                owner,
                                spender,
                                value,
                                nonces[owner]++,
                                deadline
                            )
                        )
                    )
                ),
                v,
                r,
                s
            );

            require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");

            allowance[recoveredAddress][spender] = value;
        }

        emit Approval(owner, spender, value);
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
    }

    function computeDomainSeparator() internal view virtual returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                    keccak256(bytes(name)),
                    keccak256("1"),
                    block.chainid,
                    address(this)
                )
            );
    }

    /*///////////////////////////////////////////////////////////////
                       INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(address(0), to, amount);
    }

    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;

        // Cannot underflow because a user's balance
        // will never be larger than the total supply.
        unchecked {
            totalSupply -= amount;
        }

        emit Transfer(from, address(0), amount);
    }
}

File 3 of 5: IBentoBoxMinimal.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.7;

/// @notice Minimal interface for BentoBox token vault interactions - `token` is aliased as `address` from `IERC20` for code simplicity.
interface IBentoBoxMinimal {

    struct Rebase {
        uint128 elastic;
        uint128 base;
    }

    struct StrategyData {
        uint64 strategyStartDate;
        uint64 targetPercentage;
        uint128 balance; // the balance of the strategy that BentoBox thinks is in there
    }

    function strategyData(address token) external view returns (StrategyData memory);

    /// @notice Balance per ERC-20 token per account in shares.
    function balanceOf(address, address) external view returns (uint256);

    /// @notice Deposit an amount of `token` represented in either `amount` or `share`.
    /// @param token_ The ERC-20 token to deposit.
    /// @param from which account to pull the tokens.
    /// @param to which account to push the tokens.
    /// @param amount Token amount in native representation to deposit.
    /// @param share Token amount represented in shares to deposit. Takes precedence over `amount`.
    /// @return amountOut The amount deposited.
    /// @return shareOut The deposited amount repesented in shares.
    function deposit(
        address token_,
        address from,
        address to,
        uint256 amount,
        uint256 share
    ) external payable returns (uint256 amountOut, uint256 shareOut);

    /// @notice Withdraws an amount of `token` from a user account.
    /// @param token_ The ERC-20 token to withdraw.
    /// @param from which user to pull the tokens.
    /// @param to which user to push the tokens.
    /// @param amount of tokens. Either one of `amount` or `share` needs to be supplied.
    /// @param share Like above, but `share` takes precedence over `amount`.
    function withdraw(
        address token_,
        address from,
        address to,
        uint256 amount,
        uint256 share
    ) external returns (uint256 amountOut, uint256 shareOut);

    /// @notice Transfer shares from a user account to another one.
    /// @param token The ERC-20 token to transfer.
    /// @param from which user to pull the tokens.
    /// @param to which user to push the tokens.
    /// @param share The amount of `token` in shares.
    function transfer(
        address token,
        address from,
        address to,
        uint256 share
    ) external;

    /// @dev Helper function to represent an `amount` of `token` in shares.
    /// @param token The ERC-20 token.
    /// @param amount The `token` amount.
    /// @param roundUp If the result `share` should be rounded up.
    /// @return share The token amount represented in shares.
    function toShare(
        address token,
        uint256 amount,
        bool roundUp
    ) external view returns (uint256 share);

    /// @dev Helper function to represent shares back into the `token` amount.
    /// @param token The ERC-20 token.
    /// @param share The amount of shares.
    /// @param roundUp If the result should be rounded up.
    /// @return amount The share amount back into native representation.
    function toAmount(
        address token,
        uint256 share,
        bool roundUp
    ) external view returns (uint256 amount);

    /// @notice Registers this contract so that users can approve it for the BentoBox.
    function registerProtocol() external;

    function totals(address token) external view returns (Rebase memory);

    function harvest(
        address token,
        bool balance,
        uint256 maxChangeAmount
    ) external;
}

File 4 of 5: IStrategy.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity 0.8.7;

interface IStrategy {
    /// @notice Send the assets to the Strategy and call skim to invest them.
    /// @param amount The amount of tokens to invest.
    function skim(uint256 amount) external;

    /// @notice Harvest any profits made converted to the asset and pass them to the caller.
    /// @param balance The amount of tokens the caller thinks it has invested.
    /// @param sender The address of the initiator of this transaction. Can be used for reimbursements, etc.
    /// @return amountAdded The delta (+profit or -loss) that occured in contrast to `balance`.
    function harvest(uint256 balance, address sender) external returns (int256 amountAdded);

    /// @notice Withdraw assets. The returned amount can differ from the requested amount due to rounding.
    /// @dev The `actualAmount` should be very close to the amount.
    /// The difference should NOT be used to report a loss. That's what harvest is for.
    /// @param amount The requested amount the caller wants to withdraw.
    /// @return actualAmount The real amount that is withdrawn.
    function withdraw(uint256 amount) external returns (uint256 actualAmount);

    /// @notice Withdraw all assets in the safest way possible. This shouldn't fail.
    /// @param balance The amount of tokens the caller thinks it has invested.
    /// @return amountAdded The delta (+profit or -loss) that occured in contrast to `balance`.
    function exit(uint256 balance) external returns (int256 amountAdded);
}

File 5 of 5: SafeTransferLib.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

import {ERC20} from "ERC20.sol";

/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)
/// @author Modified from Gnosis (https://github.com/gnosis/gp-v2-contracts/blob/main/src/contracts/libraries/GPv2SafeERC20.sol)
/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.
/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller.
library SafeTransferLib {
    /*///////////////////////////////////////////////////////////////
                            ETH OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferETH(address to, uint256 amount) internal {
        bool callStatus;

        assembly {
            // Transfer the ETH and store if it succeeded or not.
            callStatus := call(gas(), to, amount, 0, 0, 0, 0)
        }

        require(callStatus, "ETH_TRANSFER_FAILED");
    }

    /*///////////////////////////////////////////////////////////////
                           ERC20 OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferFrom(
        ERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        bool callStatus;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata to memory piece by piece:
            mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) // Begin with the function selector.
            mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the "from" argument.
            mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the "to" argument.
            mstore(add(freeMemoryPointer, 68), amount) // Finally append the "amount" argument. No mask as it's a full 32 byte value.

            // Call the token and store if it succeeded or not.
            // We use 100 because the calldata length is 4 + 32 * 3.
            callStatus := call(gas(), token, 0, freeMemoryPointer, 100, 0, 0)
        }

        require(didLastOptionalReturnCallSucceed(callStatus), "TRANSFER_FROM_FAILED");
    }

    function safeTransfer(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool callStatus;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata to memory piece by piece:
            mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) // Begin with the function selector.
            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Finally append the "amount" argument. No mask as it's a full 32 byte value.

            // Call the token and store if it succeeded or not.
            // We use 68 because the calldata length is 4 + 32 * 2.
            callStatus := call(gas(), token, 0, freeMemoryPointer, 68, 0, 0)
        }

        require(didLastOptionalReturnCallSucceed(callStatus), "TRANSFER_FAILED");
    }

    function safeApprove(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool callStatus;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata to memory piece by piece:
            mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) // Begin with the function selector.
            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Finally append the "amount" argument. No mask as it's a full 32 byte value.

            // Call the token and store if it succeeded or not.
            // We use 68 because the calldata length is 4 + 32 * 2.
            callStatus := call(gas(), token, 0, freeMemoryPointer, 68, 0, 0)
        }

        require(didLastOptionalReturnCallSucceed(callStatus), "APPROVE_FAILED");
    }

    /*///////////////////////////////////////////////////////////////
                         INTERNAL HELPER LOGIC
    //////////////////////////////////////////////////////////////*/

    function didLastOptionalReturnCallSucceed(bool callStatus) private pure returns (bool success) {
        assembly {
            // If the call reverted:
            if iszero(callStatus) {
                // Copy the revert message into memory.
                returndatacopy(0, 0, returndatasize())

                // Revert with the same message.
                revert(0, returndatasize())
            }

            switch returndatasize()
            case 32 {
                // Copy the return data into memory.
                returndatacopy(0, 0, returndatasize())

                // Set success to whether it returned true.
                success := iszero(iszero(mload(0)))
            }
            case 0 {
                // There was no return data.
                success := 1
            }
            default {
                // It returned some malformed output.
                success := 0
            }
        }
    }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"name":"RedeemingNotReady","type":"error"},{"inputs":[],"name":"StrategyWouldAccountLoss","type":"error"},{"inputs":[],"name":"UST","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aUST","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accountEarnings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"redeemEarningsImproved","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"exchangeRate","type":"uint256"}],"name":"toAUST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"exchangeRate","type":"uint256"}],"name":"toUST","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]

608060405234801561001057600080fd5b50610a2e806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80634e8824921161005b5780634e882492146100e55780635a2ac62d146100ed578063b52eea7414610100578063e7ec9f301461010957600080fd5b8063066f80cd14610082578063140f165d146100ba57806341e728a0146100db575b600080fd5b61009d73a8de3e3c934e2a1bb08b010104ccabbd4d6293ab81565b6040516001600160a01b0390911681526020015b60405180910390f35b6100cd6100c8366004610950565b610124565b6040519081526020016100b1565b6100e361014a565b005b6100e3610503565b6100cd6100fb366004610950565b610854565b6100cd60005481565b61009d73a47c8bf37f92abed4a126bda807a7b7498661acd81565b60008161013984670de0b6b3a76400006109ac565b610143919061098a565b9392505050565b60405163df23b45b60e01b815273a47c8bf37f92abed4a126bda807a7b7498661acd600482015260009073d96f48665a1410c0cd669a88898eca36b9fc2cce9063df23b45b9060240160606040518083038186803b1580156101ab57600080fd5b505afa1580156101bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e391906108af565b604001516001600160801b03169050600073e6191aa754f9a881e0a73f2028edf324242f39e26001600160a01b031663a788a7166040518163ffffffff1660e01b815260040160206040518083038186803b15801561024157600080fd5b505afa158015610255573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102799190610886565b60405163cdd2193960e01b815273a47c8bf37f92abed4a126bda807a7b7498661acd6004820152600160248201526001600160a01b03919091169063cdd219399060440160206040518083038186803b1580156102d557600080fd5b505afa1580156102e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030d9190610937565b6040516370a0823160e01b815273e6191aa754f9a881e0a73f2028edf324242f39e2600482015290915060009073a47c8bf37f92abed4a126bda807a7b7498661acd906370a082319060240160206040518083038186803b15801561037157600080fd5b505afa158015610385573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a99190610937565b6040516370a0823160e01b815273e6191aa754f9a881e0a73f2028edf324242f39e2600482015290915060009082906104529073a8de3e3c934e2a1bb08b010104ccabbd4d6293ab906370a08231906024015b60206040518083038186803b15801561041457600080fd5b505afa158015610428573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044c9190610937565b85610854565b61045c9190610972565b905083811161047e57604051634562846960e11b815260040160405180910390fd5b60405163ba6275ab60e01b8152600019600482018190526000602483018190526044830191909152606482015273e6191aa754f9a881e0a73f2028edf324242f39e29063ba6275ab906084015b600060405180830381600087803b1580156104e557600080fd5b505af11580156104f9573d6000803e3d6000fd5b5050505050505050565b426000546104b06105149190610972565b1115610533576040516314979d8b60e01b815260040160405180910390fd5b60405163df23b45b60e01b815273a47c8bf37f92abed4a126bda807a7b7498661acd600482015260009073d96f48665a1410c0cd669a88898eca36b9fc2cce9063df23b45b9060240160606040518083038186803b15801561059457600080fd5b505afa1580156105a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cc91906108af565b604001516001600160801b03169050600073e6191aa754f9a881e0a73f2028edf324242f39e26001600160a01b031663a788a7166040518163ffffffff1660e01b815260040160206040518083038186803b15801561062a57600080fd5b505afa15801561063e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106629190610886565b60405163cdd2193960e01b815273a47c8bf37f92abed4a126bda807a7b7498661acd6004820152600160248201526001600160a01b03919091169063cdd219399060440160206040518083038186803b1580156106be57600080fd5b505afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610937565b6040516370a0823160e01b815273e6191aa754f9a881e0a73f2028edf324242f39e2600482015290915060009073a47c8bf37f92abed4a126bda807a7b7498661acd906370a082319060240160206040518083038186803b15801561075a57600080fd5b505afa15801561076e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107929190610937565b6040516370a0823160e01b815273e6191aa754f9a881e0a73f2028edf324242f39e2600482015290915060009082906107e99073a8de3e3c934e2a1bb08b010104ccabbd4d6293ab906370a08231906024016103fc565b6107f39190610972565b4260005590508381111561084e5773e6191aa754f9a881e0a73f2028edf324242f39e263b0fd035b8361082687856109cb565b61083091906109cb565b6040518263ffffffff1660e01b81526004016104cb91815260200190565b50505050565b6000670de0b6b3a764000061013983856109ac565b805167ffffffffffffffff8116811461088157600080fd5b919050565b60006020828403121561089857600080fd5b81516001600160a01b038116811461014357600080fd5b6000606082840312156108c157600080fd5b6040516060810181811067ffffffffffffffff821117156108f257634e487b7160e01b600052604160045260246000fd5b6040526108fe83610869565b815261090c60208401610869565b602082015260408301516001600160801b038116811461092b57600080fd5b60408201529392505050565b60006020828403121561094957600080fd5b5051919050565b6000806040838503121561096357600080fd5b50508035926020909101359150565b60008219821115610985576109856109e2565b500190565b6000826109a757634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156109c6576109c66109e2565b500290565b6000828210156109dd576109dd6109e2565b500390565b634e487b7160e01b600052601160045260246000fdfea264697066735822122086f5c5bb2ef4779a169d30e44a0ea27944517d725d3f29e78e38d9e00992078f64736f6c63430008070033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80634e8824921161005b5780634e882492146100e55780635a2ac62d146100ed578063b52eea7414610100578063e7ec9f301461010957600080fd5b8063066f80cd14610082578063140f165d146100ba57806341e728a0146100db575b600080fd5b61009d73a8de3e3c934e2a1bb08b010104ccabbd4d6293ab81565b6040516001600160a01b0390911681526020015b60405180910390f35b6100cd6100c8366004610950565b610124565b6040519081526020016100b1565b6100e361014a565b005b6100e3610503565b6100cd6100fb366004610950565b610854565b6100cd60005481565b61009d73a47c8bf37f92abed4a126bda807a7b7498661acd81565b60008161013984670de0b6b3a76400006109ac565b610143919061098a565b9392505050565b60405163df23b45b60e01b815273a47c8bf37f92abed4a126bda807a7b7498661acd600482015260009073d96f48665a1410c0cd669a88898eca36b9fc2cce9063df23b45b9060240160606040518083038186803b1580156101ab57600080fd5b505afa1580156101bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e391906108af565b604001516001600160801b03169050600073e6191aa754f9a881e0a73f2028edf324242f39e26001600160a01b031663a788a7166040518163ffffffff1660e01b815260040160206040518083038186803b15801561024157600080fd5b505afa158015610255573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102799190610886565b60405163cdd2193960e01b815273a47c8bf37f92abed4a126bda807a7b7498661acd6004820152600160248201526001600160a01b03919091169063cdd219399060440160206040518083038186803b1580156102d557600080fd5b505afa1580156102e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030d9190610937565b6040516370a0823160e01b815273e6191aa754f9a881e0a73f2028edf324242f39e2600482015290915060009073a47c8bf37f92abed4a126bda807a7b7498661acd906370a082319060240160206040518083038186803b15801561037157600080fd5b505afa158015610385573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a99190610937565b6040516370a0823160e01b815273e6191aa754f9a881e0a73f2028edf324242f39e2600482015290915060009082906104529073a8de3e3c934e2a1bb08b010104ccabbd4d6293ab906370a08231906024015b60206040518083038186803b15801561041457600080fd5b505afa158015610428573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044c9190610937565b85610854565b61045c9190610972565b905083811161047e57604051634562846960e11b815260040160405180910390fd5b60405163ba6275ab60e01b8152600019600482018190526000602483018190526044830191909152606482015273e6191aa754f9a881e0a73f2028edf324242f39e29063ba6275ab906084015b600060405180830381600087803b1580156104e557600080fd5b505af11580156104f9573d6000803e3d6000fd5b5050505050505050565b426000546104b06105149190610972565b1115610533576040516314979d8b60e01b815260040160405180910390fd5b60405163df23b45b60e01b815273a47c8bf37f92abed4a126bda807a7b7498661acd600482015260009073d96f48665a1410c0cd669a88898eca36b9fc2cce9063df23b45b9060240160606040518083038186803b15801561059457600080fd5b505afa1580156105a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cc91906108af565b604001516001600160801b03169050600073e6191aa754f9a881e0a73f2028edf324242f39e26001600160a01b031663a788a7166040518163ffffffff1660e01b815260040160206040518083038186803b15801561062a57600080fd5b505afa15801561063e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106629190610886565b60405163cdd2193960e01b815273a47c8bf37f92abed4a126bda807a7b7498661acd6004820152600160248201526001600160a01b03919091169063cdd219399060440160206040518083038186803b1580156106be57600080fd5b505afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610937565b6040516370a0823160e01b815273e6191aa754f9a881e0a73f2028edf324242f39e2600482015290915060009073a47c8bf37f92abed4a126bda807a7b7498661acd906370a082319060240160206040518083038186803b15801561075a57600080fd5b505afa15801561076e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107929190610937565b6040516370a0823160e01b815273e6191aa754f9a881e0a73f2028edf324242f39e2600482015290915060009082906107e99073a8de3e3c934e2a1bb08b010104ccabbd4d6293ab906370a08231906024016103fc565b6107f39190610972565b4260005590508381111561084e5773e6191aa754f9a881e0a73f2028edf324242f39e263b0fd035b8361082687856109cb565b61083091906109cb565b6040518263ffffffff1660e01b81526004016104cb91815260200190565b50505050565b6000670de0b6b3a764000061013983856109ac565b805167ffffffffffffffff8116811461088157600080fd5b919050565b60006020828403121561089857600080fd5b81516001600160a01b038116811461014357600080fd5b6000606082840312156108c157600080fd5b6040516060810181811067ffffffffffffffff821117156108f257634e487b7160e01b600052604160045260246000fd5b6040526108fe83610869565b815261090c60208401610869565b602082015260408301516001600160801b038116811461092b57600080fd5b60408201529392505050565b60006020828403121561094957600080fd5b5051919050565b6000806040838503121561096357600080fd5b50508035926020909101359150565b60008219821115610985576109856109e2565b500190565b6000826109a757634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156109c6576109c66109e2565b500290565b6000828210156109dd576109dd6109e2565b500390565b634e487b7160e01b600052601160045260246000fdfea264697066735822122086f5c5bb2ef4779a169d30e44a0ea27944517d725d3f29e78e38d9e00992078f64736f6c63430008070033

Deployed Bytecode Sourcemap

693:2093:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;921:78;;956:42;921:78;;;;;-1:-1:-1;;;;;1955:32:5;;;1937:51;;1925:2;1910:18;921:78:4;;;;;;;;2643:140;;;;;;:::i;:::-;;:::i;:::-;;;2655:25:5;;;2643:2;2628:18;2643:140:4;2509:177:5;1260:561:4;;;:::i;:::-;;1829:659;;;:::i;2496:139::-;;;;;;:::i;:::-;;:::i;1224:27::-;;;;;;837:77;;871:42;837:77;;2643:140;2718:7;2763:12;2746:13;:6;2755:4;2746:13;:::i;:::-;2745:30;;;;:::i;:::-;2738:37;2643:140;-1:-1:-1;;;2643:140:4:o;1260:561::-;1331:53;;-1:-1:-1;;;1331:53:4;;871:42;1331:53;;;1937:51:5;1307:21:4;;1172:42;;1331:39;;1910:18:5;;1331:53:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:61;;;-1:-1:-1;;;;;1307:85:4;;;1403:20;1060:42;-1:-1:-1;;;;;1426:15:4;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:52;;-1:-1:-1;;;1426:52:4;;871:42;1426:52;;;2167:51:5;1473:4:4;2234:18:5;;;2227:50;-1:-1:-1;;;;;1426:32:4;;;;;;;2140:18:5;;1426:52:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1506:32;;-1:-1:-1;;;1506:32:4;;1060:42;1506:32;;;1937:51:5;1403:75:4;;-1:-1:-1;1489:14:4;;871:42;;1506:13;;1910:18:5;;1506:32:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1571:33;;-1:-1:-1;;;1571:33:4;;1060:42;1571:33;;;1937:51:5;1489:49:4;;-1:-1:-1;1549:13:4;;1489:49;;1565:54;;956:42;;1571:14;;1910:18:5;;1571:33:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1606:12;1565:5;:54::i;:::-;:63;;;;:::i;:::-;1549:79;;1654:13;1645:5;:22;1641:88;;1691:26;;-1:-1:-1;;;1691:26:4;;;;;;;;;;;1641:88;1741:72;;-1:-1:-1;;;1741:72:4;;-1:-1:-1;;1741:72:4;;;2910:25:5;;;1781:5:4;2951:18:5;;;2944:50;;;3010:18;;;3003:34;;;;3053:18;;;3046:50;1060:42:4;;1741:20;;2882:19:5;;1741:72:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1296:525;;;;1260:561::o;1829:659::-;1915:15;1887:12;;1902:10;1887:25;;;;:::i;:::-;:43;1883:102;;;1954:19;;-1:-1:-1;;;1954:19:4;;;;;;;;;;;1883:102;2021:53;;-1:-1:-1;;;2021:53:4;;871:42;2021:53;;;1937:51:5;1997:21:4;;1172:42;;2021:39;;1910:18:5;;2021:53:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:61;;;-1:-1:-1;;;;;1997:85:4;;;2093:20;1060:42;-1:-1:-1;;;;;2116:15:4;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:52;;-1:-1:-1;;;2116:52:4;;871:42;2116:52;;;2167:51:5;2163:4:4;2234:18:5;;;2227:50;-1:-1:-1;;;;;2116:32:4;;;;;;;2140:18:5;;2116:52:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2196:32;;-1:-1:-1;;;2196:32:4;;1060:42;2196:32;;;1937:51:5;2093:75:4;;-1:-1:-1;2179:14:4;;871:42;;2196:13;;1910:18:5;;2196:32:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2261:33;;-1:-1:-1;;;2261:33:4;;1060:42;2261:33;;;1937:51:5;2179:49:4;;-1:-1:-1;2239:13:4;;2179:49;;2255:54;;956:42;;2261:14;;1910:18:5;;2261:33:4;1791:203:5;2255:54:4;:63;;;;:::i;:::-;2346:15;2331:12;:30;2239:79;-1:-1:-1;2378:21:4;;;2374:107;;;1060:42;2416:21;2462:6;2438:21;2446:13;2438:5;:21;:::i;:::-;:30;;;;:::i;:::-;2416:53;;;;;;;;;;;;;2655:25:5;;2643:2;2628:18;;2509:177;2374:107:4;1872:616;;;;1829:659::o;2496:139::-;2570:7;2623:4;2598:21;2607:12;2598:6;:21;:::i;14:175:5:-;92:13;;145:18;134:30;;124:41;;114:69;;179:1;176;169:12;114:69;14:175;;;:::o;194:317::-;291:6;344:2;332:9;323:7;319:23;315:32;312:52;;;360:1;357;350:12;312:52;386:16;;-1:-1:-1;;;;;431:31:5;;421:42;;411:70;;477:1;474;467:12;516:828;615:6;668:2;656:9;647:7;643:23;639:32;636:52;;;684:1;681;674:12;636:52;717:2;711:9;759:2;751:6;747:15;828:6;816:10;813:22;792:18;780:10;777:34;774:62;771:185;;;878:10;873:3;869:20;866:1;859:31;913:4;910:1;903:15;941:4;938:1;931:15;771:185;972:2;965:22;1011:39;1040:9;1011:39;:::i;:::-;1003:6;996:55;1084:48;1128:2;1117:9;1113:18;1084:48;:::i;:::-;1079:2;1071:6;1067:15;1060:73;1176:2;1165:9;1161:18;1155:25;-1:-1:-1;;;;;1213:5:5;1209:46;1202:5;1199:57;1189:85;;1270:1;1267;1260:12;1189:85;1302:2;1290:15;;1283:30;1294:6;516:828;-1:-1:-1;;;516:828:5:o;1349:184::-;1419:6;1472:2;1460:9;1451:7;1447:23;1443:32;1440:52;;;1488:1;1485;1478:12;1440:52;-1:-1:-1;1511:16:5;;1349:184;-1:-1:-1;1349:184:5:o;1538:248::-;1606:6;1614;1667:2;1655:9;1646:7;1642:23;1638:32;1635:52;;;1683:1;1680;1673:12;1635:52;-1:-1:-1;;1706:23:5;;;1776:2;1761:18;;;1748:32;;-1:-1:-1;1538:248:5:o;3107:128::-;3147:3;3178:1;3174:6;3171:1;3168:13;3165:39;;;3184:18;;:::i;:::-;-1:-1:-1;3220:9:5;;3107:128::o;3240:217::-;3280:1;3306;3296:132;;3350:10;3345:3;3341:20;3338:1;3331:31;3385:4;3382:1;3375:15;3413:4;3410:1;3403:15;3296:132;-1:-1:-1;3442:9:5;;3240:217::o;3462:168::-;3502:7;3568:1;3564;3560:6;3556:14;3553:1;3550:21;3545:1;3538:9;3531:17;3527:45;3524:71;;;3575:18;;:::i;:::-;-1:-1:-1;3615:9:5;;3462:168::o;3635:125::-;3675:4;3703:1;3700;3697:8;3694:34;;;3708:18;;:::i;:::-;-1:-1:-1;3745:9:5;;3635:125::o;3765:127::-;3826:10;3821:3;3817:20;3814:1;3807:31;3857:4;3854:1;3847:15;3881:4;3878:1;3871:15

Swarm Source

ipfs://86f5c5bb2ef4779a169d30e44a0ea27944517d725d3f29e78e38d9e00992078f

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.