Contract 0xec86576c74a4cd7fcedb522968290d7ae4fea4f3

 

Contract Overview

Balance:
0 BNB

BNB Value:
$0.00

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x68aec05fe5548116dd053ddd970fa49e13d210d8c4742d7f52d528a855fd8d060xd318ca9b110821892021-09-20 15:10:052 days 11 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.001472225
0xbe3f77c04e1f3484313325b833695c91df12ed6d23147960cd98a878f29614900xd318ca9b110821832021-09-20 15:09:472 days 11 hrs ago0xb9560a11b1c775b6d82568d4bdcc59edb81524d1 IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00179249
0xbc8e53a48f25ebadf362563cb2bcbbb7c75eb1d6fc237e2bedf8c450117288720xd318ca9b110821692021-09-20 15:09:052 days 11 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00249577
0x3a8523b2e4d7d05eeca22f34328d01993533053bd8edce1a09374477c26eb1040xd318ca9b110821482021-09-20 15:08:022 days 11 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00249577
0x753a3d02f37a9f223a00c849d79bd9bacf54a8630ad4030c17594f01f094cc6d0xd318ca9b110821292021-09-20 15:07:052 days 11 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00249583
0xe7326b4e8ab48ebb6d9457430b04d46d4df21576f6dd56404a75064bba3760110xd318ca9b110821102021-09-20 15:06:082 days 11 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00181349
0xe4f8a2032850706b140ede36b5f75788789fdfdeea4fec71d697d31ec1d184420xd318ca9b110820872021-09-20 15:04:592 days 11 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.001472345
0x77ec5d4b7b0cfadc385e2097ad2b3bb43b3983d61bbe93196a60cb40cd685a7e0xd318ca9b110820732021-09-20 15:04:172 days 11 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.001472345
0x6f4fc08ad36fb5334a577fdd3a1fbaf172a15850b7bb7c7bbfd2b101d9e897d80xd318ca9b110820342021-09-20 15:02:202 days 11 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00249583
0x96303a065548b654b8d45597b46f6a4e025a43443ddeb026cc3cab7cf76aa05b0xd318ca9b110819592021-09-20 14:58:352 days 11 hrs ago0x130f83108f44cf79047872d6005acaa16b738d3b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.001526285
0x1dd3d1f111c8e3f3281b79810c6e82ba26e2a324e65e4f15772a8b63a95f59ee0xd318ca9b110819372021-09-20 14:57:292 days 11 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.001472345
0x5da29d7d4e9593808c0262406ce583482021dc085c0e7500988a54c90a5542540xd318ca9b110819182021-09-20 14:56:322 days 11 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00249583
0xc7366e84213bd87ccbc43549e675fa4c913d47cbf279ddf0ea90014e39e1090a0xd318ca9b110818982021-09-20 14:55:322 days 12 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00249571
0x237a421a18f7d9d35c923a899c5f32777ed4ec978eea1397fe6530d16519c60c0xd318ca9b110818902021-09-20 14:55:082 days 12 hrs ago0x615e5ea67155513adc58aa7d3f66541177bdbe69 IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00249583
0x59aee3a5ae7fc7fd5133e17c48a8373e8ef4fae6b44ed3d8cc074459998dfd090xd318ca9b110818812021-09-20 14:54:412 days 12 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00249577
0xd7b8bd2ed49c997be2c8d31b944684f581983aaad0a99f3b584d8a46af9b76780xd318ca9b110818692021-09-20 14:54:052 days 12 hrs ago0x615e5ea67155513adc58aa7d3f66541177bdbe69 IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.001451345
0x2cf7732a539bb381f6298969142129553d02a676c3979739500730ed596956cd0xd318ca9b110818642021-09-20 14:53:502 days 12 hrs ago0x8f8a0fe7db155a034a5bec377344103b3e09cbc7 IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00249583
0xc8beb04f0e8f9049d99e80a519a36fcff77e35414af676d564a8f556bf556db00xd318ca9b110818622021-09-20 14:53:442 days 12 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00249583
0x35cc291182a6cc5be350cbd2203b8429718de961048d043bc4f4e2904c28a0ed0xd318ca9b110818292021-09-20 14:52:052 days 12 hrs ago0x23d4ca7cbd20194960fb12803143d9a019ef3f7a IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00186743
0xf8c8c176ac6c130187f9324205bd3b8a9401e9175f5e46d6438c885f71d51be80xd318ca9b110817962021-09-20 14:50:262 days 12 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00181349
0x481738c207119ac5d1a448aa5f8811b6fb2a293debbff22aabedaa230aac248d0xd318ca9b110817792021-09-20 14:49:352 days 12 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00181343
0x8ad12c2fb295474978c6a816493f80159fe1a57751cec7c752b62c9fa59eba140xd318ca9b110817672021-09-20 14:48:592 days 12 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.001472345
0xb940e07ae2b8bc4a889f4ff21da5e38f65a46040ea7ff78ea0ea7de93cdbdc630xd318ca9b110817492021-09-20 14:48:052 days 12 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00249577
0x852afb9e2cea5e77788eb5b8909a08ff429eb1626e171606fb9b463a4ac722b90xd318ca9b110817292021-09-20 14:47:052 days 12 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00181349
0x9425923ab8bd97be27a9c2a6755e6527ad1405f1632d9303bf7e7d256b3350df0xd318ca9b110817082021-09-20 14:46:022 days 12 hrs ago0x3c6789a326035b694afa4e4524006660a9475e7b IN  0xec86576c74a4cd7fcedb522968290d7ae4fea4f30 BNB0.00181337
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xa708430ffe3c021a006f1b25ea951025110d34b93e0ebc0a2e697ff012e080c2105820242021-09-03 3:33:0719 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0xa86cad8d7ea43850a207a81665096294116bf7d2bc3a277287a872289533a61c105820232021-09-03 3:33:0419 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0xb74d1e995ff1c420fa615335b757cbd39f8becba582b80af4a1e05d48bff14a1105820232021-09-03 3:33:0419 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0x91c576e10cb30b32f4c16c4f2200a064e19b0ff7ba537079abec3ad1f45d7817105820232021-09-03 3:33:0419 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0xf632edc3a95ac16b9097468c1a5f016b6f6d5990d424cd93ba1616164c83f053105820232021-09-03 3:33:0419 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0xaf24ac636bd446ea915956475316609f18724d3b729550d07e84af4d8eb87e65105820232021-09-03 3:33:0419 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0x97173a5e7e319e3f6496c77ad57f4135928a2d1b6084540a29fbbd0e3f416b84105820222021-09-03 3:33:0119 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0x31c2ef00c9acbefb77b3cccf185c95f57b4cd85c686d55651059d4d75c8b6378105820222021-09-03 3:33:0119 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0x489196d6acf93653f7f1fb2f43c17fae839e0c76ebb54a2786fb598a291e88a7105820222021-09-03 3:33:0119 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0xe14acb84e87b4e7019d53b4b12027ced0230da924971ad31950495e32eb792ca105820222021-09-03 3:33:0119 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0xac99db36506f3a3a81ce4ce159673ea997e8c6bbdc6985af895d1517b3976663105820212021-09-03 3:32:5819 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0xd21d0b83ee8a893d46fb5569665fbacc3c71478a36ef024a53f4e4b2d6045a55105820212021-09-03 3:32:5819 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0x6010df1ef1e7893f9b782aaf70380ac3cd0d3a99a567de3b4bebe29a562fa389105820192021-09-03 3:32:5219 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0xc5b4d35ad9a7da1ee35a50d38c4a5dc5253a7f7d20cb16d5a6701da5be80db1f105820192021-09-03 3:32:5219 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0xca69ff42ca62e08f9e70372948dae14b3f2a5f49d190cbe870e905dc2b410d00105820182021-09-03 3:32:4919 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0x17d8974d974241ec1192d98f357306b59c5a43f1e2acefd6535a0a4ceeed8133105820182021-09-03 3:32:4919 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0x76f9b9ee5f1a83634e0e13efb99ba3463b48031fb09d798591a91163363d070e105820182021-09-03 3:32:4919 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0x45c836645f2b03dfc8749ce02586062759f754a00ab86bc8d1eb290a742ec1a2105820172021-09-03 3:32:4619 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0x774bf4b0d44b55d57931d80b5e25707f8efa2024f294dabfc3d6d43fc6621e86105820172021-09-03 3:32:4619 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0xb7b2fc4410c7ba52499f12b7d6f1b313691fcc4a83fbf4a7bbc698d0e601153b105820162021-09-03 3:32:4319 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0x3f15fa31729396ccea449c29a15f97924f1077c2da1d18726dc40868b9314cfa105820162021-09-03 3:32:4319 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0x5f86025fcb7b4d180aa399d21034327011c9ee10c52cb1cfc53a76df760ea129105820162021-09-03 3:32:4319 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0xeb3d91115ad1bf25f349ba43eddb2b34b444eaa27dcd828c9a5238e8d6822c12105820162021-09-03 3:32:4319 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0xfa53f6fd1c90d4d3abffe6b3054ec8064c21d7345d6239e5c69a90baf1000d01105820162021-09-03 3:32:4319 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
0x284da637b69ea36d1ce43dcae9b031f219a399631424801361be8549fa910de8105820152021-09-03 3:32:4019 days 23 hrs ago 0xec86576c74a4cd7fcedb522968290d7ae4fea4f30x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce0.02 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DragonEggReward

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 14 : DragonEggReward.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./libs/StringLibrary.sol";
import "./libs/BytesLibrary.sol";
import "./IDragonEggReward.sol";
import "./IDragonEgg.sol";
import "./Domain.sol";

