ETH Price: $3,114.84 (+0.55%)
Gas: 3 Gwei

Contract

0xC9774185f2F30Cce393d0f86337E2915Fc90BA9d
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
End173306612023-05-24 17:54:47360 days ago1684950887IN
0xC9774185...5Fc90BA9d
0 ETH0.00677468.75420023
Bid173306062023-05-24 17:43:35360 days ago1684950215IN
0xC9774185...5Fc90BA9d
19 ETH0.006239252.90690452
Bid173305992023-05-24 17:42:11360 days ago1684950131IN
0xC9774185...5Fc90BA9d
18 ETH0.0037626254.09329071
Bid173305932023-05-24 17:40:59360 days ago1684950059IN
0xC9774185...5Fc90BA9d
18.001 ETH0.0054305254.77629448
Bid173305812023-05-24 17:38:35360 days ago1684949915IN
0xC9774185...5Fc90BA9d
17.9 ETH0.0035082659.70100195
Bid173305702023-05-24 17:36:23360 days ago1684949783IN
0xC9774185...5Fc90BA9d
18.251 ETH0.0081658567.63844494
Bid173305402023-05-24 17:30:23360 days ago1684949423IN
0xC9774185...5Fc90BA9d
19.9 ETH0.0096988968.15044976
Bid173305322023-05-24 17:28:47360 days ago1684949327IN
0xC9774185...5Fc90BA9d
19.9 ETH0.0084959556.32800495
Top Up Bid173305252023-05-24 17:27:23360 days ago1684949243IN
0xC9774185...5Fc90BA9d
1 ETH0.0033427557.06595992
Top Up Bid173305082023-05-24 17:23:59360 days ago1684949039IN
0xC9774185...5Fc90BA9d
0.5 ETH0.0088426567.26808638
Bid173304962023-05-24 17:21:23360 days ago1684948883IN
0xC9774185...5Fc90BA9d
17.8001 ETH0.0061746760.57169284
Top Up Bid173304932023-05-24 17:20:47360 days ago1684948847IN
0xC9774185...5Fc90BA9d
0.1 ETH0.0061029758.81195746
Bid173304882023-05-24 17:19:47360 days ago1684948787IN
0xC9774185...5Fc90BA9d
17.71 ETH0.0042246354.47480925
Top Up Bid173304852023-05-24 17:18:59360 days ago1684948739IN
0xC9774185...5Fc90BA9d
0.2 ETH0.0041657454.17021342
Top Up Bid173304802023-05-24 17:17:59360 days ago1684948679IN
0xC9774185...5Fc90BA9d
0.3 ETH0.0061557150.72238799
Top Up Bid173304762023-05-24 17:17:11360 days ago1684948631IN
0xC9774185...5Fc90BA9d
0.1 ETH0.0045053450.63269028
Bid173304702023-05-24 17:15:59360 days ago1684948559IN
0xC9774185...5Fc90BA9d
17.999 ETH0.0074288455.30621621
Bid173304692023-05-24 17:15:47360 days ago1684948547IN
0xC9774185...5Fc90BA9d
17.53 ETH0.0030643952.14744996
Bid173304402023-05-24 17:09:47360 days ago1684948187IN
0xC9774185...5Fc90BA9d
17.7 ETH0.007645575
Bid173304032023-05-24 17:02:23360 days ago1684947743IN
0xC9774185...5Fc90BA9d
17.51 ETH0.0046567879.24552209
Bid173303932023-05-24 17:00:23360 days ago1684947623IN
0xC9774185...5Fc90BA9d
17.6999 ETH0.0067232965.9534743
Bid173303912023-05-24 16:59:59360 days ago1684947599IN
0xC9774185...5Fc90BA9d
17.8 ETH0.0078945460.02451627
Bid173303882023-05-24 16:59:23360 days ago1684947563IN
0xC9774185...5Fc90BA9d
18 ETH0.0084632959.46832362
Bid173303612023-05-24 16:53:47360 days ago1684947227IN
0xC9774185...5Fc90BA9d
17.52 ETH0.0055889456.37425476
Top Up Bid173303372023-05-24 16:48:59360 days ago1684946939IN
0xC9774185...5Fc90BA9d
0.2 ETH0.0067219555.38806625
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
173306612023-05-24 17:54:47360 days ago1684950887
0xC9774185...5Fc90BA9d
149.0416 ETH
173306612023-05-24 17:54:47360 days ago1684950887
0xC9774185...5Fc90BA9d
18.6302 ETH
173306612023-05-24 17:54:47360 days ago1684950887
0xC9774185...5Fc90BA9d
18.6302 ETH
173306062023-05-24 17:43:35360 days ago1684950215
0xC9774185...5Fc90BA9d
17.999 ETH
173305992023-05-24 17:42:11360 days ago1684950131
0xC9774185...5Fc90BA9d
17.911 ETH
173305932023-05-24 17:40:59360 days ago1684950059
0xC9774185...5Fc90BA9d
17.9 ETH
173305812023-05-24 17:38:35360 days ago1684949915
0xC9774185...5Fc90BA9d
17.8001 ETH
173305702023-05-24 17:36:23360 days ago1684949783
0xC9774185...5Fc90BA9d
17.8 ETH
173305402023-05-24 17:30:23360 days ago1684949423
0xC9774185...5Fc90BA9d
17.78 ETH
173305322023-05-24 17:28:47360 days ago1684949327
0xC9774185...5Fc90BA9d
17.71 ETH
173304962023-05-24 17:21:23360 days ago1684948883
0xC9774185...5Fc90BA9d
17.7 ETH
173304882023-05-24 17:19:47360 days ago1684948787
0xC9774185...5Fc90BA9d
17.6999 ETH
173304702023-05-24 17:15:59360 days ago1684948559
0xC9774185...5Fc90BA9d
17.53 ETH
173304692023-05-24 17:15:47360 days ago1684948547
0xC9774185...5Fc90BA9d
17.52 ETH
173304402023-05-24 17:09:47360 days ago1684948187
0xC9774185...5Fc90BA9d
17.51 ETH
173304032023-05-24 17:02:23360 days ago1684947743
0xC9774185...5Fc90BA9d
17.501 ETH
173303932023-05-24 17:00:23360 days ago1684947623
0xC9774185...5Fc90BA9d
17.5 ETH
173303912023-05-24 16:59:59360 days ago1684947599
0xC9774185...5Fc90BA9d
17.5 ETH
173303882023-05-24 16:59:23360 days ago1684947563
0xC9774185...5Fc90BA9d
17.46999 ETH
173303612023-05-24 16:53:47360 days ago1684947227
0xC9774185...5Fc90BA9d
17.439 ETH
173303302023-05-24 16:47:35360 days ago1684946855
0xC9774185...5Fc90BA9d
17.41 ETH
173302792023-05-24 16:37:11360 days ago1684946231
0xC9774185...5Fc90BA9d
17.369 ETH
173302582023-05-24 16:32:59360 days ago1684945979
0xC9774185...5Fc90BA9d
17.26 ETH
173302532023-05-24 16:31:59360 days ago1684945919
0xC9774185...5Fc90BA9d
17.25 ETH
173302482023-05-24 16:30:59360 days ago1684945859
0xC9774185...5Fc90BA9d
17.2 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RankedAuction

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 5 : RankedAuction.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.19;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

