ETH Price: $3,581.22 (-2.81%)

Contract

0x9920796a9fd75EfEc52cD1B74Af3BC601771344a
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Is Disabled200769612024-06-12 16:32:23172 days ago1718209943IN
0x9920796a...01771344a
0 ETH0.0006382321.36424169
Set Pull From Ad...200713282024-06-11 21:39:59173 days ago1718141999IN
0x9920796a...01771344a
0 ETH0.0004308914.28688284
Set Allowlist200709892024-06-11 20:31:47173 days ago1718137907IN
0x9920796a...01771344a
0 ETH0.0007147514.49039521

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PlanetfallPurchase

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 7 : PlanetfallPurchase.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import { IERC1155 } from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";

import { IPlanetfallPurchase } from "./interfaces/IPlanetfallPurchase.sol";
import { EchelonGateways } from "../prime-token/EchelonGateways.sol";

contract PlanetfallPurchase is IPlanetfallPurchase, Ownable, EchelonGateways {
    /// @notice Prime contract address
    address public prime = 0xb23d80f5FefcDDaa212212F028021B41DEd428CF;

    /// @notice Disabled state of the contract
    bool public isDisabled = true;

    /// @notice Price of each pack
    uint256 public collectorPrice = 0.1 ether;

    /// @notice Price of a player pack
    uint256 public playerPrice = 4.35 ether;

    /// @notice The tokenId of the planetfall pack redeemable
    uint256 public collectorTokenId = 100200001;
    uint256 public playerTokenId = 100200003;

    /// @notice Allowlist that bypasses the disabled variable
    mapping(address => bool) public allowlist;

    /// @notice Address of stock pile to pull packs from
    address public pullFromAddress = 0x425Aea4D6a1C0B325D8f5fEBA20d9951ADF8775B;

    /// @notice Parallel Planetfall collection smart contract address
    IERC1155 public parallelPlanetfall =
        IERC1155(0x6811f2f20c42f42656A3c8623aD5e9461b83f719);

    /**
     * @notice Function invoked by the prime token contract to handle totalCardCount increase and emit payment event
     * @param _from The address of the original msg.sender
     * @param _ethValue The amount of eth that was sent from the prime token contract
     * @param _primeValue The amount of prime that was sent from the prime token contract
     * @param _data Catch-all param to allow the caller to pass additional data to the handler, includes the amount of cards they want to purchase
     */
    function handleInvokeEchelon(
        address _from,
        address,
        address,
        uint256,
        uint256 _ethValue,
        uint256 _primeValue,
        bytes memory _data
    ) public payable {
        if (isDisabled && !allowlist[_from]) {
            revert ContractDisabled();
        }

        if (msg.sender != prime) {
            revert InvalidCaller();
        }

        uint256[] memory amounts = abi.decode(_data, (uint256[]));

        if (
            amounts[0] * collectorPrice != _ethValue ||
            amounts[1] * playerPrice != _primeValue
        ) {
            revert InvalidPayment(_primeValue);
        }

        if (amounts[0] > 0) {
            parallelPlanetfall.safeTransferFrom(
                pullFromAddress,
                _from,
                collectorTokenId,
                amounts[0],
                ""
            );
        }

        if (amounts[1] > 0) {
            parallelPlanetfall.safeTransferFrom(
                pullFromAddress,
                _from,
                playerTokenId,
                amounts[1],
                ""
            );
        }

        emit PacksPurchased(
            _from,
            amounts[1],
            amounts[0],
            _ethValue,
            _primeValue
        );
    }

    /** @notice Set the prime token address
     *  @param _prime prime token address
     */
    function setPrimeAddress(address _prime) external onlyOwner {
        prime = _prime;
        emit PrimeAddressSet(_prime);
    }

    /** @notice Set the price of packs
     *  @param _collectorPrice new collectorPrice to set
     */
    function setCollectorPrice(uint256 _collectorPrice) external onlyOwner {
        collectorPrice = _collectorPrice;
        emit CollectorPriceSet(_collectorPrice);
    }

    /** @notice Set player pack price
     *  @param _playerPrice new collectorPrice to set
     */
    function setPlayerPrice(uint256 _playerPrice) external onlyOwner {
        playerPrice = _playerPrice;
        emit PlayerPriceSet(_playerPrice);
    }

    /** @notice Set the isDisabled state
     *  @param _isDisabled new isDisabled state
     */
    function setIsDisabled(bool _isDisabled) external onlyOwner {
        isDisabled = _isDisabled;
        emit IsDisabledSet(_isDisabled);
    }

    /** @notice Set the address of Parallel Aux Items contract
     *  @param _parallelPlanetfallAddress new Parallel Aux Items address
     */
    function setParallelPlanetfall(
        address _parallelPlanetfallAddress
    ) external onlyOwner {
        parallelPlanetfall = IERC1155(_parallelPlanetfallAddress);
        emit ParallelPlanetfallSet(_parallelPlanetfallAddress);
    }

    /**
     * @notice Sets the allowlist
     * @dev Only callable by the owner
     * @param _allowlist The new allowlist
     * @param _val The new value
     */
    function setAllowlist(
        address[] calldata _allowlist,
        bool _val
    ) external onlyOwner {
        for (uint256 i = 0; i < _allowlist.length; i++) {
            allowlist[_allowlist[i]] = _val;
        }

        emit AllowlistSet(_allowlist, _val);
    }

    /** @notice Set the address that packs will be pulled from
     *  @param _pullFromAddress new pullFromAddress
     */
    function setPullFromAddress(address _pullFromAddress) external onlyOwner {
        pullFromAddress = _pullFromAddress;
        emit PullFromAddressSet(_pullFromAddress);
    }

    /**
     * @notice Setter for collectorTokenId
     * @dev Only callable by owner
     * @param _collectorTokenId New collectorTokenId
     */
    function setCollectorTokenId(uint256 _collectorTokenId) external onlyOwner {
        collectorTokenId = _collectorTokenId;
        emit CollectorTokenIdSet(_collectorTokenId);
    }

    /**
     * @notice Setter for playerTokenId
     * @dev Only callable by owner
     * @param _playerTokenId New playerTokenId
     */
    function setPlayerTokenId(uint256 _playerTokenId) external onlyOwner {
        playerTokenId = _playerTokenId;
        emit PlayerTokenIdSet(_playerTokenId);
    }

    /**
     * @notice Sweep all eth from contract
     * @dev Only callable by owner
     */
    function sweep() public onlyOwner {
        (bool sent, ) = msg.sender.call{ value: address(this).balance }("");
        require(sent, "Failed to send Ether");
    }

    /**
     * @notice Sweep all eth from contract to address
     * @dev Only callable by owner
     * @param _amount The amount of eth to sweep
     * @param _address The address to send eth to
     */
    function sweepToAddress(
        uint _amount,
        address payable _address
    ) public onlyOwner {
        (bool sent, ) = _address.call{ value: _amount }("");
        require(sent, "Failed to send Ether");
    }
}

