POL Price: $0.218381 (+0.03%)
Gas: 30 GWei
 

Overview

POL Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 POL

POL Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Redeem ERC1155As...380159472023-01-13 6:39:08831 days ago1673591948IN
0xE5a5D475...78ba90223
0 POL0.0045796449.25987986
Redeem ERC1155As...379671572023-01-12 2:31:18832 days ago1673490678IN
0xE5a5D475...78ba90223
0 POL0.0048023251.65066566
Redeem ERC1155As...379625602023-01-11 23:50:52832 days ago1673481052IN
0xE5a5D475...78ba90223
0 POL0.0059921564.46160888
Redeem ERC1155As...379495442023-01-11 16:14:10832 days ago1673453650IN
0xE5a5D475...78ba90223
0 POL0.0033737157.4063872
Redeem ERC1155As...379494692023-01-11 16:11:36832 days ago1673453496IN
0xE5a5D475...78ba90223
0 POL0.0054939659.08186351
Redeem ERC1155As...379494242023-01-11 16:10:02832 days ago1673453402IN
0xE5a5D475...78ba90223
0 POL0.0063131967.89187154
Redeem ERC1155As...379377862023-01-11 9:29:40832 days ago1673429380IN
0xE5a5D475...78ba90223
0 POL0.0062620567.35633703
Redeem ERC1155As...379377482023-01-11 9:28:24832 days ago1673429304IN
0xE5a5D475...78ba90223
0 POL0.0062516867.24481114
Redeem ERC1155As...379376452023-01-11 9:24:50832 days ago1673429090IN
0xE5a5D475...78ba90223
0 POL0.0058954863.41346133
Redeem ERC1155As...379376342023-01-11 9:24:28832 days ago1673429068IN
0xE5a5D475...78ba90223
0 POL0.0058954863.41346133
Redeem ERC1155As...379376282023-01-11 9:24:16832 days ago1673429056IN
0xE5a5D475...78ba90223
0 POL0.006300567.76991499
Redeem ERC1155As...379375762023-01-11 9:22:28832 days ago1673428948IN
0xE5a5D475...78ba90223
0 POL0.006734872.44145651
Redeem ERC1155As...379286092023-01-11 4:09:52833 days ago1673410192IN
0xE5a5D475...78ba90223
0 POL0.0082726188.98246441
Redeem ERC1155As...379267642023-01-11 3:06:26833 days ago1673406386IN
0xE5a5D475...78ba90223
0 POL0.01187991127.75612475
Redeem ERC1155As...379267572023-01-11 3:06:12833 days ago1673406372IN
0xE5a5D475...78ba90223
0 POL0.01187838127.75612475
Redeem ERC1155As...379267432023-01-11 3:05:44833 days ago1673406344IN
0xE5a5D475...78ba90223
0 POL0.01417966152.5203329
Redeem ERC1155As...379085592023-01-10 16:24:11833 days ago1673367851IN
0xE5a5D475...78ba90223
0 POL0.0068000273.12716235
Redeem ERC1155As...379085152023-01-10 16:22:39833 days ago1673367759IN
0xE5a5D475...78ba90223
0 POL0.0042966146.21561358
Redeem ERC1155As...379084802023-01-10 16:21:29833 days ago1673367689IN
0xE5a5D475...78ba90223
0 POL0.0043632446.92212893
Redeem ERC1155As...379084442023-01-10 16:20:13833 days ago1673367613IN
0xE5a5D475...78ba90223
0 POL0.0047173950.74812304
Redeem ERC1155As...379084092023-01-10 16:18:59833 days ago1673367539IN
0xE5a5D475...78ba90223
0 POL0.0051444755.32353267
Redeem ERC1155As...379083632023-01-10 16:17:27833 days ago1673367447IN
0xE5a5D475...78ba90223
0 POL0.0084791591.20412752
Redeem ERC1155As...379083152023-01-10 16:15:45833 days ago1673367345IN
0xE5a5D475...78ba90223
0 POL0.0040485643.53813799
Redeem ERC1155As...379082822023-01-10 16:14:35833 days ago1673367275IN
0xE5a5D475...78ba90223
0 POL0.0043907647.21806242
Redeem ERC1155As...379082472023-01-10 16:13:25833 days ago1673367205IN
0xE5a5D475...78ba90223
0 POL0.0045788749.25161069
View all transactions

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

