ETH Price: $3,037.93 (+0.36%)
Gas: 0.14 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
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

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xaa12A122...Df8cbce20
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
Buyout

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 3 runs

Other Settings:
default evmVersion, Unlicense license

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";

import "./interfaces/IBuyout.sol";

/// Buyout is a shotgun clause / buy-sell agreement to allow holders to acquire
/// all other outstanding tokens.
///
/// @dev totalSupply() is currently frozen at start of offer
contract Buyout is IBuyout, Initializable {
    using SafeERC20Upgradeable for IERC20Upgradeable;

    event CounterOffer(address indexed wallet, uint256 amount);
    event Surrender(uint256 tokens, uint256 funds);

    address public override offerer; // Wallet proposing to buy out
    bool internal _offererRefundedAndPaid; // After failure, offerer refunded and paid from counter offer?

    IERC20Upgradeable public listingToken; // ERC20 token representing NFT
    IERC20Upgradeable public fundingToken; // ERC20 token used for funding

    uint256 internal _offerListingAmount; // Offerer's listing tokens
    uint256 internal _offerFundingAmount; // Funding offer for outstanding tokens
    uint256 internal _outstandingTokens; // Outstanding tokens (supply - offerer's)

    uint256 public end; // Expiry date of buyout offer
    uint256 public counterOfferTarget; // Counter offer target (funding tokens)
    uint256 public counterOfferAmount; // Current counter offers (funding tokens)

    uint256 public constant MIN_TOKEN_BASIS_POINTS = 3000; // Min listing amount to be 30% of total supply
    uint256 public constant MIN_FUNDING_OFFER = 100; // Minimum funding amount
    uint256 public constant BUYOUT_OFFER_DURATION = 14 days; // Buyout offer lifespan days

    mapping(address => uint256) internal _counterOffers; // Per-wallet offer amount

    modifier onlyStatus(Status s) {
        require(status() == s, "BAD_STATUS");
        _;
    }

    modifier onlyOfferer() {
        require(msg.sender == offerer, "OFFERER_ONLY");
        _;
    }

    function initialize(
        IERC20Upgradeable _listingToken,
        IERC20Upgradeable _fundingToken
    ) public initializer {
        listingToken = _listingToken;
        fundingToken = _fundingToken;
    }

    function status() public view override returns (Status s) {
        if (offerer == address(0)) {
            s = Status.NEW;
        } else if (counterOfferAmount >= counterOfferTarget) {
            s = Status.COUNTERED;
        } else if (block.timestamp < end) {
            s = Status.OPEN;
        } else {
            s = Status.SUCCESS;
        }
    }

    function offer(uint256 listingAmount, uint256 fundingAmount)
        public
        onlyStatus(Status.NEW)
    {
        uint256 listingSupply = listingToken.totalSupply();
        offerer = msg.sender;

        uint256 minTokenOfferLimit = (MIN_TOKEN_BASIS_POINTS * listingSupply) /
            10000;

        require(listingAmount >= minTokenOfferLimit, "TOKEN_OFFER_LOW");
        require(fundingAmount > MIN_FUNDING_OFFER, "FUNDING_OFFER_LOW");

        _offerListingAmount = listingAmount;
        _offerFundingAmount = fundingAmount;

        // tokens offerer is proposing to buy with _offerFundingAmount
        _outstandingTokens = listingSupply - _offerListingAmount;

        // counter offers must hit this target
        counterOfferTarget =
            (_offerFundingAmount * _offerListingAmount) /
            _outstandingTokens;

        end = block.timestamp + BUYOUT_OFFER_DURATION;

        listingToken.safeTransferFrom(msg.sender, address(this), listingAmount);
        fundingToken.safeTransferFrom(msg.sender, address(this), fundingAmount);
    }

    // Make a counter offer, capped at remaining target.
    function counterOffer(uint256 amount) public onlyStatus(Status.OPEN) {
        require(amount > 0, "COUNTEROFFER_TOO_LOW");

        uint256 remaining = counterOfferTarget - counterOfferAmount;

        if (amount > remaining) {
            amount = remaining;
        }

        counterOfferAmount += amount;
        _counterOffers[msg.sender] += amount;

        fundingToken.safeTransferFrom(msg.sender, address(this), amount);

        emit CounterOffer(msg.sender, amount);
    }

    // Withdraw listing tokens from failed buyout, based on pro-rata
    // counter offer amount
    function withdrawTokens() public onlyStatus(Status.COUNTERED) {
        require(
            _counterOffers[msg.sender] > 0,
            "NOT_COUNTEROFFERER_OR_WITHDRAWN"
        );

        uint256 amount = (_counterOffers[msg.sender] * _offerListingAmount) /
            counterOfferAmount;
        _counterOffers[msg.sender] = 0;

        // send listing tokens to counter offerer
        listingToken.safeTransfer(msg.sender, amount);
    }

    // Withdraw funding tokens from failed buyout
    function withdrawFunds() public onlyStatus(Status.COUNTERED) onlyOfferer {
        require(_offererRefundedAndPaid == false, "ALREADY_WITHDRAWN");

        _offererRefundedAndPaid = true;
        uint256 amount = _offerFundingAmount + counterOfferAmount;

        // return funds to offerer
        fundingToken.safeTransfer(offerer, amount);
    }

    // Withdraw counter offer funds if buyout succeeds and counter offers are
    // insufficient
    function withdrawCounterOffer() public onlyStatus(Status.SUCCESS) {
        require(
            _counterOffers[msg.sender] > 0,
            "NOT_COUNTEROFFERER_OR_REFUNDED"
        );

        uint256 amount = _counterOffers[msg.sender];
        _counterOffers[msg.sender] = 0;

        // return funds to counter offerer
        fundingToken.safeTransfer(msg.sender, amount);
    }

    // Swap listing tokens for buyout offer
    function surrenderTokens(uint256 amount) public onlyStatus(Status.SUCCESS) {
        require(amount > 0, "TOKENS_LOW");

        uint256 funds = (amount * _offerFundingAmount) / _outstandingTokens;

        // take `amount` listing tokens and return `funds` funding tokens
        listingToken.safeTransferFrom(msg.sender, address(this), amount);
        fundingToken.safeTransfer(msg.sender, funds);

        emit Surrender(amount, funds);
    }
}