File 2 of 7 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 7 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(
        address[] calldata accounts,
        uint256[] calldata ids
    ) external view returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 4 of 7 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 6 of 7 : IPlanetfallPurchase.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

interface IPlanetfallPurchase {
    error ContractDisabled();
    error InvalidCaller();
    error InvalidPayment(uint256 ethValue);
    error InvalidPlayerAmount(uint256 totalAmount);

    event PrimeAddressSet(address prime);
    event CollectorPriceSet(uint256 collectorPrice);
    event PlayerPriceSet(uint256 playerPrice);
    event PacksPurchased(
        address indexed paymentAddress,
        uint256 collectorAmount,
        uint256 playerAmount,
        uint256 ethAmount,
        uint256 primeAmount
    );
    event IsDisabledSet(bool isDisabled);
    event ParallelPlanetfallSet(address parallelPlanetfall);
    event AllowlistSet(address[] allowlist, bool val);
    event PullFromAddressSet(address pullFromAddress);
    event CollectorTokenIdSet(uint256 collectorTokenId);
    event PlayerTokenIdSet(uint256 playerTokenId);
}

File 7 of 7 : EchelonGateways.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

interface EchelonGateways {
    // Invoked by the Prime Token contract to handle arbitrary functionalities by the given gateway
    function handleInvokeEchelon(
        address from,
        address ethDestination,
        address primeDestination,
        uint256 id,
        uint256 ethValue,
        uint256 primeValue,
        bytes calldata data
    ) external payable;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"ContractDisabled","type":"error"},{"inputs":[],"name":"InvalidCaller","type":"error"},{"inputs":[{"internalType":"uint256","name":"ethValue","type":"uint256"}],"name":"InvalidPayment","type":"error"},{"inputs":[{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"InvalidPlayerAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"allowlist","type":"address[]"},{"indexed":false,"internalType":"bool","name":"val","type":"bool"}],"name":"AllowlistSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"collectorPrice","type":"uint256"}],"name":"CollectorPriceSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"collectorTokenId","type":"uint256"}],"name":"CollectorTokenIdSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isDisabled","type":"bool"}],"name":"IsDisabledSet","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":true,"internalType":"address","name":"paymentAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"collectorAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"playerAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"primeAmount","type":"uint256"}],"name":"PacksPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"parallelPlanetfall","type":"address"}],"name":"ParallelPlanetfallSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"playerPrice","type":"uint256"}],"name":"PlayerPriceSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"playerTokenId","type":"uint256"}],"name":"PlayerTokenIdSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prime","type":"address"}],"name":"PrimeAddressSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"pullFromAddress","type":"address"}],"name":"PullFromAddressSet","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowlist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collectorPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collectorTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_ethValue","type":"uint256"},{"internalType":"uint256","name":"_primeValue","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"handleInvokeEchelon","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"isDisabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"parallelPlanetfall","outputs":[{"internalType":"contract IERC1155","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"playerPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"playerTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"prime","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pullFromAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_allowlist","type":"address[]"},{"internalType":"bool","name":"_val","type":"bool"}],"name":"setAllowlist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collectorPrice","type":"uint256"}],"name":"setCollectorPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collectorTokenId","type":"uint256"}],"name":"setCollectorTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isDisabled","type":"bool"}],"name":"setIsDisabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_parallelPlanetfallAddress","type":"address"}],"name":"setParallelPlanetfall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_playerPrice","type":"uint256"}],"name":"setPlayerPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_playerTokenId","type":"uint256"}],"name":"setPlayerTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_prime","type":"address"}],"name":"setPrimeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pullFromAddress","type":"address"}],"name":"setPullFromAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sweep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address payable","name":"_address","type":"address"}],"name":"sweepToAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600180547401b23d80f5fefcddaa212212f028021b41ded428cf6001600160a81b031990911617905567016345785d8a0000600255673c5e4df3e4f300006003556305f8ee416004556305f8ee43600555600780546001600160a01b031990811673425aea4d6a1c0b325d8f5feba20d9951adf8775b1790915560088054909116736811f2f20c42f42656a3c8623ad5e9461b83f7191790553480156100a957600080fd5b506100b3336100b8565b610108565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61110f806101176000396000f3fe60806040526004361061014b5760003560e01c80639560a90e116100b6578063e6cf65d51161006f578063e6cf65d51461039b578063e79b46fb146103bb578063f01fe7c4146103d1578063f2fde38b146103f1578063f928114a14610411578063ff595b1a1461043157600080fd5b80639560a90e146102df5780639c910b26146102f5578063a7cd52cb1461030b578063a809302f1461033b578063b05b35271461035b578063c7ee005e1461037b57600080fd5b80636b3edf64116101085780636b3edf641461021b5780636c57f5a91461023b578063715018a61461026c5780638a9d76d2146102815780638da5cb5b146102a15780638e0e5731146102bf57600080fd5b806303c076c91461015057806335faa41614610172578063364109ba146101875780634ceb6dfe146101c45780634d8efa94146101d75780635f454a72146101fb575b600080fd5b34801561015c57600080fd5b5061017061016b366004610cd9565b610451565b005b34801561017e57600080fd5b50610170610495565b34801561019357600080fd5b506008546101a7906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101706101d2366004610d4e565b610534565b3480156101e357600080fd5b506101ed60045481565b6040519081526020016101bb565b34801561020757600080fd5b50610170610216366004610e38565b610836565b34801561022757600080fd5b50610170610236366004610cd9565b61088c565b34801561024757600080fd5b5060015461025c90600160a01b900460ff1681565b60405190151581526020016101bb565b34801561027857600080fd5b506101706108c9565b34801561028d57600080fd5b5061017061029c366004610e71565b6108dd565b3480156102ad57600080fd5b506000546001600160a01b03166101a7565b3480156102cb57600080fd5b506007546101a7906001600160a01b031681565b3480156102eb57600080fd5b506101ed60025481565b34801561030157600080fd5b506101ed60055481565b34801561031757600080fd5b5061025c610326366004610e38565b60066020526000908152604090205460ff1681565b34801561034757600080fd5b50610170610356366004610cd9565b610932565b34801561036757600080fd5b50610170610376366004610e38565b61096f565b34801561038757600080fd5b506001546101a7906001600160a01b031681565b3480156103a757600080fd5b506101706103b6366004610cd9565b6109c5565b3480156103c757600080fd5b506101ed60035481565b3480156103dd57600080fd5b506101706103ec366004610e8c565b610a02565b3480156103fd57600080fd5b5061017061040c366004610e38565b610abc565b34801561041d57600080fd5b5061017061042c366004610e38565b610b32565b34801561043d57600080fd5b5061017061044c366004610f10565b610b88565b610459610c2f565b60038190556040518181527f0728676ae567c8e47559ed3d1925b2e70d1c3e2c78d6534541d3d4fc01365781906020015b60405180910390a150565b61049d610c2f565b604051600090339047908381818185875af1925050503d80600081146104df576040519150601f19603f3d011682016040523d82523d6000602084013e6104e4565b606091505b50509050806105315760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b60448201526064015b60405180910390fd5b50565b600154600160a01b900460ff16801561056657506001600160a01b03871660009081526006602052604090205460ff16155b15610584576040516303b14e6560e51b815260040160405180910390fd5b6001546001600160a01b031633146105af576040516348f5c3ed60e01b815260040160405180910390fd5b6000818060200190518101906105c59190610f40565b905083600254826000815181106105de576105de610fe6565b60200260200101516105f09190611012565b1415806106245750826003548260018151811061060f5761060f610fe6565b60200260200101516106219190611012565b14155b1561064557604051630717049360e11b815260048101849052602401610528565b60008160008151811061065a5761065a610fe6565b602002602001015111156106f45760085460075460045483516001600160a01b039384169363f242432a9316918c91869060009061069a5761069a610fe6565b60200260200101516040518563ffffffff1660e01b81526004016106c1949392919061102f565b600060405180830381600087803b1580156106db57600080fd5b505af11580156106ef573d6000803e3d6000fd5b505050505b60008160018151811061070957610709610fe6565b602002602001015111156107a55760085460075460055483516001600160a01b039384169363f242432a9316918c918690600190811061074b5761074b610fe6565b60200260200101516040518563ffffffff1660e01b8152600401610772949392919061102f565b600060405180830381600087803b15801561078c57600080fd5b505af11580156107a0573d6000803e3d6000fd5b505050505b876001600160a01b03167f9362fbffd9f5bd8e137587a4a7896d7f1dc293c3e8f5d73814eb8c018205abf2826001815181106107e3576107e3610fe6565b6020026020010151836000815181106107fe576107fe610fe6565b602090810291909101810151604080519384529183015281018790526060810186905260800160405180910390a25050505050505050565b61083e610c2f565b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527fda1a8c4520187155a7b85aaed417fe127990b2366a669099ad07f367478d81679060200161048a565b610894610c2f565b60028190556040518181527f1042759b7c4b6773105c85269f974ae8a85e09433e115a48634aef08efbee3529060200161048a565b6108d1610c2f565b6108db6000610c89565b565b6108e5610c2f565b60018054821515600160a01b0260ff60a01b199091161790556040517f0f2d85ce3010f9e00316762c7efe4ab1dbe6792d10c007c31f0def3339b663979061048a90831515815260200190565b61093a610c2f565b60048190556040518181527fb054becc1ea3696160522f3b401b7eb4a827e1146f9237d2205b3c51c0e0e7499060200161048a565b610977610c2f565b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f2db480336776480fabcf0aa17cc0336998d2d105bacb8f49f72121db568c93e29060200161048a565b6109cd610c2f565b60058190556040518181527fa3097fef524051806e944ff4a4c86359f5b1dde0f768580fe047478721ec8e889060200161048a565b610a0a610c2f565b60005b82811015610a7b578160066000868685818110610a2c57610a2c610fe6565b9050602002016020810190610a419190610e38565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a7381611067565b915050610a0d565b507f053490e65d46b9bfab4b7ce016a3a90d2cd85c7487f58b3d82ea98569427e2ac838383604051610aaf93929190611080565b60405180910390a1505050565b610ac4610c2f565b6001600160a01b038116610b295760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610528565b61053181610c89565b610b3a610c2f565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f6f45bf27e8660e4f757981edcc8981852feb4cda73d7af2637c107f3f0130c969060200161048a565b610b90610c2f565b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114610bdd576040519150601f19603f3d011682016040523d82523d6000602084013e610be2565b606091505b5050905080610c2a5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b6044820152606401610528565b505050565b6000546001600160a01b031633146108db5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610528565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215610ceb57600080fd5b5035919050565b6001600160a01b038116811461053157600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610d4657610d46610d07565b604052919050565b600080600080600080600060e0888a031215610d6957600080fd5b8735610d7481610cf2565b9650602088810135610d8581610cf2565b96506040890135610d9581610cf2565b9550606089013594506080890135935060a0890135925060c089013567ffffffffffffffff80821115610dc757600080fd5b818b0191508b601f830112610ddb57600080fd5b813581811115610ded57610ded610d07565b610dff601f8201601f19168501610d1d565b91508082528c84828501011115610e1557600080fd5b808484018584013760008482840101525080935050505092959891949750929550565b600060208284031215610e4a57600080fd5b8135610e5581610cf2565b9392505050565b80358015158114610e6c57600080fd5b919050565b600060208284031215610e8357600080fd5b610e5582610e5c565b600080600060408486031215610ea157600080fd5b833567ffffffffffffffff80821115610eb957600080fd5b818601915086601f830112610ecd57600080fd5b813581811115610edc57600080fd5b8760208260051b8501011115610ef157600080fd5b602092830195509350610f079186019050610e5c565b90509250925092565b60008060408385031215610f2357600080fd5b823591506020830135610f3581610cf2565b809150509250929050565b60006020808385031215610f5357600080fd5b825167ffffffffffffffff80821115610f6b57600080fd5b818501915085601f830112610f7f57600080fd5b815181811115610f9157610f91610d07565b8060051b9150610fa2848301610d1d565b8181529183018401918481019088841115610fbc57600080fd5b938501935b83851015610fda57845182529385019390850190610fc1565b98975050505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761102957611029610ffc565b92915050565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b60006001820161107957611079610ffc565b5060010190565b6040808252810183905260008460608301825b868110156110c35782356110a681610cf2565b6001600160a01b0316825260209283019290910190600101611093565b508092505050821515602083015294935050505056fea2646970667358221220c3d6819a415a8df3fa69fb672d1093c8db2bf124548502106788b8f739a64e1264736f6c63430008110033

