Contract 0x7c96079845eafb98af86c789708790c413745e13 1

Contract Overview

Balance:
0 BNB

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x5a99b75f12cbe6c3cbee3f674ffecff6690f08e0783a9141a5e1e428f6b86851Buy Egg149104942021-12-12 13:03:3741 days 6 hrs ago0x92d34a8930305b649cd414b6923719bd2c5743c6 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.0009832
0xab87a2fa24ba6bc6c4544884b0b3d33cf56f11f17d4fc13825ed8fd51d304b22Buy Item Box147983582021-12-08 15:26:5645 days 4 hrs ago0x2276ef66de905ebea002897726ca05b9d06eee4b IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00107026
0x13ae1af6a4d0211e1dbef6075a02d4fee898a06964938ae1e6e91182bdfe32ccBuy Egg147769162021-12-07 21:34:5045 days 22 hrs ago0x3cea8ffb3bc2c87d93efe3f92340f7c92684403c IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00098275
0x94f85f33ea0cff3c3d3045e02eed7f191d48f9f34ebb572862b404418cc5facfBuy Egg147769132021-12-07 21:34:4145 days 22 hrs ago0x3cea8ffb3bc2c87d93efe3f92340f7c92684403c IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00098298
0xb450534ac1d933485015c286331bf33962cf0b2d4ef02861aeb7394602bf0196Buy Egg147768862021-12-07 21:33:2045 days 22 hrs ago0x3cea8ffb3bc2c87d93efe3f92340f7c92684403c IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00098298
0x44f9436843770ad5b6c0d09d01683effa64a1ab84653c743fa7833937dc62c50Buy Egg Box147768832021-12-07 21:33:1145 days 22 hrs ago0x3cea8ffb3bc2c87d93efe3f92340f7c92684403c IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00432424
0x0efc5583a4902d50636e85d9ff3918902142998f0ec4aca8586d70155392250fBuy Egg Box147768282021-12-07 21:30:2645 days 22 hrs ago0x3cea8ffb3bc2c87d93efe3f92340f7c92684403c IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00447424
0x5748b19697504a54ec3d53f9c11be06f130d2dacc97791918180cb51ad18ef56Buy Egg147727332021-12-07 18:05:4146 days 1 hr ago0x5efacb9c824eb8b0ace54a0054b7924e6c9efaf0 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00098275
0x96db5fc346f2a711fd983f8640b4ef880b71267185d12720ae12aa6c60d670ccBuy Egg147727202021-12-07 18:05:0246 days 1 hr ago0x5efacb9c824eb8b0ace54a0054b7924e6c9efaf0 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00098309
0x72ee7930fbf87fd4e01ceca40e05ed39854b47f07c408b083ff0c3f63f28b920Buy Egg147727062021-12-07 18:04:2046 days 1 hr ago0x5efacb9c824eb8b0ace54a0054b7924e6c9efaf0 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00098298
0x99b03901ef194ae6ec4f95b9d13d3434d0bd474fa6a7971d123f8987428ed508Buy Egg147726842021-12-07 18:03:1446 days 1 hr ago0x5efacb9c824eb8b0ace54a0054b7924e6c9efaf0 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.0009832
0x0133771a5defced74680a2043b6e4cc02694bab308c0e70b8779851972346ac1Open Item Box147726632021-12-07 18:02:1146 days 1 hr ago0x5efacb9c824eb8b0ace54a0054b7924e6c9efaf0 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00089623
0xc79b32513f27b0bca7ca69c11f90adbf8d7ea4e17eb9f971c44d31a5c0226ba2Open Item Box147721622021-12-07 17:37:0846 days 2 hrs ago0x16b87c631d7ca5fd46b89a6e018a868f6b737193 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00213275
0x1ef520cedbdb8488b7972d123683dbebecc3c092bd2e2b6d5b8158f76bea59c5Buy Item Box147721252021-12-07 17:35:1746 days 2 hrs ago0x16b87c631d7ca5fd46b89a6e018a868f6b737193 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00107026
0x350ceb1b7933e491531eeb1255bca3389a2eafe386f08643a45a6175efd03dcbBuy Egg Box147721162021-12-07 17:34:5046 days 2 hrs ago0x16b87c631d7ca5fd46b89a6e018a868f6b737193 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00249182
0xe0e309162f9dfd321a27910dd9dbfa2c1d286140c2a27ae856be1c5bbcc1986fOpen Item Box147720802021-12-07 17:33:0246 days 2 hrs ago0x16b87c631d7ca5fd46b89a6e018a868f6b737193 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00213275
0x48e29dc9407eec3755c3d274401ac3e913879532a509cb7de63a18e5ca38bd11Buy Item Box147720562021-12-07 17:31:5046 days 2 hrs ago0x16b87c631d7ca5fd46b89a6e018a868f6b737193 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00107026
0xc3d95c6199a4a9f713255ca3f52129792156dab51f0c6d5e68042c74ad79562eBuy Egg Box147720462021-12-07 17:31:2046 days 2 hrs ago0x16b87c631d7ca5fd46b89a6e018a868f6b737193 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00249182
0xbf6b77d3b8449076f4e3560ba2d35e13aab14860cf781d2fd05aeaeb244fff1aOpen Item Box147719052021-12-07 17:24:1746 days 2 hrs ago0x16b87c631d7ca5fd46b89a6e018a868f6b737193 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00213275
0x6990862f4d95d37ae553f6835b2b4fc2e997515d0c1529c43228cda0980f07f8Buy Item Box147718762021-12-07 17:22:5046 days 2 hrs ago0x16b87c631d7ca5fd46b89a6e018a868f6b737193 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00107026
0xe064d985f57922e37cfd1de5429b6004c28a684db6181c7807bc6660ac883312Buy Egg Box147718652021-12-07 17:22:1746 days 2 hrs ago0x16b87c631d7ca5fd46b89a6e018a868f6b737193 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00249182
0xb7e21d7ae271fab1d736b4bd35db8bd5379a3c3af536fbe5ca87afd0686f6f59Open Item Box147718362021-12-07 17:20:5046 days 2 hrs ago0x16b87c631d7ca5fd46b89a6e018a868f6b737193 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00213275
0xe502df1f2851738b0c4297377fa60751eb6e0ecf224fb29aa38765bc82dfbdf0Buy Item Box147718052021-12-07 17:19:1746 days 2 hrs ago0x16b87c631d7ca5fd46b89a6e018a868f6b737193 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00107026
0x01a74c943bdfcf33f2808792cc083081abb5c278c68633f1c47cd4fcb9d96ab8Buy Egg Box147717982021-12-07 17:18:5646 days 2 hrs ago0x16b87c631d7ca5fd46b89a6e018a868f6b737193 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00249182
0x6f7b6ad0bb5766db5be6014a609f1f612f63b86bb81d732859ae6e5ae41877d7Open Item Box147716612021-12-07 17:12:0546 days 2 hrs ago0x16b87c631d7ca5fd46b89a6e018a868f6b737193 IN  0x7c96079845eafb98af86c789708790c413745e130 BNB0.00213275
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x5a99b75f12cbe6c3cbee3f674ffecff6690f08e0783a9141a5e1e428f6b86851149104942021-12-12 13:03:3741 days 6 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xd031cb67b7e6c47319dc809efa02f3130e436a720 BNB
0x5a99b75f12cbe6c3cbee3f674ffecff6690f08e0783a9141a5e1e428f6b86851149104942021-12-12 13:03:3741 days 6 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xb914d049ae092b193ad9d728c8d80bf73b5292b00 BNB
0x5a99b75f12cbe6c3cbee3f674ffecff6690f08e0783a9141a5e1e428f6b86851149104942021-12-12 13:03:3741 days 6 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xb914d049ae092b193ad9d728c8d80bf73b5292b00 BNB
0xab87a2fa24ba6bc6c4544884b0b3d33cf56f11f17d4fc13825ed8fd51d304b22147983582021-12-08 15:26:5645 days 4 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xb914d049ae092b193ad9d728c8d80bf73b5292b00 BNB
0xab87a2fa24ba6bc6c4544884b0b3d33cf56f11f17d4fc13825ed8fd51d304b22147983582021-12-08 15:26:5645 days 4 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xb914d049ae092b193ad9d728c8d80bf73b5292b00 BNB
0x13ae1af6a4d0211e1dbef6075a02d4fee898a06964938ae1e6e91182bdfe32cc147769162021-12-07 21:34:5045 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xd031cb67b7e6c47319dc809efa02f3130e436a720 BNB
0x13ae1af6a4d0211e1dbef6075a02d4fee898a06964938ae1e6e91182bdfe32cc147769162021-12-07 21:34:5045 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xb914d049ae092b193ad9d728c8d80bf73b5292b00 BNB
0x13ae1af6a4d0211e1dbef6075a02d4fee898a06964938ae1e6e91182bdfe32cc147769162021-12-07 21:34:5045 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xb914d049ae092b193ad9d728c8d80bf73b5292b00 BNB
0x94f85f33ea0cff3c3d3045e02eed7f191d48f9f34ebb572862b404418cc5facf147769132021-12-07 21:34:4145 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xd031cb67b7e6c47319dc809efa02f3130e436a720 BNB
0x94f85f33ea0cff3c3d3045e02eed7f191d48f9f34ebb572862b404418cc5facf147769132021-12-07 21:34:4145 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xb914d049ae092b193ad9d728c8d80bf73b5292b00 BNB
0x94f85f33ea0cff3c3d3045e02eed7f191d48f9f34ebb572862b404418cc5facf147769132021-12-07 21:34:4145 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xb914d049ae092b193ad9d728c8d80bf73b5292b00 BNB
0xb450534ac1d933485015c286331bf33962cf0b2d4ef02861aeb7394602bf0196147768862021-12-07 21:33:2045 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xd031cb67b7e6c47319dc809efa02f3130e436a720 BNB
0xb450534ac1d933485015c286331bf33962cf0b2d4ef02861aeb7394602bf0196147768862021-12-07 21:33:2045 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xb914d049ae092b193ad9d728c8d80bf73b5292b00 BNB
0xb450534ac1d933485015c286331bf33962cf0b2d4ef02861aeb7394602bf0196147768862021-12-07 21:33:2045 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xb914d049ae092b193ad9d728c8d80bf73b5292b00 BNB
0x44f9436843770ad5b6c0d09d01683effa64a1ab84653c743fa7833937dc62c50147768832021-12-07 21:33:1145 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xd031cb67b7e6c47319dc809efa02f3130e436a720 BNB
0x44f9436843770ad5b6c0d09d01683effa64a1ab84653c743fa7833937dc62c50147768832021-12-07 21:33:1145 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xd031cb67b7e6c47319dc809efa02f3130e436a720 BNB
0x44f9436843770ad5b6c0d09d01683effa64a1ab84653c743fa7833937dc62c50147768832021-12-07 21:33:1145 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xd031cb67b7e6c47319dc809efa02f3130e436a720 BNB
0x44f9436843770ad5b6c0d09d01683effa64a1ab84653c743fa7833937dc62c50147768832021-12-07 21:33:1145 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xd031cb67b7e6c47319dc809efa02f3130e436a720 BNB
0x44f9436843770ad5b6c0d09d01683effa64a1ab84653c743fa7833937dc62c50147768832021-12-07 21:33:1145 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xd031cb67b7e6c47319dc809efa02f3130e436a720 BNB
0x44f9436843770ad5b6c0d09d01683effa64a1ab84653c743fa7833937dc62c50147768832021-12-07 21:33:1145 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xd031cb67b7e6c47319dc809efa02f3130e436a720 BNB
0x44f9436843770ad5b6c0d09d01683effa64a1ab84653c743fa7833937dc62c50147768832021-12-07 21:33:1145 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xd031cb67b7e6c47319dc809efa02f3130e436a720 BNB
0x44f9436843770ad5b6c0d09d01683effa64a1ab84653c743fa7833937dc62c50147768832021-12-07 21:33:1145 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xd031cb67b7e6c47319dc809efa02f3130e436a720 BNB
0x44f9436843770ad5b6c0d09d01683effa64a1ab84653c743fa7833937dc62c50147768832021-12-07 21:33:1145 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xd031cb67b7e6c47319dc809efa02f3130e436a720 BNB
0x44f9436843770ad5b6c0d09d01683effa64a1ab84653c743fa7833937dc62c50147768832021-12-07 21:33:1145 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xd031cb67b7e6c47319dc809efa02f3130e436a720 BNB
0x44f9436843770ad5b6c0d09d01683effa64a1ab84653c743fa7833937dc62c50147768832021-12-07 21:33:1145 days 22 hrs ago 0x7c96079845eafb98af86c789708790c413745e13 0xb914d049ae092b193ad9d728c8d80bf73b5292b00 BNB
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x63513656fB9dE2491d1dB0B780a8358EFE2a6b14

