Request form
Referral Code NFTs
  • nft
  • claim
  • merkleTrees
Docs
Source
ChefGPT

Referral Code NFTs

Creators can set their NFTs for claim, but only for selected group of people with whom they have shared the referral code as QR or simply the code. Vulnerable to mempool scanning attacks. Do not attempt on high valued NFTs.

ClaimReferral :
owner() :
Returns the address of the current owner.
paused() :
Returns true if the contract is paused, and false otherwise.
renounceOwnership() :
Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
transferOwnership(address) :
Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.
ICollectible :
Ownable :
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.
constructor :
Initializes the contract setting the deployer as the initial owner.
owner() :
Returns the address of the current owner.
renounceOwnership() :
Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
transferOwnership(address) :
Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.
Strings :
String operations.
ERC2771Context :
Context variant with ERC2771 support.
MerkleProof :
These functions deal with verification of Merkle Tree proofs. The proofs can be generated using the JavaScript library https://github.com/miguelmota/merkletreejs[merkletreejs]. Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. See `test/utils/cryptography/MerkleProof.test.js` for some examples. 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.
Pausable :
Contract module which allows children to implement an emergency stop mechanism that can be triggered by an authorized account. This module is used through inheritance. It will make available the modifiers `whenNotPaused` and `whenPaused`, which can be applied to the functions of your contract. Note that they will not be pausable by simply including this module, only once the modifiers are put in place.
Paused(address) :
Emitted when the pause is triggered by `account`.
Unpaused(address) :
Emitted when the pause is lifted by `account`.
constructor :
Initializes the contract in unpaused state.
paused() :
Returns true if the contract is paused, and false otherwise.
Context :
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.
ClaimReferral.sol
Ownable.sol
Strings.sol
ERC2771Context.sol
MerkleProof.sol
Pausable.sol
Context.sol

8 downloads

Solidity Version

v0.8.17

Creator

0xadeeb
0xadeeb / Referral Code NFTs
  • nft
  • claim
  • merkleTrees
Docs
Source
ChefGPT
Expand
Share

Get Cookin'
star icon8

8 downloads

Solidity Version

v0.8.17

Creator

0xadeeb

Referral Code NFTs

Creators can set their NFTs for claim, but only for selected group of people with whom they have shared the referral code as QR or simply the code. Vulnerable to mempool scanning attacks. Do not attempt on high valued NFTs.

ClaimReferral :
owner() :
Returns the address of the current owner.
paused() :
Returns true if the contract is paused, and false otherwise.
renounceOwnership() :
Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
transferOwnership(address) :
Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.
ICollectible :
Ownable :
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.
constructor :
Initializes the contract setting the deployer as the initial owner.
owner() :
Returns the address of the current owner.
renounceOwnership() :
Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
transferOwnership(address) :
Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.
Strings :
String operations.
ERC2771Context :
Context variant with ERC2771 support.
MerkleProof :
These functions deal with verification of Merkle Tree proofs. The proofs can be generated using the JavaScript library https://github.com/miguelmota/merkletreejs[merkletreejs]. Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. See `test/utils/cryptography/MerkleProof.test.js` for some examples. 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.
Pausable :
Contract module which allows children to implement an emergency stop mechanism that can be triggered by an authorized account. This module is used through inheritance. It will make available the modifiers `whenNotPaused` and `whenPaused`, which can be applied to the functions of your contract. Note that they will not be pausable by simply including this module, only once the modifiers are put in place.
Paused(address) :
Emitted when the pause is triggered by `account`.
Unpaused(address) :
Emitted when the pause is lifted by `account`.
constructor :
Initializes the contract in unpaused state.
paused() :
Returns true if the contract is paused, and false otherwise.
Context :
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.
ClaimReferral.sol
Ownable.sol
Strings.sol
ERC2771Context.sol
MerkleProof.sol
Pausable.sol
Context.sol