Contract 0x81360eDEF3b9F3639fA60639729881Aba9Fe29B1

Contract Overview

Balance:
0 Ether
Txn Hash
Method
Block
From
To
Value
0x27fa1799342da74691e5be5a31754d54e47b5e5eb378662d02b63ad2b48b236f0x6080604099518132022-01-07 21:11:04178 days 2 hrs ago0x1e3918dd44f427f056be6c8e132cf1b5f42de59e IN  Create: GenesisSupply0 Ether0.00513815 2.5
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GenesisSupply

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 4 : GenesisSupply.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/State.sol";

contract GenesisSupply is Ownable, State {
    enum TokenType {
        NONE,
        GOD,
        DEMI_GOD,
        ELEMENTAL
    }
    enum TokenSubtype {
        NONE,
        CREATIVE,
        DESTRUCTIVE,
        AIR,
        EARTH,
        ELECTRICITY,
        FIRE,
        MAGMA,
        METAL,
        WATER
    }

    struct TokenTraits {
        TokenType tokenType;
        TokenSubtype tokenSubtype;
    }

    /**
     * Supply
     */
    uint256 public constant MAX_SUPPLY = 1077;
    uint256 public constant GODS_MAX_SUPPLY = 51;
    uint256 public constant DEMI_GODS_MAX_SUPPLY = 424;
    uint256 public constant DEMI_GODS_SUBTYPE_MAX_SUPPLY = 212;
    uint256 public constant ELEMENTALS_MAX_SUPPLY = 602;
    uint256 public constant ELEMENTALS_MAJOR_SUBTYPE_MAX_SUPPLY = 110;
    uint256 public constant ELEMENTALS_MINOR_SUBTYPE_MAX_SUPPLY = 54;
    uint256 public constant RESERVED_GODS_MAX_SUPPLY = 6;

    /**
     * Counters
     */
    uint256 private tokenCounter;
    uint256 private godsCounter;
    uint256 private creativeDemiGodsCounter;
    uint256 private destructiveDemiGodsCounter;
    uint256 private earthElementalsCounter;
    uint256 private waterElementalsCounter;
    uint256 private fireElementalsCounter;
    uint256 private airElementalsCounter;
    uint256 private electricityElementalsCounter;
    uint256 private metalElementalsCounter;
    uint256 private magmaElementalsCounter;
    uint256 private reservedGodsTransfered;

    /**
     * Minting properties
     */
    mapping(uint256 => TokenTraits) private tokenIdToTraits;

    /**
     * Utils
     */
    bool public isRevealed;
    address private genesisAddress;

    constructor() {
        isRevealed = false;
        // reserve 6 gods for owner
        for (uint256 i = 0; i < RESERVED_GODS_MAX_SUPPLY; i++) {
            godsCounter += 1;
            tokenCounter += 1;
        }
    }

    /**
     * Setters
     */
    function setIsRevealed(bool _isRevealed) external isGenesis {
        require(mintState == MintState.Maintenance, "Mint not maintenance");
        isRevealed = _isRevealed;
    }

    function setGenesis(address _genesisAddress) external onlyOwner closed {
        genesisAddress = _genesisAddress;
    }

    /**
     * Getters
     */
    /**
     * Returns the current index to mint
     * @return index current index of the collection
     */
    function currentIndex() public view returns (uint256 index) {
        return tokenCounter;
    }

    /**
     * Returns the number of reserved gods left with the supply
     * @return index current index of reserved gods
     * @return supply max supply of reserved gods
     */
    function reservedGodsCurrentIndexAndSupply()
        public
        view
        isGenesis
        returns (uint256 index, uint256 supply)
    {
        return (reservedGodsTransfered, RESERVED_GODS_MAX_SUPPLY);
    }

    /**
     * Minting functions
     */

    /**
     * Mint a token
     * @param count the number of item to mint
     * @return startIndex index of first mint
     * @return endIndex index of last mint
     */
    function mint(uint256 count)
        public
        isGenesis
        returns (uint256 startIndex, uint256 endIndex)
    {
        require(
            mintState == MintState.Closed || mintState == MintState.Active,
            "Mint not active or closed"
        );
        require(tokenCounter + count < MAX_SUPPLY + 1, "Not enough supply");
        uint256 firstTokenId = tokenCounter;
        for (uint256 i = 0; i < count; i++) {
            // On closed, we airdrop, we generate randomness with a moving nonce
            if (mintState == MintState.Closed) {
                tokenIdToTraits[firstTokenId + i] = generateRandomTraits(
                    generateRandomNumber(tokenCounter)
                );
            } else {
                // During WL we use a fix nonce
                tokenIdToTraits[firstTokenId + i] = generateRandomTraits(
                    generateRandomNumber(0)
                );
            }
            tokenCounter += 1;
        }
        return (firstTokenId, firstTokenId + count);
    }

    /**
     * Mint reserved gods
     * This function needs to be ran BEFORE the mint is opened to avoid
     * @param count number of gods to transfer
     */
    function mintReservedGods(uint256 count) public isGenesis closed {
        uint256 nextIndex = reservedGodsTransfered;
        // Here we don't need to increment counter and god supply counter because we already do in the constructor
        // to not initialize the counters at 0
        for (uint256 i = nextIndex; i < count + nextIndex; i++) {
            tokenIdToTraits[i] = TokenTraits(TokenType.GOD, TokenSubtype.NONE);
            reservedGodsTransfered += 1;
        }
    }

    /**
     * Metadata functions
     */

    /**
     * @dev Generates a uint256 random number from seed, nonce and transaction block
     * @param nonce The nonce to be used for the randomization
     * @return randomNumber random number generated
     */
    function generateRandomNumber(uint256 nonce)
        private
        view
        returns (uint256 randomNumber)
    {
        return
            uint256(
                keccak256(abi.encodePacked(msg.sender, block.timestamp, nonce))
            );
    }

    /**
     * Generate and returns the token traits (type & subtype) given a random number.
     * Function will adjust supply based on the type and subtypes generated
     * @param randomNumber random number provided
     * @return tokenTraits randomly picked token traits
     */
    function generateRandomTraits(uint256 randomNumber)
        private
        returns (TokenTraits memory tokenTraits)
    {
        // GODS
        uint256 godsLeft = GODS_MAX_SUPPLY - godsCounter;

        // DEMI-GODS
        uint256 creativeDemiGodsLeft = DEMI_GODS_SUBTYPE_MAX_SUPPLY -
            creativeDemiGodsCounter;
        uint256 destructiveDemiGodsLeft = DEMI_GODS_SUBTYPE_MAX_SUPPLY -
            destructiveDemiGodsCounter;
        uint256 demiGodsLeft = creativeDemiGodsLeft + destructiveDemiGodsLeft;

        // ELEMENTALS
        uint256 elementalsLeft = ELEMENTALS_MAX_SUPPLY -
            earthElementalsCounter -
            waterElementalsCounter -
            fireElementalsCounter -
            airElementalsCounter -
            electricityElementalsCounter -
            metalElementalsCounter -
            magmaElementalsCounter;

        uint256 totalCountLeft = godsLeft + demiGodsLeft + elementalsLeft;

        // We add 1 to modulos because we use the counts to define the type. If a count is at 0, we ignore it.
        // That's why we don't ever want the modulo to return 0.
        uint256 randomTypeIndex = (randomNumber % totalCountLeft) + 1;
        if (randomTypeIndex <= godsLeft) {
            godsCounter += 1;
            return TokenTraits(TokenType.GOD, TokenSubtype.NONE);
        } else if (randomTypeIndex <= godsLeft + demiGodsLeft) {
            uint256 randomSubtypeIndex = (randomNumber % demiGodsLeft) + 1;
            if (randomSubtypeIndex <= creativeDemiGodsLeft) {
                creativeDemiGodsCounter += 1;
                return TokenTraits(TokenType.DEMI_GOD, TokenSubtype.CREATIVE);
            } else {
                destructiveDemiGodsCounter += 1;
                return
                    TokenTraits(TokenType.DEMI_GOD, TokenSubtype.DESTRUCTIVE);
            }
        } else {
            return generateElementalSubtype(randomNumber);
        }
    }

    function generateElementalSubtype(uint256 randomNumber)
        private
        returns (TokenTraits memory traits)
    {
        // ELEMENTALS
        uint256 earthElementalsLeft = ELEMENTALS_MAJOR_SUBTYPE_MAX_SUPPLY -
            earthElementalsCounter;
        uint256 waterElementalsLeft = ELEMENTALS_MAJOR_SUBTYPE_MAX_SUPPLY -
            waterElementalsCounter;
        uint256 fireElementalsLeft = ELEMENTALS_MAJOR_SUBTYPE_MAX_SUPPLY -
            fireElementalsCounter;
        uint256 airElementalsLeft = ELEMENTALS_MAJOR_SUBTYPE_MAX_SUPPLY -
            airElementalsCounter;
        uint256 electricityElementalsLeft = ELEMENTALS_MINOR_SUBTYPE_MAX_SUPPLY -
                electricityElementalsCounter;
        uint256 metalElementalsLeft = ELEMENTALS_MINOR_SUBTYPE_MAX_SUPPLY -
            metalElementalsCounter;
        uint256 magmaElementalsLeft = ELEMENTALS_MINOR_SUBTYPE_MAX_SUPPLY -
            magmaElementalsCounter;
        uint256 elementalsLeft = earthElementalsLeft +
            waterElementalsLeft +
            fireElementalsLeft +
            airElementalsLeft +
            electricityElementalsLeft +
            metalElementalsLeft +
            magmaElementalsLeft;

        uint256 randomSubtypeIndex = (randomNumber % elementalsLeft) + 1;
        if (randomSubtypeIndex <= earthElementalsLeft) {
            earthElementalsCounter += 1;
            return TokenTraits(TokenType.ELEMENTAL, TokenSubtype.EARTH);
        } else if (
            randomSubtypeIndex <= earthElementalsLeft + waterElementalsLeft
        ) {
            waterElementalsCounter += 1;
            return TokenTraits(TokenType.ELEMENTAL, TokenSubtype.WATER);
        } else if (
            randomSubtypeIndex <=
            earthElementalsLeft + waterElementalsLeft + fireElementalsLeft
        ) {
            fireElementalsCounter += 1;
            return TokenTraits(TokenType.ELEMENTAL, TokenSubtype.FIRE);
        } else if (
            randomSubtypeIndex <=
            earthElementalsLeft +
                waterElementalsLeft +
                fireElementalsLeft +
                airElementalsLeft
        ) {
            airElementalsCounter += 1;
            return TokenTraits(TokenType.ELEMENTAL, TokenSubtype.AIR);
        } else if (
            randomSubtypeIndex <=
            earthElementalsLeft +
                waterElementalsLeft +
                fireElementalsLeft +
                airElementalsLeft +
                electricityElementalsLeft
        ) {
            electricityElementalsCounter += 1;
            return TokenTraits(TokenType.ELEMENTAL, TokenSubtype.ELECTRICITY);
        } else if (
            randomSubtypeIndex <=
            earthElementalsLeft +
                waterElementalsLeft +
                fireElementalsLeft +
                airElementalsLeft +
                electricityElementalsLeft +
                metalElementalsLeft
        ) {
            metalElementalsCounter += 1;
            return TokenTraits(TokenType.ELEMENTAL, TokenSubtype.METAL);
        } else {
            magmaElementalsCounter += 1;
            return TokenTraits(TokenType.ELEMENTAL, TokenSubtype.MAGMA);
        }
    }

    /**
     * Returns the metadata of a token
     * @param tokenId id of the token
     * @return traits metadata of the token
     */
    function getMetadataForTokenId(uint256 tokenId)
        public
        view
        validTokenId(tokenId)
        returns (TokenTraits memory traits)
    {
        require(isRevealed, "Not revealed yet");
        return tokenIdToTraits[tokenId];
    }

    /**
     *  Modifiers
     */

    /**
     * Modifier that checks for a valid tokenId
     * @param tokenId token id
     */
    modifier validTokenId(uint256 tokenId) {
        require(tokenId < MAX_SUPPLY, "Invalid tokenId");
        require(tokenId >= 0, "Invalid tokenId");
        _;
    }

    /**
     * Modifier that checks sender is Genesis
     */
    modifier isGenesis() {
        require(msg.sender == genesisAddress, "Not Genesis");
        _;
    }
}