contract RankedAuction is Ownable, Pausable, ReentrancyGuard {
    event Start();
    event Bid(address bidder, uint256 bidAmount);
    event TopUpBid(address bidder, uint256 bidAmount);
    event End();

    struct SellerInfo {
        address seller;
        uint256 bp;
    }

    struct BidState {
        address bidder; // Bidder address
        uint256 bidAmount; // Bid price
    }

    uint256 public constant DENOMINATOR = 10000;
    SellerInfo[3] public sellers;
    uint256 public endAt;
    bool public started;
    bool public ended;
    mapping(uint256 => BidState) public winners;
    uint256 public bidCount;

    constructor(SellerInfo[3] memory infos) ReentrancyGuard() {
        require(
            infos[0].bp + infos[1].bp + infos[2].bp == 10000,
            "invalid bps"
        );

        sellers[0] = infos[0];
        sellers[1] = infos[1];
        sellers[2] = infos[2];
    }

    function start(uint256 duration) external onlyOwner {
        require(!started, "started");

        started = true;
        endAt = block.timestamp + duration;

        emit Start();
    }

    function bid() external payable nonReentrant whenNotPaused {
        require(started, "not started");
        require(block.timestamp < endAt, "ended");
        require(msg.value > 0, "none bid amount");

        if (bidCount < 10) {
            uint256 index = bidCount;
            for (; index > 0; index--) {
                if (msg.value <= winners[index - 1].bidAmount) {
                    break;
                }
                winners[index] = winners[index - 1];
            }
            winners[index].bidder = msg.sender;
            winners[index].bidAmount = msg.value;
            bidCount++;
        } else {
            require(
                msg.value > winners[9].bidAmount,
                "need more fund to be a winner"
            );

            if (block.timestamp + 10 minutes > endAt) {
                endAt = block.timestamp + 10 minutes;
            }

            (bool sent, ) = winners[9].bidder.call{value: winners[9].bidAmount}(
                ""
            );
            if (!sent) {
                // The function call will fail only in case when the winner is a contract and can't recieve eth
                // In this case, the call should not revert.
            }

            uint256 index = 9;
            for (; index > 0; index--) {
                if (msg.value <= winners[index - 1].bidAmount) {
                    break;
                }
                winners[index] = winners[index - 1];
            }
            winners[index].bidder = msg.sender;
            winners[index].bidAmount = msg.value;
        }

        emit Bid(msg.sender, msg.value);
    }

    function topUpBid() external payable nonReentrant whenNotPaused {
        require(started, "not started");
        require(block.timestamp < endAt, "ended");
        require(msg.value > 0, "none bid amount");

        uint256 pos = 0;
        for (; pos < bidCount; pos++) {
            if (winners[pos].bidder == msg.sender) {
                break;
            }
        }

        require(pos < bidCount, "not eligible for top-up-bid");

        if (block.timestamp + 10 minutes > endAt) {
            endAt = block.timestamp + 10 minutes;
        }

        uint256 newBidAmount = winners[pos].bidAmount + msg.value;
        uint256 index = pos;
        for (; index > 0; index--) {
            if (newBidAmount <= winners[index - 1].bidAmount) {
                break;
            }
            winners[index] = winners[index - 1];
        }
        winners[index].bidder = msg.sender;
        winners[index].bidAmount = newBidAmount;

        emit TopUpBid(msg.sender, newBidAmount);
    }

    function end() external nonReentrant whenNotPaused {
        require(started, "not started");
        require(block.timestamp >= endAt, "not ended");
        require(!ended, "ended");

        ended = true;

        // withdraw funds
        uint256 total = address(this).balance;
        uint256 amount1 = (total * sellers[0].bp) / DENOMINATOR;
        transfer(sellers[0].seller, amount1);
        uint256 amount2 = (total * sellers[1].bp) / DENOMINATOR;
        transfer(sellers[1].seller, amount2);
        transfer(sellers[2].seller, total - amount1 - amount2);

        emit End();
    }

    function transfer(address to, uint256 amount) internal {
        (bool sent, ) = to.call{value: amount}("");
        require(sent, "Failed to send Ether");
    }

    function withdraw() external onlyOwner {
        transfer(msg.sender, address(this).balance);
    }

    function pause() external onlyOwner {
        _pause();
    }

    function unpause() external onlyOwner {
        _unpause();
    }

    function getAllWinners() public view returns (BidState[] memory) {
        BidState[] memory winnersLst = new BidState[](bidCount);

        for (uint ix = 0; ix < bidCount; ix++) {
            winnersLst[ix] = winners[ix];
        }
        return (winnersLst);
    }
}