Contract Source Code Verified (Exact Match)

Contract Name:
LootBoxRedemer

Compiler Version
v0.8.1+commit.df193b15

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 9 : LootBoxRedemer.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.1;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "../interfaces/ICancellationRegistry.sol";

contract LootBoxRedemer is Ownable {
    bytes32 private EIP712_DOMAIN_TYPE_HASH =
        keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
    bytes32 private DOMAIN_SEPARATOR =
        keccak256(
            abi.encode(
                EIP712_DOMAIN_TYPE_HASH,
                keccak256(bytes("Bullieverse")),
                keccak256(bytes("1")),
                block.chainid,
                address(this)
            )
        );

    address public masterAddress;

    ICancellationRegistry cancellationRegistry;

    mapping(address => uint256) public claimedAmount;

    mapping(address => mapping(uint256 => uint256)) public claimedERC1155Assets;

    mapping(address => mapping(uint256 => uint256)) public lootBoxPaidDetails;

    event RedeemedBullReward(uint256 indexed amount, address indexed claimer);

    event RedeemLootBox(
        uint256 lootBoxType,
        uint256 paidAmount,
        address redeemer
    );

    /*
     * @dev Sets the registry contracts for the exchange.
     */
    function setRegistryContracts(address _cancellationRegistry)
        external
        onlyOwner
    {
        cancellationRegistry = ICancellationRegistry(_cancellationRegistry);
    }

    /**
     * @dev Change Master Address
     */
    function changeMasterAddresss(address newMasterAddress) external {
        masterAddress = newMasterAddress;
    }

    // Start of Transfer Section

    function _transferERC20Reward(address erc20Address, uint256 tokenAmount)
        private
    {
        require(tokenAmount != 0, "Cannot WithDraw Zero Token");
        IERC20(erc20Address).transferFrom(
            masterAddress,
            msg.sender,
            tokenAmount * (10**18)
        );
    }

    function _transferERC1155(
        address erc1155Address,
        uint256 collectionId,
        uint256 amount
    ) private {
        require(amount != 0, "Cannot WithDraw Zero Token");
        IERC1155(erc1155Address).safeTransferFrom(
            masterAddress,
            msg.sender,
            collectionId,
            amount,
            ""
        );
    }

    // End of Transfer Section

    //Start of Validate Section

    function _validateSigner(
        address erc1155Address,
        uint256 collectionId,
        uint256 amount,
        address redeemer,
        bytes memory signature
    ) public view returns (address) {
        bytes32 CLAIM_ERC1155_ASSETS = keccak256(
            "Reward(address erc1155Address,uint256 collectionId,uint256 amount,address redeemer)"
        );

        bytes32 structHash = keccak256(
            abi.encode(
                CLAIM_ERC1155_ASSETS,
                erc1155Address,
                collectionId,
                amount,
                redeemer
            )
        );

        bytes32 digest = ECDSA.toTypedDataHash(DOMAIN_SEPARATOR, structHash);

        address recoveredAddress = ECDSA.recover(digest, signature);
        return recoveredAddress;
    }

    function _validateSigner(
        address erc20Address,
        uint256 amount,
        address redeemer,
        bytes memory signature
    ) public view returns (address) {
        bytes32 BUYORDER_TYPEHASH = keccak256(
            "Reward(address erc20Address,uint256 amount,address redeemer)"
        );

        bytes32 structHash = keccak256(
            abi.encode(BUYORDER_TYPEHASH, erc20Address, amount, redeemer)
        );

        bytes32 digest = ECDSA.toTypedDataHash(DOMAIN_SEPARATOR, structHash);

        address recoveredAddress = ECDSA.recover(digest, signature);
        return recoveredAddress;
    }

    function _validateSigner(
        uint256 lootBoxType,
        address erc20Address,
        uint256 amount,
        uint256 blockNumber,
        address redeemer,
        bytes memory signature
    ) public view returns (address) {
        bytes32 PAYORDER_TYPEHASH = keccak256(
            "Reward(uint256 lootBoxType,address erc20Address,uint256 amount,uint256 blockNumber,address redeemer)"
        );

        bytes32 structHash = keccak256(
            abi.encode(
                PAYORDER_TYPEHASH,
                lootBoxType,
                erc20Address,
                amount,
                blockNumber,
                redeemer
            )
        );

        bytes32 digest = ECDSA.toTypedDataHash(DOMAIN_SEPARATOR, structHash);

        address recoveredAddress = ECDSA.recover(digest, signature);
        return recoveredAddress;
    }

    // End of Validate Section

    function redeemBull(
        uint256 amount,
        address erc20Address,
        bytes memory signature
    ) external {
        address signer = _validateSigner(
            erc20Address,
            amount,
            msg.sender,
            signature
        );
        require(signer == masterAddress, "Invalid Signer");
        address sender = msg.sender;
        uint256 remainingToken = amount - claimedAmount[sender];
        _transferERC20Reward(erc20Address, remainingToken);
        claimedAmount[sender] = amount;
        emit RedeemedBullReward(remainingToken, sender);
    }

    function redeemERC1155Assets(
        address erc1155Address,
        uint256 collectionId,
        uint256 amount,
        bytes memory signature
    ) external {
        address signer = _validateSigner(
            erc1155Address,
            collectionId,
            amount,
            msg.sender,
            signature
        );
        require(signer == masterAddress, "Invalid Signer");
        uint256 claimAbleAssetAmount = amount -
            claimedERC1155Assets[msg.sender][collectionId];
        _transferERC1155(erc1155Address, collectionId, claimAbleAssetAmount);
        claimedERC1155Assets[msg.sender][collectionId] = amount;
    }

    function payFee(
        uint256 lootBoxType,
        address erc20Address,
        uint256 amount,
        uint256 blockNumber,
        bytes memory signature
    ) external {
        require(
            blockNumber >
                cancellationRegistry.getLastTransactionBlockNumber(msg.sender),
            "Invalid Signature"
        );
        address signer = _validateSigner(
            lootBoxType,
            erc20Address,
            amount,
            blockNumber,
            msg.sender,
            signature
        );
        require(signer == masterAddress, "Invalid Signer");
        IERC20(erc20Address).transferFrom(msg.sender, masterAddress, amount);
        lootBoxPaidDetails[msg.sender][lootBoxType] += amount;
        cancellationRegistry.cancelAllPreviousSignatures(msg.sender);
        emit RedeemLootBox(lootBoxType, amount, msg.sender);
    }
}