Deployed Bytecode

0x60806040526004361061014b5760003560e01c80639560a90e116100b6578063e6cf65d51161006f578063e6cf65d51461039b578063e79b46fb146103bb578063f01fe7c4146103d1578063f2fde38b146103f1578063f928114a14610411578063ff595b1a1461043157600080fd5b80639560a90e146102df5780639c910b26146102f5578063a7cd52cb1461030b578063a809302f1461033b578063b05b35271461035b578063c7ee005e1461037b57600080fd5b80636b3edf64116101085780636b3edf641461021b5780636c57f5a91461023b578063715018a61461026c5780638a9d76d2146102815780638da5cb5b146102a15780638e0e5731146102bf57600080fd5b806303c076c91461015057806335faa41614610172578063364109ba146101875780634ceb6dfe146101c45780634d8efa94146101d75780635f454a72146101fb575b600080fd5b34801561015c57600080fd5b5061017061016b366004610cd9565b610451565b005b34801561017e57600080fd5b50610170610495565b34801561019357600080fd5b506008546101a7906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101706101d2366004610d4e565b610534565b3480156101e357600080fd5b506101ed60045481565b6040519081526020016101bb565b34801561020757600080fd5b50610170610216366004610e38565b610836565b34801561022757600080fd5b50610170610236366004610cd9565b61088c565b34801561024757600080fd5b5060015461025c90600160a01b900460ff1681565b60405190151581526020016101bb565b34801561027857600080fd5b506101706108c9565b34801561028d57600080fd5b5061017061029c366004610e71565b6108dd565b3480156102ad57600080fd5b506000546001600160a01b03166101a7565b3480156102cb57600080fd5b506007546101a7906001600160a01b031681565b3480156102eb57600080fd5b506101ed60025481565b34801561030157600080fd5b506101ed60055481565b34801561031757600080fd5b5061025c610326366004610e38565b60066020526000908152604090205460ff1681565b34801561034757600080fd5b50610170610356366004610cd9565b610932565b34801561036757600080fd5b50610170610376366004610e38565b61096f565b34801561038757600080fd5b506001546101a7906001600160a01b031681565b3480156103a757600080fd5b506101706103b6366004610cd9565b6109c5565b3480156103c757600080fd5b506101ed60035481565b3480156103dd57600080fd5b506101706103ec366004610e8c565b610a02565b3480156103fd57600080fd5b5061017061040c366004610e38565b610abc565b34801561041d57600080fd5b5061017061042c366004610e38565b610b32565b34801561043d57600080fd5b5061017061044c366004610f10565b610b88565b610459610c2f565b60038190556040518181527f0728676ae567c8e47559ed3d1925b2e70d1c3e2c78d6534541d3d4fc01365781906020015b60405180910390a150565b61049d610c2f565b604051600090339047908381818185875af1925050503d80600081146104df576040519150601f19603f3d011682016040523d82523d6000602084013e6104e4565b606091505b50509050806105315760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b60448201526064015b60405180910390fd5b50565b600154600160a01b900460ff16801561056657506001600160a01b03871660009081526006602052604090205460ff16155b15610584576040516303b14e6560e51b815260040160405180910390fd5b6001546001600160a01b031633146105af576040516348f5c3ed60e01b815260040160405180910390fd5b6000818060200190518101906105c59190610f40565b905083600254826000815181106105de576105de610fe6565b60200260200101516105f09190611012565b1415806106245750826003548260018151811061060f5761060f610fe6565b60200260200101516106219190611012565b14155b1561064557604051630717049360e11b815260048101849052602401610528565b60008160008151811061065a5761065a610fe6565b602002602001015111156106f45760085460075460045483516001600160a01b039384169363f242432a9316918c91869060009061069a5761069a610fe6565b60200260200101516040518563ffffffff1660e01b81526004016106c1949392919061102f565b600060405180830381600087803b1580156106db57600080fd5b505af11580156106ef573d6000803e3d6000fd5b505050505b60008160018151811061070957610709610fe6565b602002602001015111156107a55760085460075460055483516001600160a01b039384169363f242432a9316918c918690600190811061074b5761074b610fe6565b60200260200101516040518563ffffffff1660e01b8152600401610772949392919061102f565b600060405180830381600087803b15801561078c57600080fd5b505af11580156107a0573d6000803e3d6000fd5b505050505b876001600160a01b03167f9362fbffd9f5bd8e137587a4a7896d7f1dc293c3e8f5d73814eb8c018205abf2826001815181106107e3576107e3610fe6565b6020026020010151836000815181106107fe576107fe610fe6565b602090810291909101810151604080519384529183015281018790526060810186905260800160405180910390a25050505050505050565b61083e610c2f565b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527fda1a8c4520187155a7b85aaed417fe127990b2366a669099ad07f367478d81679060200161048a565b610894610c2f565b60028190556040518181527f1042759b7c4b6773105c85269f974ae8a85e09433e115a48634aef08efbee3529060200161048a565b6108d1610c2f565b6108db6000610c89565b565b6108e5610c2f565b60018054821515600160a01b0260ff60a01b199091161790556040517f0f2d85ce3010f9e00316762c7efe4ab1dbe6792d10c007c31f0def3339b663979061048a90831515815260200190565b61093a610c2f565b60048190556040518181527fb054becc1ea3696160522f3b401b7eb4a827e1146f9237d2205b3c51c0e0e7499060200161048a565b610977610c2f565b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f2db480336776480fabcf0aa17cc0336998d2d105bacb8f49f72121db568c93e29060200161048a565b6109cd610c2f565b60058190556040518181527fa3097fef524051806e944ff4a4c86359f5b1dde0f768580fe047478721ec8e889060200161048a565b610a0a610c2f565b60005b82811015610a7b578160066000868685818110610a2c57610a2c610fe6565b9050602002016020810190610a419190610e38565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a7381611067565b915050610a0d565b507f053490e65d46b9bfab4b7ce016a3a90d2cd85c7487f58b3d82ea98569427e2ac838383604051610aaf93929190611080565b60405180910390a1505050565b610ac4610c2f565b6001600160a01b038116610b295760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610528565b61053181610c89565b610b3a610c2f565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f6f45bf27e8660e4f757981edcc8981852feb4cda73d7af2637c107f3f0130c969060200161048a565b610b90610c2f565b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114610bdd576040519150601f19603f3d011682016040523d82523d6000602084013e610be2565b606091505b5050905080610c2a5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b6044820152606401610528565b505050565b6000546001600160a01b031633146108db5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610528565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215610ceb57600080fd5b5035919050565b6001600160a01b038116811461053157600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610d4657610d46610d07565b604052919050565b600080600080600080600060e0888a031215610d6957600080fd5b8735610d7481610cf2565b9650602088810135610d8581610cf2565b96506040890135610d9581610cf2565b9550606089013594506080890135935060a0890135925060c089013567ffffffffffffffff80821115610dc757600080fd5b818b0191508b601f830112610ddb57600080fd5b813581811115610ded57610ded610d07565b610dff601f8201601f19168501610d1d565b91508082528c84828501011115610e1557600080fd5b808484018584013760008482840101525080935050505092959891949750929550565b600060208284031215610e4a57600080fd5b8135610e5581610cf2565b9392505050565b80358015158114610e6c57600080fd5b919050565b600060208284031215610e8357600080fd5b610e5582610e5c565b600080600060408486031215610ea157600080fd5b833567ffffffffffffffff80821115610eb957600080fd5b818601915086601f830112610ecd57600080fd5b813581811115610edc57600080fd5b8760208260051b8501011115610ef157600080fd5b602092830195509350610f079186019050610e5c565b90509250925092565b60008060408385031215610f2357600080fd5b823591506020830135610f3581610cf2565b809150509250929050565b60006020808385031215610f5357600080fd5b825167ffffffffffffffff80821115610f6b57600080fd5b818501915085601f830112610f7f57600080fd5b815181811115610f9157610f91610d07565b8060051b9150610fa2848301610d1d565b8181529183018401918481019088841115610fbc57600080fd5b938501935b83851015610fda57845182529385019390850190610fc1565b98975050505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761102957611029610ffc565b92915050565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b60006001820161107957611079610ffc565b5060010190565b6040808252810183905260008460608301825b868110156110c35782356110a681610cf2565b6001600160a01b0316825260209283019290910190600101611093565b508092505050821515602083015294935050505056fea2646970667358221220c3d6819a415a8df3fa69fb672d1093c8db2bf124548502106788b8f739a64e1264736f6c63430008110033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.