contract DragonEggReward is Ownable, ReentrancyGuard, IDragonEggReward {
    using StringLibrary for string;
    using BytesLibrary for bytes32;
    using SafeERC20 for IERC20;

    address signer;
    address public beneficiary;
    mapping(uint => bool) usedSalts;
    address[] public eggAddresses;
    event RewardClaimed(address owner, address dragonAddress, uint tokenId );
    event EggAddressUpdated();

    constructor(address _signer, address _beneficiary) {
        signer = _signer;
        beneficiary = _beneficiary;
    }

    /*
    * Override egg addresses
    */
    function setEggAddresses(address[] calldata newEggAddresses, bool isResetAll) override public onlyOwner {
        // delete all existing address
        if(isResetAll) {
            delete eggAddresses;
        }

        for(uint i = 0; i < newEggAddresses.length; i++) {
            require(newEggAddresses[i] != address(0), "EggAddress: invalid");
            eggAddresses.push(newEggAddresses[i]);
        }

        emit EggAddressUpdated();

    }
    function claim(uint salt, uint price, address buyToken, Sig calldata sig) override public nonReentrant payable {
        require(price > 0, "price must be greater than 0");
        require(!usedSalts[salt], "Already claim ");
        address eggToken = validateSig(salt, price, buyToken, sig);
        usedSalts[salt] = true;

        if(buyToken == address (0)) { // Buy by Native Coin

            require(price <= msg.value, "Price: invalid");
            // refund if over paid
            if(price < msg.value) {
                /// refund over paid
                 payable(msg.sender).transfer(msg.value - price);
            }
            // send balance to beneficiary
            payable(beneficiary).transfer(price);
        } else {
            IERC20(buyToken).safeTransferFrom(msg.sender, beneficiary, price);
        }
        uint tokenId =  IDragonEgg(eggToken).mint(msg.sender);
        emit RewardClaimed(msg.sender, eggToken, tokenId);
    }

    function validateSig(uint salt, uint price, address buyToken, Sig memory sig) internal view returns(address) {

        for(uint i = 0; i < eggAddresses.length; i++) {
            address egg = eggAddresses[i];
            if(keccak256(abi.encode(this, salt, egg, price, buyToken, msg.sender)).toString().recover(sig.v, sig.r, sig.s) == signer) {
                return egg;
            }
        }
        revert("incorrect reward signature");
    }

    function changeSigner(address newSigner) override  public  onlyOwner {
        require(signer != newSigner, "Signer existed");
        signer = newSigner;
    }

    function changeBeneficiary(address newBeneficiary) override public onlyOwner {
        require(newBeneficiary != address (0), "Wrong beneficiary");
        require(beneficiary != newBeneficiary, "Beneficiary existed");
        beneficiary = newBeneficiary;
    }
}

