ETH Price: $2,249.66 (+4.88%)

Contract

0xDEe68f8a5f20caf8388A89c86100e19FE37CE759
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Add Minter Addre...150976792022-07-07 20:55:39967 days ago1657227339IN
0xDEe68f8a...FE37CE759
0 ETH0.004089360

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RaregotchiPetResolver

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 2000 runs

Other Settings:
default evmVersion
File 1 of 4 : RaregotchiPetResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./ProtectedMint.sol";

contract RaregotchiPetResolver is ProtectedMint {
    event Open(uint256 _toyId, uint8 _type, uint8 _size, uint256[] _ids, bool _special);

    mapping (uint8 => uint8) petAmountPerBucketSize;
    mapping (uint8 => mapping(uint8 => uint256)) specialPetAmounts;
    mapping (uint8 => mapping(uint8 => uint16)) mintedPetAmounts;
    mapping (uint8 => uint16) mintedSpecialPetAmounts;
    mapping (uint8 => uint8) specialPetsPerSize;
    mapping (uint8 => mapping(uint8 => uint256[])) petIdRanges;
    mapping (uint8 => mapping(uint8 => mapping(uint256 => uint256))) petIdMatrix;
    mapping (uint8 => mapping(uint256 => uint256)) specialPetIdMatrix;
    mapping (uint8 => uint256[]) specialPetIdRanges;
    mapping (uint256 => uint256[]) public toysToPets;

    uint8 SCHOOL_KID = 0;
    uint8 ALIEN_BABY = 1;
    uint8 SNOW_CONE = 2;

    uint8 REGULAR = 0;
    uint8 LARGE = 1;
    uint8 HUGE = 2;

    constructor() {
        petAmountPerBucketSize[REGULAR] = 3;
        petAmountPerBucketSize[LARGE] = 4;
        petAmountPerBucketSize[HUGE] = 6;

        specialPetsPerSize[REGULAR] = 105;
        specialPetsPerSize[LARGE] = 31;
        specialPetsPerSize[HUGE] = 14;

        // Legendary, Epics, Full Sets and Shinies
        specialPetIdRanges[SCHOOL_KID] = [1, 150];
        specialPetIdRanges[ALIEN_BABY] = [151, 300];
        specialPetIdRanges[SNOW_CONE] = [301, 450];

        // Regulars
        petIdRanges[SCHOOL_KID][REGULAR] = [451, 2652];
        petIdRanges[SCHOOL_KID][LARGE] = [2653, 3341];
        petIdRanges[SCHOOL_KID][HUGE] = [3342, 3633];

        petIdRanges[ALIEN_BABY][REGULAR] = [3634, 5835];
        petIdRanges[ALIEN_BABY][LARGE] = [5836, 6524];
        petIdRanges[ALIEN_BABY][HUGE] = [6525, 6816];

        petIdRanges[SNOW_CONE][REGULAR] = [6817, 9018];
        petIdRanges[SNOW_CONE][LARGE] = [9019, 9707];
        petIdRanges[SNOW_CONE][HUGE] = [9708, 9999];

        useSpecialTokenId(SCHOOL_KID, 1);
        useSpecialTokenId(SCHOOL_KID, 2);
        useSpecialTokenId(SCHOOL_KID, 3);
        useSpecialTokenId(ALIEN_BABY, 151);
        useSpecialTokenId(ALIEN_BABY, 152);
        useSpecialTokenId(ALIEN_BABY, 153);
        useSpecialTokenId(SNOW_CONE, 301);
        useSpecialTokenId(SNOW_CONE, 302);
        useSpecialTokenId(SNOW_CONE, 303);

        specialPetAmounts[SCHOOL_KID][REGULAR] = 3;
        mintedSpecialPetAmounts[SCHOOL_KID] = 3;

        specialPetAmounts[ALIEN_BABY][REGULAR] = 3;
        mintedSpecialPetAmounts[ALIEN_BABY] = 3;

        specialPetAmounts[SNOW_CONE][REGULAR] = 3;
        mintedSpecialPetAmounts[SNOW_CONE] = 3;
    }

    function getPetsForToy(uint256 _toyId) external view returns (uint256[] memory) {
        return toysToPets[_toyId];
    }

    function open(uint256 _toyId, uint8 _type, uint8 _size) external onlyMinter {
        require(_type == SCHOOL_KID || _type == ALIEN_BABY || _type == SNOW_CONE, "Invalid pet type");
        require(_size == REGULAR || _size == LARGE || _size == HUGE, "Invalid pet size");
        require(toysToPets[_toyId].length == 0, "This toy has already been opened");
        require(getMintedPets() < 9999, "All pets have been given");

        uint256 lastId;
        bool specialGranted = false;

        if (_toyId == 2037) {
            toysToPets[_toyId] = [1, 2, 3];
            return;
        } else if (_toyId == 2630) {
            toysToPets[_toyId] = [151, 152, 153];
            return;
        } else if (_toyId == 913) {
            toysToPets[_toyId] = [301, 302, 303];
            return;
        }

        uint256[] memory petIds = new uint256[](petAmountPerBucketSize[_size]);

        for (uint8 i = 0; i < petAmountPerBucketSize[_size]; i++) {
            if (
                specialGranted == false &&
                specialPetAmounts[_type][_size] < specialPetsPerSize[_size] &&
                lastId > 0 &&
                lastId % 9 == 0
            ) {
                specialGranted = true;
                lastId = getSpecialTokenId(_type, _size);
                mintedSpecialPetAmounts[_type]++;
                specialPetAmounts[_type][_size]++;
            } else {
                lastId = getTokenId(_type, _size);
                mintedPetAmounts[_type][_size]++;
            }

            petIds[i] = lastId;
        }

        toysToPets[_toyId] = petIds;

        emit Open(_toyId, _type, _size, petIds, specialGranted);
    }

    function getTokenId(uint8 _type, uint8 _size) private returns (uint256) {
        uint256[] memory range = petIdRanges[_type][_size];
        uint256 maxTokensToMint = range[1] - range[0] + 1;
        uint256 maxIndex = maxTokensToMint - mintedPetAmounts[_type][_size];
        uint256 random = _getRandomNumber(maxIndex, maxTokensToMint);
        uint256 tokenId = petIdMatrix[_type][_size][random];

        if (tokenId == 0) {
            tokenId = random;
        }

        if (petIdMatrix[_type][_size][maxIndex - 1] == 0) {
            petIdMatrix[_type][_size][random] = maxIndex - 1;
        } else {
            petIdMatrix[_type][_size][random] = petIdMatrix[_type][_size][maxIndex - 1];
        }

        return tokenId + range[0];
    }

    function getSpecialTokenId(uint8 _type, uint8 _size) private returns (uint256) {
        uint256[] memory range = specialPetIdRanges[_type];
        uint256 maxTokensToMint = range[1] - range[0] + 1;
        uint256 maxIndex = maxTokensToMint - specialPetAmounts[_type][_size];
        uint256 random = _getRandomNumber(maxIndex, maxTokensToMint);
        uint256 tokenId = specialPetIdMatrix[_type][random];

        if (tokenId == 0) {
            tokenId = random;
        }

        if (specialPetIdMatrix[_type][maxIndex - 1] == 0) {
            specialPetIdMatrix[_type][random] = maxIndex - 1;
        } else {
            specialPetIdMatrix[_type][random] = specialPetIdMatrix[_type][maxIndex - 1];
        }

        return tokenId + range[0];
    }


    function useSpecialTokenId(uint8 _type, uint256 _id) private {
        uint256[] memory range = specialPetIdRanges[_type];
        uint256 maxTokensToMint = range[1] - range[0] + 1;
        uint256 maxIndex = maxTokensToMint - mintedSpecialPetAmounts[_type];

        uint256 nonRandom = _id - range[0];

        uint256 tokenId = specialPetIdMatrix[_type][nonRandom];

        if (tokenId == 0) {
            tokenId = nonRandom;
        }

        if (specialPetIdMatrix[_type][maxIndex - 1] == 0) {
            specialPetIdMatrix[_type][nonRandom] = maxIndex - 1;
        } else {
            specialPetIdMatrix[_type][nonRandom] = specialPetIdMatrix[_type][maxIndex - 1];
        }
    }

    /**
     * @dev Generates a pseudo-random number between 0 and _upper (exclusive)
     */
    function _getRandomNumber(uint256 _upper, uint256 _nonce) private view returns (uint256) {
        uint256 random = uint256(
            uint256(
                keccak256(
                    abi.encodePacked(
                        _nonce,
                        blockhash(block.number - 1),
                        block.coinbase,
                        block.difficulty,
                        msg.sender
                    )
                )
            )
        );

        return (random % _upper);
    }

    function getMintedPets() public view returns (uint16) {
        return (
            mintedPetAmounts[SCHOOL_KID][REGULAR] + mintedPetAmounts[ALIEN_BABY][REGULAR] + mintedPetAmounts[SNOW_CONE][REGULAR] +
            mintedPetAmounts[SCHOOL_KID][LARGE] + mintedPetAmounts[ALIEN_BABY][LARGE] + mintedPetAmounts[SNOW_CONE][LARGE] +
            mintedPetAmounts[SCHOOL_KID][HUGE] + mintedPetAmounts[ALIEN_BABY][HUGE] + mintedPetAmounts[SNOW_CONE][HUGE] +
            mintedSpecialPetAmounts[SCHOOL_KID] + mintedSpecialPetAmounts[ALIEN_BABY] + mintedSpecialPetAmounts[SNOW_CONE]
        );
    }
}