Contract Name:
CorgiShop

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 10 : CorgiShop.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "./ICorgiItem.sol";
import "./ICorgiPet.sol";

contract CorgiShop is Ownable {
    using SafeERC20 for IERC20;

    IERC20 public corToken;
    IERC20 public assetToken;
    ICorgiItem public corgiItem;
    ICorgiPet public corgiPet;

    uint256 public eggPrice = 100 ether;
    uint256 public itemPrice = 10 ether;

    uint256 public itemBoxLength = 0;

    uint256 public buyerCommisionRatio = 500;
    uint256 public referCommisionRatio = 500;
    uint256 public constant ZOOM = 10000;
    uint256 nonce = 0;

    struct ItemBox {
        address owner;
        bool isOpened;
        uint256 boxType;
    }
    mapping(uint256 => ItemBox) public itemBoxs;
    mapping(uint8 => uint256) public itemComboPrices;
    mapping(uint8 => uint256) public eggComboPrices;

    event BuyEggEvent(address _buyer, uint256 _amount);
    event BuyItemEvent(address _buyer, uint256 _amount);
    event BuyItemBoxEvent(
        address _buyer,
        uint256 _comboType,
        uint256 _boxId,
        uint256 _amount
    );
    event BuyEggBoxEvent(
        address _buyer,
        uint256 _comboType,
        uint256 _boxId,
        uint256 _amount
    );
    event OpenItemBoxEvent(address _ownerBox, uint256 _boxId);

    function setPriceItemCombo(uint8 _comboType, uint256 _price)
        public
        onlyOwner
    {
        itemComboPrices[_comboType] = _price;
    }

    function setPriceEggCombo(uint8 _comboType, uint256 _price)
        public
        onlyOwner
    {
        eggComboPrices[_comboType] = _price;
    }

    constructor(
        IERC20 _corToken,
        ICorgiItem _corgiItem,
        ICorgiPet _corgiPet
    ) {
        corToken = _corToken;
        assetToken = _corToken;
        corgiItem = _corgiItem;
        corgiPet = _corgiPet;

        itemComboPrices[1] = 10 ether;
        itemComboPrices[3] = 30 ether;
        itemComboPrices[5] = 50 ether;
        itemComboPrices[10] = 100 ether;

        eggComboPrices[3] = 300 ether;
        eggComboPrices[5] = 500 ether;
        eggComboPrices[10] = 1000 ether;
    }

    function setCorgiPet(ICorgiPet _address) public onlyOwner {
        corgiPet = _address;
    }

    function setCorgiItem(ICorgiItem _address) public onlyOwner {
        corgiItem = _address;
    }

    function setEggPrice(uint256 _price) public onlyOwner {
        eggPrice = _price;
    }

    function setItemPrice(uint256 _price) public onlyOwner {
        itemPrice = _price;
    }

    function random() internal returns (uint256) {
        uint256 randomnumber = uint256(
            keccak256(abi.encodePacked(block.timestamp, msg.sender, nonce))
        ) % 4;
        randomnumber = randomnumber;
        nonce++;
        return randomnumber;
    }

    function pay(
        address _sender,
        address _referral,
        uint256 _basePrice
    ) internal {
        if (_referral != address(0) && _referral != _sender) {
            uint256 referCommisionFee = (_basePrice * referCommisionRatio) /
                ZOOM;
            uint256 buyerCommisionFee = (_basePrice * buyerCommisionRatio) /
                ZOOM;

            corToken.safeTransferFrom(
                _sender,
                address(this),
                _basePrice - referCommisionFee - buyerCommisionFee
            );
            corToken.safeTransferFrom(_sender, _referral, referCommisionFee);
        } else {
            corToken.safeTransferFrom(_sender, address(this), _basePrice);
        }
    }

    function buyEgg(address _referral, uint256 _eggType) public {
        // 0 = Corgi, 1 = Akita, 2 = Eaglato, 3 = Dodo
        require(
            _eggType == 0 || _eggType == 1 || _eggType == 2 || _eggType == 3,
            "invalid eggType"
        );
        require(
            corToken.balanceOf(msg.sender) >= eggPrice,
            "not enough COR balance"
        );
        pay(msg.sender, _referral, eggPrice);

        corgiPet.mint(msg.sender, _eggType);

        emit BuyEggEvent(msg.sender, eggPrice);
    }

    function buyItem(address _referral) public {
        require(
            corToken.balanceOf(msg.sender) >= itemPrice,
            "not enough COR balance"
        );

        pay(msg.sender, _referral, itemPrice);

        corgiItem.mint(msg.sender);
        emit BuyItemEvent(msg.sender, itemPrice);
    }

    function buyEggBox(uint8 _comboType, address _referral) public {
        uint256 price;
        price = eggComboPrices[_comboType];

        require(price != 0, "invalid _comboType");

        require(
            corToken.balanceOf(msg.sender) >= price,
            "not enough COR balance"
        );

        pay(msg.sender, _referral, price);

        for (uint256 i = 0; i < _comboType; i++) {
            uint256 eggType = random();
            corgiPet.mint(msg.sender, eggType);
        }
    }

    function buyItemBox(uint8 _comboType, address _referral) public {
        uint256 price;
        price = itemComboPrices[_comboType];

        require(price != 0, "invalid _comboType");

        require(
            corToken.balanceOf(msg.sender) >= price,
            "not enough COR balance"
        );

        pay(msg.sender, _referral, price);

        itemBoxLength++;
        itemBoxs[itemBoxLength].owner = msg.sender;
        itemBoxs[itemBoxLength].isOpened = false;
        itemBoxs[itemBoxLength].boxType = _comboType;

        emit BuyItemBoxEvent(msg.sender, _comboType, itemBoxLength, price);
    }

    function openItemBox(uint256 _boxId) public {
        require(itemBoxs[_boxId].isOpened == false, "box had been opened");
        require(itemBoxs[_boxId].owner == msg.sender);

        itemBoxs[_boxId].isOpened = true;

        for (uint256 i = 0; i < itemBoxs[_boxId].boxType; i++) {
            corgiItem.mintWithBox(msg.sender, _boxId);
        }
        emit OpenItemBoxEvent(msg.sender, _boxId);
    }

    function setAssetToken(IERC20 _token) public onlyOwner {
        assetToken = _token;
    }

    function withdrawAsset(uint256 _amount) public onlyOwner {
        require(
            assetToken.balanceOf(address(this)) >= _amount,
            "not enough Fund"
        );
        assetToken.safeTransfer(msg.sender, _amount);
    }
}

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

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 6 of 10 : ICorgiItem.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface ICorgiItem {
    function mint(address _player) external;
    function mintWithBox(address _player,  uint256 _boxId) external;
}