File 2 of 5 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 5 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 4 of 5 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 5 of 5 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"components":[{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint256","name":"bp","type":"uint256"}],"internalType":"struct RankedAuction.SellerInfo[3]","name":"infos","type":"tuple[3]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"bidder","type":"address"},{"indexed":false,"internalType":"uint256","name":"bidAmount","type":"uint256"}],"name":"Bid","type":"event"},{"anonymous":false,"inputs":[],"name":"End","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[],"name":"Start","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"bidder","type":"address"},{"indexed":false,"internalType":"uint256","name":"bidAmount","type":"uint256"}],"name":"TopUpBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"bidCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"end","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ended","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllWinners","outputs":[{"components":[{"internalType":"address","name":"bidder","type":"address"},{"internalType":"uint256","name":"bidAmount","type":"uint256"}],"internalType":"struct RankedAuction.BidState[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"sellers","outputs":[{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint256","name":"bp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"start","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"started","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"topUpBid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"winners","outputs":[{"internalType":"address","name":"bidder","type":"address"},{"internalType":"uint256","name":"bidAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620014ca380380620014ca8339810160408190526200003491620001e4565b6200003f336200012e565b6000805460ff60a01b1916905560018055604081015160209081015181830151820151835190920151909162000075916200028c565b6200008191906200028c565b61271014620000c45760405162461bcd60e51b815260206004820152600b60248201526a696e76616c69642062707360a81b604482015260640160405180910390fd5b80518051600280546001600160a01b03199081166001600160a01b03938416179091556020928301516003558284015180516004805484169185169190911790558301516005556040909301518051600680549095169216919091179092550151600755620002b4565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715620001b957620001b96200017e565b60405290565b604080519081016001600160401b0381118282101715620001b957620001b96200017e565b600060c08284031215620001f757600080fd5b82601f8301126200020757600080fd5b6200021162000194565b8060c08401858111156200022457600080fd5b845b81811015620002815760408188031215620002415760008081fd5b6200024b620001bf565b81516001600160a01b0381168114620002645760008081fd5b815260208281015181830152908552939093019260400162000226565b509095945050505050565b80820180821115620002ae57634e487b7160e01b600052601160045260246000fd5b92915050565b61120680620002c46000396000f3fe6080604052600436106101145760003560e01c80638456cb59116100a0578063b40a562711610064578063b40a5627146102cd578063cee26ed5146102e3578063dc6b862714610303578063efbe1c1c14610325578063f2fde38b1461033a57600080fd5b80638456cb59146101fb5780638da5cb5b14610210578063918f86741461023857806395805dad1461024e578063a2fb11751461026e57600080fd5b80633ccfd60b116100e75780633ccfd60b146101795780633f4ba83a1461018e5780635c975abb146101a3578063715018a6146101c25780637cc3ae8c146101d757600080fd5b806312fa6feb146101195780631998aeef1461014d5780631f2698ab146101575780632e9c728714610171575b600080fd5b34801561012557600080fd5b5060095461013890610100900460ff1681565b60405190151581526020015b60405180910390f35b61015561035a565b005b34801561016357600080fd5b506009546101389060ff1681565b610155610715565b34801561018557600080fd5b5061015561097e565b34801561019a57600080fd5b50610155610990565b3480156101af57600080fd5b50600054600160a01b900460ff16610138565b3480156101ce57600080fd5b506101556109a0565b3480156101e357600080fd5b506101ed60085481565b604051908152602001610144565b34801561020757600080fd5b506101556109b2565b34801561021c57600080fd5b506000546040516001600160a01b039091168152602001610144565b34801561024457600080fd5b506101ed61271081565b34801561025a57600080fd5b50610155610269366004611014565b6109c2565b34801561027a57600080fd5b506102ae610289366004611014565b600a60205260009081526040902080546001909101546001600160a01b039091169082565b604080516001600160a01b039093168352602083019190915201610144565b3480156102d957600080fd5b506101ed600b5481565b3480156102ef57600080fd5b506102ae6102fe366004611014565b610a4d565b34801561030f57600080fd5b50610318610a79565b604051610144919061102d565b34801561033157600080fd5b50610155610b54565b34801561034657600080fd5b50610155610355366004611085565b610cc4565b610362610d3d565b61036a610d96565b60095460ff166103955760405162461bcd60e51b815260040161038c906110b5565b60405180910390fd5b60085442106103b65760405162461bcd60e51b815260040161038c906110da565b600034116103f85760405162461bcd60e51b815260206004820152600f60248201526e1b9bdb9948189a5908185b5bdd5b9d608a1b604482015260640161038c565b600a600b5410156104d757600b545b801561049957600a600061041c60018461110f565b81526020019081526020016000206001015434111561049957600a600061044460018461110f565b815260208082019290925260409081016000908120848252600a90935220815481546001600160a01b0319166001600160a01b039091161781556001918201549101558061049181611128565b915050610407565b6000818152600a6020526040812080546001600160a01b0319163317815534600190910155600b8054916104cc8361113f565b9190505550506106d2565b6009600052600a6020527f825eb4cda6b8b44578c55770496c59e6dc3cf2235f690bcdaf51a61898ceb2855434116105515760405162461bcd60e51b815260206004820152601d60248201527f6e656564206d6f72652066756e6420746f20626520612077696e6e6572000000604482015260640161038c565b60085461056042610258611158565b11156105765761057242610258611158565b6008555b60096000908152600a6020527f825eb4cda6b8b44578c55770496c59e6dc3cf2235f690bcdaf51a61898ceb284547f825eb4cda6b8b44578c55770496c59e6dc3cf2235f690bcdaf51a61898ceb285546040516001600160a01b03909216918381818185875af1925050503d806000811461060d576040519150601f19603f3d011682016040523d82523d6000602084013e610612565b606091505b5050905060095b80156106ab57600a600061062e60018461110f565b8152602001908152602001600020600101543411156106ab57600a600061065660018461110f565b815260208082019290925260409081016000908120848252600a90935220815481546001600160a01b0319166001600160a01b03909116178155600191820154910155806106a381611128565b915050610619565b6000908152600a6020526040902080546001600160a01b0319163317815534600190910155505b604080513381523460208201527fe684a55f31b79eca403df938249029212a5925ec6be8012e099b45bc1019e5d2910160405180910390a161071360018055565b565b61071d610d3d565b610725610d96565b60095460ff166107475760405162461bcd60e51b815260040161038c906110b5565b60085442106107685760405162461bcd60e51b815260040161038c906110da565b600034116107aa5760405162461bcd60e51b815260206004820152600f60248201526e1b9bdb9948189a5908185b5bdd5b9d608a1b604482015260640161038c565b60005b600b548110156107e7576000818152600a60205260409020546001600160a01b031633146107e757806107df8161113f565b9150506107ad565b600b5481106108385760405162461bcd60e51b815260206004820152601b60248201527f6e6f7420656c696769626c6520666f7220746f702d75702d6269640000000000604482015260640161038c565b60085461084742610258611158565b111561085d5761085942610258611158565b6008555b6000818152600a602052604081206001015461087a903490611158565b9050815b801561091057600a600061089360018461110f565b81526020019081526020016000206001015482111561091057600a60006108bb60018461110f565b815260208082019290925260409081016000908120848252600a90935220815481546001600160a01b0319166001600160a01b039091161781556001918201549101558061090881611128565b91505061087e565b6000818152600a602090815260409182902080546001600160a01b031916339081178255600190910185905582519081529081018490527f5eca93a36b1f75a1b5b9d73b5f2a4138391857466742bf446e54d0180e8b95d2910160405180910390a150505061071360018055565b610986610de3565b6107133347610e3d565b610998610de3565b610713610edc565b6109a8610de3565b6107136000610f31565b6109ba610de3565b610713610f81565b6109ca610de3565b60095460ff1615610a075760405162461bcd60e51b81526020600482015260076024820152661cdd185c9d195960ca1b604482015260640161038c565b6009805460ff19166001179055610a1e8142611158565b6008556040517f1b55ba3aa851a46be3b365aee5b5c140edd620d578922f3e8466d2cbd96f954b90600090a150565b60028160038110610a5d57600080fd5b6002020180546001909101546001600160a01b03909116915082565b60606000600b5467ffffffffffffffff811115610a9857610a9861116b565b604051908082528060200260200182016040528015610add57816020015b6040805180820190915260008082526020820152815260200190600190039081610ab65790505b50905060005b600b54811015610b4e576000818152600a6020908152604091829020825180840190935280546001600160a01b0316835260010154908201528251839083908110610b3057610b30611181565b60200260200101819052508080610b469061113f565b915050610ae3565b50919050565b610b5c610d3d565b610b64610d96565b60095460ff16610b865760405162461bcd60e51b815260040161038c906110b5565b600854421015610bc45760405162461bcd60e51b81526020600482015260096024820152681b9bdd08195b99195960ba1b604482015260640161038c565b600954610100900460ff1615610bec5760405162461bcd60e51b815260040161038c906110da565b6009805461ff001916610100179055600354479060009061271090610c119084611197565b610c1b91906111ae565b9050610c39600260005b60020201546001600160a01b031682610e3d565b60055460009061271090610c4d9085611197565b610c5791906111ae565b9050610c6560026001610c25565b600654610c8f906001600160a01b031682610c80858761110f565b610c8a919061110f565b610e3d565b6040517f06e649079f276fcfc97b1e5cbfbb65937dac6a51ee164e3190e707e27ff345fa90600090a150505061071360018055565b610ccc610de3565b6001600160a01b038116610d315760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161038c565b610d3a81610f31565b50565b600260015403610d8f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161038c565b6002600155565b600054600160a01b900460ff16156107135760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161038c565b6000546001600160a01b031633146107135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161038c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610e8a576040519150601f19603f3d011682016040523d82523d6000602084013e610e8f565b606091505b5050905080610ed75760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b604482015260640161038c565b505050565b610ee4610fc4565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610f89610d96565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610f143390565b600054600160a01b900460ff166107135760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161038c565b60006020828403121561102657600080fd5b5035919050565b602080825282518282018190526000919060409081850190868401855b8281101561107857815180516001600160a01b0316855286015186850152928401929085019060010161104a565b5091979650505050505050565b60006020828403121561109757600080fd5b81356001600160a01b03811681146110ae57600080fd5b9392505050565b6020808252600b908201526a1b9bdd081cdd185c9d195960aa1b604082015260600190565b602080825260059082015264195b99195960da1b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611122576111226110f9565b92915050565b600081611137576111376110f9565b506000190190565b600060018201611151576111516110f9565b5060010190565b80820180821115611122576111226110f9565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8082028115828204841417611122576111226110f9565b6000826111cb57634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220bb9caf49e84777c710b9b1366cc1cbc29cf388c4104ec759cdb07b0df4dffd1c64736f6c634300081300330000000000000000000000008dc93807b66a0d47f165591848e8e49f99d6d5af00000000000000000000000000000000000000000000000000000000000003e80000000000000000000000003a875fb99e601eefe9b8c3927dff8e2a50988a9a00000000000000000000000000000000000000000000000000000000000003e800000000000000000000000034bd1d5d8881bba433033a3fda628c88130ba26b0000000000000000000000000000000000000000000000000000000000001f40

Deployed Bytecode

0x6080604052600436106101145760003560e01c80638456cb59116100a0578063b40a562711610064578063b40a5627146102cd578063cee26ed5146102e3578063dc6b862714610303578063efbe1c1c14610325578063f2fde38b1461033a57600080fd5b80638456cb59146101fb5780638da5cb5b14610210578063918f86741461023857806395805dad1461024e578063a2fb11751461026e57600080fd5b80633ccfd60b116100e75780633ccfd60b146101795780633f4ba83a1461018e5780635c975abb146101a3578063715018a6146101c25780637cc3ae8c146101d757600080fd5b806312fa6feb146101195780631998aeef1461014d5780631f2698ab146101575780632e9c728714610171575b600080fd5b34801561012557600080fd5b5060095461013890610100900460ff1681565b60405190151581526020015b60405180910390f35b61015561035a565b005b34801561016357600080fd5b506009546101389060ff1681565b610155610715565b34801561018557600080fd5b5061015561097e565b34801561019a57600080fd5b50610155610990565b3480156101af57600080fd5b50600054600160a01b900460ff16610138565b3480156101ce57600080fd5b506101556109a0565b3480156101e357600080fd5b506101ed60085481565b604051908152602001610144565b34801561020757600080fd5b506101556109b2565b34801561021c57600080fd5b506000546040516001600160a01b039091168152602001610144565b34801561024457600080fd5b506101ed61271081565b34801561025a57600080fd5b50610155610269366004611014565b6109c2565b34801561027a57600080fd5b506102ae610289366004611014565b600a60205260009081526040902080546001909101546001600160a01b039091169082565b604080516001600160a01b039093168352602083019190915201610144565b3480156102d957600080fd5b506101ed600b5481565b3480156102ef57600080fd5b506102ae6102fe366004611014565b610a4d565b34801561030f57600080fd5b50610318610a79565b604051610144919061102d565b34801561033157600080fd5b50610155610b54565b34801561034657600080fd5b50610155610355366004611085565b610cc4565b610362610d3d565b61036a610d96565b60095460ff166103955760405162461bcd60e51b815260040161038c906110b5565b60405180910390fd5b60085442106103b65760405162461bcd60e51b815260040161038c906110da565b600034116103f85760405162461bcd60e51b815260206004820152600f60248201526e1b9bdb9948189a5908185b5bdd5b9d608a1b604482015260640161038c565b600a600b5410156104d757600b545b801561049957600a600061041c60018461110f565b81526020019081526020016000206001015434111561049957600a600061044460018461110f565b815260208082019290925260409081016000908120848252600a90935220815481546001600160a01b0319166001600160a01b039091161781556001918201549101558061049181611128565b915050610407565b6000818152600a6020526040812080546001600160a01b0319163317815534600190910155600b8054916104cc8361113f565b9190505550506106d2565b6009600052600a6020527f825eb4cda6b8b44578c55770496c59e6dc3cf2235f690bcdaf51a61898ceb2855434116105515760405162461bcd60e51b815260206004820152601d60248201527f6e656564206d6f72652066756e6420746f20626520612077696e6e6572000000604482015260640161038c565b60085461056042610258611158565b11156105765761057242610258611158565b6008555b60096000908152600a6020527f825eb4cda6b8b44578c55770496c59e6dc3cf2235f690bcdaf51a61898ceb284547f825eb4cda6b8b44578c55770496c59e6dc3cf2235f690bcdaf51a61898ceb285546040516001600160a01b03909216918381818185875af1925050503d806000811461060d576040519150601f19603f3d011682016040523d82523d6000602084013e610612565b606091505b5050905060095b80156106ab57600a600061062e60018461110f565b8152602001908152602001600020600101543411156106ab57600a600061065660018461110f565b815260208082019290925260409081016000908120848252600a90935220815481546001600160a01b0319166001600160a01b03909116178155600191820154910155806106a381611128565b915050610619565b6000908152600a6020526040902080546001600160a01b0319163317815534600190910155505b604080513381523460208201527fe684a55f31b79eca403df938249029212a5925ec6be8012e099b45bc1019e5d2910160405180910390a161071360018055565b565b61071d610d3d565b610725610d96565b60095460ff166107475760405162461bcd60e51b815260040161038c906110b5565b60085442106107685760405162461bcd60e51b815260040161038c906110da565b600034116107aa5760405162461bcd60e51b815260206004820152600f60248201526e1b9bdb9948189a5908185b5bdd5b9d608a1b604482015260640161038c565b60005b600b548110156107e7576000818152600a60205260409020546001600160a01b031633146107e757806107df8161113f565b9150506107ad565b600b5481106108385760405162461bcd60e51b815260206004820152601b60248201527f6e6f7420656c696769626c6520666f7220746f702d75702d6269640000000000604482015260640161038c565b60085461084742610258611158565b111561085d5761085942610258611158565b6008555b6000818152600a602052604081206001015461087a903490611158565b9050815b801561091057600a600061089360018461110f565b81526020019081526020016000206001015482111561091057600a60006108bb60018461110f565b815260208082019290925260409081016000908120848252600a90935220815481546001600160a01b0319166001600160a01b039091161781556001918201549101558061090881611128565b91505061087e565b6000818152600a602090815260409182902080546001600160a01b031916339081178255600190910185905582519081529081018490527f5eca93a36b1f75a1b5b9d73b5f2a4138391857466742bf446e54d0180e8b95d2910160405180910390a150505061071360018055565b610986610de3565b6107133347610e3d565b610998610de3565b610713610edc565b6109a8610de3565b6107136000610f31565b6109ba610de3565b610713610f81565b6109ca610de3565b60095460ff1615610a075760405162461bcd60e51b81526020600482015260076024820152661cdd185c9d195960ca1b604482015260640161038c565b6009805460ff19166001179055610a1e8142611158565b6008556040517f1b55ba3aa851a46be3b365aee5b5c140edd620d578922f3e8466d2cbd96f954b90600090a150565b60028160038110610a5d57600080fd5b6002020180546001909101546001600160a01b03909116915082565b60606000600b5467ffffffffffffffff811115610a9857610a9861116b565b604051908082528060200260200182016040528015610add57816020015b6040805180820190915260008082526020820152815260200190600190039081610ab65790505b50905060005b600b54811015610b4e576000818152600a6020908152604091829020825180840190935280546001600160a01b0316835260010154908201528251839083908110610b3057610b30611181565b60200260200101819052508080610b469061113f565b915050610ae3565b50919050565b610b5c610d3d565b610b64610d96565b60095460ff16610b865760405162461bcd60e51b815260040161038c906110b5565b600854421015610bc45760405162461bcd60e51b81526020600482015260096024820152681b9bdd08195b99195960ba1b604482015260640161038c565b600954610100900460ff1615610bec5760405162461bcd60e51b815260040161038c906110da565b6009805461ff001916610100179055600354479060009061271090610c119084611197565b610c1b91906111ae565b9050610c39600260005b60020201546001600160a01b031682610e3d565b60055460009061271090610c4d9085611197565b610c5791906111ae565b9050610c6560026001610c25565b600654610c8f906001600160a01b031682610c80858761110f565b610c8a919061110f565b610e3d565b6040517f06e649079f276fcfc97b1e5cbfbb65937dac6a51ee164e3190e707e27ff345fa90600090a150505061071360018055565b610ccc610de3565b6001600160a01b038116610d315760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161038c565b610d3a81610f31565b50565b600260015403610d8f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161038c565b6002600155565b600054600160a01b900460ff16156107135760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161038c565b6000546001600160a01b031633146107135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161038c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610e8a576040519150601f19603f3d011682016040523d82523d6000602084013e610e8f565b606091505b5050905080610ed75760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b604482015260640161038c565b505050565b610ee4610fc4565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610f89610d96565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610f143390565b600054600160a01b900460ff166107135760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161038c565b60006020828403121561102657600080fd5b5035919050565b602080825282518282018190526000919060409081850190868401855b8281101561107857815180516001600160a01b0316855286015186850152928401929085019060010161104a565b5091979650505050505050565b60006020828403121561109757600080fd5b81356001600160a01b03811681146110ae57600080fd5b9392505050565b6020808252600b908201526a1b9bdd081cdd185c9d195960aa1b604082015260600190565b602080825260059082015264195b99195960da1b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611122576111226110f9565b92915050565b600081611137576111376110f9565b506000190190565b600060018201611151576111516110f9565b5060010190565b80820180821115611122576111226110f9565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b8082028115828204841417611122576111226110f9565b6000826111cb57634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220bb9caf49e84777c710b9b1366cc1cbc29cf388c4104ec759cdb07b0df4dffd1c64736f6c63430008130033

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

0000000000000000000000008dc93807b66a0d47f165591848e8e49f99d6d5af00000000000000000000000000000000000000000000000000000000000003e80000000000000000000000003a875fb99e601eefe9b8c3927dff8e2a50988a9a00000000000000000000000000000000000000000000000000000000000003e800000000000000000000000034bd1d5d8881bba433033a3fda628c88130ba26b0000000000000000000000000000000000000000000000000000000000001f40

-----Decoded View---------------
Arg [0] : infos (tuple[3]): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000008dc93807b66a0d47f165591848e8e49f99d6d5af
Arg [1] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [2] : 0000000000000000000000003a875fb99e601eefe9b8c3927dff8e2a50988a9a
Arg [3] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [4] : 00000000000000000000000034bd1d5d8881bba433033a3fda628c88130ba26b
Arg [5] : 0000000000000000000000000000000000000000000000000000000000001f40


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ 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.