File 2 of 4 : Ownable.sol
// SPDX-License-Identifier: MIT

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() {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 4 : Context.sol
// SPDX-License-Identifier: MIT

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;
    }
}

File 4 of 4 : ProtectedMint.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";

abstract contract ProtectedMint is Ownable {
    address[] public minterAddresses;

    modifier onlyMinter() {
        bool isAllowed;

        for (uint256 i; i < minterAddresses.length; i++) {
            if (minterAddresses[i] == msg.sender) {
                isAllowed = true;

                break;
            }
        }

        require(isAllowed, "Minter: caller is not an allowed minter");

        _;
    }

    /**
     * @dev Adds an address that is allowed to mint
     */
    function addMinterAddress(address _minterAddress) external onlyOwner {
        minterAddresses.push(_minterAddress);
    }

    /**
     * @dev Removes
     */
    function removeMinterAddress(address _minterAddress) external onlyOwner {
        for (uint256 i; i < minterAddresses.length; i++) {
            if (minterAddresses[i] != _minterAddress) {
                continue;
            }

            minterAddresses[i] = minterAddresses[minterAddresses.length - 1];

            minterAddresses.pop();
        }
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_toyId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"_type","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"_size","type":"uint8"},{"indexed":false,"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"indexed":false,"internalType":"bool","name":"_special","type":"bool"}],"name":"Open","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"},{"inputs":[{"internalType":"address","name":"_minterAddress","type":"address"}],"name":"addMinterAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getMintedPets","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_toyId","type":"uint256"}],"name":"getPetsForToy","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"minterAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_toyId","type":"uint256"},{"internalType":"uint8","name":"_type","type":"uint8"},{"internalType":"uint8","name":"_size","type":"uint8"}],"name":"open","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minterAddress","type":"address"}],"name":"removeMinterAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"toysToPets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600c805465ffffffffffff1916650201000201001790553480156200002857600080fd5b50620000343362000614565b600c805460ff63010000009182900481166000908152600260208181526040808420805460ff199081166003179091558754640100000000908190048716865282862080548316600417905588546501000000000090819004881687528387208054841660069081179091558a5499909904881687529784528286208054831660691790558854048616855281852080548216601f179055875496909604851684528084208054909616600e17909555845180860186526001815260968183015295549093168252600a90925291909120620001129290916200085c565b506040805180820182526097815261012c602080830191909152600c54610100900460ff166000908152600a9091529190912062000152916002620008b1565b5060408051808201825261012d81526101c2602080830191909152600c5462010000900460ff166000908152600a9091529190912062000194916002620008b1565b506040805180820182526101c38152610a5c602080830191909152600c5460ff80821660009081526007845285812063010000009093049091168152915291909120620001e3916002620008b1565b50604080518082018252610a5d8152610d0d602080830191909152600c5460ff808216600090815260078452858120640100000000909304909116815291529190912062000233916002620008b1565b50604080518082018252610d0e8152610e31602080830191909152600c5460ff80821660009081526007845285812065010000000000909304909116815291529190912062000284916002620008b1565b50604080518082018252610e3281526116cb602080830191909152600c5460ff6101008204811660009081526007845285812063010000009093049091168152915291909120620002d7916002620008b1565b506040805180820182526116cc815261197c602080830191909152600c5460ff6101008204811660009081526007845285812064010000000090930490911681529152919091206200032b916002620008b1565b5060408051808201825261197d8152611aa0602080830191909152600c5460ff6101008204811660009081526007845285812065010000000000909304909116815291529190912062000380916002620008b1565b50604080518082018252611aa1815261233a602080830191909152600c5460ff620100008204811660009081526007845285812063010000009093049091168152915291909120620003d4916002620008b1565b5060408051808201825261233b81526125eb602080830191909152600c5460ff6201000082048116600090815260078452858120640100000000909304909116815291529190912062000429916002620008b1565b506040805180820182526125ec815261270f602080830191909152600c5460ff62010000820481166000908152600784528581206501000000000090930490911681529152919091206200047f916002620008b1565b50600c54620004939060ff16600162000664565b600c54620004a69060ff16600262000664565b600c54620004b99060ff16600362000664565b600c54620004d190610100900460ff16609762000664565b600c54620004e990610100900460ff16609862000664565b600c546200050190610100900460ff16609962000664565b600c546200051b9062010000900460ff1661012d62000664565b600c54620005359062010000900460ff1661012e62000664565b600c546200054f9062010000900460ff1661012f62000664565b600c805460ff80821660009081526003602081815260408084206301000000968790048616855282528084208390558654851684526005808352818520805461ffff199081168617909155885461010080820489168852868652848820918a9004891688529085528387208690558954048716865281845282862080548216861790558854620100008082048916885286865284882099909104881687529784528286208590559754969096049094168352939093522080549092161790556200096d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60ff82166000908152600a6020908152604080832080548251818502810185019093528083529192909190830182828015620006c057602002820191906000526020600020905b815481526020019060010190808311620006ab575b50505050509050600081600081518110620006df57620006df6200090c565b602002602001015182600181518110620006fd57620006fd6200090c565b602002602001015162000711919062000938565b6200071e90600162000952565b60ff851660009081526005602052604081205491925090620007459061ffff168362000938565b90506000836000815181106200075f576200075f6200090c565b60200260200101518562000774919062000938565b60ff87166000908152600960209081526040808320848452909152902054909150806200079e5750805b60ff8716600090815260096020526040812090620007be60018662000938565b815260200190815260200160002054600014156200080757620007e360018462000938565b60ff8816600090815260096020908152604080832086845290915290205562000853565b60ff87166000908152600960205260408120906200082760018662000938565b8152602080820192909252604090810160009081205460ff8b1682526009845282822086835290935220555b50505050505050565b8280548282559060005260206000209081019282156200089f579160200282015b828111156200089f578251829060ff169055916020019190600101906200087d565b50620008ad929150620008f5565b5090565b8280548282559060005260206000209081019282156200089f579160200282015b828111156200089f578251829061ffff16905591602001919060010190620008d2565b5b80821115620008ad5760008155600101620008f6565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000828210156200094d576200094d62000922565b500390565b6000821982111562000968576200096862000922565b500190565b6118ce806200097d6000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c806383ca5a0511610076578063e9cf98ae1161005b578063e9cf98ae1461016f578063f2f76e9714610182578063f2fde38b146101a357600080fd5b806383ca5a051461014b5780638da5cb5b1461015e57600080fd5b806338f85468116100a757806338f85468146101135780636df212401461012e578063715018a61461014357600080fd5b806302885097146100c357806313f038a2146100f3575b600080fd5b6100d66100d1366004611622565b6101b6565b6040516001600160a01b0390911681526020015b60405180910390f35b610106610101366004611622565b6101e0565b6040516100ea9190611676565b61011b610242565b60405161ffff90911681526020016100ea565b61014161013c3660046116a6565b6106a1565b005b610141610c83565b6101416101593660046116e2565b610ce9565b6000546001600160a01b03166100d6565b61014161017d3660046116e2565b610da1565b61019561019036600461170b565b610f14565b6040519081526020016100ea565b6101416101b13660046116e2565b610f45565b600181815481106101c657600080fd5b6000918252602090912001546001600160a01b0316905081565b6000818152600b602090815260409182902080548351818402810184019094528084526060939283018282801561023657602002820191906000526020600020905b815481526020019060010190808311610222575b50505050509050919050565b600060056000600c60029054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660056000600c60019054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660056000600c60009054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60029054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60059054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60019054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60059054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60009054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60059054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60029054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60049054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60019054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60049054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60009054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60049054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60029054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60039054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60019054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60039054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60009054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60039054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff166106389190611743565b6106429190611743565b61064c9190611743565b6106569190611743565b6106609190611743565b61066a9190611743565b6106749190611743565b61067e9190611743565b6106889190611743565b6106929190611743565b61069c9190611743565b905090565b6000805b60015481101561070257336001600160a01b0316600182815481106106cc576106cc611769565b6000918252602090912001546001600160a01b031614156106f05760019150610702565b806106fa8161177f565b9150506106a5565b508061077b5760405162461bcd60e51b815260206004820152602760248201527f4d696e7465723a2063616c6c6572206973206e6f7420616e20616c6c6f77656460448201527f206d696e7465720000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600c5460ff8481169116148061079d5750600c5460ff84811661010090920416145b806107b55750600c5460ff8481166201000090920416145b6108015760405162461bcd60e51b815260206004820152601060248201527f496e76616c6964207065742074797065000000000000000000000000000000006044820152606401610772565b600c5460ff838116630100000090920416148061082d5750600c5460ff83811664010000000090920416145b806108485750600c5460ff8381166501000000000090920416145b6108945760405162461bcd60e51b815260206004820152601060248201527f496e76616c6964207065742073697a65000000000000000000000000000000006044820152606401610772565b6000848152600b6020526040902054156108f05760405162461bcd60e51b815260206004820181905260248201527f5468697320746f792068617320616c7265616479206265656e206f70656e65646044820152606401610772565b61270f6108fb610242565b61ffff161061094c5760405162461bcd60e51b815260206004820152601860248201527f416c6c20706574732068617665206265656e20676976656e00000000000000006044820152606401610772565b6000806107f586141561099b5760408051606081018252600181526002602080830191909152600382840181905260008a8152600b90925292902061099392909190611541565b505050610c7d565b85610a4614156109dd57604080516060810182526097815260986020808301919091526099828401526000898152600b90915291909120610993916003611541565b856103911415610a22576040805160608101825261012d815261012e60208083019190915261012f828401526000898152600b90915291909120610993916003611591565b60ff80851660009081526002602052604081205490911667ffffffffffffffff811115610a5157610a5161179a565b604051908082528060200260200182016040528015610a7a578160200160208202803683370190505b50905060005b60ff80871660009081526002602052604090205481169082161015610c195782158015610ad9575060ff8087166000818152600660209081526040808320548c8616845260038352818420948452939091529020549116115b8015610ae55750600084115b8015610af95750610af76009856117b0565b155b15610b895760019250610b0c8787611027565b60ff88166000908152600560205260408120805492965061ffff9092169190610b34836117d2565b825461ffff9182166101009390930a92830291909202199091161790555060ff8088166000908152600360209081526040808320938a168352929052908120805491610b7f8361177f565b9190505550610be6565b610b938787611218565b60ff8089166000908152600460209081526040808320938b168352929052908120805492965061ffff9092169190610bca836117d2565b91906101000a81548161ffff021916908361ffff160217905550505b83828260ff1681518110610bfc57610bfc611769565b602090810291909101015280610c11816117f4565b915050610a80565b506000878152600b602090815260409091208251610c39928401906115d2565b507f4515706868a1a5dca0dc24dadd3cdc6bb7c75310c7ff6e754a441855998349b38787878486604051610c71959493929190611814565b60405180910390a15050505b50505050565b6000546001600160a01b03163314610cdd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610772565b610ce7600061143a565b565b6000546001600160a01b03163314610d435760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610772565b6001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf601805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610dfb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610772565b60005b600154811015610f1057816001600160a01b031660018281548110610e2557610e25611769565b6000918252602090912001546001600160a01b031614610e4457610efe565b60018054610e53908290611853565b81548110610e6357610e63611769565b600091825260209091200154600180546001600160a01b039092169183908110610e8f57610e8f611769565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506001805480610ece57610ece61186a565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff191690550190555b80610f088161177f565b915050610dfe565b5050565b600b6020528160005260406000208181548110610f3057600080fd5b90600052602060002001600091509150505481565b6000546001600160a01b03163314610f9f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610772565b6001600160a01b03811661101b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610772565b6110248161143a565b50565b60ff82166000908152600a602090815260408083208054825181850281018501909352808352849383018282801561107e57602002820191906000526020600020905b81548152602001906001019080831161106a575b5050505050905060008160008151811061109a5761109a611769565b6020026020010151826001815181106110b5576110b5611769565b60200260200101516110c79190611853565b6110d2906001611880565b60ff8087166000908152600360209081526040808320938916835292905290812054919250906111029083611853565b905060006111108284611497565b60ff88166000908152600960209081526040808320848452909152902054909150806111395750805b60ff8816600090815260096020526040812090611157600186611853565b8152602001908152602001600020546000141561119c57611179600184611853565b60ff891660009081526009602090815260408083208684529091529020556111e6565b60ff88166000908152600960205260408120906111ba600186611853565b8152602080820192909252604090810160009081205460ff8c1682526009845282822086835290935220555b846000815181106111f9576111f9611769565b60200260200101518161120c9190611880565b98975050505050505050565b60ff80831660009081526007602090815260408083209385168352928152828220805484518184028101840190955280855292938493909283018282801561127f57602002820191906000526020600020905b81548152602001906001019080831161126b575b5050505050905060008160008151811061129b5761129b611769565b6020026020010151826001815181106112b6576112b6611769565b60200260200101516112c89190611853565b6112d3906001611880565b60ff8087166000908152600460209081526040808320938916835292905290812054919250906113079061ffff1683611853565b905060006113158284611497565b60ff8089166000908152600860209081526040808320938b16835292815282822084835290522054909150806113485750805b60ff8089166000908152600860209081526040808320938b16835292905290812090611375600186611853565b815260200190815260200160002054600014156113c457611397600184611853565b60ff808a166000908152600860209081526040808320938c168352928152828220868352905220556111e6565b60ff8089166000908152600860209081526040808320938b168352929052908120906113f1600186611853565b8152602080820192909252604090810160009081205460ff808d16835260088552838320908c16835284528282208683529093522055846000815181106111f9576111f9611769565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080826114a6600143611853565b6040805160208101939093529040908201527fffffffffffffffffffffffffffffffffffffffff00000000000000000000000041606090811b82168184015244607484015233901b16609482015260a801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120905061153984826117b0565b949350505050565b828054828255906000526020600020908101928215611581579160200282015b82811115611581578251829060ff16905591602001919060010190611561565b5061158d92915061160d565b5090565b828054828255906000526020600020908101928215611581579160200282015b82811115611581578251829061ffff169055916020019190600101906115b1565b828054828255906000526020600020908101928215611581579160200282015b828111156115815782518255916020019190600101906115f2565b5b8082111561158d576000815560010161160e565b60006020828403121561163457600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561166b5781518752958201959082019060010161164f565b509495945050505050565b602081526000611689602083018461163b565b9392505050565b803560ff811681146116a157600080fd5b919050565b6000806000606084860312156116bb57600080fd5b833592506116cb60208501611690565b91506116d960408501611690565b90509250925092565b6000602082840312156116f457600080fd5b81356001600160a01b038116811461168957600080fd5b6000806040838503121561171e57600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b600061ffff8083168185168083038211156117605761176061172d565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b60006000198214156117935761179361172d565b5060010190565b634e487b7160e01b600052604160045260246000fd5b6000826117cd57634e487b7160e01b600052601260045260246000fd5b500690565b600061ffff808316818114156117ea576117ea61172d565b6001019392505050565b600060ff821660ff81141561180b5761180b61172d565b60010192915050565b85815260ff8516602082015260ff8416604082015260a06060820152600061183f60a083018561163b565b905082151560808301529695505050505050565b6000828210156118655761186561172d565b500390565b634e487b7160e01b600052603160045260246000fd5b600082198211156118935761189361172d565b50019056fea26469706673582212205f413da8dfca333be4a937a4dffde162f4f571fcc67ecbec828d46d49b5c2bb564736f6c63430008090033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100be5760003560e01c806383ca5a0511610076578063e9cf98ae1161005b578063e9cf98ae1461016f578063f2f76e9714610182578063f2fde38b146101a357600080fd5b806383ca5a051461014b5780638da5cb5b1461015e57600080fd5b806338f85468116100a757806338f85468146101135780636df212401461012e578063715018a61461014357600080fd5b806302885097146100c357806313f038a2146100f3575b600080fd5b6100d66100d1366004611622565b6101b6565b6040516001600160a01b0390911681526020015b60405180910390f35b610106610101366004611622565b6101e0565b6040516100ea9190611676565b61011b610242565b60405161ffff90911681526020016100ea565b61014161013c3660046116a6565b6106a1565b005b610141610c83565b6101416101593660046116e2565b610ce9565b6000546001600160a01b03166100d6565b61014161017d3660046116e2565b610da1565b61019561019036600461170b565b610f14565b6040519081526020016100ea565b6101416101b13660046116e2565b610f45565b600181815481106101c657600080fd5b6000918252602090912001546001600160a01b0316905081565b6000818152600b602090815260409182902080548351818402810184019094528084526060939283018282801561023657602002820191906000526020600020905b815481526020019060010190808311610222575b50505050509050919050565b600060056000600c60029054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660056000600c60019054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660056000600c60009054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60029054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60059054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60019054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60059054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60009054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60059054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60029054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60049054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60019054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60049054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60009054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60049054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60029054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60039054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60019054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60039054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff1660046000600c60009054906101000a900460ff1660ff1660ff1681526020019081526020016000206000600c60039054906101000a900460ff1660ff1660ff16815260200190815260200160002060009054906101000a900461ffff166106389190611743565b6106429190611743565b61064c9190611743565b6106569190611743565b6106609190611743565b61066a9190611743565b6106749190611743565b61067e9190611743565b6106889190611743565b6106929190611743565b61069c9190611743565b905090565b6000805b60015481101561070257336001600160a01b0316600182815481106106cc576106cc611769565b6000918252602090912001546001600160a01b031614156106f05760019150610702565b806106fa8161177f565b9150506106a5565b508061077b5760405162461bcd60e51b815260206004820152602760248201527f4d696e7465723a2063616c6c6572206973206e6f7420616e20616c6c6f77656460448201527f206d696e7465720000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600c5460ff8481169116148061079d5750600c5460ff84811661010090920416145b806107b55750600c5460ff8481166201000090920416145b6108015760405162461bcd60e51b815260206004820152601060248201527f496e76616c6964207065742074797065000000000000000000000000000000006044820152606401610772565b600c5460ff838116630100000090920416148061082d5750600c5460ff83811664010000000090920416145b806108485750600c5460ff8381166501000000000090920416145b6108945760405162461bcd60e51b815260206004820152601060248201527f496e76616c6964207065742073697a65000000000000000000000000000000006044820152606401610772565b6000848152600b6020526040902054156108f05760405162461bcd60e51b815260206004820181905260248201527f5468697320746f792068617320616c7265616479206265656e206f70656e65646044820152606401610772565b61270f6108fb610242565b61ffff161061094c5760405162461bcd60e51b815260206004820152601860248201527f416c6c20706574732068617665206265656e20676976656e00000000000000006044820152606401610772565b6000806107f586141561099b5760408051606081018252600181526002602080830191909152600382840181905260008a8152600b90925292902061099392909190611541565b505050610c7d565b85610a4614156109dd57604080516060810182526097815260986020808301919091526099828401526000898152600b90915291909120610993916003611541565b856103911415610a22576040805160608101825261012d815261012e60208083019190915261012f828401526000898152600b90915291909120610993916003611591565b60ff80851660009081526002602052604081205490911667ffffffffffffffff811115610a5157610a5161179a565b604051908082528060200260200182016040528015610a7a578160200160208202803683370190505b50905060005b60ff80871660009081526002602052604090205481169082161015610c195782158015610ad9575060ff8087166000818152600660209081526040808320548c8616845260038352818420948452939091529020549116115b8015610ae55750600084115b8015610af95750610af76009856117b0565b155b15610b895760019250610b0c8787611027565b60ff88166000908152600560205260408120805492965061ffff9092169190610b34836117d2565b825461ffff9182166101009390930a92830291909202199091161790555060ff8088166000908152600360209081526040808320938a168352929052908120805491610b7f8361177f565b9190505550610be6565b610b938787611218565b60ff8089166000908152600460209081526040808320938b168352929052908120805492965061ffff9092169190610bca836117d2565b91906101000a81548161ffff021916908361ffff160217905550505b83828260ff1681518110610bfc57610bfc611769565b602090810291909101015280610c11816117f4565b915050610a80565b506000878152600b602090815260409091208251610c39928401906115d2565b507f4515706868a1a5dca0dc24dadd3cdc6bb7c75310c7ff6e754a441855998349b38787878486604051610c71959493929190611814565b60405180910390a15050505b50505050565b6000546001600160a01b03163314610cdd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610772565b610ce7600061143a565b565b6000546001600160a01b03163314610d435760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610772565b6001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf601805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610dfb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610772565b60005b600154811015610f1057816001600160a01b031660018281548110610e2557610e25611769565b6000918252602090912001546001600160a01b031614610e4457610efe565b60018054610e53908290611853565b81548110610e6357610e63611769565b600091825260209091200154600180546001600160a01b039092169183908110610e8f57610e8f611769565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506001805480610ece57610ece61186a565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff191690550190555b80610f088161177f565b915050610dfe565b5050565b600b6020528160005260406000208181548110610f3057600080fd5b90600052602060002001600091509150505481565b6000546001600160a01b03163314610f9f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610772565b6001600160a01b03811661101b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610772565b6110248161143a565b50565b60ff82166000908152600a602090815260408083208054825181850281018501909352808352849383018282801561107e57602002820191906000526020600020905b81548152602001906001019080831161106a575b5050505050905060008160008151811061109a5761109a611769565b6020026020010151826001815181106110b5576110b5611769565b60200260200101516110c79190611853565b6110d2906001611880565b60ff8087166000908152600360209081526040808320938916835292905290812054919250906111029083611853565b905060006111108284611497565b60ff88166000908152600960209081526040808320848452909152902054909150806111395750805b60ff8816600090815260096020526040812090611157600186611853565b8152602001908152602001600020546000141561119c57611179600184611853565b60ff891660009081526009602090815260408083208684529091529020556111e6565b60ff88166000908152600960205260408120906111ba600186611853565b8152602080820192909252604090810160009081205460ff8c1682526009845282822086835290935220555b846000815181106111f9576111f9611769565b60200260200101518161120c9190611880565b98975050505050505050565b60ff80831660009081526007602090815260408083209385168352928152828220805484518184028101840190955280855292938493909283018282801561127f57602002820191906000526020600020905b81548152602001906001019080831161126b575b5050505050905060008160008151811061129b5761129b611769565b6020026020010151826001815181106112b6576112b6611769565b60200260200101516112c89190611853565b6112d3906001611880565b60ff8087166000908152600460209081526040808320938916835292905290812054919250906113079061ffff1683611853565b905060006113158284611497565b60ff8089166000908152600860209081526040808320938b16835292815282822084835290522054909150806113485750805b60ff8089166000908152600860209081526040808320938b16835292905290812090611375600186611853565b815260200190815260200160002054600014156113c457611397600184611853565b60ff808a166000908152600860209081526040808320938c168352928152828220868352905220556111e6565b60ff8089166000908152600860209081526040808320938b168352929052908120906113f1600186611853565b8152602080820192909252604090810160009081205460ff808d16835260088552838320908c16835284528282208683529093522055846000815181106111f9576111f9611769565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080826114a6600143611853565b6040805160208101939093529040908201527fffffffffffffffffffffffffffffffffffffffff00000000000000000000000041606090811b82168184015244607484015233901b16609482015260a801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120905061153984826117b0565b949350505050565b828054828255906000526020600020908101928215611581579160200282015b82811115611581578251829060ff16905591602001919060010190611561565b5061158d92915061160d565b5090565b828054828255906000526020600020908101928215611581579160200282015b82811115611581578251829061ffff169055916020019190600101906115b1565b828054828255906000526020600020908101928215611581579160200282015b828111156115815782518255916020019190600101906115f2565b5b8082111561158d576000815560010161160e565b60006020828403121561163457600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561166b5781518752958201959082019060010161164f565b509495945050505050565b602081526000611689602083018461163b565b9392505050565b803560ff811681146116a157600080fd5b919050565b6000806000606084860312156116bb57600080fd5b833592506116cb60208501611690565b91506116d960408501611690565b90509250925092565b6000602082840312156116f457600080fd5b81356001600160a01b038116811461168957600080fd5b6000806040838503121561171e57600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b600061ffff8083168185168083038211156117605761176061172d565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b60006000198214156117935761179361172d565b5060010190565b634e487b7160e01b600052604160045260246000fd5b6000826117cd57634e487b7160e01b600052601260045260246000fd5b500690565b600061ffff808316818114156117ea576117ea61172d565b6001019392505050565b600060ff821660ff81141561180b5761180b61172d565b60010192915050565b85815260ff8516602082015260ff8416604082015260a06060820152600061183f60a083018561163b565b905082151560808301529695505050505050565b6000828210156118655761186561172d565b500390565b634e487b7160e01b600052603160045260246000fd5b600082198211156118935761189361172d565b50019056fea26469706673582212205f413da8dfca333be4a937a4dffde162f4f571fcc67ecbec828d46d49b5c2bb564736f6c63430008090033

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.