File 7 of 10 : ICorgiPet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface ICorgiPet {
    function mint(address _player, uint256 _eggType) external;
}

File 8 of 10 : 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 9 of 10 : 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);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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 10 of 10 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_corToken","type":"address"},{"internalType":"contract ICorgiItem","name":"_corgiItem","type":"address"},{"internalType":"contract ICorgiPet","name":"_corgiPet","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"_comboType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_boxId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"BuyEggBoxEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"BuyEggEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"_comboType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_boxId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"BuyItemBoxEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"BuyItemEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_ownerBox","type":"address"},{"indexed":false,"internalType":"uint256","name":"_boxId","type":"uint256"}],"name":"OpenItemBoxEvent","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":[],"name":"ZOOM","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"assetToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_referral","type":"address"},{"internalType":"uint256","name":"_eggType","type":"uint256"}],"name":"buyEgg","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_comboType","type":"uint8"},{"internalType":"address","name":"_referral","type":"address"}],"name":"buyEggBox","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_referral","type":"address"}],"name":"buyItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_comboType","type":"uint8"},{"internalType":"address","name":"_referral","type":"address"}],"name":"buyItemBox","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buyerCommisionRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"corToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"corgiItem","outputs":[{"internalType":"contract ICorgiItem","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"corgiPet","outputs":[{"internalType":"contract ICorgiPet","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"eggComboPrices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eggPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"itemBoxLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"itemBoxs","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"bool","name":"isOpened","type":"bool"},{"internalType":"uint256","name":"boxType","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"itemComboPrices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"itemPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_boxId","type":"uint256"}],"name":"openItemBox","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"referCommisionRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"setAssetToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ICorgiItem","name":"_address","type":"address"}],"name":"setCorgiItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ICorgiPet","name":"_address","type":"address"}],"name":"setCorgiPet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setEggPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setItemPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_comboType","type":"uint8"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPriceEggCombo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_comboType","type":"uint8"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPriceItemCombo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawAsset","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405268056bc75e2d63100000600555678ac7230489e8000060065560006007556101f46008556101f46009556000600a553480156200004057600080fd5b5060405162001c3938038062001c39833981016040819052620000639162000258565b620000776200007162000204565b62000208565b600180546001600160a01b039485166001600160a01b03199182168117909255600280548216909217909155600380549385169382169390931790925560048054919093169116179055678ac7230489e800007fd421a5181c571bba3f01190c922c3b2a896fc1d84e86c9f17ac10e67ebef8b5c556801a055690d9db800007fc0da782485e77ae272268ae0a3ff44c1552ecb60b3743924de17a815e0a3cfd7556802b5e3af16b18800007f2cd9ebf6ff19cdd7ffcc447d7c7d47b5991f5c7392a04512134e765802361fa65568056bc75e2d631000007f9e6c92d7be355807bd948171438a5e65aaf9e4c36f1405c1b9ca25d27c4ea3a055600d602052681043561a88293000007f26b4a10d0f0b04925c23bd4480ee147c916e5e87a7d68206a533dad160ac81e255681b1ae4d6e2ef5000007fa5049387d9cb649c59f4bda666105ba636c2a103d8e2b232ba4d125737cd214955600a600052683635c9adc5dea000007fba9d637f252776d5e1b3534bbd7554a1265a4ef0539d9ca50abe118598a6973c55620002c4565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000606084860312156200026d578283fd5b83516200027a81620002ab565b60208501519093506200028d81620002ab565b6040850151909250620002a081620002ab565b809150509250925092565b6001600160a01b0381168114620002c157600080fd5b50565b61196580620002d46000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80639172803b11610104578063d5e9da2c116100a2578063dec0a73a11610071578063dec0a73a1461036a578063ef9879db14610372578063f2fde38b14610385578063f79d875f14610398576101cf565b8063d5e9da2c14610334578063dac6db1c1461033c578063dc3b91be14610344578063dd62b03914610357576101cf565b8063ab654265116100de578063ab65426514610309578063af9b9d5614610311578063ba9e278714610324578063c445a98f1461032c576101cf565b80639172803b146102db57806398ca7795146102e3578063a805ad4f146102f6576101cf565b806358e5bc88116101715780637b9c53221161014b5780637b9c53221461029a5780638d92fdf3146102ad5780638da5cb5b146102c0578063904da9f6146102c8576101cf565b806358e5bc881461027757806370f803751461027f578063715018a614610292576101cf565b8063305e3552116101ad578063305e35521461021a5780633d63e60c1461022f578063466cce0314610242578063553c0a8714610264576101cf565b80631083f761146101d457806326bde5aa146101f2578063283087bd14610207575b600080fd5b6101dc6103ab565b6040516101e991906114dc565b60405180910390f35b610205610200366004611396565b6103ba565b005b6102056102153660046113b2565b610424565b6102226105b3565b6040516101e99190611840565b61020561023d366004611447565b6105b9565b6102556102503660046113fd565b610728565b6040516101e993929190611514565b61020561027236600461147d565b610757565b6102226107ac565b61020561028d3660046113fd565b6107b2565b6102056107f6565b6102056102a8366004611396565b610841565b6102056102bb3660046113fd565b6108a2565b6101dc610999565b6102056102d6366004611396565b6109a8565b6101dc610a09565b6102056102f13660046113fd565b610a18565b61022261030436600461142d565b610a5c565b610222610a6e565b61020561031f366004611447565b610a74565b610222610bef565b610222610bf5565b6101dc610bfb565b610222610c0a565b61020561035236600461147d565b610c10565b610205610365366004611396565b610c65565b6101dc610dcc565b61022261038036600461142d565b610ddb565b610205610393366004611396565b610ded565b6102056103a63660046113fd565b610e5b565b6002546001600160a01b031681565b6103c2610faf565b6001600160a01b03166103d3610999565b6001600160a01b0316146104025760405162461bcd60e51b81526004016103f9906116d2565b60405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b8015806104315750806001145b8061043c5750806002145b806104475750806003145b6104635760405162461bcd60e51b81526004016103f99061169b565b6005546001546040516370a0823160e01b81526001600160a01b03909116906370a08231906104969033906004016114dc565b60206040518083038186803b1580156104ae57600080fd5b505afa1580156104c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e69190611415565b10156105045760405162461bcd60e51b81526004016103f990611607565b6105113383600554610fb3565b600480546040516340c10f1960e01b81526001600160a01b03909116916340c10f1991610542913391869101611535565b600060405180830381600087803b15801561055c57600080fd5b505af1158015610570573d6000803e3d6000fd5b505050507fec948a1f8e059e8dc8ff74fb6db923d88f3a59b154a474e183cd803a08d86191336005546040516105a7929190611535565b60405180910390a15050565b60055481565b60ff82166000908152600d6020526040902054806105e95760405162461bcd60e51b81526004016103f990611707565b6001546040516370a0823160e01b815282916001600160a01b0316906370a08231906106199033906004016114dc565b60206040518083038186803b15801561063157600080fd5b505afa158015610645573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106699190611415565b10156106875760405162461bcd60e51b81526004016103f990611607565b610692338383610fb3565b60005b8360ff168110156107225760006106aa61108a565b600480546040516340c10f1960e01b81529293506001600160a01b0316916340c10f19916106dc913391869101611535565b600060405180830381600087803b1580156106f657600080fd5b505af115801561070a573d6000803e3d6000fd5b5050505050808061071a906118bf565b915050610695565b50505050565b600b60205260009081526040902080546001909101546001600160a01b03821691600160a01b900460ff169083565b61075f610faf565b6001600160a01b0316610770610999565b6001600160a01b0316146107965760405162461bcd60e51b81526004016103f9906116d2565b60ff9091166000908152600c6020526040902055565b61271081565b6107ba610faf565b6001600160a01b03166107cb610999565b6001600160a01b0316146107f15760405162461bcd60e51b81526004016103f9906116d2565b600555565b6107fe610faf565b6001600160a01b031661080f610999565b6001600160a01b0316146108355760405162461bcd60e51b81526004016103f9906116d2565b61083f60006110e6565b565b610849610faf565b6001600160a01b031661085a610999565b6001600160a01b0316146108805760405162461bcd60e51b81526004016103f9906116d2565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6108aa610faf565b6001600160a01b03166108bb610999565b6001600160a01b0316146108e15760405162461bcd60e51b81526004016103f9906116d2565b6002546040516370a0823160e01b815282916001600160a01b0316906370a08231906109119030906004016114dc565b60206040518083038186803b15801561092957600080fd5b505afa15801561093d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109619190611415565b101561097f5760405162461bcd60e51b81526004016103f9906117d2565b600254610996906001600160a01b03163383611136565b50565b6000546001600160a01b031690565b6109b0610faf565b6001600160a01b03166109c1610999565b6001600160a01b0316146109e75760405162461bcd60e51b81526004016103f9906116d2565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031681565b610a20610faf565b6001600160a01b0316610a31610999565b6001600160a01b031614610a575760405162461bcd60e51b81526004016103f9906116d2565b600655565b600c6020526000908152604090205481565b60085481565b60ff82166000908152600c602052604090205480610aa45760405162461bcd60e51b81526004016103f990611707565b6001546040516370a0823160e01b815282916001600160a01b0316906370a0823190610ad49033906004016114dc565b60206040518083038186803b158015610aec57600080fd5b505afa158015610b00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b249190611415565b1015610b425760405162461bcd60e51b81526004016103f990611607565b610b4d338383610fb3565b60078054906000610b5d836118bf565b9091555050600780546000908152600b602052604080822080546001600160a01b0319163390811790915583548352818320805460ff60a01b19169055835483529181902060ff871660019190910155915491517fecdf37617ab2105e9d6f2b2f6d7d661465a361729782c7b8fba7133f5b4e64d092610be29291879190869061154e565b60405180910390a1505050565b60075481565b60095481565b6003546001600160a01b031681565b60065481565b610c18610faf565b6001600160a01b0316610c29610999565b6001600160a01b031614610c4f5760405162461bcd60e51b81526004016103f9906116d2565b60ff9091166000908152600d6020526040902055565b6006546001546040516370a0823160e01b81526001600160a01b03909116906370a0823190610c989033906004016114dc565b60206040518083038186803b158015610cb057600080fd5b505afa158015610cc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce89190611415565b1015610d065760405162461bcd60e51b81526004016103f990611607565b610d133382600654610fb3565b6003546040517f6a6278420000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690636a62784290610d5c9033906004016114dc565b600060405180830381600087803b158015610d7657600080fd5b505af1158015610d8a573d6000803e3d6000fd5b505050507fd8f31e628a0b74a52005119415ba9e3eb6b50479de0b7e470c95de6d3239adc733600654604051610dc1929190611535565b60405180910390a150565b6001546001600160a01b031681565b600d6020526000908152604090205481565b610df5610faf565b6001600160a01b0316610e06610999565b6001600160a01b031614610e2c5760405162461bcd60e51b81526004016103f9906116d2565b6001600160a01b038116610e525760405162461bcd60e51b81526004016103f9906115aa565b610996816110e6565b6000818152600b6020526040902054600160a01b900460ff1615610e915760405162461bcd60e51b81526004016103f990611809565b6000818152600b60205260409020546001600160a01b03163314610eb457600080fd5b6000818152600b60205260408120805460ff60a01b1916600160a01b1790555b6000828152600b6020526040902060010154811015610f7d576003546040517faae42f970000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063aae42f9790610f389033908690600401611535565b600060405180830381600087803b158015610f5257600080fd5b505af1158015610f66573d6000803e3d6000fd5b505050508080610f75906118bf565b915050610ed4565b507f5b0538fec88acd81d34b51ccb42c68f087b6b5206fe63871b8e9446744c646cc3382604051610dc1929190611535565b3390565b6001600160a01b03821615801590610fdd5750826001600160a01b0316826001600160a01b031614155b1561106d57600061271060095483610ff5919061185d565b610fff9190611849565b9050600061271060085484611014919061185d565b61101e9190611849565b905061104e853083611030868861187c565b61103a919061187c565b6001546001600160a01b03169291906111b9565b600154611066906001600160a01b03168686856111b9565b5050611085565b600154611085906001600160a01b03168430846111b9565b505050565b60008060044233600a546040516020016110a6939291906114b4565b6040516020818303038152906040528051906020012060001c6110c991906118da565b600a805491925060006110db836118bf565b909155509091505090565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6110858363a9059cbb60e01b8484604051602401611155929190611535565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526111da565b610722846323b872dd60e01b858585604051602401611155939291906114f0565b600061122f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112699092919063ffffffff16565b805190915015611085578080602001905181019061124d91906113dd565b6110855760405162461bcd60e51b81526004016103f990611775565b60606112788484600085611282565b90505b9392505050565b6060824710156112a45760405162461bcd60e51b81526004016103f99061163e565b6112ad85611342565b6112c95760405162461bcd60e51b81526004016103f99061173e565b600080866001600160a01b031685876040516112e59190611498565b60006040518083038185875af1925050503d8060008114611322576040519150601f19603f3d011682016040523d82523d6000602084013e611327565b606091505b509150915061133782828661134c565b979650505050505050565b803b15155b919050565b6060831561135b57508161127b565b82511561136b5782518084602001fd5b8160405162461bcd60e51b81526004016103f99190611577565b803560ff8116811461134757600080fd5b6000602082840312156113a7578081fd5b813561127b8161191a565b600080604083850312156113c4578081fd5b82356113cf8161191a565b946020939093013593505050565b6000602082840312156113ee578081fd5b8151801515811461127b578182fd5b60006020828403121561140e578081fd5b5035919050565b600060208284031215611426578081fd5b5051919050565b60006020828403121561143e578081fd5b61127b82611385565b60008060408385031215611459578182fd5b61146283611385565b915060208301356114728161191a565b809150509250929050565b6000806040838503121561148f578182fd5b6113cf83611385565b600082516114aa818460208701611893565b9190910192915050565b92835260609190911b6bffffffffffffffffffffffff19166020830152603482015260540190565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b039390931683529015156020830152604082015260600190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0394909416845260ff9290921660208401526040830152606082015260800190565b6000602082528251806020840152611596816040850160208701611893565b601f01601f19169190910160400192915050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b60208082526016908201527f6e6f7420656e6f75676820434f522062616c616e636500000000000000000000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f696e76616c696420656767547970650000000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526012908201527f696e76616c6964205f636f6d626f547970650000000000000000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f6e6f7420656e6f7567682046756e640000000000000000000000000000000000604082015260600190565b60208082526013908201527f626f7820686164206265656e206f70656e656400000000000000000000000000604082015260600190565b90815260200190565b60008261185857611858611904565b500490565b6000816000190483118215151615611877576118776118ee565b500290565b60008282101561188e5761188e6118ee565b500390565b60005b838110156118ae578181015183820152602001611896565b838111156107225750506000910152565b60006000198214156118d3576118d36118ee565b5060010190565b6000826118e9576118e9611904565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6001600160a01b038116811461099657600080fdfea26469706673582212200b931af004b30f0acc4948344552d2274c14a15f196d6bbea8a651af417c4c2664736f6c63430008000033000000000000000000000000b914d049ae092b193ad9d728c8d80bf73b5292b0000000000000000000000000e0d509c9459f17ec95e90cbcc65f81d43f3a5b8a000000000000000000000000be9af93062e414e5c11c62586f2fc84fb7783047

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading