More Info
Private Name Tags
Latest 25 from a total of 6,216 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 58863312 | 294 days ago | IN | 0 POL | 0.00044722 | ||||
Claim | 57205568 | 337 days ago | IN | 0 POL | 0.00042796 | ||||
Claim | 57188810 | 337 days ago | IN | 0 POL | 0.0148848 | ||||
Claim | 57188565 | 337 days ago | IN | 0 POL | 0.00206422 | ||||
0x0eb02625 | 57188209 | 337 days ago | IN | 0 POL | 0.00165779 | ||||
Claim | 57188087 | 337 days ago | IN | 0 POL | 0.0018075 | ||||
Claim | 57183601 | 337 days ago | IN | 0 POL | 0.0069135 | ||||
Claim | 57183523 | 337 days ago | IN | 0 POL | 0.00138366 | ||||
Claim | 57183464 | 337 days ago | IN | 0 POL | 0.00156814 | ||||
Claim | 57183453 | 337 days ago | IN | 0 POL | 0.11834383 | ||||
Claim | 57183450 | 337 days ago | IN | 0 POL | 0.0015674 | ||||
Claim | 57183441 | 337 days ago | IN | 0 POL | 0.00156706 | ||||
Claim | 57183433 | 337 days ago | IN | 0 POL | 0.023062 | ||||
Claim | 57183432 | 337 days ago | IN | 0 POL | 0.023031 | ||||
Claim | 57183432 | 337 days ago | IN | 0 POL | 0.023057 | ||||
Claim | 57183430 | 337 days ago | IN | 0 POL | 0.023047 | ||||
Claim | 57183430 | 337 days ago | IN | 0 POL | 0.0258992 | ||||
Claim | 57183424 | 337 days ago | IN | 0 POL | 0.00176011 | ||||
Claim | 57183424 | 337 days ago | IN | 0 POL | 0.00176209 | ||||
Claim | 57183424 | 337 days ago | IN | 0 POL | 0.00176347 | ||||
Claim | 57183413 | 337 days ago | IN | 0 POL | 0.00156624 | ||||
Claim | 57183409 | 337 days ago | IN | 0 POL | 0.00138294 | ||||
Claim | 57183408 | 337 days ago | IN | 0 POL | 0.00138264 | ||||
Claim | 57183405 | 337 days ago | IN | 0 POL | 0.00138306 | ||||
Claim | 57183405 | 337 days ago | IN | 0 POL | 0.00138366 |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xa949bFc5...909885A68 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
ERC1155ClaimWindowMerkleClaim
Compiler Version
v0.8.22+commit.4fc1097e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.22; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import {IERC1155Mintable} from "@animoca/ethereum-contracts/contracts/token/ERC1155/interfaces/IERC1155Mintable.sol"; import {ForwarderRegistryContext} from "@animoca/ethereum-contracts/contracts/metatx/ForwarderRegistryContext.sol"; import {ContractOwnership} from "@animoca/ethereum-contracts/contracts/access/ContractOwnership.sol"; import {ContractOwnershipStorage} from "@animoca/ethereum-contracts/contracts/access/libraries/ContractOwnershipStorage.sol"; import {ForwarderRegistryContextBase} from "@animoca/ethereum-contracts/contracts/metatx/base/ForwarderRegistryContextBase.sol"; import {IForwarderRegistry} from "@animoca/ethereum-contracts/contracts/metatx/interfaces/IForwarderRegistry.sol"; import {Context} from "@openzeppelin/contracts/utils/Context.sol"; /** * @title ERC1155 Claim Window Merkle Claim Contract * @dev This contract allows users to claim rewards by claim window based on a Merkle proof, which verifies that they are * @dev entitled to the rewards without revealing the entire list of recipients. */ contract ERC1155ClaimWindowMerkleClaim is ForwarderRegistryContext, ContractOwnership { using ContractOwnershipStorage for ContractOwnershipStorage.Layout; using MerkleProof for bytes32[]; /// @notice The claim window struct. struct ClaimWindow { bytes32 merkleRoot; uint256 startTime; uint256 endTime; } /// @notice The ERC1155Mintable reward contract. IERC1155Mintable public immutable REWARD_CONTRACT; /// @notice The token id to be claimed. uint256 public immutable TOKEN_ID; /// @notice The total number of tokens that can be minted in this contract. uint256 public immutable MINT_SUPPLY; /// @notice The total number of tokens that have been claimed. uint256 public noOfTokensClaimed; /// @notice Mapping from the epoch ID to the claim window. mapping(bytes32 => ClaimWindow) public claimWindows; /// @notice Mapping from leafhash to the claim status. mapping(bytes32 => bool) public claimStatus; /// @notice Event emitted when a payout is claimed. event PayoutClaimed(bytes32 indexed epochId, address indexed recipient, uint256 id, uint256 value); /// @notice Event emitted when a claim window is set. event SetEpochMerkleRoot(bytes32 indexed epochId, bytes32 indexed merkleRoot, uint256 startTime, uint256 endTime); /// @notice Error thrown when the payout has already been claimed. error AlreadyClaimed(bytes32 epochId, address recipient); /// @notice Error thrown when the proof provided for the claim is invalid. error InvalidProof(bytes32 epochId, address recipient); /// @notice Error thrown when the claim window is closed or has not yet opened. error OutOfClaimWindow(bytes32 epochId, uint256 currentTime); /// @notice Error thrown when the number of tokens claimed exceeds the mint supply. error ExceededMintSupply(); /// @notice Error thrown when the epoch ID already exists. error EpochIdAlreadyExists(bytes32 epochId); /// @notice Error thrown when the epoch ID does not exist. error EpochIdNotExists(bytes32 epochId); /// @notice Error thrown when the claim window is invalid. error InvalidClaimWindow(uint256 startTime, uint256 endTime, uint256 currentTime); /** * @notice Constructor for the ERC1155ClaimWindowMerkleClaim contract. * @param tokenId The token id to be claimed. * @param mintSupply The total number of tokens that can be minted in this contract. * @param rewardContract The ERC1155Mintable reward contract interface. * @param forwarderRegistry The forwarder registry contract. */ constructor( uint256 tokenId, uint256 mintSupply, IERC1155Mintable rewardContract, IForwarderRegistry forwarderRegistry ) ForwarderRegistryContext(forwarderRegistry) ContractOwnership(msg.sender) { TOKEN_ID = tokenId; MINT_SUPPLY = mintSupply; REWARD_CONTRACT = rewardContract; } /// @inheritdoc ForwarderRegistryContextBase function _msgSender() internal view virtual override(Context, ForwarderRegistryContextBase) returns (address) { return ForwarderRegistryContextBase._msgSender(); } /// @inheritdoc ForwarderRegistryContextBase function _msgData() internal view virtual override(Context, ForwarderRegistryContextBase) returns (bytes calldata) { return ForwarderRegistryContextBase._msgData(); } /** * @notice Sets the merkle root for a specific epoch with start and end time. * @dev Reverts if the _msgSender() is not the owner. * @dev Reverts if the epoch ID has already been set. * @dev Emits a SetEpochMerkleRoot event. * @param epochId The epoch ID for the claim. * @param merkleRoot The Merkle root of the claim. * @param startTime The start time of the claim window. * @param endTime The end time of the claim window. */ function setEpochMerkleRoot(bytes32 epochId, bytes32 merkleRoot, uint256 startTime, uint256 endTime) external { ContractOwnershipStorage.layout().enforceIsContractOwner(_msgSender()); if (startTime >= endTime || endTime <= block.timestamp) { revert InvalidClaimWindow(startTime, endTime, block.timestamp); } if (claimWindows[epochId].merkleRoot != bytes32(0)) { revert EpochIdAlreadyExists(epochId); } claimWindows[epochId] = ClaimWindow(merkleRoot, startTime, endTime); emit SetEpochMerkleRoot(epochId, merkleRoot, startTime, endTime); } /** * @notice Claims the payout for a specific epoch. * @param epochId The epoch ID for the claim. * @param proof The Merkle proof for the claim. * @param recipient The recipient of the payout. * @dev Throws if the claim window has not been set. * @dev Throws if the claim window is closed or has not yet opened. * @dev Throws if the proof provided for the claim is invalid. * @dev Throws if the payout has already been claimed. * @dev Throws if the number of tokens claimed exceeds the mint supply. */ function claim(bytes32 epochId, bytes32[] calldata proof, address recipient) external { ClaimWindow storage claimWindow = claimWindows[epochId]; bytes32 merkleRoot = claimWindow.merkleRoot; if (merkleRoot == bytes32(0)) { revert EpochIdNotExists(epochId); } if (block.timestamp < claimWindow.startTime || block.timestamp > claimWindow.endTime) { revert OutOfClaimWindow(epochId, block.timestamp); } bytes32 leaf = keccak256(abi.encodePacked(epochId, recipient)); if (!proof.verify(merkleRoot, leaf)) revert InvalidProof(epochId, recipient); if (claimStatus[leaf]) revert AlreadyClaimed(epochId, recipient); uint256 updatedNoOfTokensClaimed = noOfTokensClaimed + 1; if (updatedNoOfTokensClaimed > MINT_SUPPLY) { revert ExceededMintSupply(); } noOfTokensClaimed = updatedNoOfTokensClaimed; claimStatus[leaf] = true; REWARD_CONTRACT.safeMint(recipient, TOKEN_ID, 1, ""); emit PayoutClaimed(epochId, recipient, TOKEN_ID, 1); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import {ContractOwnershipStorage} from "./libraries/ContractOwnershipStorage.sol"; import {ContractOwnershipBase} from "./base/ContractOwnershipBase.sol"; import {InterfaceDetection} from "./../introspection/InterfaceDetection.sol"; /// @title ERC173 Contract Ownership Standard (immutable version). /// @dev See https://eips.ethereum.org/EIPS/eip-173 /// @dev This contract is to be used via inheritance in an immutable (non-proxied) implementation. abstract contract ContractOwnership is ContractOwnershipBase, InterfaceDetection { using ContractOwnershipStorage for ContractOwnershipStorage.Layout; /// @notice Initializes the storage with an initial contract owner. /// @notice Marks the following ERC165 interface(s) as supported: ERC173. /// @dev Emits an {OwnershipTransferred} if `initialOwner` is not the zero address. /// @param initialOwner the initial contract owner. constructor(address initialOwner) { ContractOwnershipStorage.layout().constructorInit(initialOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import {IERC173} from "./../interfaces/IERC173.sol"; import {ContractOwnershipStorage} from "./../libraries/ContractOwnershipStorage.sol"; import {Context} from "@openzeppelin/contracts/utils/Context.sol"; /// @title ERC173 Contract Ownership Standard (proxiable version). /// @dev See https://eips.ethereum.org/EIPS/eip-173 /// @dev This contract is to be used via inheritance in a proxied implementation. /// @dev Note: This contract requires ERC165 (Interface Detection Standard). abstract contract ContractOwnershipBase is IERC173, Context { using ContractOwnershipStorage for ContractOwnershipStorage.Layout; /// @inheritdoc IERC173 function owner() public view virtual returns (address) { return ContractOwnershipStorage.layout().owner(); } /// @inheritdoc IERC173 function transferOwnership(address newOwner) public virtual { ContractOwnershipStorage.layout().transferOwnership(_msgSender(), newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; /// @notice Thrown when the target contract is actually not a contract. /// @param targetContract The contract that was checked error TargetIsNotAContract(address targetContract);
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; /// @notice Thrown when an account is not the contract owner but is required to. /// @param account The account that was checked. error NotContractOwner(address account); /// @notice Thrown when an account is not the target contract owner but is required to. /// @param targetContract The contract that was checked. /// @param account The account that was checked. error NotTargetContractOwner(address targetContract, address account);
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; /// @notice Emitted when the contract ownership changes. /// @param previousOwner the previous contract owner. /// @param newOwner the new contract owner. event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; /// @title ERC-173 Contract Ownership Standard (functions) /// @dev See https://eips.ethereum.org/EIPS/eip-173 /// @dev Note: the ERC-165 identifier for this interface is 0x7f5828d0 interface IERC173 { /// @notice Sets the address of the new contract owner. /// @dev Reverts if the sender is not the contract owner. /// @dev Emits an {OwnershipTransferred} event if `newOwner` is different from the current contract owner. /// @param newOwner The address of the new contract owner. Using the zero address means renouncing ownership. function transferOwnership(address newOwner) external; /// @notice Gets the address of the contract owner. /// @return contractOwner The address of the contract owner. function owner() external view returns (address contractOwner); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import {NotContractOwner, NotTargetContractOwner} from "./../errors/ContractOwnershipErrors.sol"; import {TargetIsNotAContract} from "./../errors/Common.sol"; import {OwnershipTransferred} from "./../events/ERC173Events.sol"; import {IERC173} from "./../interfaces/IERC173.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {ProxyInitialization} from "./../../proxy/libraries/ProxyInitialization.sol"; import {InterfaceDetectionStorage} from "./../../introspection/libraries/InterfaceDetectionStorage.sol"; library ContractOwnershipStorage { using Address for address; using ContractOwnershipStorage for ContractOwnershipStorage.Layout; using InterfaceDetectionStorage for InterfaceDetectionStorage.Layout; struct Layout { address contractOwner; } bytes32 internal constant LAYOUT_STORAGE_SLOT = bytes32(uint256(keccak256("animoca.core.access.ContractOwnership.storage")) - 1); bytes32 internal constant PROXY_INIT_PHASE_SLOT = bytes32(uint256(keccak256("animoca.core.access.ContractOwnership.phase")) - 1); /// @notice Initializes the storage with an initial contract owner (immutable version). /// @notice Marks the following ERC165 interface(s) as supported: ERC173. /// @dev Note: This function should be called ONLY in the constructor of an immutable (non-proxied) contract. /// @dev Emits an {OwnershipTransferred} if `initialOwner` is not the zero address. /// @param initialOwner The initial contract owner. function constructorInit(Layout storage s, address initialOwner) internal { if (initialOwner != address(0)) { s.contractOwner = initialOwner; emit OwnershipTransferred(address(0), initialOwner); } InterfaceDetectionStorage.layout().setSupportedInterface(type(IERC173).interfaceId, true); } /// @notice Initializes the storage with an initial contract owner (proxied version). /// @notice Sets the proxy initialization phase to `1`. /// @notice Marks the following ERC165 interface(s) as supported: ERC173. /// @dev Note: This function should be called ONLY in the init function of a proxied contract. /// @dev Reverts with {InitializationPhaseAlreadyReached} if the proxy initialization phase is set to `1` or above. /// @dev Emits an {OwnershipTransferred} if `initialOwner` is not the zero address. /// @param initialOwner The initial contract owner. function proxyInit(Layout storage s, address initialOwner) internal { ProxyInitialization.setPhase(PROXY_INIT_PHASE_SLOT, 1); s.constructorInit(initialOwner); } /// @notice Sets the address of the new contract owner. /// @dev Reverts with {NotContractOwner} if `sender` is not the contract owner. /// @dev Emits an {OwnershipTransferred} event if `newOwner` is different from the current contract owner. /// @param newOwner The address of the new contract owner. Using the zero address means renouncing ownership. function transferOwnership(Layout storage s, address sender, address newOwner) internal { address previousOwner = s.contractOwner; if (sender != previousOwner) revert NotContractOwner(sender); if (previousOwner != newOwner) { s.contractOwner = newOwner; emit OwnershipTransferred(previousOwner, newOwner); } } /// @notice Gets the address of the contract owner. /// @return contractOwner The address of the contract owner. function owner(Layout storage s) internal view returns (address contractOwner) { return s.contractOwner; } /// @notice Checks whether an account is the owner of a target contract. /// @param targetContract The contract to check. /// @param account The account to check. /// @return isTargetContractOwner_ Whether `account` is the owner of `targetContract`. function isTargetContractOwner(address targetContract, address account) internal view returns (bool isTargetContractOwner_) { if (!targetContract.isContract()) revert TargetIsNotAContract(targetContract); return IERC173(targetContract).owner() == account; } /// @notice Ensures that an account is the contract owner. /// @dev Reverts with {NotContractOwner} if `account` is not the contract owner. /// @param account The account. function enforceIsContractOwner(Layout storage s, address account) internal view { if (account != s.contractOwner) revert NotContractOwner(account); } /// @notice Enforces that an account is the owner of a target contract. /// @dev Reverts with {NotTheTargetContractOwner} if the account is not the owner. /// @param targetContract The contract to check. /// @param account The account to check. function enforceIsTargetContractOwner(address targetContract, address account) internal view { if (!isTargetContractOwner(targetContract, account)) revert NotTargetContractOwner(targetContract, account); } function layout() internal pure returns (Layout storage s) { bytes32 position = LAYOUT_STORAGE_SLOT; assembly { s.slot := position } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import {IERC165} from "./interfaces/IERC165.sol"; import {InterfaceDetectionStorage} from "./libraries/InterfaceDetectionStorage.sol"; /// @title ERC165 Interface Detection Standard (immutable or proxiable version). /// @dev This contract is to be used via inheritance in an immutable (non-proxied) or proxied implementation. abstract contract InterfaceDetection is IERC165 { using InterfaceDetectionStorage for InterfaceDetectionStorage.Layout; /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) external view returns (bool) { return InterfaceDetectionStorage.layout().supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; /// @notice Thrown when setting the illegal interfaceId 0xffffffff. error IllegalInterfaceId();
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; /// @title ERC165 Interface Detection Standard. /// @dev See https://eips.ethereum.org/EIPS/eip-165. /// @dev Note: The ERC-165 identifier for this interface is 0x01ffc9a7. interface IERC165 { /// @notice Returns whether this contract implements a given interface. /// @dev Note: This function call must use less than 30 000 gas. /// @param interfaceId the interface identifier to test. /// @return supported True if the interface is supported, false if `interfaceId` is `0xffffffff` or if the interface is not supported. function supportsInterface(bytes4 interfaceId) external view returns (bool supported); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import {IllegalInterfaceId} from "./../errors/InterfaceDetectionErrors.sol"; import {IERC165} from "./../interfaces/IERC165.sol"; library InterfaceDetectionStorage { struct Layout { mapping(bytes4 => bool) supportedInterfaces; } bytes32 internal constant LAYOUT_STORAGE_SLOT = bytes32(uint256(keccak256("animoca.core.introspection.InterfaceDetection.storage")) - 1); bytes4 internal constant ILLEGAL_INTERFACE_ID = 0xffffffff; /// @notice Sets or unsets an ERC165 interface. /// @dev Revertswith {IllegalInterfaceId} if `interfaceId` is `0xffffffff`. /// @param interfaceId the interface identifier. /// @param supported True to set the interface, false to unset it. function setSupportedInterface(Layout storage s, bytes4 interfaceId, bool supported) internal { if (interfaceId == ILLEGAL_INTERFACE_ID) revert IllegalInterfaceId(); s.supportedInterfaces[interfaceId] = supported; } /// @notice Returns whether this contract implements a given interface. /// @dev Note: This function call must use less than 30 000 gas. /// @param interfaceId The interface identifier to test. /// @return supported True if the interface is supported, false if `interfaceId` is `0xffffffff` or if the interface is not supported. function supportsInterface(Layout storage s, bytes4 interfaceId) internal view returns (bool supported) { if (interfaceId == ILLEGAL_INTERFACE_ID) { return false; } if (interfaceId == type(IERC165).interfaceId) { return true; } return s.supportedInterfaces[interfaceId]; } function layout() internal pure returns (Layout storage s) { bytes32 position = LAYOUT_STORAGE_SLOT; assembly { s.slot := position } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import {IForwarderRegistry} from "./interfaces/IForwarderRegistry.sol"; import {IERC2771} from "./interfaces/IERC2771.sol"; import {ForwarderRegistryContextBase} from "./base/ForwarderRegistryContextBase.sol"; /// @title Meta-Transactions Forwarder Registry Context (immutable version). /// @dev This contract is to be used via inheritance in an immutable (non-proxied) implementation. /// @dev Derived from https://github.com/wighawag/universal-forwarder (MIT licence) abstract contract ForwarderRegistryContext is ForwarderRegistryContextBase, IERC2771 { constructor(IForwarderRegistry forwarderRegistry_) ForwarderRegistryContextBase(forwarderRegistry_) {} function forwarderRegistry() external view returns (IForwarderRegistry) { return _FORWARDER_REGISTRY; } /// @inheritdoc IERC2771 function isTrustedForwarder(address forwarder) external view virtual returns (bool) { return forwarder == address(_FORWARDER_REGISTRY); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import {IForwarderRegistry} from "./../interfaces/IForwarderRegistry.sol"; import {ERC2771Calldata} from "./../libraries/ERC2771Calldata.sol"; /// @title Meta-Transactions Forwarder Registry Context (proxiable version). /// @dev This contract is to be used via inheritance in a proxied implementation. /// @dev Derived from https://github.com/wighawag/universal-forwarder (MIT licence) abstract contract ForwarderRegistryContextBase { IForwarderRegistry internal immutable _FORWARDER_REGISTRY; constructor(IForwarderRegistry forwarderRegistry) { _FORWARDER_REGISTRY = forwarderRegistry; } /// @notice Returns the message sender depending on the ForwarderRegistry-based meta-transaction context. function _msgSender() internal view virtual returns (address) { // Optimised path in case of an EOA-initiated direct tx to the contract or a call from a contract not complying with EIP-2771 // solhint-disable-next-line avoid-tx-origin if (msg.sender == tx.origin || msg.data.length < 24) { return msg.sender; } address sender = ERC2771Calldata.msgSender(); // Return the EIP-2771 calldata-appended sender address if the message was forwarded by the ForwarderRegistry or an approved forwarder if (msg.sender == address(_FORWARDER_REGISTRY) || _FORWARDER_REGISTRY.isApprovedForwarder(sender, msg.sender)) { return sender; } return msg.sender; } /// @notice Returns the message data depending on the ForwarderRegistry-based meta-transaction context. function _msgData() internal view virtual returns (bytes calldata) { // Optimised path in case of an EOA-initiated direct tx to the contract or a call from a contract not complying with EIP-2771 // solhint-disable-next-line avoid-tx-origin if (msg.sender == tx.origin || msg.data.length < 24) { return msg.data; } // Return the EIP-2771 calldata (minus the appended sender) if the message was forwarded by the ForwarderRegistry or an approved forwarder if (msg.sender == address(_FORWARDER_REGISTRY) || _FORWARDER_REGISTRY.isApprovedForwarder(ERC2771Calldata.msgSender(), msg.sender)) { return ERC2771Calldata.msgData(); } return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; /// @title Secure Protocol for Native Meta Transactions. /// @dev See https://eips.ethereum.org/EIPS/eip-2771 interface IERC2771 { /// @notice Checks whether a forwarder is trusted. /// @param forwarder The forwarder to check. /// @return isTrusted True if `forwarder` is trusted, false if not. function isTrustedForwarder(address forwarder) external view returns (bool isTrusted); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; /// @title Universal Meta-Transactions Forwarder Registry. /// @dev Derived from https://github.com/wighawag/universal-forwarder (MIT licence) interface IForwarderRegistry { /// @notice Checks whether an account is as an approved meta-transaction forwarder for a sender account. /// @param sender The sender account. /// @param forwarder The forwarder account. /// @return isApproved True if `forwarder` is an approved meta-transaction forwarder for `sender`, false otherwise. function isApprovedForwarder(address sender, address forwarder) external view returns (bool isApproved); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; /// @dev Derived from https://github.com/OpenZeppelin/openzeppelin-contracts (MIT licence) /// @dev See https://eips.ethereum.org/EIPS/eip-2771 library ERC2771Calldata { /// @notice Returns the sender address appended at the end of the calldata, as specified in EIP-2771. function msgSender() internal pure returns (address sender) { assembly { sender := shr(96, calldataload(sub(calldatasize(), 20))) } } /// @notice Returns the calldata while omitting the appended sender address, as specified in EIP-2771. function msgData() internal pure returns (bytes calldata data) { unchecked { return msg.data[:msg.data.length - 20]; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; /// @notice Emitted when trying to set a phase value that has already been reached. /// @param currentPhase The current phase. /// @param newPhase The new phase trying to be set. error InitializationPhaseAlreadyReached(uint256 currentPhase, uint256 newPhase);
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import {InitializationPhaseAlreadyReached} from "./../errors/ProxyInitializationErrors.sol"; import {StorageSlot} from "@openzeppelin/contracts/utils/StorageSlot.sol"; /// @notice Multiple calls protection for storage-modifying proxy initialization functions. library ProxyInitialization { /// @notice Sets the initialization phase during a storage-modifying proxy initialization function. /// @dev Reverts with {InitializationPhaseAlreadyReached} if `phase` has been reached already. /// @param storageSlot the storage slot where `phase` is stored. /// @param phase the initialization phase. function setPhase(bytes32 storageSlot, uint256 phase) internal { StorageSlot.Uint256Slot storage currentVersion = StorageSlot.getUint256Slot(storageSlot); uint256 currentPhase = currentVersion.value; if (currentPhase >= phase) revert InitializationPhaseAlreadyReached(currentPhase, phase); currentVersion.value = phase; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; /// @title ERC1155 Multi Token Standard, optional extension: Mintable. /// @dev See https://eips.ethereum.org/EIPS/eip-1155 /// @dev Note: The ERC-165 identifier for this interface is 0x5190c92c. interface IERC1155Mintable { /// @notice Safely mints some token. /// @dev Reverts if `to` is the zero address. /// @dev Reverts if `to`'s balance of `id` overflows. /// @dev Reverts if `to` is a contract and the call to {IERC1155TokenReceiver-onERC1155Received} fails, reverts or is rejected. /// @dev Emits an {IERC1155-TransferSingle} event. /// @param to Address of the new token owner. /// @param id Identifier of the token to mint. /// @param value Amount of token to mint. /// @param data Optional data to send along to a receiver contract. function safeMint(address to, uint256 id, uint256 value, bytes calldata data) external; /// @notice Safely mints a batch of tokens. /// @dev Reverts if `ids` and `values` have different lengths. /// @dev Reverts if `to` is the zero address. /// @dev Reverts if `to`'s balance overflows for one of `ids`. /// @dev Reverts if `to` is a contract and the call to {IERC1155TokenReceiver-onERC1155batchReceived} fails, reverts or is rejected. /// @dev Emits an {IERC1155-TransferBatch} event. /// @param to Address of the new tokens owner. /// @param ids Identifiers of the tokens to mint. /// @param values Amounts of tokens to mint. /// @param data Optional data to send along to a receiver contract. function safeBatchMint(address to, uint256[] calldata ids, uint256[] calldata values, bytes calldata data) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
{ "evmVersion": "paris", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 99999 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"mintSupply","type":"uint256"},{"internalType":"contract IERC1155Mintable","name":"rewardContract","type":"address"},{"internalType":"contract IForwarderRegistry","name":"forwarderRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes32","name":"epochId","type":"bytes32"},{"internalType":"address","name":"recipient","type":"address"}],"name":"AlreadyClaimed","type":"error"},{"inputs":[{"internalType":"bytes32","name":"epochId","type":"bytes32"}],"name":"EpochIdAlreadyExists","type":"error"},{"inputs":[{"internalType":"bytes32","name":"epochId","type":"bytes32"}],"name":"EpochIdNotExists","type":"error"},{"inputs":[],"name":"ExceededMintSupply","type":"error"},{"inputs":[],"name":"IllegalInterfaceId","type":"error"},{"inputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"currentTime","type":"uint256"}],"name":"InvalidClaimWindow","type":"error"},{"inputs":[{"internalType":"bytes32","name":"epochId","type":"bytes32"},{"internalType":"address","name":"recipient","type":"address"}],"name":"InvalidProof","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"NotContractOwner","type":"error"},{"inputs":[{"internalType":"bytes32","name":"epochId","type":"bytes32"},{"internalType":"uint256","name":"currentTime","type":"uint256"}],"name":"OutOfClaimWindow","type":"error"},{"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":"epochId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"PayoutClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"epochId","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"SetEpochMerkleRoot","type":"event"},{"inputs":[],"name":"MINT_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARD_CONTRACT","outputs":[{"internalType":"contract IERC1155Mintable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"epochId","type":"bytes32"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"address","name":"recipient","type":"address"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"claimStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"claimWindows","outputs":[{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forwarderRegistry","outputs":[{"internalType":"contract IForwarderRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"noOfTokensClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"epochId","type":"bytes32"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"setEpochMerkleRoot","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"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100df5760003560e01c80638da5cb5b1161008c578063dc45def611610066578063dc45def614610249578063e3a0ce0914610292578063eb02625c146102b5578063f2fde38b146102c857600080fd5b80638da5cb5b146102115780639dfbcde814610219578063ba65912e1461024057600080fd5b80633a5af339116100bd5780633a5af33914610168578063572b6c051461018f57806389a89002146101dc57600080fd5b806301ffc9a7146100e45780630328a8fc1461010c5780632b4c9f1614610121575b600080fd5b6100f76100f2366004610d0e565b6102db565b60405190151581526020015b60405180910390f35b61011f61011a366004610d50565b6102f5565b005b7f0000000000000000000000003f547f87251710f70109ae0409d461b2707096935b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610103565b6101437f00000000000000000000000010db7f0863d0293d783bda8e1cf73ed79879500b81565b6100f761019d366004610dab565b7f0000000000000000000000003f547f87251710f70109ae0409d461b27070969373ffffffffffffffffffffffffffffffffffffffff90811691161490565b6102037f000000000000000000000000000000000000000000000000000000000000000181565b604051908152602001610103565b610143610432565b6102037f000000000000000000000000000000000000000000000000000000000000136381565b61020360005481565b610277610257366004610dc6565b600160208190526000918252604090912080549181015460029091015483565b60408051938452602084019290925290820152606001610103565b6100f76102a0366004610dc6565b60026020526000908152604090205460ff1681565b61011f6102c3366004610ddf565b61045e565b61011f6102d6366004610dab565b61085a565b60006102ef826102e9610878565b906108a6565b92915050565b61030e610300610980565b61030861098a565b906109b8565b808210158061031d5750428111155b15610369576040517f790c7cef00000000000000000000000000000000000000000000000000000000815260048101839052602481018290524260448201526064015b60405180910390fd5b600084815260016020526040902054156103b2576040517fed10979d00000000000000000000000000000000000000000000000000000000815260048101859052602401610360565b604080516060810182528481526020808201858152828401858152600089815260018085529086902094518555915191840191909155516002909201919091558151848152908101839052849186917f91a4b7a2b4c6a1702be62e3b867cf7e4dbbd496a4707e8d66638d99b3946a8da910160405180910390a350505050565b600061045961043f61098a565b5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b60008481526001602052604090208054806104a8576040517f84f229dc00000000000000000000000000000000000000000000000000000000815260048101879052602401610360565b81600101544210806104bd5750816002015442115b156104fd576040517fdbeb4f4d00000000000000000000000000000000000000000000000000000000815260048101879052426024820152604401610360565b6000868460405160200161054092919091825260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602082015260340190565b60405160208183030381529060405280519060200120905061059a8282888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929493925050610a279050565b6105ef576040517fa04a37c00000000000000000000000000000000000000000000000000000000081526004810188905273ffffffffffffffffffffffffffffffffffffffff85166024820152604401610360565b60008181526002602052604090205460ff1615610657576040517fa8ca238e0000000000000000000000000000000000000000000000000000000081526004810188905273ffffffffffffffffffffffffffffffffffffffff85166024820152604401610360565b60008054610666906001610e9e565b90507f00000000000000000000000000000000000000000000000000000000000013638111156106c2576040517f192d175500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181558281526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915590517f5cfa929700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301527f0000000000000000000000000000000000000000000000000000000000000001602483015260448201929092526080606482015260848101929092527f00000000000000000000000010db7f0863d0293d783bda8e1cf73ed79879500b1690635cfa92979060a401600060405180830381600087803b1580156107c557600080fd5b505af11580156107d9573d6000803e3d6000fd5b5050604080517f000000000000000000000000000000000000000000000000000000000000000181526001602082015273ffffffffffffffffffffffffffffffffffffffff891693508b92507fa68c079189004e3175c636199e3e4d2aae420ce461ed29f670552b3eba9d2a03910160405180910390a35050505050505050565b610875610865610980565b8261086e61098a565b9190610a3d565b50565b6000806102ef60017fca9d3e17f264b0f3984e2634e94adb37fa3e6a8103f06aeae6fa59e21c769f5e610eb1565b60007c01000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316016108f6575060006102ef565b7ffe003659000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831601610947575060016102ef565b507fffffffff00000000000000000000000000000000000000000000000000000000166000908152602091909152604090205460ff1690565b6000610459610b52565b6000806102ef60017fc9ed16f33ab3a66c84bfd83099ccb2a8845871e2e1c1928f63797152f0fd54cd610eb1565b815473ffffffffffffffffffffffffffffffffffffffff828116911614610a23576040517f2ef4875e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610360565b5050565b600082610a348584610c99565b14949350505050565b825473ffffffffffffffffffffffffffffffffffffffff9081169083168114610aaa576040517f2ef4875e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610360565b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b4c5783547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8381169182178655604051908316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35b50505050565b600033321480610b625750601836105b15610b6c57503390565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec36013560601c7f0000000000000000000000003f547f87251710f70109ae0409d461b27070969373ffffffffffffffffffffffffffffffffffffffff16331480610c8857506040517f8929a8ca00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301523360248301527f0000000000000000000000003f547f87251710f70109ae0409d461b2707096931690638929a8ca90604401602060405180830381865afa158015610c64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c889190610ec4565b15610c9257919050565b3391505090565b600081815b8451811015610cd457610cca82868381518110610cbd57610cbd610ee6565b6020026020010151610cdc565b9150600101610c9e565b509392505050565b6000818310610cf8576000828152602084905260409020610d07565b60008381526020839052604090205b9392505050565b600060208284031215610d2057600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610d0757600080fd5b60008060008060808587031215610d6657600080fd5b5050823594602084013594506040840135936060013592509050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610da657600080fd5b919050565b600060208284031215610dbd57600080fd5b610d0782610d82565b600060208284031215610dd857600080fd5b5035919050565b60008060008060608587031215610df557600080fd5b84359350602085013567ffffffffffffffff80821115610e1457600080fd5b818701915087601f830112610e2857600080fd5b813581811115610e3757600080fd5b8860208260051b8501011115610e4c57600080fd5b602083019550809450505050610e6460408601610d82565b905092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156102ef576102ef610e6f565b818103818111156102ef576102ef610e6f565b600060208284031215610ed657600080fd5b81518015158114610d0757600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea2646970667358221220eb5612f3617bb28d7e354311efdc74ddf5592ddf0aac5a944c57211ba99feb4c64736f6c63430008160033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.