File 2 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 3 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 4 of 14 : 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 5 of 14 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 6 of 14 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

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

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

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

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

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

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

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

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

File 7 of 14 : StringLibrary.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "./UintLibrary.sol";
library StringLibrary {
    using UintLibrary for uint256;

    function append(string memory _a, string memory _b) internal pure returns (string memory) {
        bytes memory _ba = bytes(_a);
        bytes memory _bb = bytes(_b);
        bytes memory bab = new bytes(_ba.length + _bb.length);
        uint k = 0;
        for (uint i = 0; i < _ba.length; i++) bab[k++] = _ba[i];
        for (uint i = 0; i < _bb.length; i++) bab[k++] = _bb[i];
        return string(bab);
    }

    function append(string memory _a, string memory _b, string memory _c) internal pure returns (string memory) {
        bytes memory _ba = bytes(_a);
        bytes memory _bb = bytes(_b);
        bytes memory _bc = bytes(_c);
        bytes memory bbb = new bytes(_ba.length + _bb.length + _bc.length);
        uint k = 0;
        for (uint i = 0; i < _ba.length; i++) bbb[k++] = _ba[i];
        for (uint i = 0; i < _bb.length; i++) bbb[k++] = _bb[i];
        for (uint i = 0; i < _bc.length; i++) bbb[k++] = _bc[i];
        return string(bbb);
    }

    function recover(string memory message, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        bytes memory msgBytes = bytes(message);
        bytes memory fullMessage = concat(
            bytes("\x19Ethereum Signed Message:\n"),
            bytes(msgBytes.length.toString()),
            msgBytes,
            new bytes(0), new bytes(0), new bytes(0), new bytes(0)
        );
        return ecrecover(keccak256(fullMessage), v, r, s);
    }

    function concat(bytes memory _ba, bytes memory _bb, bytes memory _bc, bytes memory _bd, bytes memory _be, bytes memory _bf, bytes memory _bg) internal pure returns (bytes memory) {
        bytes memory resultBytes = new bytes(_ba.length + _bb.length + _bc.length + _bd.length + _be.length + _bf.length + _bg.length);
        uint k = 0;
        for (uint i = 0; i < _ba.length; i++) resultBytes[k++] = _ba[i];
        for (uint i = 0; i < _bb.length; i++) resultBytes[k++] = _bb[i];
        for (uint i = 0; i < _bc.length; i++) resultBytes[k++] = _bc[i];
        for (uint i = 0; i < _bd.length; i++) resultBytes[k++] = _bd[i];
        for (uint i = 0; i < _be.length; i++) resultBytes[k++] = _be[i];
        for (uint i = 0; i < _bf.length; i++) resultBytes[k++] = _bf[i];
        for (uint i = 0; i < _bg.length; i++) resultBytes[k++] = _bg[i];
        return resultBytes;
    }
}