File 2 of 9 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token 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 amount 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 `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `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 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` 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 amounts,
        bytes calldata data
    ) external;
}

File 3 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

File 4 of 9 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 5 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

File 6 of 9 : ICancellationRegistry.sol
//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.1;

interface ICancellationRegistry {
    function addRegistrant(address registrant) external;

    function removeRegistrant(address registrant) external;

    function cancelAllPreviousSignatures(address redeemer) external;

    function getLastTransactionBlockNumber(address redeemer)
        external
        view
        returns (uint256);
}

File 7 of 9 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

File 8 of 9 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 9 of 9 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

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

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lootBoxType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"paidAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"redeemer","type":"address"}],"name":"RedeemLootBox","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"claimer","type":"address"}],"name":"RedeemedBullReward","type":"event"},{"inputs":[{"internalType":"address","name":"erc1155Address","type":"address"},{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"redeemer","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"_validateSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"redeemer","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"_validateSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"lootBoxType","type":"uint256"},{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"address","name":"redeemer","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"_validateSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newMasterAddress","type":"address"}],"name":"changeMasterAddresss","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimedERC1155Assets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"lootBoxPaidDetails","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"lootBoxType","type":"uint256"},{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"payFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"redeemBull","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc1155Address","type":"address"},{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"redeemERC1155Assets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_cancellationRegistry","type":"address"}],"name":"setRegistryContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6001818155600b6080526a42756c6c6965766572736560a81b60a05261010060405260c052603160f81b60e05261009d907f04e1a141bd284a6be4d4cd3427d70220b8d58f3a2b00e586534bbde39c592b8d7fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463061012061012c565b604051602081830303815290604052805190602001206002553480156100c257600080fd5b506100d36100ce6100d8565b6100dc565b610158565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b6114d5806101676000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80638da5cb5b11610097578063cf44874c11610066578063cf44874c146101da578063d365a08e146101ed578063f2fde38b146101f5578063fdc8673a14610208576100f5565b80638da5cb5b146101995780638eb1eddb146101a1578063a83ffa82146101b4578063bee46ef9146101c7576100f5565b80633f78561b116100d35780633f78561b1461014b5780635380d4151461016b57806353f4dc521461017e578063715018a614610191576100f5565b806304e86903146100fa57806310a3705814610123578063309da13e14610136575b600080fd5b61010d610108366004610e1a565b61021b565b60405161011a91906113fd565b60405180910390f35b61010d610131366004610e3b565b61022d565b610149610144366004610fb9565b61024a565b005b61015e610159366004610eca565b610301565b60405161011a91906110f1565b61015e610179366004610e64565b610384565b61014961018c366004611086565b610404565b61014961063b565b61015e610686565b6101496101af366004610e1a565b610695565b61015e6101c236600461100e565b6106f6565b6101496101d5366004610e1a565b61077c565b61010d6101e8366004610e3b565b61079e565b61015e6107bb565b610149610203366004610e1a565b6107ca565b610149610216366004610f3a565b61083b565b60056020526000908152604090205481565b600760209081526000928352604080842090915290825290205481565b600061025883853385610384565b6003549091506001600160a01b038083169116146102915760405162461bcd60e51b81526004016102889061123d565b60405180910390fd5b336000818152600560205260408120546102ab908761145c565b90506102b785826108cf565b6001600160a01b0382166000818152600560205260408082208990555183917f36b07111a24a6e89eb5d0606af35e2b376c146b288c5eccad4fc862259af6b6a91a3505050505050565b6000807f45a1d7aa447794781987c9e9b7bbb1ae9aa8309d1dbb97a1ba124ba772e97e6c905060008188888888604051602001610342959493929190611188565b60405160208183030381529060405280519060200120905060006103686002548361098a565b9050600061037682876109bd565b9a9950505050505050505050565b6000807feae7f00d4825c630591aad80fe9759a6d9ae1efc2b15d512731601f078bbbcbb90506000818787876040516020016103c39493929190611161565b60405160208183030381529060405280519060200120905060006103e96002548361098a565b905060006103f782876109bd565b9998505050505050505050565b600480546040516305c8962160e41b81526001600160a01b0390911691635c89621091610433913391016110f1565b60206040518083038186803b15801561044b57600080fd5b505afa15801561045f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104839190610fa1565b82116104a15760405162461bcd60e51b81526004016102889061139d565b60006104b18686868633876106f6565b6003549091506001600160a01b038083169116146104e15760405162461bcd60e51b81526004016102889061123d565b6003546040516323b872dd60e01b81526001600160a01b03808816926323b872dd9261051592339216908990600401611105565b602060405180830381600087803b15801561052f57600080fd5b505af1158015610543573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105679190610f81565b5033600090815260076020908152604080832089845290915281208054869290610592908490611425565b909155505060048054604051631f4d52d360e11b81526001600160a01b0390911691633e9aa5a6916105c6913391016110f1565b600060405180830381600087803b1580156105e057600080fd5b505af11580156105f4573d6000803e3d6000fd5b505050507fe5fb87c34923fe68c77392a5c899f5a79c08873742b66af535ede6a0a4ae55b486853360405161062b93929190611406565b60405180910390a1505050505050565b6106436109e1565b6001600160a01b0316610654610686565b6001600160a01b03161461067a5760405162461bcd60e51b8152600401610288906113c8565b61068460006109e5565b565b6000546001600160a01b031690565b61069d6109e1565b6001600160a01b03166106ae610686565b6001600160a01b0316146106d45760405162461bcd60e51b8152600401610288906113c8565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000807ff80083d8eaaa66e99c7cfe14e29021579f2807b0af0346b70582503a37ffcd3f90506000818989898989604051602001610739969594939291906111b4565b604051602081830303815290604052805190602001209050600061075f6002548361098a565b9050600061076d82876109bd565b9b9a5050505050505050505050565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600660209081526000928352604080842090915290825290205481565b6003546001600160a01b031681565b6107d26109e1565b6001600160a01b03166107e3610686565b6001600160a01b0316146108095760405162461bcd60e51b8152600401610288906113c8565b6001600160a01b03811661082f5760405162461bcd60e51b81526004016102889061129c565b610838816109e5565b50565b600061084a8585853386610301565b6003549091506001600160a01b0380831691161461087a5760405162461bcd60e51b81526004016102889061123d565b33600090815260066020908152604080832087845290915281205461089f908561145c565b90506108ac868683610a35565b505033600090815260066020908152604080832095835294905292909220555050565b806108ec5760405162461bcd60e51b815260040161028890611324565b6003546001600160a01b03808416916323b872dd91163361091585670de0b6b3a764000061143d565b6040518463ffffffff1660e01b815260040161093393929190611105565b602060405180830381600087803b15801561094d57600080fd5b505af1158015610961573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109859190610f81565b505050565b6000828260405160200161099f9291906110d6565b60405160208183030381529060405280519060200120905092915050565b60008060006109cc8585610ac1565b915091506109d981610b31565b509392505050565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80610a525760405162461bcd60e51b815260040161028890611324565b600354604051637921219560e11b81526001600160a01b038581169263f242432a92610a8a9290911690339087908790600401611129565b600060405180830381600087803b158015610aa457600080fd5b505af1158015610ab8573d6000803e3d6000fd5b50505050505050565b600080825160411415610af85760208301516040840151606085015160001a610aec87828585610c5e565b94509450505050610b2a565b825160401415610b225760208301516040840151610b17868383610d3e565b935093505050610b2a565b506000905060025b9250929050565b6000816004811115610b5357634e487b7160e01b600052602160045260246000fd5b1415610b5e57610838565b6001816004811115610b8057634e487b7160e01b600052602160045260246000fd5b1415610b9e5760405162461bcd60e51b815260040161028890611206565b6002816004811115610bc057634e487b7160e01b600052602160045260246000fd5b1415610bde5760405162461bcd60e51b815260040161028890611265565b6003816004811115610c0057634e487b7160e01b600052602160045260246000fd5b1415610c1e5760405162461bcd60e51b8152600401610288906112e2565b6004816004811115610c4057634e487b7160e01b600052602160045260246000fd5b14156108385760405162461bcd60e51b81526004016102889061135b565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610c955750600090506003610d35565b8460ff16601b14158015610cad57508460ff16601c14155b15610cbe5750600090506004610d35565b600060018787878760405160008152602001604052604051610ce394939291906111e8565b6020604051602081039080840390855afa158015610d05573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2e57600060019250925050610d35565b9150600090505b94509492505050565b6000806001600160ff1b03831681610d5b60ff86901c601b611425565b9050610d6987828885610c5e565b935093505050935093915050565b80356001600160a01b0381168114610d8e57600080fd5b919050565b600082601f830112610da3578081fd5b813567ffffffffffffffff80821115610dbe57610dbe611489565b604051601f8301601f19908116603f01168101908282118183101715610de657610de6611489565b81604052838152866020858801011115610dfe578485fd5b8360208701602083013792830160200193909352509392505050565b600060208284031215610e2b578081fd5b610e3482610d77565b9392505050565b60008060408385031215610e4d578081fd5b610e5683610d77565b946020939093013593505050565b60008060008060808587031215610e79578182fd5b610e8285610d77565b935060208501359250610e9760408601610d77565b9150606085013567ffffffffffffffff811115610eb2578182fd5b610ebe87828801610d93565b91505092959194509250565b600080600080600060a08688031215610ee1578081fd5b610eea86610d77565b94506020860135935060408601359250610f0660608701610d77565b9150608086013567ffffffffffffffff811115610f21578182fd5b610f2d88828901610d93565b9150509295509295909350565b60008060008060808587031215610f4f578384fd5b610f5885610d77565b93506020850135925060408501359150606085013567ffffffffffffffff811115610eb2578182fd5b600060208284031215610f92578081fd5b81518015158114610e34578182fd5b600060208284031215610fb2578081fd5b5051919050565b600080600060608486031215610fcd578283fd5b83359250610fdd60208501610d77565b9150604084013567ffffffffffffffff811115610ff8578182fd5b61100486828701610d93565b9150509250925092565b60008060008060008060c08789031215611026578081fd5b8635955061103660208801610d77565b9450604087013593506060870135925061105260808801610d77565b915060a087013567ffffffffffffffff81111561106d578182fd5b61107989828a01610d93565b9150509295509295509295565b600080600080600060a0868803121561109d578081fd5b853594506110ad60208701610d77565b93506040860135925060608601359150608086013567ffffffffffffffff811115610f21578182fd5b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b9384526001600160a01b039283166020850152604084019190915216606082015260800190565b9485526001600160a01b0393841660208601526040850192909252606084015216608082015260a00190565b95865260208601949094526001600160a01b039283166040860152606085019190915260808401521660a082015260c00190565b93845260ff9290921660208401526040830152606082015260800190565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b6020808252600e908201526d24b73b30b634b21029b4b3b732b960911b604082015260600190565b6020808252601f908201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604082015261756560f01b606082015260800190565b6020808252601a908201527f43616e6e6f74205769746844726177205a65726f20546f6b656e000000000000604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604082015261756560f01b606082015260800190565b602080825260119082015270496e76616c6964205369676e617475726560781b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b90815260200190565b92835260208301919091526001600160a01b0316604082015260600190565b6000821982111561143857611438611473565b500190565b600081600019048311821515161561145757611457611473565b500290565b60008282101561146e5761146e611473565b500390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220302a0b921a72d0ef1a1fda0c9734e4178b4b74f9eb64dfa94caf87f051cb9ff064736f6c63430008010033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80638da5cb5b11610097578063cf44874c11610066578063cf44874c146101da578063d365a08e146101ed578063f2fde38b146101f5578063fdc8673a14610208576100f5565b80638da5cb5b146101995780638eb1eddb146101a1578063a83ffa82146101b4578063bee46ef9146101c7576100f5565b80633f78561b116100d35780633f78561b1461014b5780635380d4151461016b57806353f4dc521461017e578063715018a614610191576100f5565b806304e86903146100fa57806310a3705814610123578063309da13e14610136575b600080fd5b61010d610108366004610e1a565b61021b565b60405161011a91906113fd565b60405180910390f35b61010d610131366004610e3b565b61022d565b610149610144366004610fb9565b61024a565b005b61015e610159366004610eca565b610301565b60405161011a91906110f1565b61015e610179366004610e64565b610384565b61014961018c366004611086565b610404565b61014961063b565b61015e610686565b6101496101af366004610e1a565b610695565b61015e6101c236600461100e565b6106f6565b6101496101d5366004610e1a565b61077c565b61010d6101e8366004610e3b565b61079e565b61015e6107bb565b610149610203366004610e1a565b6107ca565b610149610216366004610f3a565b61083b565b60056020526000908152604090205481565b600760209081526000928352604080842090915290825290205481565b600061025883853385610384565b6003549091506001600160a01b038083169116146102915760405162461bcd60e51b81526004016102889061123d565b60405180910390fd5b336000818152600560205260408120546102ab908761145c565b90506102b785826108cf565b6001600160a01b0382166000818152600560205260408082208990555183917f36b07111a24a6e89eb5d0606af35e2b376c146b288c5eccad4fc862259af6b6a91a3505050505050565b6000807f45a1d7aa447794781987c9e9b7bbb1ae9aa8309d1dbb97a1ba124ba772e97e6c905060008188888888604051602001610342959493929190611188565b60405160208183030381529060405280519060200120905060006103686002548361098a565b9050600061037682876109bd565b9a9950505050505050505050565b6000807feae7f00d4825c630591aad80fe9759a6d9ae1efc2b15d512731601f078bbbcbb90506000818787876040516020016103c39493929190611161565b60405160208183030381529060405280519060200120905060006103e96002548361098a565b905060006103f782876109bd565b9998505050505050505050565b600480546040516305c8962160e41b81526001600160a01b0390911691635c89621091610433913391016110f1565b60206040518083038186803b15801561044b57600080fd5b505afa15801561045f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104839190610fa1565b82116104a15760405162461bcd60e51b81526004016102889061139d565b60006104b18686868633876106f6565b6003549091506001600160a01b038083169116146104e15760405162461bcd60e51b81526004016102889061123d565b6003546040516323b872dd60e01b81526001600160a01b03808816926323b872dd9261051592339216908990600401611105565b602060405180830381600087803b15801561052f57600080fd5b505af1158015610543573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105679190610f81565b5033600090815260076020908152604080832089845290915281208054869290610592908490611425565b909155505060048054604051631f4d52d360e11b81526001600160a01b0390911691633e9aa5a6916105c6913391016110f1565b600060405180830381600087803b1580156105e057600080fd5b505af11580156105f4573d6000803e3d6000fd5b505050507fe5fb87c34923fe68c77392a5c899f5a79c08873742b66af535ede6a0a4ae55b486853360405161062b93929190611406565b60405180910390a1505050505050565b6106436109e1565b6001600160a01b0316610654610686565b6001600160a01b03161461067a5760405162461bcd60e51b8152600401610288906113c8565b61068460006109e5565b565b6000546001600160a01b031690565b61069d6109e1565b6001600160a01b03166106ae610686565b6001600160a01b0316146106d45760405162461bcd60e51b8152600401610288906113c8565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000807ff80083d8eaaa66e99c7cfe14e29021579f2807b0af0346b70582503a37ffcd3f90506000818989898989604051602001610739969594939291906111b4565b604051602081830303815290604052805190602001209050600061075f6002548361098a565b9050600061076d82876109bd565b9b9a5050505050505050505050565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600660209081526000928352604080842090915290825290205481565b6003546001600160a01b031681565b6107d26109e1565b6001600160a01b03166107e3610686565b6001600160a01b0316146108095760405162461bcd60e51b8152600401610288906113c8565b6001600160a01b03811661082f5760405162461bcd60e51b81526004016102889061129c565b610838816109e5565b50565b600061084a8585853386610301565b6003549091506001600160a01b0380831691161461087a5760405162461bcd60e51b81526004016102889061123d565b33600090815260066020908152604080832087845290915281205461089f908561145c565b90506108ac868683610a35565b505033600090815260066020908152604080832095835294905292909220555050565b806108ec5760405162461bcd60e51b815260040161028890611324565b6003546001600160a01b03808416916323b872dd91163361091585670de0b6b3a764000061143d565b6040518463ffffffff1660e01b815260040161093393929190611105565b602060405180830381600087803b15801561094d57600080fd5b505af1158015610961573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109859190610f81565b505050565b6000828260405160200161099f9291906110d6565b60405160208183030381529060405280519060200120905092915050565b60008060006109cc8585610ac1565b915091506109d981610b31565b509392505050565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80610a525760405162461bcd60e51b815260040161028890611324565b600354604051637921219560e11b81526001600160a01b038581169263f242432a92610a8a9290911690339087908790600401611129565b600060405180830381600087803b158015610aa457600080fd5b505af1158015610ab8573d6000803e3d6000fd5b50505050505050565b600080825160411415610af85760208301516040840151606085015160001a610aec87828585610c5e565b94509450505050610b2a565b825160401415610b225760208301516040840151610b17868383610d3e565b935093505050610b2a565b506000905060025b9250929050565b6000816004811115610b5357634e487b7160e01b600052602160045260246000fd5b1415610b5e57610838565b6001816004811115610b8057634e487b7160e01b600052602160045260246000fd5b1415610b9e5760405162461bcd60e51b815260040161028890611206565b6002816004811115610bc057634e487b7160e01b600052602160045260246000fd5b1415610bde5760405162461bcd60e51b815260040161028890611265565b6003816004811115610c0057634e487b7160e01b600052602160045260246000fd5b1415610c1e5760405162461bcd60e51b8152600401610288906112e2565b6004816004811115610c4057634e487b7160e01b600052602160045260246000fd5b14156108385760405162461bcd60e51b81526004016102889061135b565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610c955750600090506003610d35565b8460ff16601b14158015610cad57508460ff16601c14155b15610cbe5750600090506004610d35565b600060018787878760405160008152602001604052604051610ce394939291906111e8565b6020604051602081039080840390855afa158015610d05573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d2e57600060019250925050610d35565b9150600090505b94509492505050565b6000806001600160ff1b03831681610d5b60ff86901c601b611425565b9050610d6987828885610c5e565b935093505050935093915050565b80356001600160a01b0381168114610d8e57600080fd5b919050565b600082601f830112610da3578081fd5b813567ffffffffffffffff80821115610dbe57610dbe611489565b604051601f8301601f19908116603f01168101908282118183101715610de657610de6611489565b81604052838152866020858801011115610dfe578485fd5b8360208701602083013792830160200193909352509392505050565b600060208284031215610e2b578081fd5b610e3482610d77565b9392505050565b60008060408385031215610e4d578081fd5b610e5683610d77565b946020939093013593505050565b60008060008060808587031215610e79578182fd5b610e8285610d77565b935060208501359250610e9760408601610d77565b9150606085013567ffffffffffffffff811115610eb2578182fd5b610ebe87828801610d93565b91505092959194509250565b600080600080600060a08688031215610ee1578081fd5b610eea86610d77565b94506020860135935060408601359250610f0660608701610d77565b9150608086013567ffffffffffffffff811115610f21578182fd5b610f2d88828901610d93565b9150509295509295909350565b60008060008060808587031215610f4f578384fd5b610f5885610d77565b93506020850135925060408501359150606085013567ffffffffffffffff811115610eb2578182fd5b600060208284031215610f92578081fd5b81518015158114610e34578182fd5b600060208284031215610fb2578081fd5b5051919050565b600080600060608486031215610fcd578283fd5b83359250610fdd60208501610d77565b9150604084013567ffffffffffffffff811115610ff8578182fd5b61100486828701610d93565b9150509250925092565b60008060008060008060c08789031215611026578081fd5b8635955061103660208801610d77565b9450604087013593506060870135925061105260808801610d77565b915060a087013567ffffffffffffffff81111561106d578182fd5b61107989828a01610d93565b9150509295509295509295565b600080600080600060a0868803121561109d578081fd5b853594506110ad60208701610d77565b93506040860135925060608601359150608086013567ffffffffffffffff811115610f21578182fd5b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b9384526001600160a01b039283166020850152604084019190915216606082015260800190565b9485526001600160a01b0393841660208601526040850192909252606084015216608082015260a00190565b95865260208601949094526001600160a01b039283166040860152606085019190915260808401521660a082015260c00190565b93845260ff9290921660208401526040830152606082015260800190565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b6020808252600e908201526d24b73b30b634b21029b4b3b732b960911b604082015260600190565b6020808252601f908201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604082015261756560f01b606082015260800190565b6020808252601a908201527f43616e6e6f74205769746844726177205a65726f20546f6b656e000000000000604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604082015261756560f01b606082015260800190565b602080825260119082015270496e76616c6964205369676e617475726560781b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b90815260200190565b92835260208301919091526001600160a01b0316604082015260600190565b6000821982111561143857611438611473565b500190565b600081600019048311821515161561145757611457611473565b500290565b60008282101561146e5761146e611473565b500390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220302a0b921a72d0ef1a1fda0c9734e4178b4b74f9eb64dfa94caf87f051cb9ff064736f6c63430008010033

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.