Overview
TokenID
310
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
Minimal Proxy Contract for 0xd9de97a77d42a9c7e44f0c4e4ef6c908b0a45b64
Contract Name:
ConfigurableGuildRewardNFT
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526//SPDX-License-Identifier: MITpragma solidity 0.8.19;import { IConfigurableGuildRewardNFT } from "./interfaces/IConfigurableGuildRewardNFT.sol";import { IGuildRewardNFTFactory } from "./interfaces/IGuildRewardNFTFactory.sol";import { ITreasuryManager } from "./interfaces/ITreasuryManager.sol";import { LibTransfer } from "./lib/LibTransfer.sol";import { OptionallySoulboundERC721 } from "./token/OptionallySoulboundERC721.sol";import { TreasuryManager } from "./utils/TreasuryManager.sol";import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";import { ECDSAUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol";import { MulticallUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/MulticallUpgradeable.sol";/// @title An NFT distributed as a reward for Guild.xyz users.contract ConfigurableGuildRewardNFT isIConfigurableGuildRewardNFT,Initializable,OwnableUpgradeable,OptionallySoulboundERC721,TreasuryManager,MulticallUpgradeable{using ECDSAUpgradeable for bytes32;using LibTransfer for address payable;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)pragma solidity ^0.8.0;import "../utils/ContextUpgradeable.sol";import {Initializable} from "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {address private _owner;event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);/**
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)pragma solidity ^0.8.2;import "../../utils/AddressUpgradeable.sol";/*** @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.** The initialization functions use a version number. Once a version number is used, it is consumed and cannot be* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in* case an upgrade adds a module that needs to be initialized.** For example:** [.hljs-theme-light.nopadding]* ```solidity* contract MyToken is ERC20Upgradeable {* function initialize() initializer public {* __ERC20_init("MyToken", "MTK");* }* }
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)pragma solidity ^0.8.0;import "./IERC721Upgradeable.sol";import "./IERC721ReceiverUpgradeable.sol";import "./extensions/IERC721MetadataUpgradeable.sol";import "../../utils/AddressUpgradeable.sol";import "../../utils/ContextUpgradeable.sol";import "../../utils/StringsUpgradeable.sol";import "../../utils/introspection/ERC165Upgradeable.sol";import {Initializable} from "../../proxy/utils/Initializable.sol";/*** @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including* the Metadata extension, but not including the Enumerable extension, which is available separately as* {ERC721Enumerable}.*/contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {using AddressUpgradeable for address;using StringsUpgradeable for uint256;// Token namestring private _name;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol)pragma solidity ^0.8.0;import "../ERC721Upgradeable.sol";import "./IERC721EnumerableUpgradeable.sol";import {Initializable} from "../../../proxy/utils/Initializable.sol";/*** @dev This implements an optional extension of {ERC721} defined in the EIP that adds* enumerability of all the token ids in the contract as well as all token ids owned by each* account.*/abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable {// Mapping from owner to list of owned token IDsmapping(address => mapping(uint256 => uint256)) private _ownedTokens;// Mapping from token ID to index of the owner tokens listmapping(uint256 => uint256) private _ownedTokensIndex;// Array with all token ids, used for enumerationuint256[] private _allTokens;// Mapping from token id to position in the allTokens arraymapping(uint256 => uint256) private _allTokensIndex;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)pragma solidity ^0.8.0;import "../IERC721Upgradeable.sol";/*** @title ERC-721 Non-Fungible Token Standard, optional enumeration extension* @dev See https://eips.ethereum.org/EIPS/eip-721*/interface IERC721EnumerableUpgradeable is IERC721Upgradeable {/*** @dev Returns the total amount of tokens stored by the contract.*/function totalSupply() external view returns (uint256);/*** @dev Returns a token ID owned by `owner` at a given `index` of its token list.* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.*/function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);/*** @dev Returns a token ID at a given `index` of all the tokens stored by the contract.* Use along with {totalSupply} to enumerate all tokens.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)pragma solidity ^0.8.0;import "../IERC721Upgradeable.sol";/*** @title ERC-721 Non-Fungible Token Standard, optional metadata extension* @dev See https://eips.ethereum.org/EIPS/eip-721*/interface IERC721MetadataUpgradeable is IERC721Upgradeable {/*** @dev Returns the token collection name.*/function name() external view returns (string memory);/*** @dev Returns the token collection symbol.*/function symbol() external view returns (string memory);/*** @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.*/function tokenURI(uint256 tokenId) external view returns (string memory);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)pragma solidity ^0.8.0;/*** @title ERC721 token receiver interface* @dev Interface for any contract that wants to support safeTransfers* from ERC721 asset contracts.*/interface IERC721ReceiverUpgradeable {/*** @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}* by `operator` from `from`, this function is called.** It must return its Solidity selector to confirm the token transfer.* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.** The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.*/function onERC721Received(address operator,address from,uint256 tokenId,bytes calldata data) external returns (bytes4);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)pragma solidity ^0.8.0;import "../../utils/introspection/IERC165Upgradeable.sol";/*** @dev Required interface of an ERC721 compliant contract.*/interface IERC721Upgradeable is IERC165Upgradeable {/*** @dev Emitted when `tokenId` token is transferred from `from` to `to`.*/event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);/*** @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.*/event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);/*** @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.*/event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)pragma solidity ^0.8.1;/*** @dev Collection of functions related to the address type*/library AddressUpgradeable {/*** @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** Furthermore, `isContract` will also return true if the target contract within
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)pragma solidity ^0.8.0;import {Initializable} from "../proxy/utils/Initializable.sol";/*** @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 ContextUpgradeable is Initializable {function __Context_init() internal onlyInitializing {}function __Context_init_unchained() internal onlyInitializing {}function _msgSender() internal view virtual returns (address) {return msg.sender;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)pragma solidity ^0.8.0;import "../StringsUpgradeable.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 ECDSAUpgradeable {enum RecoverError {NoError,InvalidSignature,InvalidSignatureLength,InvalidSignatureS,InvalidSignatureV // Deprecated in v4.8}function _throwError(RecoverError error) private pure {if (error == RecoverError.NoError) {return; // no error: do nothing} else if (error == RecoverError.InvalidSignature) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)pragma solidity ^0.8.0;import "./IERC165Upgradeable.sol";import {Initializable} from "../../proxy/utils/Initializable.sol";/*** @dev Implementation of the {IERC165} interface.** Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check* for the additional interface id that will be supported. For example:** ```solidity* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);* }* ```** Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.*/abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {function __ERC165_init() internal onlyInitializing {}
12345678910111213141516171819202122232425// 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 IERC165Upgradeable {/*** @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);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)pragma solidity ^0.8.0;/*** @dev Standard math utilities missing in the Solidity language.*/library MathUpgradeable {enum Rounding {Down, // Toward negative infinityUp, // Toward infinityZero // Toward zero}/*** @dev Returns the largest of two numbers.*/function max(uint256 a, uint256 b) internal pure returns (uint256) {return a > b ? a : b;}/*** @dev Returns the smallest of two numbers.*/function min(uint256 a, uint256 b) internal pure returns (uint256) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)pragma solidity ^0.8.0;/*** @dev Standard signed math utilities missing in the Solidity language.*/library SignedMathUpgradeable {/*** @dev Returns the largest of two signed numbers.*/function max(int256 a, int256 b) internal pure returns (int256) {return a > b ? a : b;}/*** @dev Returns the smallest of two signed numbers.*/function min(int256 a, int256 b) internal pure returns (int256) {return a < b ? a : b;}/*** @dev Returns the average of two signed numbers without overflow.* The result is rounded towards zero.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.5) (utils/Multicall.sol)pragma solidity ^0.8.0;import "./AddressUpgradeable.sol";import "./ContextUpgradeable.sol";import {Initializable} from "../proxy/utils/Initializable.sol";/*** @dev Provides a function to batch together multiple calls in a single external call.** Consider any assumption about calldata validation performed by the sender may be violated if it's not especially* careful about sending transactions invoking {multicall}. For example, a relay address that filters function* selectors won't filter calls nested within a {multicall} operation.** NOTE: Since 5.0.1 and 4.9.4, this contract identifies non-canonical contexts (i.e. `msg.sender` is not {_msgSender}).* If a non-canonical context is identified, the following self `delegatecall` appends the last bytes of `msg.data`* to the subcall. This makes it safe to use with {ERC2771Context}. Contexts that don't affect the resolution of* {_msgSender} are not propagated to subcalls.** _Available since v4.1._*/abstract contract MulticallUpgradeable is Initializable, ContextUpgradeable {function __Multicall_init() internal onlyInitializing {}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)pragma solidity ^0.8.0;import "./math/MathUpgradeable.sol";import "./math/SignedMathUpgradeable.sol";/*** @dev String operations.*/library StringsUpgradeable {bytes16 private constant _SYMBOLS = "0123456789abcdef";uint8 private constant _ADDRESS_LENGTH = 20;/*** @dev Converts a `uint256` to its ASCII `string` decimal representation.*/function toString(uint256 value) internal pure returns (string memory) {unchecked {uint256 length = MathUpgradeable.log10(value) + 1;string memory buffer = new string(length);uint256 ptr;/// @solidity memory-safe-assemblyassembly {ptr := add(buffer, add(32, length))
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.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.*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.0;import { IGuildRewardNFTFactory } from "./IGuildRewardNFTFactory.sol";import { IMaxSupply } from "./IMaxSupply.sol";/// @title An NFT distributed as a reward for Guild.xyz users.interface IConfigurableGuildRewardNFT is IMaxSupply {/// @notice The address of the proxy to be used when interacting with the factory./// @dev Used to access the factory's address when interacting through minimal proxies./// @return factoryAddress The address of the factory.function factoryProxy() external view returns (address factoryAddress);/// @notice The maximum amount of tokens a Guild user can claim from the token./// @dev Doesn't matter if they are claimed in the same transaction or separately./// @return mintableAmountPerUser The amount of tokens. Unlimited if zero.function mintableAmountPerUser() external view returns (uint256 mintableAmountPerUser);/// @notice The time interval while a signature is valid./// @return validity The time interval in seconds.// solhint-disable func-name-mixedcasefunction SIGNATURE_VALIDITY() external pure returns (uint256 validity);/// @notice Returns the number of tokens the user claimed./// @dev Analogous to balanceOf(address), but works with Guild user ids./// @param userId The id of the user on Guild.
1234567891011121314151617181920// SPDX-License-Identifier: CC0-1.0pragma solidity ^0.8.0;interface IERC5192 {/// @notice Emitted when the locking status is changed to locked./// @dev If a token is minted and the status is locked, this event should be emitted./// @param tokenId The identifier for a token.event Locked(uint256 tokenId);/// @notice Emitted when the locking status is changed to unlocked./// @dev If a token is minted and the status is unlocked, this event should be emitted./// @param tokenId The identifier for a token.event Unlocked(uint256 tokenId);/// @notice Returns the locking status of an Soulbound Token/// @dev SBTs assigned to zero address are considered invalid, and queries/// about them do throw./// @param tokenId The identifier for an SBT.function locked(uint256 tokenId) external view returns (bool);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.0;/// @title A simple factory deploying minimal proxy contracts for Guild reward NFTs.interface IGuildRewardNFTFactory {/// @notice The type of the contract./// @dev Used as an identifier. Should be expanded in future updates.enum ContractType {BASIC_NFT,CONFIGURABLE_NFT}/// @notice Input parameters of the deployConfigurableNFT function./// @dev Needed to prevent "stack too deep" errors./// @param name The name of the NFT to be created./// @param symbol The symbol of the NFT to be created./// @param cid The cid used to construct the tokenURI of the NFT to be created./// @param tokenOwner The address that will be the owner of the deployed token./// @param tokenTreasury The address that will collect the prices of the minted tokens./// @param tokenFee The price of every mint in wei./// @param soulbound Whether the token should be soulbound./// @param maxSupply The maximum number of tokens that users will ever be able to mint./// @param mintableAmountPerUser The maximum amount a user will be able to mint from the deployed token.struct ConfigurableNFTConfig {string name;string symbol;
123456789101112131415161718192021// SPDX-License-Identifier: MITpragma solidity ^0.8.0;interface IMaxSupply {/// @notice The maximum number of tokens that can ever be minted./// @return count The number of tokens. Unlimited if zero.function maxSupply() external view returns (uint256 count);/// @notice Sets the maximum number of tokens that can ever be minted./// @dev Only callable by the owner./// @param newMaxSupply The number of tokens. Unlimited if zero.function setMaxSupply(uint256 newMaxSupply) external;/// @notice Event emitted when the maxSupply is changed./// @param newMaxSupply The number of tokens.event MaxSupplyChanged(uint256 newMaxSupply);/// @notice Error thrown when the tokenId is higher than the maximum supply./// @param maxSupply The maximum supply of the token.error MaxSupplyReached(uint256 maxSupply);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.0;/// @title A contract that manages fee-related functionality.interface ITreasuryManager {/// @notice Sets the minting fee./// @dev Callable only by the owner./// @param newFee The new fee in base units.function setFee(uint256 newFee) external;/// @notice Sets the address that receives the fees./// @dev Callable only by the owner./// @param newTreasury The new address of the treasury.function setTreasury(address payable newTreasury) external;/// @notice The base minting fee of a token./// @return fee The amount of the fee in base units.function fee() external view returns (uint256 fee);/// @notice Sets the fee override for a specific token./// @dev Callable only by the owner./// @param tokenAddress The address of the token./// @param newFee The new fee amount in base units.function setFeeOverride(address tokenAddress, uint256 newFee) external;/// @notice The minting fee of a token for a specific caller.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.0;import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";/// @title Library for functions related to transfers.library LibTransfer {/// @notice Error thrown when sending ether fails./// @param recipient The address that could not receive the ether.error FailedToSendEther(address recipient);/// @notice Error thrown when an ERC20 transfer failed./// @param from The sender of the token./// @param to The recipient of the token.error TransferFailed(address from, address to);/// @notice Sends ether to an address, forwarding all available gas and reverting on errors./// @param recipient The recipient of the ether./// @param amount The amount of ether to send in base units.function sendEther(address payable recipient, uint256 amount) internal {// solhint-disable-next-line avoid-low-level-calls(bool success, ) = recipient.call{ value: amount }("");if (!success) revert FailedToSendEther(recipient);}/// @notice Sends an ERC20 token to an address and reverts if the transfer returns false.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.8.19;/* solhint-disable max-line-length */import { IERC5192 } from "../interfaces/IERC5192.sol";import { ERC721Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";import { IERC721Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol";import { ERC721EnumerableUpgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";import { IERC721EnumerableUpgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol";/* solhint-enable max-line-length *//// @title An enumerable ERC721 that's optionally soulbound./// @notice Allowance and transfer-related functions are disabled in soulbound mode./// @dev Inheriting from upgradeable contracts here - even though we're using it in a non-upgradeable way,/// we still want it to be initializablecontract OptionallySoulboundERC721 is ERC721Upgradeable, ERC721EnumerableUpgradeable, IERC5192 {/// @notice Whether the token is set as soulbound.bool internal soulbound;/// @notice Error thrown when trying to query info about a token that's not (yet) minted./// @param tokenId The queried id.error NonExistentToken(uint256 tokenId);/// @notice Error thrown when a function's execution is not possible, because the soulbound mode is on.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.8.19;import { ITreasuryManager } from "../interfaces/ITreasuryManager.sol";import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";/// @title A contract that manages fee-related functionality.contract TreasuryManager is ITreasuryManager, Initializable, OwnableUpgradeable {address payable public treasury;uint256 public fee;/// @notice Fee overrides to be able to discount fees for specific guilds.mapping(address token => uint256 fee) internal _feeOverrides;/// @notice Empty space reserved for future updates.uint256[47] private __gap;/// @param treasury_ The address that will receive the fees./// @param fee_ The fee amount in wei.// solhint-disable-next-line func-name-mixedcasefunction __TreasuryManager_init(address payable treasury_, uint256 fee_) internal onlyInitializing {treasury = treasury_;fee = fee_;}
12345678910111213141516171819{"optimizer": {"enabled": true,"runs": 200},"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","devdoc","userdoc","metadata","abi"]}},"libraries": {}}
Contract ABI
API[{"inputs":[],"name":"AlreadyClaimed","type":"error"},{"inputs":[],"name":"ExpiredSignature","type":"error"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"FailedToSendEther","type":"error"},{"inputs":[{"internalType":"uint256","name":"paid","type":"uint256"},{"internalType":"uint256","name":"requiredAmount","type":"uint256"}],"name":"IncorrectFee","type":"error"},{"inputs":[],"name":"IncorrectSender","type":"error"},{"inputs":[],"name":"IncorrectSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"maxSupply","type":"uint256"}],"name":"MaxSupplyReached","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NonExistentToken","type":"error"},{"inputs":[],"name":"Soulbound","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"FeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"FeeOverrideChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Locked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newMaxSupply","type":"uint256"}],"name":"MaxSupplyChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"MintableAmountPerUserChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newTreasury","type":"address"}],"name":"TreasuryChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Unlocked","type":"event"},{"inputs":[],"name":"SIGNATURE_VALIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"userId","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"userId","type":"uint256"},{"internalType":"uint256","name":"signedAt","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"userId","type":"uint256"},{"internalType":"uint256","name":"signedAt","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"factoryProxy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeeData","outputs":[{"internalType":"uint256","name":"tokenFee","type":"uint256"},{"internalType":"address payable","name":"treasuryAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"getFeeWithOverrides","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"cid","type":"string"},{"internalType":"address","name":"tokenOwner","type":"address"},{"internalType":"address payable","name":"treasury","type":"address"},{"internalType":"uint256","name":"tokenFee","type":"uint256"},{"internalType":"bool","name":"soulbound","type":"bool"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"mintableAmountPerUser","type":"uint256"}],"internalType":"struct IGuildRewardNFTFactory.ConfigurableNFTConfig","name":"nftConfig","type":"tuple"},{"internalType":"address","name":"factoryProxyAddress","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"locked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"locked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintableAmountPerUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"setFeeOverride","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"newLocked","type":"bool"}],"name":"setLocked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"setMintableAmountPerUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newTreasury","type":"address"}],"name":"setTreasury","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":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"newCid","type":"string"}],"name":"updateTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"}]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.