File 8 of 14 : BytesLibrary.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

library BytesLibrary {
    function toString(bytes32 value) internal pure returns (string memory) {
        bytes memory alphabet = "0123456789abcdef";
        bytes memory str = new bytes(64);
        for (uint256 i = 0; i < 32; i++) {
            str[i*2] = alphabet[uint8(value[i] >> 4)];
            str[1+i*2] = alphabet[uint8(value[i] & 0x0f)];
        }
        return string(str);
    }
}

File 9 of 14 : IDragonEggReward.sol
pragma solidity ^0.8.0;

import "./Domain.sol";

interface IDragonEggReward  {
    function claim(uint salt, uint price, address buyToken, Sig calldata sig) payable external;
    function changeSigner(address newSigner) external;
    function changeBeneficiary(address newBeneficiaryAddress) external;
    function setEggAddresses(address[] calldata newEggAddresses, bool isResetAll) external;
}

File 10 of 14 : IDragonEgg.sol
pragma solidity ^0.8.0;

interface IDragonEgg {
    function mint(address to) external returns(uint tokenId);
    function changeUseTokenUriFlag(bool newUseTokenIdInUri) external;
    function changeBaseURI(string calldata newBaseUri) external;
}

File 11 of 14 : Domain.sol
pragma solidity ^0.8.0;

/* An ECDSA signature. */
struct Sig {
    /* v parameter */
    uint8 v;
    /* r parameter */
    bytes32 r;
    /* s parameter */
    bytes32 s;
}

File 12 of 14 : 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 13 of 14 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