File 2 of 6 : Initializable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../../../utils/AddressUpgradeable.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20Upgradeable {
    using AddressUpgradeable for address;

    function safeTransfer(
        IERC20Upgradeable token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20Upgradeable token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

interface IBuyout {
    enum Status {
        NEW, // Buyout not offered yet
        OPEN, // Buyout offer is currently open
        COUNTERED, // Fails, counter-offerers can claim listing tokens
        SUCCESS // Success, listing token holders can surrender tokens in exchange for funding token
    }

    function status() external view returns (IBuyout.Status s);

    function offerer() external returns (address);
}

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 3
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"CounterOffer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"funds","type":"uint256"}],"name":"Surrender","type":"event"},{"inputs":[],"name":"BUYOUT_OFFER_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_FUNDING_OFFER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_TOKEN_BASIS_POINTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"counterOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"counterOfferAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"counterOfferTarget","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"end","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundingToken","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"_listingToken","type":"address"},{"internalType":"contract IERC20Upgradeable","name":"_fundingToken","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"listingToken","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"listingAmount","type":"uint256"},{"internalType":"uint256","name":"fundingAmount","type":"uint256"}],"name":"offer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"offerer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"status","outputs":[{"internalType":"enum IBuyout.Status","name":"s","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"surrenderTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawCounterOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]

0x608060405234801561001057600080fd5b50610fa2806100206000396000f3fe608060405234801561001057600080fd5b50600436106100db5760003560e01c8063200d2ed2146100e057806324600fc3146100fe578063485cc9551461010857806378065f271461011b57806389a4157e146101465780638d8f2adb1461014e578063965fbde514610156578063a19205861461016d578063aa1a3c5c14610180578063c782ff1f14610189578063c7d4da0c146101a2578063cdaf64f4146101ab578063d6f3800d146101be578063e18bb5dd146101c6578063e47e5527146101d0578063e53546b4146101e3578063efbe1c1c146101f6575b600080fd5b6100e86101ff565b6040516100f59190610e3d565b60405180910390f35b610106610243565b005b610106610116366004610d9e565b61037d565b60025461012e906001600160a01b031681565b6040516001600160a01b0390911681526020016100f5565b610106610462565b610106610532565b61015f60085481565b6040519081526020016100f5565b61010661017b366004610e00565b61062b565b61015f60075481565b60005461012e906201000090046001600160a01b031681565b61015f610bb881565b60015461012e906001600160a01b031681565b61015f606481565b61015f6212750081565b6101066101de366004610dd0565b610829565b6101066101f1366004610dd0565b610964565b61015f60065481565b600080546201000090046001600160a01b031661021c5750600090565b6007546008541061022d5750600290565b60065442101561023d5750600190565b50600390565b60028061024e6101ff565b600381111561026d57634e487b7160e01b600052602160045260246000fd5b146102935760405162461bcd60e51b815260040161028a90610e98565b60405180910390fd5b6000546201000090046001600160a01b031633146102e25760405162461bcd60e51b815260206004820152600c60248201526b4f4646455245525f4f4e4c5960a01b604482015260640161028a565b600054600160b01b900460ff16156103305760405162461bcd60e51b815260206004820152601160248201527020a62922a0a22cafaba4aa24222920aba760791b604482015260640161028a565b6000805460ff60b01b1916600160b01b1781556008546004546103539190610ebc565b600054600254919250610379916001600160a01b03908116916201000090041683610a75565b5050565b600054610100900460ff1680610396575060005460ff16155b6103f95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161028a565b600054610100900460ff1615801561041b576000805461ffff19166101011790555b600180546001600160a01b038086166001600160a01b0319928316179092556002805492851692909116919091179055801561045d576000805461ff00191690555b505050565b60038061046d6101ff565b600381111561048c57634e487b7160e01b600052602160045260246000fd5b146104a95760405162461bcd60e51b815260040161028a90610e98565b336000908152600960205260409020546105055760405162461bcd60e51b815260206004820152601e60248201527f4e4f545f434f554e5445524f4646455245525f4f525f524546554e4445440000604482015260640161028a565b33600081815260096020526040812080549190556002549091610379916001600160a01b03169083610a75565b60028061053d6101ff565b600381111561055c57634e487b7160e01b600052602160045260246000fd5b146105795760405162461bcd60e51b815260040161028a90610e98565b336000908152600960205260409020546105d55760405162461bcd60e51b815260206004820152601f60248201527f4e4f545f434f554e5445524f4646455245525f4f525f57495448445241574e00604482015260640161028a565b600854600354336000908152600960205260408120549092916105f791610ef4565b6106019190610ed4565b33600081815260096020526040812055600154919250610379916001600160a01b03169083610a75565b6000806106366101ff565b600381111561065557634e487b7160e01b600052602160045260246000fd5b146106725760405162461bcd60e51b815260040161028a90610e98565b600154604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b1580156106b757600080fd5b505afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610de8565b6000805462010000600160b01b03191633620100000217815590915061271061071a83610bb8610ef4565b6107249190610ed4565b9050808510156107685760405162461bcd60e51b815260206004820152600f60248201526e544f4b454e5f4f464645525f4c4f5760881b604482015260640161028a565b606484116107ac5760405162461bcd60e51b815260206004820152601160248201527046554e44494e475f4f464645525f4c4f5760781b604482015260640161028a565b600385905560048490556107c08583610f13565b60058190556003546004546107d59190610ef4565b6107df9190610ed4565b6007556107ef6212750042610ebc565b60065560015461080a906001600160a01b0316333088610ad8565b600254610822906001600160a01b0316333087610ad8565b5050505050565b6001806108346101ff565b600381111561085357634e487b7160e01b600052602160045260246000fd5b146108705760405162461bcd60e51b815260040161028a90610e98565b600082116108b75760405162461bcd60e51b8152602060048201526014602482015273434f554e5445524f464645525f544f4f5f4c4f5760601b604482015260640161028a565b60006008546007546108c99190610f13565b9050808311156108d7578092505b82600860008282546108e99190610ebc565b9091555050336000908152600960205260408120805485929061090d908490610ebc565b909155505060025461092a906001600160a01b0316333086610ad8565b60405183815233907fe4a537463f3d8138c281ade192f2f55198939ca995b611b8d9ef6ebe29f360579060200160405180910390a2505050565b60038061096f6101ff565b600381111561098e57634e487b7160e01b600052602160045260246000fd5b146109ab5760405162461bcd60e51b815260040161028a90610e98565b600082116109e85760405162461bcd60e51b815260206004820152600a602482015269544f4b454e535f4c4f5760b01b604482015260640161028a565b6000600554600454846109fb9190610ef4565b610a059190610ed4565b600154909150610a20906001600160a01b0316333086610ad8565b600254610a37906001600160a01b03163383610a75565b60408051848152602081018390527f8ba0b35745118c74013821d55ed1f27f5328705c838c8a27ec3e0d72dc57ace2910160405180910390a1505050565b6040516001600160a01b03831660248201526044810182905261045d90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610b16565b6040516001600160a01b0380851660248301528316604482015260648101829052610b109085906323b872dd60e01b90608401610aa1565b50505050565b6000610b6b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610be89092919063ffffffff16565b80519091501561045d5780806020019051810190610b899190610d7e565b61045d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161028a565b6060610bf78484600085610c01565b90505b9392505050565b606082471015610c625760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161028a565b843b610cb05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161028a565b600080866001600160a01b03168587604051610ccc9190610e21565b60006040518083038185875af1925050503d8060008114610d09576040519150601f19603f3d011682016040523d82523d6000602084013e610d0e565b606091505b5091509150610d1e828286610d29565b979650505050505050565b60608315610d38575081610bfa565b825115610d485782518084602001fd5b8160405162461bcd60e51b815260040161028a9190610e65565b80356001600160a01b0381168114610d7957600080fd5b919050565b600060208284031215610d8f578081fd5b81518015158114610bfa578182fd5b60008060408385031215610db0578081fd5b610db983610d62565b9150610dc760208401610d62565b90509250929050565b600060208284031215610de1578081fd5b5035919050565b600060208284031215610df9578081fd5b5051919050565b60008060408385031215610e12578182fd5b50508035926020909101359150565b60008251610e33818460208701610f2a565b9190910192915050565b6020810160048310610e5f57634e487b7160e01b600052602160045260246000fd5b91905290565b6020815260008251806020840152610e84816040850160208701610f2a565b601f01601f19169190910160400192915050565b6020808252600a90820152694241445f53544154555360b01b604082015260600190565b60008219821115610ecf57610ecf610f56565b500190565b600082610eef57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615610f0e57610f0e610f56565b500290565b600082821015610f2557610f25610f56565b500390565b60005b83811015610f45578181015183820152602001610f2d565b83811115610b105750506000910152565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220bff5a5a5d4b201b85f9d17f5b25acf95e3df2f6d81c369dce91a607164c54a5264736f6c63430008040033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100db5760003560e01c8063200d2ed2146100e057806324600fc3146100fe578063485cc9551461010857806378065f271461011b57806389a4157e146101465780638d8f2adb1461014e578063965fbde514610156578063a19205861461016d578063aa1a3c5c14610180578063c782ff1f14610189578063c7d4da0c146101a2578063cdaf64f4146101ab578063d6f3800d146101be578063e18bb5dd146101c6578063e47e5527146101d0578063e53546b4146101e3578063efbe1c1c146101f6575b600080fd5b6100e86101ff565b6040516100f59190610e3d565b60405180910390f35b610106610243565b005b610106610116366004610d9e565b61037d565b60025461012e906001600160a01b031681565b6040516001600160a01b0390911681526020016100f5565b610106610462565b610106610532565b61015f60085481565b6040519081526020016100f5565b61010661017b366004610e00565b61062b565b61015f60075481565b60005461012e906201000090046001600160a01b031681565b61015f610bb881565b60015461012e906001600160a01b031681565b61015f606481565b61015f6212750081565b6101066101de366004610dd0565b610829565b6101066101f1366004610dd0565b610964565b61015f60065481565b600080546201000090046001600160a01b031661021c5750600090565b6007546008541061022d5750600290565b60065442101561023d5750600190565b50600390565b60028061024e6101ff565b600381111561026d57634e487b7160e01b600052602160045260246000fd5b146102935760405162461bcd60e51b815260040161028a90610e98565b60405180910390fd5b6000546201000090046001600160a01b031633146102e25760405162461bcd60e51b815260206004820152600c60248201526b4f4646455245525f4f4e4c5960a01b604482015260640161028a565b600054600160b01b900460ff16156103305760405162461bcd60e51b815260206004820152601160248201527020a62922a0a22cafaba4aa24222920aba760791b604482015260640161028a565b6000805460ff60b01b1916600160b01b1781556008546004546103539190610ebc565b600054600254919250610379916001600160a01b03908116916201000090041683610a75565b5050565b600054610100900460ff1680610396575060005460ff16155b6103f95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161028a565b600054610100900460ff1615801561041b576000805461ffff19166101011790555b600180546001600160a01b038086166001600160a01b0319928316179092556002805492851692909116919091179055801561045d576000805461ff00191690555b505050565b60038061046d6101ff565b600381111561048c57634e487b7160e01b600052602160045260246000fd5b146104a95760405162461bcd60e51b815260040161028a90610e98565b336000908152600960205260409020546105055760405162461bcd60e51b815260206004820152601e60248201527f4e4f545f434f554e5445524f4646455245525f4f525f524546554e4445440000604482015260640161028a565b33600081815260096020526040812080549190556002549091610379916001600160a01b03169083610a75565b60028061053d6101ff565b600381111561055c57634e487b7160e01b600052602160045260246000fd5b146105795760405162461bcd60e51b815260040161028a90610e98565b336000908152600960205260409020546105d55760405162461bcd60e51b815260206004820152601f60248201527f4e4f545f434f554e5445524f4646455245525f4f525f57495448445241574e00604482015260640161028a565b600854600354336000908152600960205260408120549092916105f791610ef4565b6106019190610ed4565b33600081815260096020526040812055600154919250610379916001600160a01b03169083610a75565b6000806106366101ff565b600381111561065557634e487b7160e01b600052602160045260246000fd5b146106725760405162461bcd60e51b815260040161028a90610e98565b600154604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b1580156106b757600080fd5b505afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610de8565b6000805462010000600160b01b03191633620100000217815590915061271061071a83610bb8610ef4565b6107249190610ed4565b9050808510156107685760405162461bcd60e51b815260206004820152600f60248201526e544f4b454e5f4f464645525f4c4f5760881b604482015260640161028a565b606484116107ac5760405162461bcd60e51b815260206004820152601160248201527046554e44494e475f4f464645525f4c4f5760781b604482015260640161028a565b600385905560048490556107c08583610f13565b60058190556003546004546107d59190610ef4565b6107df9190610ed4565b6007556107ef6212750042610ebc565b60065560015461080a906001600160a01b0316333088610ad8565b600254610822906001600160a01b0316333087610ad8565b5050505050565b6001806108346101ff565b600381111561085357634e487b7160e01b600052602160045260246000fd5b146108705760405162461bcd60e51b815260040161028a90610e98565b600082116108b75760405162461bcd60e51b8152602060048201526014602482015273434f554e5445524f464645525f544f4f5f4c4f5760601b604482015260640161028a565b60006008546007546108c99190610f13565b9050808311156108d7578092505b82600860008282546108e99190610ebc565b9091555050336000908152600960205260408120805485929061090d908490610ebc565b909155505060025461092a906001600160a01b0316333086610ad8565b60405183815233907fe4a537463f3d8138c281ade192f2f55198939ca995b611b8d9ef6ebe29f360579060200160405180910390a2505050565b60038061096f6101ff565b600381111561098e57634e487b7160e01b600052602160045260246000fd5b146109ab5760405162461bcd60e51b815260040161028a90610e98565b600082116109e85760405162461bcd60e51b815260206004820152600a602482015269544f4b454e535f4c4f5760b01b604482015260640161028a565b6000600554600454846109fb9190610ef4565b610a059190610ed4565b600154909150610a20906001600160a01b0316333086610ad8565b600254610a37906001600160a01b03163383610a75565b60408051848152602081018390527f8ba0b35745118c74013821d55ed1f27f5328705c838c8a27ec3e0d72dc57ace2910160405180910390a1505050565b6040516001600160a01b03831660248201526044810182905261045d90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610b16565b6040516001600160a01b0380851660248301528316604482015260648101829052610b109085906323b872dd60e01b90608401610aa1565b50505050565b6000610b6b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610be89092919063ffffffff16565b80519091501561045d5780806020019051810190610b899190610d7e565b61045d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161028a565b6060610bf78484600085610c01565b90505b9392505050565b606082471015610c625760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161028a565b843b610cb05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161028a565b600080866001600160a01b03168587604051610ccc9190610e21565b60006040518083038185875af1925050503d8060008114610d09576040519150601f19603f3d011682016040523d82523d6000602084013e610d0e565b606091505b5091509150610d1e828286610d29565b979650505050505050565b60608315610d38575081610bfa565b825115610d485782518084602001fd5b8160405162461bcd60e51b815260040161028a9190610e65565b80356001600160a01b0381168114610d7957600080fd5b919050565b600060208284031215610d8f578081fd5b81518015158114610bfa578182fd5b60008060408385031215610db0578081fd5b610db983610d62565b9150610dc760208401610d62565b90509250929050565b600060208284031215610de1578081fd5b5035919050565b600060208284031215610df9578081fd5b5051919050565b60008060408385031215610e12578182fd5b50508035926020909101359150565b60008251610e33818460208701610f2a565b9190910192915050565b6020810160048310610e5f57634e487b7160e01b600052602160045260246000fd5b91905290565b6020815260008251806020840152610e84816040850160208701610f2a565b601f01601f19169190910160400192915050565b6020808252600a90820152694241445f53544154555360b01b604082015260600190565b60008219821115610ecf57610ecf610f56565b500190565b600082610eef57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615610f0e57610f0e610f56565b500290565b600082821015610f2557610f25610f56565b500390565b60005b83811015610f45578181015183820152602001610f2d565b83811115610b105750506000910152565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220bff5a5a5d4b201b85f9d17f5b25acf95e3df2f6d81c369dce91a607164c54a5264736f6c63430008040033

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

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.