File 2 of 4 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        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 4 : State.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

abstract contract State {
    enum MintState {
        Closed,
        Active,
        Maintenance,
        Finalized
    }
    MintState public mintState = MintState.Closed;

    function _setMintState(MintState _mintState) external {
        require(mintState != MintState.Finalized, "Mint finalized");
        mintState = _mintState;
    }

    /**
     * Modifier that checks mint state to be closed
     */
    modifier closed() {
        require(mintState == MintState.Closed, "Mint not closed");
        _;
    }

    /**
     * Modifier that checks mint state to be active
     */
    modifier active() {
        require(mintState == MintState.Active, "Mint not active");
        _;
    }
}

File 4 of 4 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"DEMI_GODS_MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEMI_GODS_SUBTYPE_MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ELEMENTALS_MAJOR_SUBTYPE_MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ELEMENTALS_MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ELEMENTALS_MINOR_SUBTYPE_MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GODS_MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RESERVED_GODS_MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum State.MintState","name":"_mintState","type":"uint8"}],"name":"_setMintState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentIndex","outputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMetadataForTokenId","outputs":[{"components":[{"internalType":"enum GenesisSupply.TokenType","name":"tokenType","type":"uint8"},{"internalType":"enum GenesisSupply.TokenSubtype","name":"tokenSubtype","type":"uint8"}],"internalType":"struct GenesisSupply.TokenTraits","name":"traits","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRevealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"name":"mint","outputs":[{"internalType":"uint256","name":"startIndex","type":"uint256"},{"internalType":"uint256","name":"endIndex","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"name":"mintReservedGods","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintState","outputs":[{"internalType":"enum State.MintState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reservedGodsCurrentIndexAndSupply","outputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"supply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_genesisAddress","type":"address"}],"name":"setGenesis","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isRevealed","type":"bool"}],"name":"setIsRevealed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405260008060146101000a81548160ff021916908360038111156200002c576200002b6200028b565b5b02179055503480156200003e57600080fd5b506200005f62000053620000db60201b60201c565b620000e360201b60201c565b6000600e60006101000a81548160ff02191690831515021790555060005b6006811015620000d4576001600260008282546200009c9190620001a7565b925050819055506001806000828254620000b79190620001a7565b925050819055508080620000cb906200020e565b9150506200007d565b50620002ba565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000620001b48262000204565b9150620001c18362000204565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115620001f957620001f86200025c565b5b828201905092915050565b6000819050919050565b60006200021b8262000204565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156200025157620002506200025c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6122d180620002ca6000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80638a5f36f0116100b8578063c070e4a01161007c578063c070e4a01461030b578063c426ceb914610329578063ea50e78c14610347578063eb14b35314610363578063f2fde38b1461037f578063f3df656d1461039b57610137565b80638a5f36f0146102505780638da5cb5b14610280578063a0712d681461029e578063aaeb0747146102cf578063c051e38a146102ed57610137565b80635f3088ca116100ff5780635f3088ca146101ce578063715018a6146101ec57806376d7079a146101f65780637c7cd71314610214578063842e05ea1461023257610137565b806326987b601461013c57806332cb6b0c1461015a57806349a5980a146101785780634ce847471461019457806354214f69146101b0575b600080fd5b6101446103ba565b6040516101519190611d6d565b60405180910390f35b6101626103c4565b60405161016f9190611d6d565b60405180910390f35b610192600480360381019061018d91906118e8565b6103ca565b005b6101ae60048036038101906101a99190611915565b6104ed565b005b6101b8610590565b6040516101c59190611bdc565b60405180910390f35b6101d66105a3565b6040516101e39190611d6d565b60405180910390f35b6101f46105a8565b005b6101fe610630565b60405161020b9190611d6d565b60405180910390f35b61021c610635565b6040516102299190611d6d565b60405180910390f35b61023a61063b565b6040516102479190611d6d565b60405180910390f35b61026a60048036038101906102659190611942565b610640565b6040516102779190611d52565b60405180910390f35b6102886107bc565b6040516102959190611bc1565b60405180910390f35b6102b860048036038101906102b39190611942565b6107e5565b6040516102c6929190611d88565b60405180910390f35b6102d7610b48565b6040516102e49190611d6d565b60405180910390f35b6102f5610b4d565b6040516103029190611bf7565b60405180910390f35b610313610b60565b6040516103209190611d6d565b60405180910390f35b610331610b66565b60405161033e9190611d6d565b60405180910390f35b610361600480360381019061035c9190611942565b610b6b565b005b61037d600480360381019061037891906118bb565b610d74565b005b610399600480360381019061039491906118bb565b610eaa565b005b6103a3610fa2565b6040516103b1929190611d88565b60405180910390f35b6000600154905090565b61043581565b600e60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461045a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161045190611d12565b60405180910390fd5b6002600381111561046e5761046d612009565b5b600060149054906101000a900460ff1660038111156104905761048f612009565b5b146104d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c790611c72565b60405180910390fd5b80600e60006101000a81548160ff02191690831515021790555050565b600380811115610500576104ff612009565b5b600060149054906101000a900460ff16600381111561052257610521612009565b5b1415610563576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055a90611c12565b60405180910390fd5b80600060146101000a81548160ff0219169083600381111561058857610587612009565b5b021790555050565b600e60009054906101000a900460ff1681565b600681565b6105b0611042565b73ffffffffffffffffffffffffffffffffffffffff166105ce6107bc565b73ffffffffffffffffffffffffffffffffffffffff1614610624576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161061b90611d32565b60405180910390fd5b61062e600061104a565b565b60d481565b61025a81565b603681565b610648611829565b81610435811061068d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068490611cb2565b60405180910390fd5b60008110156106d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c890611cb2565b60405180910390fd5b600e60009054906101000a900460ff16610720576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161071790611cd2565b60405180910390fd5b600d60008481526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16600381111561076357610762612009565b5b600381111561077557610774612009565b5b81526020016000820160019054906101000a900460ff16600981111561079e5761079d612009565b5b60098111156107b0576107af612009565b5b81525050915050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600e60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610878576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086f90611d12565b60405180910390fd5b6000600381111561088c5761088b612009565b5b600060149054906101000a900460ff1660038111156108ae576108ad612009565b5b14806108ed5750600160038111156108c9576108c8612009565b5b600060149054906101000a900460ff1660038111156108eb576108ea612009565b5b145b61092c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092390611c92565b60405180910390fd5b600161043561093b9190611dc2565b836001546109499190611dc2565b10610989576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098090611c32565b60405180910390fd5b6000600154905060005b84811015610b3057600060038111156109af576109ae612009565b5b600060149054906101000a900460ff1660038111156109d1576109d0612009565b5b1415610a70576109ea6109e560015461110e565b611145565b600d600083856109fa9190611dc2565b815260200190815260200160002060008201518160000160006101000a81548160ff02191690836003811115610a3357610a32612009565b5b021790555060208201518160000160016101000a81548160ff02191690836009811115610a6357610a62612009565b5b0217905550905050610b04565b610a82610a7d600061110e565b611145565b600d60008385610a929190611dc2565b815260200190815260200160002060008201518160000160006101000a81548160ff02191690836003811115610acb57610aca612009565b5b021790555060208201518160000160016101000a81548160ff02191690836009811115610afb57610afa612009565b5b02179055509050505b6001806000828254610b169190611dc2565b925050819055508080610b2890611f03565b915050610993565b50808482610b3e9190611dc2565b9250925050915091565b606e81565b600060149054906101000a900460ff1681565b6101a881565b603381565b600e60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bfb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf290611d12565b60405180910390fd5b60006003811115610c0f57610c0e612009565b5b600060149054906101000a900460ff166003811115610c3157610c30612009565b5b14610c71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6890611cf2565b60405180910390fd5b6000600c54905060008190505b8183610c8a9190611dc2565b811015610d6f57604051806040016040528060016003811115610cb057610caf612009565b5b815260200160006009811115610cc957610cc8612009565b5b815250600d600083815260200190815260200160002060008201518160000160006101000a81548160ff02191690836003811115610d0a57610d09612009565b5b021790555060208201518160000160016101000a81548160ff02191690836009811115610d3a57610d39612009565b5b02179055509050506001600c6000828254610d559190611dc2565b925050819055508080610d6790611f03565b915050610c7e565b505050565b610d7c611042565b73ffffffffffffffffffffffffffffffffffffffff16610d9a6107bc565b73ffffffffffffffffffffffffffffffffffffffff1614610df0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de790611d32565b60405180910390fd5b60006003811115610e0457610e03612009565b5b600060149054906101000a900460ff166003811115610e2657610e25612009565b5b14610e66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5d90611cf2565b60405180910390fd5b80600e60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610eb2611042565b73ffffffffffffffffffffffffffffffffffffffff16610ed06107bc565b73ffffffffffffffffffffffffffffffffffffffff1614610f26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1d90611d32565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610f96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8d90611c52565b60405180910390fd5b610f9f8161104a565b50565b600080600e60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611035576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102c90611d12565b60405180910390fd5b600c546006915091509091565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033428360405160200161112593929190611b84565b6040516020818303038152906040528051906020012060001c9050919050565b61114d611829565b6000600254603361115e9190611e18565b9050600060035460d46111719190611e18565b9050600060045460d46111849190611e18565b9050600081836111949190611dc2565b90506000600b54600a5460095460085460075460065460055461025a6111ba9190611e18565b6111c49190611e18565b6111ce9190611e18565b6111d89190611e18565b6111e29190611e18565b6111ec9190611e18565b6111f69190611e18565b905060008183876112079190611dc2565b6112119190611dc2565b905060006001828a6112239190611f7a565b61122d9190611dc2565b9050868111611299576001600260008282546112499190611dc2565b9250508190555060405180604001604052806001600381111561126f5761126e612009565b5b81526020016000600981111561128857611287612009565b5b8152509750505050505050506113a9565b83876112a59190611dc2565b81116113965760006001858b6112bb9190611f7a565b6112c59190611dc2565b9050868111611332576001600360008282546112e19190611dc2565b9250508190555060405180604001604052806002600381111561130757611306612009565b5b8152602001600160098111156113205761131f612009565b5b815250985050505050505050506113a9565b6001600460008282546113459190611dc2565b9250508190555060405180604001604052806002600381111561136b5761136a612009565b5b81526020016002600981111561138457611383612009565b5b815250985050505050505050506113a9565b61139f896113ae565b9750505050505050505b919050565b6113b6611829565b6000600554606e6113c79190611e18565b90506000600654606e6113da9190611e18565b90506000600754606e6113ed9190611e18565b90506000600854606e6114009190611e18565b9050600060095460366114139190611e18565b90506000600a5460366114269190611e18565b90506000600b5460366114399190611e18565b9050600081838587898b8d61144e9190611dc2565b6114589190611dc2565b6114629190611dc2565b61146c9190611dc2565b6114769190611dc2565b6114809190611dc2565b905060006001828c6114929190611f7a565b61149c9190611dc2565b9050888111611509576001600560008282546114b89190611dc2565b9250508190555060405180604001604052806003808111156114dd576114dc612009565b5b8152602001600460098111156114f6576114f5612009565b5b8152509950505050505050505050611824565b87896115159190611dc2565b811161157e5760016006600082825461152e9190611dc2565b92505081905550604051806040016040528060038081111561155357611552612009565b5b815260200160098081111561156b5761156a612009565b5b8152509950505050505050505050611824565b86888a61158b9190611dc2565b6115959190611dc2565b81116115ff576001600760008282546115ae9190611dc2565b9250508190555060405180604001604052806003808111156115d3576115d2612009565b5b8152602001600660098111156115ec576115eb612009565b5b8152509950505050505050505050611824565b8587898b61160d9190611dc2565b6116179190611dc2565b6116219190611dc2565b811161168b5760016008600082825461163a9190611dc2565b92505081905550604051806040016040528060038081111561165f5761165e612009565b5b81526020016003600981111561167857611677612009565b5b8152509950505050505050505050611824565b8486888a8c61169a9190611dc2565b6116a49190611dc2565b6116ae9190611dc2565b6116b89190611dc2565b8111611722576001600960008282546116d19190611dc2565b9250508190555060405180604001604052806003808111156116f6576116f5612009565b5b81526020016005600981111561170f5761170e612009565b5b8152509950505050505050505050611824565b838587898b8d6117329190611dc2565b61173c9190611dc2565b6117469190611dc2565b6117509190611dc2565b61175a9190611dc2565b81116117c4576001600a60008282546117739190611dc2565b92505081905550604051806040016040528060038081111561179857611797612009565b5b8152602001600860098111156117b1576117b0612009565b5b8152509950505050505050505050611824565b6001600b60008282546117d79190611dc2565b9250508190555060405180604001604052806003808111156117fc576117fb612009565b5b81526020016007600981111561181557611814612009565b5b81525099505050505050505050505b919050565b60405180604001604052806000600381111561184857611847612009565b5b81526020016000600981111561186157611860612009565b5b81525090565b60008135905061187681612246565b92915050565b60008135905061188b8161225d565b92915050565b6000813590506118a081612274565b92915050565b6000813590506118b581612284565b92915050565b6000602082840312156118d1576118d0612038565b5b60006118df84828501611867565b91505092915050565b6000602082840312156118fe576118fd612038565b5b600061190c8482850161187c565b91505092915050565b60006020828403121561192b5761192a612038565b5b600061193984828501611891565b91505092915050565b60006020828403121561195857611957612038565b5b6000611966848285016118a6565b91505092915050565b61197881611e4c565b82525050565b61198f61198a82611e4c565b611f4c565b82525050565b61199e81611e5e565b82525050565b6119ad81611ecd565b82525050565b6119bc81611edf565b82525050565b6119cb81611ef1565b82525050565b60006119de600e83611db1565b91506119e98261204a565b602082019050919050565b6000611a01601183611db1565b9150611a0c82612073565b602082019050919050565b6000611a24602683611db1565b9150611a2f8261209c565b604082019050919050565b6000611a47601483611db1565b9150611a52826120eb565b602082019050919050565b6000611a6a601983611db1565b9150611a7582612114565b602082019050919050565b6000611a8d600f83611db1565b9150611a988261213d565b602082019050919050565b6000611ab0601083611db1565b9150611abb82612166565b602082019050919050565b6000611ad3600f83611db1565b9150611ade8261218f565b602082019050919050565b6000611af6600b83611db1565b9150611b01826121b8565b602082019050919050565b6000611b19602083611db1565b9150611b24826121e1565b602082019050919050565b604082016000820151611b4560008501826119c2565b506020820151611b5860208501826119b3565b50505050565b611b6781611ec3565b82525050565b611b7e611b7982611ec3565b611f70565b82525050565b6000611b90828661197e565b601482019150611ba08285611b6d565b602082019150611bb08284611b6d565b602082019150819050949350505050565b6000602082019050611bd6600083018461196f565b92915050565b6000602082019050611bf16000830184611995565b92915050565b6000602082019050611c0c60008301846119a4565b92915050565b60006020820190508181036000830152611c2b816119d1565b9050919050565b60006020820190508181036000830152611c4b816119f4565b9050919050565b60006020820190508181036000830152611c6b81611a17565b9050919050565b60006020820190508181036000830152611c8b81611a3a565b9050919050565b60006020820190508181036000830152611cab81611a5d565b9050919050565b60006020820190508181036000830152611ccb81611a80565b9050919050565b60006020820190508181036000830152611ceb81611aa3565b9050919050565b60006020820190508181036000830152611d0b81611ac6565b9050919050565b60006020820190508181036000830152611d2b81611ae9565b9050919050565b60006020820190508181036000830152611d4b81611b0c565b9050919050565b6000604082019050611d676000830184611b2f565b92915050565b6000602082019050611d826000830184611b5e565b92915050565b6000604082019050611d9d6000830185611b5e565b611daa6020830184611b5e565b9392505050565b600082825260208201905092915050565b6000611dcd82611ec3565b9150611dd883611ec3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611e0d57611e0c611fab565b5b828201905092915050565b6000611e2382611ec3565b9150611e2e83611ec3565b925082821015611e4157611e40611fab565b5b828203905092915050565b6000611e5782611ea3565b9050919050565b60008115159050919050565b6000819050611e788261220a565b919050565b6000819050611e8b8261221e565b919050565b6000819050611e9e82612232565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000611ed882611e6a565b9050919050565b6000611eea82611e7d565b9050919050565b6000611efc82611e90565b9050919050565b6000611f0e82611ec3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611f4157611f40611fab565b5b600182019050919050565b6000611f5782611f5e565b9050919050565b6000611f698261203d565b9050919050565b6000819050919050565b6000611f8582611ec3565b9150611f9083611ec3565b925082611fa057611f9f611fda565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600080fd5b60008160601b9050919050565b7f4d696e742066696e616c697a6564000000000000000000000000000000000000600082015250565b7f4e6f7420656e6f75676820737570706c79000000000000000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4d696e74206e6f74206d61696e74656e616e6365000000000000000000000000600082015250565b7f4d696e74206e6f7420616374697665206f7220636c6f73656400000000000000600082015250565b7f496e76616c696420746f6b656e49640000000000000000000000000000000000600082015250565b7f4e6f742072657665616c65642079657400000000000000000000000000000000600082015250565b7f4d696e74206e6f7420636c6f7365640000000000000000000000000000000000600082015250565b7f4e6f742047656e65736973000000000000000000000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6004811061221b5761221a612009565b5b50565b600a811061222f5761222e612009565b5b50565b6004811061224357612242612009565b5b50565b61224f81611e4c565b811461225a57600080fd5b50565b61226681611e5e565b811461227157600080fd5b50565b6004811061228157600080fd5b50565b61228d81611ec3565b811461229857600080fd5b5056fea264697066735822122095267fce440fc5ae9c1f41b068d9ce0a0b8928145a97e907063e537da7a813a664736f6c63430008070033

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
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.