IDropERC20_V2
Thirdweb's 'Drop' contracts are distribution mechanisms for tokens. The DropERC20
contract is a distribution mechanism for ERC20 tokens. A contract admin (i.e. holder of DEFAULT_ADMIN_ROLE
) can create claim conditions with non-overlapping time windows, and accounts can claim the tokens according to restrictions defined in the claim condition that is active at the time of the transaction.
Methods
allowance
Returns the remaining number of tokens that spender
will be allowed to spend on behalf of owner
through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.
Parameters
owner
address
undefined
spender
address
undefined
Returns
_0
uint256
undefined
approve
Sets amount
as the allowance of spender
over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.
Parameters
spender
address
undefined
amount
uint256
undefined
Returns
_0
bool
undefined
balanceOf
Returns the amount of tokens owned by account
.
Parameters
account
address
undefined
Returns
_0
uint256
undefined
claim
Lets an account claim a given quantity of tokens.
Parameters
receiver
address
The receiver of the tokens to claim.
quantity
uint256
The quantity of tokens to claim.
currency
address
The currency in which to pay for the claim.
pricePerToken
uint256
The price per token (i.e. price per 1 ether unit of the token) to pay for the claim.
proofs
bytes32[]
The proof of the claimer's inclusion in the merkle root allowlist of the claim conditions that apply.
proofMaxQuantityPerTransaction
uint256
(Optional) The maximum number of tokens an address included in an allowlist can claim.
setClaimConditions
Parameters
phases
IDropClaimCondition_V2.ClaimCondition[]
undefined
resetClaimEligibility
bool
undefined
totalSupply
Returns the amount of tokens in existence.
Returns
_0
uint256
undefined
transfer
Moves amount
tokens from the caller's account to to
. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
Parameters
to
address
undefined
amount
uint256
undefined
Returns
_0
bool
undefined
transferFrom
Moves amount
tokens from from
to to
using the allowance mechanism. amount
is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.
Parameters
from
address
undefined
to
address
undefined
amount
uint256
undefined
Returns
_0
bool
undefined
Events
Approval
Parameters
owner indexed
address
undefined
spender indexed
address
undefined
value
uint256
undefined
ClaimConditionsUpdated
Emitted when new claim conditions are set.
Parameters
claimConditions
IDropClaimCondition_V2.ClaimCondition[]
undefined
ContractURIUpdated
Emitted when the contract URI is updated.
Parameters
prevURI
string
undefined
newURI
string
undefined
MaxTotalSupplyUpdated
Emitted when the global max supply of tokens is updated.
Parameters
maxTotalSupply
uint256
undefined
MaxWalletClaimCountUpdated
Emitted when the global max wallet claim count is updated.
Parameters
count
uint256
undefined
TokensClaimed
Emitted when tokens are claimed.
Parameters
claimConditionIndex indexed
uint256
undefined
claimer indexed
address
undefined
receiver indexed
address
undefined
quantityClaimed
uint256
undefined
Transfer
Parameters
from indexed
address
undefined
to indexed
address
undefined
value
uint256
undefined
WalletClaimCountUpdated
Emitted when the wallet claim count for an address is updated.
Parameters
wallet indexed
address
undefined
count
uint256
undefined
Last updated