POL Price: $0.296025 (-1.00%)
 

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Manual Remove Fr...588292182024-07-01 13:15:19221 days ago1719839719IN
0x4E77Ba63...3ECf27C27
0 POL0.001383837
Anima Gacha588291242024-07-01 13:11:59221 days ago1719839519IN
0x4E77Ba63...3ECf27C27
0 POL0.003658840
Anima Gacha588291152024-07-01 13:11:39221 days ago1719839499IN
0x4E77Ba63...3ECf27C27
0 POL0.0032205541
Anima Gacha588128562024-07-01 3:12:51221 days ago1719803571IN
0x4E77Ba63...3ECf27C27
0 POL0.01623225126.4391332
Anima Gacha588091732024-07-01 0:39:55221 days ago1719794395IN
0x4E77Ba63...3ECf27C27
0 POL0.003338430.00000333
Anima Gacha588091662024-07-01 0:39:39221 days ago1719794379IN
0x4E77Ba63...3ECf27C27
0 POL0.002356530.00000257
Anima Gacha588091582024-07-01 0:39:23221 days ago1719794363IN
0x4E77Ba63...3ECf27C27
0 POL0.0037488330.00000247
Anima Gacha588091512024-07-01 0:39:07221 days ago1719794347IN
0x4E77Ba63...3ECf27C27
0 POL0.0046879230.00000222
Anima Gacha588091432024-07-01 0:38:51221 days ago1719794331IN
0x4E77Ba63...3ECf27C27
0 POL0.0032790930.00000222
Anima Gacha588091362024-07-01 0:38:37221 days ago1719794317IN
0x4E77Ba63...3ECf27C27
0 POL0.0052217730.00000206
Anima Gacha587612642024-06-29 20:02:30223 days ago1719691350IN
0x4E77Ba63...3ECf27C27
0 POL0.0049127430.00000002
Anima Gacha587612572024-06-29 20:02:14223 days ago1719691334IN
0x4E77Ba63...3ECf27C27
0 POL0.003935430.00000003
Anima Gacha587607092024-06-29 19:42:48223 days ago1719690168IN
0x4E77Ba63...3ECf27C27
0 POL0.0048527430.00000002
Anima Gacha587368902024-06-29 5:22:22223 days ago1719638542IN
0x4E77Ba63...3ECf27C27
0 POL0.003422430.00000111
Anima Gacha587368812024-06-29 5:22:04223 days ago1719638524IN
0x4E77Ba63...3ECf27C27
0 POL0.0042349230.00000132
Anima Gacha587368742024-06-29 5:21:48223 days ago1719638508IN
0x4E77Ba63...3ECf27C27
0 POL0.0045437430.00000159
Anima Gacha587368662024-06-29 5:21:32223 days ago1719638492IN
0x4E77Ba63...3ECf27C27
0 POL0.003422430.00000174
Anima Gacha587171772024-06-28 17:42:09224 days ago1719596529IN
0x4E77Ba63...3ECf27C27
0 POL0.0030918330.00001965
Anima Gacha587169712024-06-28 17:34:51224 days ago1719596091IN
0x4E77Ba63...3ECf27C27
0 POL0.0032286330.00000959
Anima Gacha587169642024-06-28 17:34:37224 days ago1719596077IN
0x4E77Ba63...3ECf27C27
0 POL0.003880530.00001095
Anima Gacha586877942024-06-27 23:42:11224 days ago1719531731IN
0x4E77Ba63...3ECf27C27
0 POL0.003935430.00000002
Anima Gacha586835222024-06-27 21:07:15224 days ago1719522435IN
0x4E77Ba63...3ECf27C27
0 POL0.0067873544
Anima Gacha586835132024-06-27 21:06:55224 days ago1719522415IN
0x4E77Ba63...3ECf27C27
0 POL0.0050195244
Anima Gacha586835032024-06-27 21:06:33224 days ago1719522393IN
0x4E77Ba63...3ECf27C27
0 POL0.003456244
Anima Gacha586468542024-06-26 23:12:51225 days ago1719443571IN
0x4E77Ba63...3ECf27C27
0 POL0.0047687430.00000002
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
KimojiGacha

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 11 : Gacha.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";

interface IAnima {
    //interface for Anima contract
    function burnFrom(address account, uint256 amount) external;
    function transfer(address to, uint256 amount) external;
    function transferFrom(address from, address to, uint256 amount) external;
    function allowance(address owner, address spender) external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
}

interface IBurnableERC1155 is IERC1155 {
    function burn(address account, uint256 id, uint256 value) external;
}


// should be ERC721 and ERC1155 receiver