File 14 of 14 : UintLibrary.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
library UintLibrary {

    function toString(uint256 v) internal pure returns (string memory) {
        uint maxlength = 100;
        bytes memory reversed = new bytes(maxlength);
        uint i = 0;
        while (v != 0) {
            uint remainder = v % 10;
            v = v / 10;
            reversed[i++] = bytes1(uint8(48 + remainder));
        }
        bytes memory s = new bytes(i); // i + 1 is inefficient
        for (uint j = 0; j < i; j++) {
            s[j] = reversed[i - j - 1]; // to avoid the off-by-one error
        }
        return string(s);  // memory isn't implicitly convertible to storage
    }

}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_signer","type":"address"},{"internalType":"address","name":"_beneficiary","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[],"name":"EggAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"dragonAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"inputs":[],"name":"beneficiary","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newBeneficiary","type":"address"}],"name":"changeBeneficiary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSigner","type":"address"}],"name":"changeSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"address","name":"buyToken","type":"address"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct Sig","name":"sig","type":"tuple"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"eggAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[{"internalType":"address[]","name":"newEggAddresses","type":"address[]"},{"internalType":"bool","name":"isResetAll","type":"bool"}],"name":"setEggAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162001bd338038062001bd38339810160408190526200003491620000ef565b62000048620000426200007e565b62000082565b60018055600280546001600160a01b039384166001600160a01b0319918216179091556003805492909316911617905562000126565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000ea57600080fd5b919050565b6000806040838503121562000102578182fd5b6200010d83620000d2565b91506200011d60208401620000d2565b90509250929050565b611a9d80620001366000396000f3fe6080604052600436106100865760003560e01c8063d318ca9b11610059578063d318ca9b14610102578063d9f9f3d514610115578063dc07065714610135578063e8cb06bb14610155578063f2fde38b1461017557610086565b806338af3eed1461008b578063715018a6146100b65780638da5cb5b146100cd578063aad2b723146100e2575b600080fd5b34801561009757600080fd5b506100a0610195565b6040516100ad91906115c9565b60405180910390f35b3480156100c257600080fd5b506100cb6101a4565b005b3480156100d957600080fd5b506100a06101f8565b3480156100ee57600080fd5b506100cb6100fd366004611407565b610207565b6100cb61011036600461155f565b610296565b34801561012157600080fd5b506100cb610130366004611421565b6104d5565b34801561014157600080fd5b506100cb610150366004611407565b610639565b34801561016157600080fd5b506100a061017036600461152f565b6106ee565b34801561018157600080fd5b506100cb610190366004611407565b610718565b6003546001600160a01b031681565b6101ac610789565b6001600160a01b03166101bd6101f8565b6001600160a01b0316146101ec5760405162461bcd60e51b81526004016101e390611801565b60405180910390fd5b6101f6600061078d565b565b6000546001600160a01b031690565b61020f610789565b6001600160a01b03166102206101f8565b6001600160a01b0316146102465760405162461bcd60e51b81526004016101e390611801565b6002546001600160a01b03828116911614156102745760405162461bcd60e51b81526004016101e39061189a565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600260015414156102b95760405162461bcd60e51b81526004016101e39061190c565b6002600155826102db5760405162461bcd60e51b81526004016101e3906116d2565b60008481526004602052604090205460ff161561030a5760405162461bcd60e51b81526004016101e390611709565b6000610326858585610321368790038701876114bd565b6107dd565b6000868152600460205260409020805460ff1916600117905590506001600160a01b0383166103ef573484111561036f5760405162461bcd60e51b81526004016101e3906117d9565b348410156103af57336108fc61038586346119bb565b6040518115909202916000818181858888f193505050501580156103ad573d6000803e3d6000fd5b505b6003546040516001600160a01b039091169085156108fc029086906000818181858888f193505050501580156103e9573d6000803e3d6000fd5b5061040b565b60035461040b906001600160a01b0385811691339116876108ec565b6040516335313c2160e11b81526000906001600160a01b03831690636a6278429061043a9033906004016115c9565b602060405180830381600087803b15801561045457600080fd5b505af1158015610468573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048c9190611547565b90507f0aa4d283470c904c551d18bb894d37e17674920f3261a7f854be501e25f421b73383836040516104c1939291906115dd565b60405180910390a150506001805550505050565b6104dd610789565b6001600160a01b03166104ee6101f8565b6001600160a01b0316146105145760405162461bcd60e51b81526004016101e390611801565b801561052657610526600560006113be565b60005b8281101561060a57600084848381811061055357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105689190611407565b6001600160a01b0316141561058f5760405162461bcd60e51b81526004016101e390611836565b60058484838181106105b157634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105c69190611407565b81546001810183556000928352602090922090910180546001600160a01b0319166001600160a01b0390921691909117905580610602816119fe565b915050610529565b506040517f415227cac50a06f4632d16f614334bf8e073d3a7b7c7e67c9d2a45e3637ec97790600090a1505050565b610641610789565b6001600160a01b03166106526101f8565b6001600160a01b0316146106785760405162461bcd60e51b81526004016101e390611801565b6001600160a01b03811661069e5760405162461bcd60e51b81526004016101e390611731565b6003546001600160a01b03828116911614156106cc5760405162461bcd60e51b81526004016101e390611943565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600581815481106106fe57600080fd5b6000918252602090912001546001600160a01b0316905081565b610720610789565b6001600160a01b03166107316101f8565b6001600160a01b0316146107575760405162461bcd60e51b81526004016101e390611801565b6001600160a01b03811661077d5760405162461bcd60e51b81526004016101e39061168c565b6107868161078d565b50565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000805b6005548110156108cb5760006005828154811061080e57634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b03169050600260009054906101000a90046001600160a01b03166001600160a01b03166108a0856000015186602001518760400151610898308d888e8e3360405160200161087d9695949392919061161f565b6040516020818303038152906040528051906020012061094a565b929190610b00565b6001600160a01b031614156108b85791506108e49050565b50806108c3816119fe565b9150506107e1565b5060405162461bcd60e51b81526004016101e3906117a2565b949350505050565b610944846323b872dd60e01b85858560405160240161090d939291906115dd565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610bdc565b50505050565b604080518082018252601081526f181899199a1a9b1b9c1cb0b131b232b360811b6020820152815182815260608181018452926000919060208201818036833701905050905060005b6020811015610af6578260048683602081106109bf57634e487b7160e01b600052603260045260246000fd5b1a60f81b6001600160f81b031916901c60f81c60ff16815181106109f357634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b03191682610a0e83600261199c565b81518110610a2c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535082858260208110610a6457634e487b7160e01b600052603260045260246000fd5b825191901a600f16908110610a8957634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b03191682610aa483600261199c565b610aaf906001611970565b81518110610acd57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535080610aee816119fe565b915050610993565b509150505b919050565b6000808590506000610b786040518060400160405280601a81526020017f19457468657265756d205369676e6564204d6573736167653a0a000000000000815250610b4b8451610c70565b60408051600080825260208201818152828401828152606084019283526080840190945288939091610e06565b90506001818051906020012087878760405160008152602001604052604051610ba49493929190611601565b6020604051602081039080840390855afa158015610bc6573d6000803e3d6000fd5b5050604051601f19015198975050505050505050565b6000610c31826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112a69092919063ffffffff16565b805190915015610c6b5780806020019051810190610c4f91906114a1565b610c6b5760405162461bcd60e51b81526004016101e3906118c2565b505050565b60408051606480825260a08201909252606091906000908260208201818036833701905050905060005b8415610d12576000610cad600a87611a19565b9050610cba600a87611988565b9550610cc7816030611970565b60f81b8383610cd5816119fe565b945081518110610cf557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535050610c9a565b60008167ffffffffffffffff811115610d3b57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610d65576020820181803683370190505b50905060005b82811015610dfc57836001610d8083866119bb565b610d8a91906119bb565b81518110610da857634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b828281518110610dd357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535080610df4816119fe565b915050610d6b565b5095945050505050565b6060600082518451865188518a518c518e51610e229190611970565b610e2c9190611970565b610e369190611970565b610e409190611970565b610e4a9190611970565b610e549190611970565b67ffffffffffffffff811115610e7a57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610ea4576020820181803683370190505b5090506000805b8a51811015610f37578a8181518110610ed457634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319168383610eee816119fe565b945081518110610f0e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535080610f2f816119fe565b915050610eab565b5060005b8951811015610fc757898181518110610f6457634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319168383610f7e816119fe565b945081518110610f9e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535080610fbf816119fe565b915050610f3b565b5060005b885181101561105757888181518110610ff457634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b031916838361100e816119fe565b94508151811061102e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053508061104f816119fe565b915050610fcb565b5060005b87518110156110e75787818151811061108457634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b031916838361109e816119fe565b9450815181106110be57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350806110df816119fe565b91505061105b565b5060005b86518110156111775786818151811061111457634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b031916838361112e816119fe565b94508151811061114e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053508061116f816119fe565b9150506110eb565b5060005b8551811015611207578581815181106111a457634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b03191683836111be816119fe565b9450815181106111de57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350806111ff816119fe565b91505061117b565b5060005b84518110156112975784818151811061123457634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b031916838361124e816119fe565b94508151811061126e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053508061128f816119fe565b91505061120b565b50909998505050505050505050565b60606112b584846000856112bf565b90505b9392505050565b6060824710156112e15760405162461bcd60e51b81526004016101e39061175c565b6112ea8561137f565b6113065760405162461bcd60e51b81526004016101e390611863565b600080866001600160a01b0316858760405161132291906115ad565b60006040518083038185875af1925050503d806000811461135f576040519150601f19603f3d011682016040523d82523d6000602084013e611364565b606091505b5091509150611374828286611385565b979650505050505050565b3b151590565b606083156113945750816112b8565b8251156113a45782518084602001fd5b8160405162461bcd60e51b81526004016101e39190611659565b508054600082559060005260206000209081019061078691905b808211156113ec57600081556001016113d8565b5090565b80356001600160a01b0381168114610afb57600080fd5b600060208284031215611418578081fd5b6112b8826113f0565b600080600060408486031215611435578182fd5b833567ffffffffffffffff8082111561144c578384fd5b818601915086601f83011261145f578384fd5b81358181111561146d578485fd5b8760208083028501011115611480578485fd5b6020928301955093505084013561149681611a59565b809150509250925092565b6000602082840312156114b2578081fd5b81516112b881611a59565b6000606082840312156114ce578081fd5b6040516060810181811067ffffffffffffffff821117156114fd57634e487b7160e01b83526041600452602483fd5b604052823560ff81168114611510578283fd5b8152602083810135908201526040928301359281019290925250919050565b600060208284031215611540578081fd5b5035919050565b600060208284031215611558578081fd5b5051919050565b60008060008084860360c0811215611575578182fd5b853594506020860135935061158c604087016113f0565b92506060605f198201121561159f578182fd5b509295919450926060019150565b600082516115bf8184602087016119d2565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b93845260ff9290921660208401526040830152606082015260800190565b6001600160a01b0396871681526020810195909552928516604085015260608401919091528316608083015290911660a082015260c00190565b60006020825282518060208401526116788160408501602087016119d2565b601f01601f19169190910160400192915050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f7072696365206d7573742062652067726561746572207468616e203000000000604082015260600190565b6020808252600e908201526d020b63932b0b23c9031b630b4b6960951b604082015260600190565b60208082526011908201527057726f6e672062656e656669636961727960781b604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601a908201527f696e636f727265637420726577617264207369676e6174757265000000000000604082015260600190565b6020808252600e908201526d141c9a58d94e881a5b9d985b1a5960921b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601390820152721159d9d059191c995cdcce881a5b9d985b1a59606a1b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252600e908201526d14da59db995c88195e1a5cdd195960921b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526013908201527210995b99599a58da585c9e48195e1a5cdd1959606a1b604082015260600190565b6000821982111561198357611983611a2d565b500190565b60008261199757611997611a43565b500490565b60008160001904831182151516156119b6576119b6611a2d565b500290565b6000828210156119cd576119cd611a2d565b500390565b60005b838110156119ed5781810151838201526020016119d5565b838111156109445750506000910152565b6000600019821415611a1257611a12611a2d565b5060010190565b600082611a2857611a28611a43565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b801515811461078657600080fdfea2646970667358221220857c94c5ab931484f3f03c130cbc03da9d440d665b5c97d1ab9bc9d5d760dc2164736f6c634300080000330000000000000000000000001c044af0afdc4be7d15e01e53845d01cc83c3d710000000000000000000000005552e23f719e4eb06d96869f1724fe4fb6c5a3ce

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

0000000000000000000000001c044af0afdc4be7d15e01e53845d01cc83c3d710000000000000000000000005552e23f719e4eb06d96869f1724fe4fb6c5a3ce

-----Decoded View---------------
Arg [0] : _signer (address): 0x1c044af0afdc4be7d15e01e53845d01cc83c3d71
Arg [1] : _beneficiary (address): 0x5552e23f719e4eb06d96869f1724fe4fb6c5a3ce

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000001c044af0afdc4be7d15e01e53845d01cc83c3d71
Arg [1] : 0000000000000000000000005552e23f719e4eb06d96869f1724fe4fb6c5a3ce


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.