contract KimojiGacha is
    ERC165,
    IERC721Receiver,
    IERC1155Receiver,
    Ownable,
    AccessControl
{
    IAnima public anima;
    IBurnableERC1155 public burnable;

    event GachaSent(uint256 index, address contractAddress, uint256 tokenID, address to);

    // structure to keep track of tokens
    struct tokenInfo {
        address contractAddress;
        uint256 tokenId;
        uint32 tokenType; //0 = erc721, 1 = erc 1155 (maybe an enum here?)
    }

    tokenInfo[] public availableTokens;

    address[] private whitelistSenders;
    address[] private blacklistContract;

    uint256[] public burnableIds;
   
    uint256 public animaCost = 100 * 10**18; // 100 anima cost - settable
    uint256 public maticCost = 5 * 10**18; // 5 matic cost - settable
    
    uint256 private tokenCount = 0;
    uint256 private randNonce = 0;

    bool private paused = true;
    bool private maticEnabled = false;
    bool private burnableEnabled = false;
    bool private limitBurnableIds = false;
    bool private burnableBurn = true;  //do we call burn (if false transfer to burn address)
    bool private burnAnima = false;

    address private burnAddress = 0x000000000000000000000000000000000000dEaD;

    constructor() Ownable(msg.sender) {
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
        whitelistSenders.push(msg.sender);
    }

    // Anima payment gets a random token
    function animaGacha() external {
        if (paused) revert("Paused");
        //check if user has enough anima
        if (anima.balanceOf(msg.sender) < animaCost) revert("Cost");
        //check if we have approval of enough anima
        if (anima.allowance(msg.sender, address(this)) < animaCost) revert("Allow");
        if (tokenCount == 0) revert("NoTokens"); 

        //depending on the setting either burn the anima or tansfer to this contract
        if (burnAnima) anima.burnFrom(msg.sender, animaCost);
        else anima.transferFrom(msg.sender, address(this), animaCost);

        doGacha();
    }

    function checkBurnableIDs(uint256 tokenId) internal view returns(bool){    
        uint256 length = burnableIds.length;
        for (uint256 i; i < length; ) {
            if (burnableIds[i] == tokenId) return true;
            unchecked {++i;}
        }
        return false;
    }
 
    function burnableForGacha(uint256 tokenId) external {
        if (paused) revert("Paused");
        if (!burnableEnabled) revert ("NotEnabled");
        //check if user has approved the burnable
        if (!burnable.isApprovedForAll(msg.sender, address(this))) revert ("Allow");
        //check if user has balance of burnable
        if (burnable.balanceOf(msg.sender, tokenId) == 0) revert ("NotOwned");
        //possible to limit which token ids can be burned for Gacha
        if (limitBurnableIds) {
            if (!checkBurnableIDs(tokenId)) revert ("NotBurnable");
        }
        if (tokenCount == 0) revert("NoTokens");        

        //prefer to burn them with burn function, but can setBurnableBurn false to send them to 0xdead
        // if the burn function is not accessible
        if (burnableBurn) burnable.burn(msg.sender, tokenId, 1);
        else burnable.safeTransferFrom(msg.sender, burnAddress, tokenId, 1, new bytes(0));

        doGacha();

    }

    // Matic payment gets a random token
    function maticGacha() external payable {
        if (paused) revert("Paused");
        if (!maticEnabled) revert("NotEnabled");
        if (msg.value < maticCost) revert("Cost");
        if (tokenCount == 0) revert("NoTokens"); 

        doGacha();
    }

    //pick and send a random token
    function doGacha() internal { 
        //get a pseudorandom index
        uint256 index = selectRandomIndex();

        //send the token
        sendTokenFromIndex(index, msg.sender);

        //cleanup
        removeFromTokens(index);
    }

    //function to cleanup after sending a token
    function removeFromTokens(uint256 index) internal { 
        //cleanup the availableTokens array after sending the token
        uint256 length = availableTokens.length;
        if (index < length - 1) {
            //if its not the last element in the array move the last element to this spot
            availableTokens[index] = availableTokens[length - 1];
        }
        availableTokens.pop(); //remove the last element
        if (tokenCount > 0) tokenCount--; // reduce the count
    }  

    //get the token info from the index and select the correct send method
    function sendTokenFromIndex(uint256 index, address to) internal {
        tokenInfo memory info = availableTokens[index];

        if (info.tokenType == 0) 
        {
            sendERC721(info.contractAddress, info.tokenId, to);
        } 
        else 
        {
            sendERC1155(info.contractAddress, info.tokenId, to);
        }

        emit GachaSent(index, info.contractAddress, info.tokenId, to);
    }

    //actual sending for ERC721
    function sendERC721(address contractAddress, uint256 tokenId, address to) internal {
        IERC721 tokenContract = IERC721(contractAddress);
        tokenContract.safeTransferFrom(address(this), to, tokenId);
    }

    //actual sending for ERC1155
    function sendERC1155(address contractAddress, uint256 tokenId, address to) internal {
        IERC1155 tokenContract = IERC1155(contractAddress);
        tokenContract.safeTransferFrom(address(this), to, tokenId, 1, new bytes(0));
    }

    // use the pseudo-random to select
    function selectRandomIndex() internal returns (uint256) {
        assert(tokenCount > 0); //should always have tokens if we get here

        //get a peudo-random index
        ++randNonce;
        uint256 random = uint256(keccak256(abi.encodePacked(block.timestamp, blockhash(block.number), msg.sender, randNonce)));
        uint256 index = random % tokenCount;
        
        return index;
    }

    //should only accept tokens sent from an approved wallet
    function checkWhitelist(address sender) internal view returns (bool) {
        uint256 length = whitelistSenders.length;
        for (uint256 i; i < length; ) {
            if (whitelistSenders[i] == sender) return true;
            unchecked {++i;}
        }
        return false;
    }

    //can blacklist contracts we don't want to receive from (opensea TransferHelper ugh...)
    function checkBlacklist(address sender) internal view returns (bool) {
        uint256 length = blacklistContract.length;
        for (uint256 i; i < length; ) {
            if (blacklistContract[i] == sender) return true;
            unchecked {++i;}
        }
        return false;
    }

    //solidity ERC165 supportsInterface implementation (required by solidity)
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165, AccessControl) returns (bool)
    {
        return
            interfaceId == type(IERC1155Receiver).interfaceId ||
            interfaceId == type(IERC721Receiver).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    //ERC721 receiver implementation
    function onERC721Received(
        address,
        address from,
        uint256 tokenId,
        bytes memory
    ) public virtual returns (bytes4) { 
        if (!checkWhitelist(from)) revert("NotApproved"); //we can only receive from whitelisted senders
        if (checkBlacklist(msg.sender)) revert ("BadContractSender"); //msg.sender SHOULD be the ERC721 contract, 
            //but bulk-sending ERC 721 tokens from Open Sea is setting this as the TransferHelper contract not the ERC721 contract
            //best I can do until I understand more or how to get the actual contract is blacklist the TransferHelper
            //that way bulk transfers get rejected and don't fill the availableTokens with unsendables

        //the msg.sender should be the tokens contract (how did we get OS transfer helper as the msg sender??)
        availableTokens.push(tokenInfo(msg.sender, tokenId, 0)); //add contract token id and type (0=erc721)
        tokenCount++;
        return this.onERC721Received.selector;
    }

    //ERC1155 receiver implementation
    function onERC1155Received(
        address,
        address from,
        uint256 tokenId,
        uint256 value,
        bytes memory
    ) public virtual override returns (bytes4) {
        if (!checkWhitelist(from)) revert("NotApproved");
        //the msg.sender will be the tokens contract
        //for erc1155 we want to add it "value" times - one for each token we hold
        for (uint256 i; i < value; ) {
            availableTokens.push(tokenInfo(msg.sender, tokenId, 1)); //add contract token id and type (1=erc1155)
            tokenCount++;
            unchecked {++i;}
        }
        return this.onERC1155Received.selector;
    }

    //ERC1155 batch receiver implementation
    function onERC1155BatchReceived(
        address,
        address from,
        uint256[] memory tokenIds,
        uint256[] memory values,
        bytes memory
    ) public virtual override returns (bytes4) {
        if (!checkWhitelist(from)) revert("NotApproved");
        //the sender will be from the tokens contract
        // for each token erc1155 arrived we want to add it "value" times - one for each token we hold
        uint256 count = tokenIds.length;
        for (uint256 i; i < count; ) {
            for (uint256 j; j < values[i]; ) {
                availableTokens.push(tokenInfo(msg.sender, tokenIds[i], 1)); //add contract token id and type (1=erc1155)
                tokenCount++;
                unchecked {++j;}
            }
            unchecked {++i;}
        }
        return this.onERC1155BatchReceived.selector;
    }

    //get the count of tokens in the Gacha
    function getAvailableTokenCount() external view returns (uint256) {
        return availableTokens.length;
    }

    //function to list held tokens with contract/tokenID (front end will need to grab the urls from the contract)
    function listAvalableTokenInfos(uint256 startIndex, uint256 count) external view returns (tokenInfo[] memory)
    {
        tokenInfo[] memory tokens = new tokenInfo[](count);
        
        //guard against overflows
        if (count > availableTokens.length) count = availableTokens.length;
        if (startIndex + count > availableTokens.length) count = availableTokens.length - startIndex;

        for (uint256 i; i < count; ) {
            tokens[i] = availableTokens[startIndex + i];
            unchecked {++i;}
        }
        return tokens;
    }

    //---------------------------ADMIN functions

    //we need some cleanup / fallbacks to ensure we can retreive all tokens
    
    function manualSendERC721(address contractAddress, uint256 tokenId, address to) external onlyRole(DEFAULT_ADMIN_ROLE) {
        sendERC721(contractAddress, tokenId, to);
    }

    function manualSendERC1155(address contractAddress, uint256 tokenId, address to) external onlyRole(DEFAULT_ADMIN_ROLE) {
        sendERC1155(contractAddress, tokenId, to);
    }
   
   function manualSendTokenFromIndex(uint256 index, address to) external onlyRole(DEFAULT_ADMIN_ROLE) {
        sendTokenFromIndex(index, to);

        removeFromTokens(index);
   }

    function manualRemoveFromIndex(uint256 index) external onlyRole(DEFAULT_ADMIN_ROLE) {
        removeFromTokens(index);
    }

    //fix the contract address for a tokenInfo --- somehow getting Transfer helper contract
    function adjustTokenInfoContract(uint256 index, address contractAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {
        availableTokens[index].contractAddress = contractAddress;
    }

    //add a sender address to whitelisted senders
    function setWhitelistSender(address wlAddress) external onlyRole(DEFAULT_ADMIN_ROLE)
    {
        whitelistSenders.push(wlAddress);
    }

    //remove a sender address from whitelisted senders
    function removeWhitelistSender(address removeAddress) external onlyRole(DEFAULT_ADMIN_ROLE)
    {
        uint256 length = whitelistSenders.length;
        for (uint256 i; i < length; ) {
            if (whitelistSenders[i] == removeAddress) {
                if (i < length - 1) {
                    //if its not the last element in the array move the last element to this spot
                    whitelistSenders[i] = whitelistSenders[length - 1];
                }
                whitelistSenders.pop(); //remove last element
                return; //exit loop after removal
            }
            unchecked {++i;}
        }
    }

    function setBlacklistContract(address blAddress) external onlyRole(DEFAULT_ADMIN_ROLE)
    {
        blacklistContract.push(blAddress);
    }

    //remove an address from blacklisted contracts 
    function removeBlacklistContract(address removeAddress) external onlyRole(DEFAULT_ADMIN_ROLE)
    {
        uint256 length = blacklistContract.length;
        for (uint256 i; i < length; ) {
            if (blacklistContract[i] == removeAddress) {
                if (i < length - 1) {
                    //if its not the last element in the array move the last element to this spot
                    blacklistContract[i] = blacklistContract[length - 1];
                }
                blacklistContract.pop(); //remove last element
                return; //exit loop after removal
            }
            unchecked {++i;}
        }
    }

    //set the anima token contract
    function setAnimaTokenContract(IAnima _contract) external onlyRole(DEFAULT_ADMIN_ROLE) {
        anima = _contract;
    }

    //set the burnable token contract
    function setBurnableContract(IBurnableERC1155 _contract) external onlyRole(DEFAULT_ADMIN_ROLE) {
        burnable = _contract;
    }

    function getBurnableContract() public view returns(address) {
        return address(burnable);
    }

    //can assign token id's to be burnable or not... Id's are only checked if limitBurnableIds is enabled
    function setBurnableIds(uint256[] calldata _burnableIds) external onlyRole(DEFAULT_ADMIN_ROLE) {
        
        uint256 length = _burnableIds.length;

        burnableIds = new uint256[](length);

        for (uint256 i; i < length;) {
            burnableIds[i] = _burnableIds[i];
            unchecked {++i;}
        }
    }

    function getBurnableIds() public view returns (uint256[] memory) {
        return burnableIds;
    }

    //set ANIMA COST (in whole ANIMA)
    function setAnimaCost(uint256 newAnimaCost) external onlyRole(DEFAULT_ADMIN_ROLE)
    {
        animaCost = newAnimaCost * 10**18; // add the decimals
    }

    //set MATIC cost (in whole MATIC)
    function setMaticCost(uint256 newMaticCost) external onlyRole(DEFAULT_ADMIN_ROLE)
    {
        maticCost = newMaticCost * 10**18; // add the decimals
    }

    //set MATIC cost (in gwei - useful if you want fractional matic)
    function setMaticCostGWEI(uint256 newMaticCostGWEI) external onlyRole(DEFAULT_ADMIN_ROLE)
    {
        maticCost = newMaticCostGWEI; // use the given GWEI cost
    }

    //call burn on burnable contract = true; transfer to burn address = false;
    function setBurnableBurn(bool state) external onlyRole(DEFAULT_ADMIN_ROLE) {
        burnableBurn = state;
    }

    //function to set contract to burn anima instead of collecting it
    function setBurnAnima(bool state) external onlyRole(DEFAULT_ADMIN_ROLE) {
        burnAnima = state;
    }

    function setPaused(bool state) external onlyRole(DEFAULT_ADMIN_ROLE)
    {
        paused = state;
    }

    function getPaused() public view returns (bool)
    {
        return paused;
    }

    function setMaticEnabled(bool state) external onlyRole(DEFAULT_ADMIN_ROLE) {
        maticEnabled = state;
    }

    function getMaticEnabled() public view returns(bool) {
        return maticEnabled;
    }

    function setBurnableEnabled(bool state) external onlyRole(DEFAULT_ADMIN_ROLE) {
        burnableEnabled = state;
    }

    function getBurnableEnabled() public view returns(bool) {
        return burnableEnabled;
    }

    function setLimitBurnableIds(bool state) external onlyRole(DEFAULT_ADMIN_ROLE) {
        limitBurnableIds = state;
    }

    function getBurnableLimited() public view returns(bool) {
        return limitBurnableIds;
    }

    //withdraw for ANIMA
    function withdrawAnima() public onlyOwner {
        uint256 amount = anima.balanceOf(address(this));
        anima.transfer(owner(), amount);
    }

    //withdraw for MATIC
    function withdraw() public payable onlyOwner {
        (bool os, ) = payable(owner()).call{value: address(this).balance}("");
        require(os);
    }
}

File 2 of 11 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```solidity
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```solidity
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address account => bool) hasRole;
        bytes32 adminRole;
    }

    mapping(bytes32 role => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual returns (bool) {
        return _roles[role].hasRole[account];
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address callerConfirmation) public virtual {
        if (callerConfirmation != _msgSender()) {
            revert AccessControlBadConfirmation();
        }

        _revokeRole(role, callerConfirmation);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        if (!hasRole(role, account)) {
            _roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        if (hasRole(role, account)) {
            _roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

File 3 of 11 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 11 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

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

File 5 of 11 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

/**
 * @dev Interface that must be implemented by smart contracts in order to receive
 * ERC-1155 token transfers.
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 6 of 11 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`.
     *
     * WARNING: This function can potentially allow a reentrancy attack when transferring tokens
     * to an untrusted contract, when invoking {onERC1155Received} on the receiver.
     * Ensure to follow the checks-effects-interactions pattern and consider employing
     * reentrancy guards when interacting with untrusted contracts.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `value` amount.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes calldata data) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     *
     * WARNING: This function can potentially allow a reentrancy attack when transferring tokens
     * to an untrusted contract, when invoking {onERC1155BatchReceived} on the receiver.
     * Ensure to follow the checks-effects-interactions pattern and consider employing
     * reentrancy guards when interacting with untrusted contracts.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `values` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external;
}

File 7 of 11 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.20;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be
     * reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 8 of 11 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../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`.
     *
     * 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;

    /**
     * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 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 address zero.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) external;

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

    /**
     * @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);
}

File 9 of 11 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @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 10 of 11 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 11 of 11 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     */
    function renounceRole(bytes32 role, address callerConfirmation) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenID","type":"uint256"},{"indexed":false,"internalType":"address","name":"to","type":"address"}],"name":"GachaSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"contractAddress","type":"address"}],"name":"adjustTokenInfoContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"anima","outputs":[{"internalType":"contract IAnima","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"animaCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"animaGacha","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"availableTokens","outputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint32","name":"tokenType","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnable","outputs":[{"internalType":"contract IBurnableERC1155","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burnableForGacha","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"burnableIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAvailableTokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBurnableContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBurnableEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBurnableIds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBurnableLimited","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaticEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"startIndex","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"listAvalableTokenInfos","outputs":[{"components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint32","name":"tokenType","type":"uint32"}],"internalType":"struct KimojiGacha.tokenInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"manualRemoveFromIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"manualSendERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"manualSendERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"manualSendTokenFromIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maticCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maticGacha","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"removeAddress","type":"address"}],"name":"removeBlacklistContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"removeAddress","type":"address"}],"name":"removeWhitelistSender","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newAnimaCost","type":"uint256"}],"name":"setAnimaCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IAnima","name":"_contract","type":"address"}],"name":"setAnimaTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"blAddress","type":"address"}],"name":"setBlacklistContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state","type":"bool"}],"name":"setBurnAnima","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state","type":"bool"}],"name":"setBurnableBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IBurnableERC1155","name":"_contract","type":"address"}],"name":"setBurnableContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state","type":"bool"}],"name":"setBurnableEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_burnableIds","type":"uint256[]"}],"name":"setBurnableIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state","type":"bool"}],"name":"setLimitBurnableIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaticCost","type":"uint256"}],"name":"setMaticCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaticCostGWEI","type":"uint256"}],"name":"setMaticCostGWEI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state","type":"bool"}],"name":"setMaticEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wlAddress","type":"address"}],"name":"setWhitelistSender","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdrawAnima","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405268056bc75e2d63100000600855674563918244f400006009555f600a819055600b55600c80546001600160d01b03191667dead0001000000011790553480156200004c575f80fd5b5033806200007357604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b6200007e81620000d3565b506200008b5f3362000122565b50600580546001810182555f919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b03191633179055620001b6565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f8281526001602090815260408083206001600160a01b038516845290915281205460ff16620001ad575f8381526001602081815260408084206001600160a01b0387168086529252808420805460ff19169093179092559051339286917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a4506001620001b0565b505f5b92915050565b612b9280620001c45f395ff3fe60806040526004361061030c575f3560e01c806387703000116101a3578063ae1d9973116100f2578063c6648a1a11610092578063e2fd42e71161006d578063e2fd42e714610925578063ef2e7f801461092d578063f23a6e611461094c578063f2fde38b1461096b575f80fd5b8063c6648a1a146108d3578063d5370904146108f2578063d547741f14610906575f80fd5b8063bad69714116100cd578063bad6971414610855578063bc197c8114610876578063bf55993e14610895578063c2af24f9146108b4575f80fd5b8063ae1d997314610803578063b209efd614610822578063baaea72114610841575f80fd5b806395ad48701161015d578063a217fddf11610138578063a217fddf14610769578063a5bc40821461077c578063ac9aeca21461079b578063ad64d068146107b9575f80fd5b806395ad48701461071657806399e1fab614610735578063a07c7ce41461074a575f80fd5b8063877030001461065f578063897ef01a1461067e5780638da5cb5b1461069d578063917de6c7146106b9578063919df584146106d857806391d14854146106f7575f80fd5b806336568abe1161025f578063666d1f31116102195780636e569ebf116101f45780636e569ebf146105ee578063715018a61461060d57806371ac250114610621578063741af17e14610640575f80fd5b8063666d1f31146105975780636805b84b146105c35780636935d1e9146105da575f80fd5b806336568abe146104fe5780633ccfd60b1461051d5780633d6e1129146105255780634371ae0f1461054457806346b7b66f146105595780635d50f66014610578575f80fd5b80631c2a0678116102ca57806325c813de116102a557806325c813de146104705780632779847f1461048f5780632b9e133e146104c05780632f2ff15d146104df575f80fd5b80631c2a0678146103f757806322db274014610416578063248a9ca314610433575f80fd5b8062119db61461031057806301ffc9a7146103315780630ee3153f1461036557806312c73d4314610384578063150b7a02146103a057806316c38b3c146103d8575b5f80fd5b34801561031b575f80fd5b5061032f61032a3660046124a5565b61098a565b005b34801561033c575f80fd5b5061035061034b3660046124c0565b6109b1565b60405190151581526020015b60405180910390f35b348015610370575f80fd5b5061032f61037f3660046124fb565b6109f6565b34801561038f575f80fd5b50600c54610100900460ff16610350565b3480156103ab575f80fd5b506103bf6103ba3660046125c7565b610b11565b6040516001600160e01b0319909116815260200161035c565b3480156103e3575f80fd5b5061032f6103f23660046124a5565b610c80565b348015610402575f80fd5b5061032f61041136600461262f565b610c9e565b348015610421575f80fd5b50600c5462010000900460ff16610350565b34801561043e575f80fd5b5061046261044d36600461262f565b5f908152600160208190526040909120015490565b60405190815260200161035c565b34801561047b575f80fd5b5061032f61048a36600461262f565b610fd4565b34801561049a575f80fd5b506003546001600160a01b03165b6040516001600160a01b03909116815260200161035c565b3480156104cb575f80fd5b5061032f6104da3660046124fb565b610ff7565b3480156104ea575f80fd5b5061032f6104f9366004612646565b611024565b348015610509575f80fd5b5061032f610518366004612646565b611049565b61032f611081565b348015610530575f80fd5b5061032f61053f366004612674565b6110e5565b34801561054f575f80fd5b5061046260085481565b348015610564575f80fd5b5061032f6105733660046124a5565b6110fa565b348015610583575f80fd5b5061032f610592366004612674565b611123565b3480156105a2575f80fd5b506105b66105b13660046126b3565b611138565b60405161035c91906126d3565b3480156105ce575f80fd5b50600c5460ff16610350565b3480156105e5575f80fd5b5061032f611272565b3480156105f9575f80fd5b5061032f6106083660046124fb565b611367565b348015610618575f80fd5b5061032f611394565b34801561062c575f80fd5b5061032f61063b36600461273a565b6113a7565b34801561064b575f80fd5b5061032f61065a3660046124fb565b611453565b34801561066a575f80fd5b5061032f610679366004612646565b6114af565b348015610689575f80fd5b506002546104a8906001600160a01b031681565b3480156106a8575f80fd5b505f546001600160a01b03166104a8565b3480156106c4575f80fd5b5061032f6106d33660046124fb565b6114cc565b3480156106e3575f80fd5b5061032f6106f236600461262f565b6115b8565b348015610702575f80fd5b50610350610711366004612646565b6115cb565b348015610721575f80fd5b5061032f6107303660046124a5565b6115f5565b348015610740575f80fd5b5061046260095481565b348015610755575f80fd5b506003546104a8906001600160a01b031681565b348015610774575f80fd5b506104625f81565b348015610787575f80fd5b5061032f61079636600461262f565b61161a565b3480156107a6575f80fd5b50600c546301000000900460ff16610350565b3480156107c4575f80fd5b506107d86107d336600461262f565b61163d565b604080516001600160a01b039094168452602084019290925263ffffffff169082015260600161035c565b34801561080e575f80fd5b5061032f61081d366004612646565b61167e565b34801561082d575f80fd5b5061032f61083c3660046124fb565b6116ce565b34801561084c575f80fd5b5061032f61172a565b348015610860575f80fd5b506108696119a9565b60405161035c91906127a9565b348015610881575f80fd5b506103bf610890366004612869565b6119ff565b3480156108a0575f80fd5b5061032f6108af3660046124a5565b611b30565b3480156108bf575f80fd5b5061032f6108ce36600461262f565b611b5d565b3480156108de575f80fd5b506104626108ed36600461262f565b611b6d565b3480156108fd575f80fd5b50600454610462565b348015610911575f80fd5b5061032f610920366004612646565b611b8c565b61032f611bb1565b348015610938575f80fd5b5061032f6109473660046124a5565b611c74565b348015610957575f80fd5b506103bf610966366004612910565b611c9f565b348015610976575f80fd5b5061032f6109853660046124fb565b611dd1565b5f61099481611e0b565b50600c8054911515620100000262ff000019909216919091179055565b5f6001600160e01b03198216630271189760e51b14806109e157506001600160e01b03198216630a85bd0160e11b145b806109f057506109f082611e15565b92915050565b5f610a0081611e0b565b6005545f5b81811015610b0a57836001600160a01b031660058281548110610a2a57610a2a612974565b5f918252602090912001546001600160a01b031603610b0257610a4e60018361299c565b811015610ac9576005610a6260018461299c565b81548110610a7257610a72612974565b5f91825260209091200154600580546001600160a01b039092169183908110610a9d57610a9d612974565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055505b6005805480610ada57610ada6129af565b5f8281526020902081015f1990810180546001600160a01b031916905501905550610b0d9050565b600101610a05565b50505b5050565b5f610b1b84611e49565b610b405760405162461bcd60e51b8152600401610b37906129c3565b60405180910390fd5b610b4933611ea9565b15610b8a5760405162461bcd60e51b81526020600482015260116024820152702130b221b7b73a3930b1ba29b2b73232b960791b6044820152606401610b37565b60408051606081018252338152602081018581525f9282018381526004805460018101825590855292517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600390940293840180546001600160a01b0319166001600160a01b0390921691909117905590517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d909101805463ffffffff191663ffffffff909216919091179055600a805491610c6a836129e8565b90915550630a85bd0160e11b9695505050505050565b5f610c8a81611e0b565b50600c805460ff1916911515919091179055565b600c5460ff1615610cc15760405162461bcd60e51b8152600401610b3790612a00565b600c5462010000900460ff16610d065760405162461bcd60e51b815260206004820152600a602482015269139bdd115b98589b195960b21b6044820152606401610b37565b60035460405163e985e9c560e01b81523360048201523060248201526001600160a01b039091169063e985e9c590604401602060405180830381865afa158015610d52573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d769190612a20565b610daa5760405162461bcd60e51b8152602060048201526005602482015264416c6c6f7760d81b6044820152606401610b37565b600354604051627eeac760e11b8152336004820152602481018390526001600160a01b039091169062fdd58e90604401602060405180830381865afa158015610df5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e199190612a3b565b5f03610e525760405162461bcd60e51b8152602060048201526008602482015267139bdd13dddb995960c21b6044820152606401610b37565b600c546301000000900460ff1615610ea757610e6d81611f00565b610ea75760405162461bcd60e51b815260206004820152600b60248201526a4e6f744275726e61626c6560a81b6044820152606401610b37565b600a545f03610ec85760405162461bcd60e51b8152600401610b3790612a52565b600c54640100000000900460ff1615610f4657600354604051637a94c56560e11b815233600482015260248101839052600160448201526001600160a01b039091169063f5298aca906064015f604051808303815f87803b158015610f2b575f80fd5b505af1158015610f3d573d5f803e3d5ffd5b50505050610fc9565b600354600c54604080515f81526020810191829052637921219560e11b9091526001600160a01b039283169263f242432a92610f9b923392660100000000000090920490911690869060019060248101612a74565b5f604051808303815f87803b158015610fb2575f80fd5b505af1158015610fc4573d5f803e3d5ffd5b505050505b610fd1611f43565b50565b5f610fde81611e0b565b610ff082670de0b6b3a7640000612aea565b6009555050565b5f61100181611e0b565b50600280546001600160a01b0319166001600160a01b0392909216919091179055565b5f828152600160208190526040909120015461103f81611e0b565b610b0a8383611f61565b6001600160a01b03811633146110725760405163334bd91960e11b815260040160405180910390fd5b61107c8282611fd7565b505050565b611089612042565b5f80546040516001600160a01b039091169047908381818185875af1925050503d805f81146110d3576040519150601f19603f3d011682016040523d82523d5f602084013e6110d8565b606091505b5050905080610fd1575f80fd5b5f6110ef81611e0b565b610b0a84848461206e565b5f61110481611e0b565b50600c805491151563010000000263ff00000019909216919091179055565b5f61112d81611e0b565b610b0a8484846120db565b60605f8267ffffffffffffffff81111561115457611154612516565b60405190808252806020026020018201604052801561119d57816020015b604080516060810182525f80825260208083018290529282015282525f199092019101816111725790505b506004549091508311156111b15760045492505b6004546111be8486612b01565b11156111d5576004546111d290859061299c565b92505b5f5b8381101561126a5760046111eb8287612b01565b815481106111fb576111fb612974565b5f91825260209182902060408051606081018252600390930290910180546001600160a01b0316835260018101549383019390935260029092015463ffffffff1691810191909152825183908390811061125757611257612974565b60209081029190910101526001016111d7565b509392505050565b61127a612042565b6002546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa1580156112c0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112e49190612a3b565b6002549091506001600160a01b031663a9059cbb6113095f546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044015f604051808303815f87803b15801561134e575f80fd5b505af1158015611360573d5f803e3d5ffd5b5050505050565b5f61137181611e0b565b50600380546001600160a01b0319166001600160a01b0392909216919091179055565b61139c612042565b6113a55f61211e565b565b5f6113b181611e0b565b818067ffffffffffffffff8111156113cb576113cb612516565b6040519080825280602002602001820160405280156113f4578160200160208202803683370190505b5080516114099160079160209091019061243b565b505f5b818110156113605784848281811061142657611426612974565b905060200201356007828154811061144057611440612974565b5f9182526020909120015560010161140c565b5f61145d81611e0b565b50600680546001810182555f919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b0392909216919091179055565b5f6114b981611e0b565b6114c3838361216d565b61107c83612257565b5f6114d681611e0b565b6006545f5b81811015610b0a57836001600160a01b03166006828154811061150057611500612974565b5f918252602090912001546001600160a01b0316036115b05761152460018361299c565b81101561159f57600661153860018461299c565b8154811061154857611548612974565b5f91825260209091200154600680546001600160a01b03909216918390811061157357611573612974565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055505b6006805480610ada57610ada6129af565b6001016114db565b5f6115c281611e0b565b610b0d82612257565b5f9182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f6115ff81611e0b565b50600c80549115156101000261ff0019909216919091179055565b5f61162481611e0b565b61163682670de0b6b3a7640000612aea565b6008555050565b6004818154811061164c575f80fd5b5f9182526020909120600390910201805460018201546002909201546001600160a01b03909116925063ffffffff1683565b5f61168881611e0b565b816004848154811061169c5761169c612974565b5f918252602090912060039091020180546001600160a01b0319166001600160a01b0392909216919091179055505050565b5f6116d881611e0b565b50600580546001810182555f919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319166001600160a01b0392909216919091179055565b600c5460ff161561174d5760405162461bcd60e51b8152600401610b3790612a00565b6008546002546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611796573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117ba9190612a3b565b10156117f15760405162461bcd60e51b8152600401610b379060208082526004908201526310dbdcdd60e21b604082015260600190565b600854600254604051636eb1769f60e11b81523360048201523060248201526001600160a01b039091169063dd62ed3e90604401602060405180830381865afa158015611840573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118649190612a3b565b101561189a5760405162461bcd60e51b8152602060048201526005602482015264416c6c6f7760d81b6044820152606401610b37565b600a545f036118bb5760405162461bcd60e51b8152600401610b3790612a52565b600c5465010000000000900460ff16156119375760025460085460405163079cc67960e41b815233600482015260248101919091526001600160a01b03909116906379cc6790906044015f604051808303815f87803b15801561191c575f80fd5b505af115801561192e573d5f803e3d5ffd5b505050506119a1565b6002546008546040516323b872dd60e01b815233600482015230602482015260448101919091526001600160a01b03909116906323b872dd906064015f604051808303815f87803b15801561198a575f80fd5b505af115801561199c573d5f803e3d5ffd5b505050505b6113a5611f43565b606060078054806020026020016040519081016040528092919081815260200182805480156119f557602002820191905f5260205f20905b8154815260200190600101908083116119e1575b5050505050905090565b5f611a0985611e49565b611a255760405162461bcd60e51b8152600401610b37906129c3565b83515f5b81811015611b1c575f5b858281518110611a4557611a45612974565b6020026020010151811015611b135760046040518060600160405280336001600160a01b03168152602001898581518110611a8257611a82612974565b60209081029190910181015182526001918101829052835480830185555f948552818520845160039092020180546001600160a01b0319166001600160a01b0390921691909117815590830151918101919091556040909101516002909101805463ffffffff191663ffffffff909216919091179055600a805491611b06836129e8565b9091555050600101611a33565b50600101611a29565b5063bc197c8160e01b979650505050505050565b5f611b3a81611e0b565b50600c8054911515650100000000000265ff000000000019909216919091179055565b5f611b6781611e0b565b50600955565b60078181548110611b7c575f80fd5b5f91825260209091200154905081565b5f8281526001602081905260409091200154611ba781611e0b565b610b0a8383611fd7565b600c5460ff1615611bd45760405162461bcd60e51b8152600401610b3790612a00565b600c54610100900460ff16611c185760405162461bcd60e51b815260206004820152600a602482015269139bdd115b98589b195960b21b6044820152606401610b37565b600954341015611c535760405162461bcd60e51b8152600401610b379060208082526004908201526310dbdcdd60e21b604082015260600190565b600a545f036119a15760405162461bcd60e51b8152600401610b3790612a52565b5f611c7e81611e0b565b50600c80549115156401000000000264ff0000000019909216919091179055565b5f611ca985611e49565b611cc55760405162461bcd60e51b8152600401610b37906129c3565b5f5b83811015611dbe57604080516060810182523381526020810187815260019282018381526004805494850181555f90815292517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600390950294850180546001600160a01b0319166001600160a01b0390921691909117905590517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c840155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d909201805463ffffffff191663ffffffff90931692909217909155600a805491611db1836129e8565b9091555050600101611cc7565b5063f23a6e6160e01b9695505050505050565b611dd9612042565b6001600160a01b038116611e0257604051631e4fbdf760e01b81525f6004820152602401610b37565b610fd18161211e565b610fd1813361236a565b5f6001600160e01b03198216637965db0b60e01b14806109f057506301ffc9a760e01b6001600160e01b03198316146109f0565b6005545f90815b81811015611ea057836001600160a01b031660058281548110611e7557611e75612974565b5f918252602090912001546001600160a01b031603611e98575060019392505050565b600101611e50565b505f9392505050565b6006545f90815b81811015611ea057836001600160a01b031660068281548110611ed557611ed5612974565b5f918252602090912001546001600160a01b031603611ef8575060019392505050565b600101611eb0565b6007545f90815b81811015611ea0578360078281548110611f2357611f23612974565b905f5260205f20015403611f3b575060019392505050565b600101611f07565b5f611f4c6123a3565b9050611f58813361216d565b610fd181612257565b5f611f6c83836115cb565b611fd0575f8381526001602081815260408084206001600160a01b0387168086529252808420805460ff19169093179092559051339286917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45060016109f0565b505f6109f0565b5f611fe283836115cb565b15611fd0575f8381526001602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016109f0565b5f546001600160a01b031633146113a55760405163118cdaa760e01b8152336004820152602401610b37565b604051632142170760e11b81523060048201526001600160a01b038281166024830152604482018490528491908216906342842e0e906064015b5f604051808303815f87803b1580156120bf575f80fd5b505af11580156120d1573d5f803e3d5ffd5b5050505050505050565b604080515f81526020810191829052637921219560e11b90915283906001600160a01b0382169063f242432a906120a89030908690889060019060248101612a74565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f6004838154811061218157612181612974565b5f918252602080832060408051606081018252600390940290910180546001600160a01b0316845260018101549284019290925260029091015463ffffffff1690820181905290925090036121e7576121e2815f015182602001518461206e565b6121f9565b6121f9815f01518260200151846120db565b8051602080830151604080518781526001600160a01b039485169381019390935282015290831660608201527f5405921dd1b587716a5c6098f0bb6f64a2a226a5c8b631daf9b37481380554b59060800160405180910390a1505050565b60045461226560018261299c565b82101561230057600461227960018361299c565b8154811061228957612289612974565b905f5260205f209060030201600483815481106122a8576122a8612974565b5f9182526020909120825460039092020180546001600160a01b0319166001600160a01b03909216919091178155600180830154908201556002918201549101805463ffffffff191663ffffffff9092169190911790555b6004805480612311576123116129af565b5f8281526020812060035f199093019283020180546001600160a01b03191681556001810191909155600201805463ffffffff191690559055600a5415610b0d57600a8054905f61236183612b14565b91905055505050565b61237482826115cb565b610b0d5760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610b37565b5f80600a54116123b5576123b5612b29565b600b5f81546123c3906129e8565b90915550600b546040515f9161240b914291434091339190602001938452602084019290925260601b6bffffffffffffffffffffffff19166040830152605482015260740190565b604051602081830303815290604052805190602001205f1c90505f600a54826124349190612b3d565b9392505050565b828054828255905f5260205f20908101928215612474579160200282015b82811115612474578251825591602001919060010190612459565b50612480929150612484565b5090565b5b80821115612480575f8155600101612485565b8015158114610fd1575f80fd5b5f602082840312156124b5575f80fd5b813561243481612498565b5f602082840312156124d0575f80fd5b81356001600160e01b031981168114612434575f80fd5b6001600160a01b0381168114610fd1575f80fd5b5f6020828403121561250b575f80fd5b8135612434816124e7565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561255357612553612516565b604052919050565b5f82601f83011261256a575f80fd5b813567ffffffffffffffff81111561258457612584612516565b612597601f8201601f191660200161252a565b8181528460208386010111156125ab575f80fd5b816020850160208301375f918101602001919091529392505050565b5f805f80608085870312156125da575f80fd5b84356125e5816124e7565b935060208501356125f5816124e7565b925060408501359150606085013567ffffffffffffffff811115612617575f80fd5b6126238782880161255b565b91505092959194509250565b5f6020828403121561263f575f80fd5b5035919050565b5f8060408385031215612657575f80fd5b823591506020830135612669816124e7565b809150509250929050565b5f805f60608486031215612686575f80fd5b8335612691816124e7565b92506020840135915060408401356126a8816124e7565b809150509250925092565b5f80604083850312156126c4575f80fd5b50508035926020909101359150565b602080825282518282018190525f919060409081850190868401855b8281101561272d57815180516001600160a01b03168552868101518786015285015163ffffffff1685850152606090930192908501906001016126ef565b5091979650505050505050565b5f806020838503121561274b575f80fd5b823567ffffffffffffffff80821115612762575f80fd5b818501915085601f830112612775575f80fd5b813581811115612783575f80fd5b8660208260051b8501011115612797575f80fd5b60209290920196919550909350505050565b602080825282518282018190525f9190848201906040850190845b818110156127e0578351835292840192918401916001016127c4565b50909695505050505050565b5f82601f8301126127fb575f80fd5b8135602067ffffffffffffffff82111561281757612817612516565b8160051b61282682820161252a565b928352848101820192828101908785111561283f575f80fd5b83870192505b8483101561285e57823582529183019190830190612845565b979650505050505050565b5f805f805f60a0868803121561287d575f80fd5b8535612888816124e7565b94506020860135612898816124e7565b9350604086013567ffffffffffffffff808211156128b4575f80fd5b6128c089838a016127ec565b945060608801359150808211156128d5575f80fd5b6128e189838a016127ec565b935060808801359150808211156128f6575f80fd5b506129038882890161255b565b9150509295509295909350565b5f805f805f60a08688031215612924575f80fd5b853561292f816124e7565b9450602086013561293f816124e7565b93506040860135925060608601359150608086013567ffffffffffffffff811115612968575f80fd5b6129038882890161255b565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b818103818111156109f0576109f0612988565b634e487b7160e01b5f52603160045260245ffd5b6020808252600b908201526a139bdd105c1c1c9bdd995960aa1b604082015260600190565b5f600182016129f9576129f9612988565b5060010190565b60208082526006908201526514185d5cd95960d21b604082015260600190565b5f60208284031215612a30575f80fd5b815161243481612498565b5f60208284031215612a4b575f80fd5b5051919050565b6020808252600890820152674e6f546f6b656e7360c01b604082015260600190565b5f60018060a01b0380881683526020818816602085015286604085015285606085015260a06080850152845191508160a08501525f5b82811015612ac65785810182015185820160c001528101612aaa565b50505f60c0828501015260c0601f19601f8301168401019150509695505050505050565b80820281158282048414176109f0576109f0612988565b808201808211156109f0576109f0612988565b5f81612b2257612b22612988565b505f190190565b634e487b7160e01b5f52600160045260245ffd5b5f82612b5757634e487b7160e01b5f52601260045260245ffd5b50069056fea2646970667358221220d999c927edcdeebc82a4454051858214b7acad8095024bb9f1c996d73bd0508664736f6c63430008170033

Deployed Bytecode

0x60806040526004361061030c575f3560e01c806387703000116101a3578063ae1d9973116100f2578063c6648a1a11610092578063e2fd42e71161006d578063e2fd42e714610925578063ef2e7f801461092d578063f23a6e611461094c578063f2fde38b1461096b575f80fd5b8063c6648a1a146108d3578063d5370904146108f2578063d547741f14610906575f80fd5b8063bad69714116100cd578063bad6971414610855578063bc197c8114610876578063bf55993e14610895578063c2af24f9146108b4575f80fd5b8063ae1d997314610803578063b209efd614610822578063baaea72114610841575f80fd5b806395ad48701161015d578063a217fddf11610138578063a217fddf14610769578063a5bc40821461077c578063ac9aeca21461079b578063ad64d068146107b9575f80fd5b806395ad48701461071657806399e1fab614610735578063a07c7ce41461074a575f80fd5b8063877030001461065f578063897ef01a1461067e5780638da5cb5b1461069d578063917de6c7146106b9578063919df584146106d857806391d14854146106f7575f80fd5b806336568abe1161025f578063666d1f31116102195780636e569ebf116101f45780636e569ebf146105ee578063715018a61461060d57806371ac250114610621578063741af17e14610640575f80fd5b8063666d1f31146105975780636805b84b146105c35780636935d1e9146105da575f80fd5b806336568abe146104fe5780633ccfd60b1461051d5780633d6e1129146105255780634371ae0f1461054457806346b7b66f146105595780635d50f66014610578575f80fd5b80631c2a0678116102ca57806325c813de116102a557806325c813de146104705780632779847f1461048f5780632b9e133e146104c05780632f2ff15d146104df575f80fd5b80631c2a0678146103f757806322db274014610416578063248a9ca314610433575f80fd5b8062119db61461031057806301ffc9a7146103315780630ee3153f1461036557806312c73d4314610384578063150b7a02146103a057806316c38b3c146103d8575b5f80fd5b34801561031b575f80fd5b5061032f61032a3660046124a5565b61098a565b005b34801561033c575f80fd5b5061035061034b3660046124c0565b6109b1565b60405190151581526020015b60405180910390f35b348015610370575f80fd5b5061032f61037f3660046124fb565b6109f6565b34801561038f575f80fd5b50600c54610100900460ff16610350565b3480156103ab575f80fd5b506103bf6103ba3660046125c7565b610b11565b6040516001600160e01b0319909116815260200161035c565b3480156103e3575f80fd5b5061032f6103f23660046124a5565b610c80565b348015610402575f80fd5b5061032f61041136600461262f565b610c9e565b348015610421575f80fd5b50600c5462010000900460ff16610350565b34801561043e575f80fd5b5061046261044d36600461262f565b5f908152600160208190526040909120015490565b60405190815260200161035c565b34801561047b575f80fd5b5061032f61048a36600461262f565b610fd4565b34801561049a575f80fd5b506003546001600160a01b03165b6040516001600160a01b03909116815260200161035c565b3480156104cb575f80fd5b5061032f6104da3660046124fb565b610ff7565b3480156104ea575f80fd5b5061032f6104f9366004612646565b611024565b348015610509575f80fd5b5061032f610518366004612646565b611049565b61032f611081565b348015610530575f80fd5b5061032f61053f366004612674565b6110e5565b34801561054f575f80fd5b5061046260085481565b348015610564575f80fd5b5061032f6105733660046124a5565b6110fa565b348015610583575f80fd5b5061032f610592366004612674565b611123565b3480156105a2575f80fd5b506105b66105b13660046126b3565b611138565b60405161035c91906126d3565b3480156105ce575f80fd5b50600c5460ff16610350565b3480156105e5575f80fd5b5061032f611272565b3480156105f9575f80fd5b5061032f6106083660046124fb565b611367565b348015610618575f80fd5b5061032f611394565b34801561062c575f80fd5b5061032f61063b36600461273a565b6113a7565b34801561064b575f80fd5b5061032f61065a3660046124fb565b611453565b34801561066a575f80fd5b5061032f610679366004612646565b6114af565b348015610689575f80fd5b506002546104a8906001600160a01b031681565b3480156106a8575f80fd5b505f546001600160a01b03166104a8565b3480156106c4575f80fd5b5061032f6106d33660046124fb565b6114cc565b3480156106e3575f80fd5b5061032f6106f236600461262f565b6115b8565b348015610702575f80fd5b50610350610711366004612646565b6115cb565b348015610721575f80fd5b5061032f6107303660046124a5565b6115f5565b348015610740575f80fd5b5061046260095481565b348015610755575f80fd5b506003546104a8906001600160a01b031681565b348015610774575f80fd5b506104625f81565b348015610787575f80fd5b5061032f61079636600461262f565b61161a565b3480156107a6575f80fd5b50600c546301000000900460ff16610350565b3480156107c4575f80fd5b506107d86107d336600461262f565b61163d565b604080516001600160a01b039094168452602084019290925263ffffffff169082015260600161035c565b34801561080e575f80fd5b5061032f61081d366004612646565b61167e565b34801561082d575f80fd5b5061032f61083c3660046124fb565b6116ce565b34801561084c575f80fd5b5061032f61172a565b348015610860575f80fd5b506108696119a9565b60405161035c91906127a9565b348015610881575f80fd5b506103bf610890366004612869565b6119ff565b3480156108a0575f80fd5b5061032f6108af3660046124a5565b611b30565b3480156108bf575f80fd5b5061032f6108ce36600461262f565b611b5d565b3480156108de575f80fd5b506104626108ed36600461262f565b611b6d565b3480156108fd575f80fd5b50600454610462565b348015610911575f80fd5b5061032f610920366004612646565b611b8c565b61032f611bb1565b348015610938575f80fd5b5061032f6109473660046124a5565b611c74565b348015610957575f80fd5b506103bf610966366004612910565b611c9f565b348015610976575f80fd5b5061032f6109853660046124fb565b611dd1565b5f61099481611e0b565b50600c8054911515620100000262ff000019909216919091179055565b5f6001600160e01b03198216630271189760e51b14806109e157506001600160e01b03198216630a85bd0160e11b145b806109f057506109f082611e15565b92915050565b5f610a0081611e0b565b6005545f5b81811015610b0a57836001600160a01b031660058281548110610a2a57610a2a612974565b5f918252602090912001546001600160a01b031603610b0257610a4e60018361299c565b811015610ac9576005610a6260018461299c565b81548110610a7257610a72612974565b5f91825260209091200154600580546001600160a01b039092169183908110610a9d57610a9d612974565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055505b6005805480610ada57610ada6129af565b5f8281526020902081015f1990810180546001600160a01b031916905501905550610b0d9050565b600101610a05565b50505b5050565b5f610b1b84611e49565b610b405760405162461bcd60e51b8152600401610b37906129c3565b60405180910390fd5b610b4933611ea9565b15610b8a5760405162461bcd60e51b81526020600482015260116024820152702130b221b7b73a3930b1ba29b2b73232b960791b6044820152606401610b37565b60408051606081018252338152602081018581525f9282018381526004805460018101825590855292517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600390940293840180546001600160a01b0319166001600160a01b0390921691909117905590517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d909101805463ffffffff191663ffffffff909216919091179055600a805491610c6a836129e8565b90915550630a85bd0160e11b9695505050505050565b5f610c8a81611e0b565b50600c805460ff1916911515919091179055565b600c5460ff1615610cc15760405162461bcd60e51b8152600401610b3790612a00565b600c5462010000900460ff16610d065760405162461bcd60e51b815260206004820152600a602482015269139bdd115b98589b195960b21b6044820152606401610b37565b60035460405163e985e9c560e01b81523360048201523060248201526001600160a01b039091169063e985e9c590604401602060405180830381865afa158015610d52573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d769190612a20565b610daa5760405162461bcd60e51b8152602060048201526005602482015264416c6c6f7760d81b6044820152606401610b37565b600354604051627eeac760e11b8152336004820152602481018390526001600160a01b039091169062fdd58e90604401602060405180830381865afa158015610df5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e199190612a3b565b5f03610e525760405162461bcd60e51b8152602060048201526008602482015267139bdd13dddb995960c21b6044820152606401610b37565b600c546301000000900460ff1615610ea757610e6d81611f00565b610ea75760405162461bcd60e51b815260206004820152600b60248201526a4e6f744275726e61626c6560a81b6044820152606401610b37565b600a545f03610ec85760405162461bcd60e51b8152600401610b3790612a52565b600c54640100000000900460ff1615610f4657600354604051637a94c56560e11b815233600482015260248101839052600160448201526001600160a01b039091169063f5298aca906064015f604051808303815f87803b158015610f2b575f80fd5b505af1158015610f3d573d5f803e3d5ffd5b50505050610fc9565b600354600c54604080515f81526020810191829052637921219560e11b9091526001600160a01b039283169263f242432a92610f9b923392660100000000000090920490911690869060019060248101612a74565b5f604051808303815f87803b158015610fb2575f80fd5b505af1158015610fc4573d5f803e3d5ffd5b505050505b610fd1611f43565b50565b5f610fde81611e0b565b610ff082670de0b6b3a7640000612aea565b6009555050565b5f61100181611e0b565b50600280546001600160a01b0319166001600160a01b0392909216919091179055565b5f828152600160208190526040909120015461103f81611e0b565b610b0a8383611f61565b6001600160a01b03811633146110725760405163334bd91960e11b815260040160405180910390fd5b61107c8282611fd7565b505050565b611089612042565b5f80546040516001600160a01b039091169047908381818185875af1925050503d805f81146110d3576040519150601f19603f3d011682016040523d82523d5f602084013e6110d8565b606091505b5050905080610fd1575f80fd5b5f6110ef81611e0b565b610b0a84848461206e565b5f61110481611e0b565b50600c805491151563010000000263ff00000019909216919091179055565b5f61112d81611e0b565b610b0a8484846120db565b60605f8267ffffffffffffffff81111561115457611154612516565b60405190808252806020026020018201604052801561119d57816020015b604080516060810182525f80825260208083018290529282015282525f199092019101816111725790505b506004549091508311156111b15760045492505b6004546111be8486612b01565b11156111d5576004546111d290859061299c565b92505b5f5b8381101561126a5760046111eb8287612b01565b815481106111fb576111fb612974565b5f91825260209182902060408051606081018252600390930290910180546001600160a01b0316835260018101549383019390935260029092015463ffffffff1691810191909152825183908390811061125757611257612974565b60209081029190910101526001016111d7565b509392505050565b61127a612042565b6002546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa1580156112c0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112e49190612a3b565b6002549091506001600160a01b031663a9059cbb6113095f546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044015f604051808303815f87803b15801561134e575f80fd5b505af1158015611360573d5f803e3d5ffd5b5050505050565b5f61137181611e0b565b50600380546001600160a01b0319166001600160a01b0392909216919091179055565b61139c612042565b6113a55f61211e565b565b5f6113b181611e0b565b818067ffffffffffffffff8111156113cb576113cb612516565b6040519080825280602002602001820160405280156113f4578160200160208202803683370190505b5080516114099160079160209091019061243b565b505f5b818110156113605784848281811061142657611426612974565b905060200201356007828154811061144057611440612974565b5f9182526020909120015560010161140c565b5f61145d81611e0b565b50600680546001810182555f919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b0392909216919091179055565b5f6114b981611e0b565b6114c3838361216d565b61107c83612257565b5f6114d681611e0b565b6006545f5b81811015610b0a57836001600160a01b03166006828154811061150057611500612974565b5f918252602090912001546001600160a01b0316036115b05761152460018361299c565b81101561159f57600661153860018461299c565b8154811061154857611548612974565b5f91825260209091200154600680546001600160a01b03909216918390811061157357611573612974565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055505b6006805480610ada57610ada6129af565b6001016114db565b5f6115c281611e0b565b610b0d82612257565b5f9182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f6115ff81611e0b565b50600c80549115156101000261ff0019909216919091179055565b5f61162481611e0b565b61163682670de0b6b3a7640000612aea565b6008555050565b6004818154811061164c575f80fd5b5f9182526020909120600390910201805460018201546002909201546001600160a01b03909116925063ffffffff1683565b5f61168881611e0b565b816004848154811061169c5761169c612974565b5f918252602090912060039091020180546001600160a01b0319166001600160a01b0392909216919091179055505050565b5f6116d881611e0b565b50600580546001810182555f919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319166001600160a01b0392909216919091179055565b600c5460ff161561174d5760405162461bcd60e51b8152600401610b3790612a00565b6008546002546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611796573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117ba9190612a3b565b10156117f15760405162461bcd60e51b8152600401610b379060208082526004908201526310dbdcdd60e21b604082015260600190565b600854600254604051636eb1769f60e11b81523360048201523060248201526001600160a01b039091169063dd62ed3e90604401602060405180830381865afa158015611840573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118649190612a3b565b101561189a5760405162461bcd60e51b8152602060048201526005602482015264416c6c6f7760d81b6044820152606401610b37565b600a545f036118bb5760405162461bcd60e51b8152600401610b3790612a52565b600c5465010000000000900460ff16156119375760025460085460405163079cc67960e41b815233600482015260248101919091526001600160a01b03909116906379cc6790906044015f604051808303815f87803b15801561191c575f80fd5b505af115801561192e573d5f803e3d5ffd5b505050506119a1565b6002546008546040516323b872dd60e01b815233600482015230602482015260448101919091526001600160a01b03909116906323b872dd906064015f604051808303815f87803b15801561198a575f80fd5b505af115801561199c573d5f803e3d5ffd5b505050505b6113a5611f43565b606060078054806020026020016040519081016040528092919081815260200182805480156119f557602002820191905f5260205f20905b8154815260200190600101908083116119e1575b5050505050905090565b5f611a0985611e49565b611a255760405162461bcd60e51b8152600401610b37906129c3565b83515f5b81811015611b1c575f5b858281518110611a4557611a45612974565b6020026020010151811015611b135760046040518060600160405280336001600160a01b03168152602001898581518110611a8257611a82612974565b60209081029190910181015182526001918101829052835480830185555f948552818520845160039092020180546001600160a01b0319166001600160a01b0390921691909117815590830151918101919091556040909101516002909101805463ffffffff191663ffffffff909216919091179055600a805491611b06836129e8565b9091555050600101611a33565b50600101611a29565b5063bc197c8160e01b979650505050505050565b5f611b3a81611e0b565b50600c8054911515650100000000000265ff000000000019909216919091179055565b5f611b6781611e0b565b50600955565b60078181548110611b7c575f80fd5b5f91825260209091200154905081565b5f8281526001602081905260409091200154611ba781611e0b565b610b0a8383611fd7565b600c5460ff1615611bd45760405162461bcd60e51b8152600401610b3790612a00565b600c54610100900460ff16611c185760405162461bcd60e51b815260206004820152600a602482015269139bdd115b98589b195960b21b6044820152606401610b37565b600954341015611c535760405162461bcd60e51b8152600401610b379060208082526004908201526310dbdcdd60e21b604082015260600190565b600a545f036119a15760405162461bcd60e51b8152600401610b3790612a52565b5f611c7e81611e0b565b50600c80549115156401000000000264ff0000000019909216919091179055565b5f611ca985611e49565b611cc55760405162461bcd60e51b8152600401610b37906129c3565b5f5b83811015611dbe57604080516060810182523381526020810187815260019282018381526004805494850181555f90815292517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600390950294850180546001600160a01b0319166001600160a01b0390921691909117905590517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c840155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d909201805463ffffffff191663ffffffff90931692909217909155600a805491611db1836129e8565b9091555050600101611cc7565b5063f23a6e6160e01b9695505050505050565b611dd9612042565b6001600160a01b038116611e0257604051631e4fbdf760e01b81525f6004820152602401610b37565b610fd18161211e565b610fd1813361236a565b5f6001600160e01b03198216637965db0b60e01b14806109f057506301ffc9a760e01b6001600160e01b03198316146109f0565b6005545f90815b81811015611ea057836001600160a01b031660058281548110611e7557611e75612974565b5f918252602090912001546001600160a01b031603611e98575060019392505050565b600101611e50565b505f9392505050565b6006545f90815b81811015611ea057836001600160a01b031660068281548110611ed557611ed5612974565b5f918252602090912001546001600160a01b031603611ef8575060019392505050565b600101611eb0565b6007545f90815b81811015611ea0578360078281548110611f2357611f23612974565b905f5260205f20015403611f3b575060019392505050565b600101611f07565b5f611f4c6123a3565b9050611f58813361216d565b610fd181612257565b5f611f6c83836115cb565b611fd0575f8381526001602081815260408084206001600160a01b0387168086529252808420805460ff19169093179092559051339286917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45060016109f0565b505f6109f0565b5f611fe283836115cb565b15611fd0575f8381526001602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016109f0565b5f546001600160a01b031633146113a55760405163118cdaa760e01b8152336004820152602401610b37565b604051632142170760e11b81523060048201526001600160a01b038281166024830152604482018490528491908216906342842e0e906064015b5f604051808303815f87803b1580156120bf575f80fd5b505af11580156120d1573d5f803e3d5ffd5b5050505050505050565b604080515f81526020810191829052637921219560e11b90915283906001600160a01b0382169063f242432a906120a89030908690889060019060248101612a74565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f6004838154811061218157612181612974565b5f918252602080832060408051606081018252600390940290910180546001600160a01b0316845260018101549284019290925260029091015463ffffffff1690820181905290925090036121e7576121e2815f015182602001518461206e565b6121f9565b6121f9815f01518260200151846120db565b8051602080830151604080518781526001600160a01b039485169381019390935282015290831660608201527f5405921dd1b587716a5c6098f0bb6f64a2a226a5c8b631daf9b37481380554b59060800160405180910390a1505050565b60045461226560018261299c565b82101561230057600461227960018361299c565b8154811061228957612289612974565b905f5260205f209060030201600483815481106122a8576122a8612974565b5f9182526020909120825460039092020180546001600160a01b0319166001600160a01b03909216919091178155600180830154908201556002918201549101805463ffffffff191663ffffffff9092169190911790555b6004805480612311576123116129af565b5f8281526020812060035f199093019283020180546001600160a01b03191681556001810191909155600201805463ffffffff191690559055600a5415610b0d57600a8054905f61236183612b14565b91905055505050565b61237482826115cb565b610b0d5760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610b37565b5f80600a54116123b5576123b5612b29565b600b5f81546123c3906129e8565b90915550600b546040515f9161240b914291434091339190602001938452602084019290925260601b6bffffffffffffffffffffffff19166040830152605482015260740190565b604051602081830303815290604052805190602001205f1c90505f600a54826124349190612b3d565b9392505050565b828054828255905f5260205f20908101928215612474579160200282015b82811115612474578251825591602001919060010190612459565b50612480929150612484565b5090565b5b80821115612480575f8155600101612485565b8015158114610fd1575f80fd5b5f602082840312156124b5575f80fd5b813561243481612498565b5f602082840312156124d0575f80fd5b81356001600160e01b031981168114612434575f80fd5b6001600160a01b0381168114610fd1575f80fd5b5f6020828403121561250b575f80fd5b8135612434816124e7565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561255357612553612516565b604052919050565b5f82601f83011261256a575f80fd5b813567ffffffffffffffff81111561258457612584612516565b612597601f8201601f191660200161252a565b8181528460208386010111156125ab575f80fd5b816020850160208301375f918101602001919091529392505050565b5f805f80608085870312156125da575f80fd5b84356125e5816124e7565b935060208501356125f5816124e7565b925060408501359150606085013567ffffffffffffffff811115612617575f80fd5b6126238782880161255b565b91505092959194509250565b5f6020828403121561263f575f80fd5b5035919050565b5f8060408385031215612657575f80fd5b823591506020830135612669816124e7565b809150509250929050565b5f805f60608486031215612686575f80fd5b8335612691816124e7565b92506020840135915060408401356126a8816124e7565b809150509250925092565b5f80604083850312156126c4575f80fd5b50508035926020909101359150565b602080825282518282018190525f919060409081850190868401855b8281101561272d57815180516001600160a01b03168552868101518786015285015163ffffffff1685850152606090930192908501906001016126ef565b5091979650505050505050565b5f806020838503121561274b575f80fd5b823567ffffffffffffffff80821115612762575f80fd5b818501915085601f830112612775575f80fd5b813581811115612783575f80fd5b8660208260051b8501011115612797575f80fd5b60209290920196919550909350505050565b602080825282518282018190525f9190848201906040850190845b818110156127e0578351835292840192918401916001016127c4565b50909695505050505050565b5f82601f8301126127fb575f80fd5b8135602067ffffffffffffffff82111561281757612817612516565b8160051b61282682820161252a565b928352848101820192828101908785111561283f575f80fd5b83870192505b8483101561285e57823582529183019190830190612845565b979650505050505050565b5f805f805f60a0868803121561287d575f80fd5b8535612888816124e7565b94506020860135612898816124e7565b9350604086013567ffffffffffffffff808211156128b4575f80fd5b6128c089838a016127ec565b945060608801359150808211156128d5575f80fd5b6128e189838a016127ec565b935060808801359150808211156128f6575f80fd5b506129038882890161255b565b9150509295509295909350565b5f805f805f60a08688031215612924575f80fd5b853561292f816124e7565b9450602086013561293f816124e7565b93506040860135925060608601359150608086013567ffffffffffffffff811115612968575f80fd5b6129038882890161255b565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b818103818111156109f0576109f0612988565b634e487b7160e01b5f52603160045260245ffd5b6020808252600b908201526a139bdd105c1c1c9bdd995960aa1b604082015260600190565b5f600182016129f9576129f9612988565b5060010190565b60208082526006908201526514185d5cd95960d21b604082015260600190565b5f60208284031215612a30575f80fd5b815161243481612498565b5f60208284031215612a4b575f80fd5b5051919050565b6020808252600890820152674e6f546f6b656e7360c01b604082015260600190565b5f60018060a01b0380881683526020818816602085015286604085015285606085015260a06080850152845191508160a08501525f5b82811015612ac65785810182015185820160c001528101612aaa565b50505f60c0828501015260c0601f19601f8301168401019150509695505050505050565b80820281158282048414176109f0576109f0612988565b808201808211156109f0576109f0612988565b5f81612b2257612b22612988565b505f190190565b634e487b7160e01b5f52600160045260245ffd5b5f82612b5757634e487b7160e01b5f52601260045260245ffd5b50069056fea2646970667358221220d999c927edcdeebc82a4454051858214b7acad8095024bb9f1c996d73bd0508664736f6c63430008170033

Block Transaction Gas Used Reward
view all blocks produced

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

Validator Index Block Amount
View All Withdrawals

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

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