DropAllowanceERC20
Airdrop ERC1155 NFTsThe Token Allowance Drop is an extended version of the Token Drop contract that allows users to set the token they want to sell. to a list of recipients.
The DropAllowanceERC20 contract is an extended version of the standard DropERC20
contract, allowing users to set the ERC-20 token they want to sell. This contract works with any ERC-20 token that uses 18 decimals and enables a presale or public sale flow where the token owner gives the contract an allowance, and buyers can claim tokens under predefined conditions.
Key Features
Custom Token Support – Unlike fixed-token drops, this version allows you to specify which ERC-20 token you want to sell at deployment.
Allowance-Based Sale – The contract does not hold your tokens directly. Instead, the token owner must grant allowance to the contract so it can transfer tokens to buyers upon claim.
Standard ERC-20 Compliance – Works with any ERC-20 token that has 18 decimals.
Thirdweb Integration – Fully compatible with Thirdweb SDK, allowing you to set claim conditions, price, and distribution parameters from the dashboard or via code.
Ownership Flexibility – You can define a
Token Owner
different from the deployer, enabling multi-party setups.
Use Cases
Token presales where you don’t want to transfer custody of tokens before the sale.
Community reward campaigns using existing ERC-20 tokens.
Controlled distributions where the seller can revoke allowance at any time.
Private or public drops using custom claim conditions.
Deploying this contract

How It Works
Deployment When deploying the contract, you will provide:
Token Address – The ERC-20 token contract address to be sold.
Token Owner – The wallet address that currently holds the tokens.
Sale Recipient – The wallet address that will receive the payment from token sales.
Granting Allowance Before any claims can occur, the
Token Owner
must call theapprove()
function on the token contract, granting allowance to theDropAllowanceERC20
contract for the amount they want to sell.Setting Claim Conditions Through the dashboard or SDK, you can set:
Price per token
Sale start. End date will finish when supply is totally claimed or another phase is created.
Wallet purchase limits
Any other claim restrictions
Token Claiming When a user claims tokens, the contract transfers the tokens directly from the
Token Owner
’s wallet to the buyer, deducting from the granted allowance.
Deployment Parameters
Name
The display name for your drop (used for dashboard display).
Symbol
Token symbol for reference purposes.
Description
Rich-text or markdown description of your token drop.
Image
Optional logo/image to represent your token sale.
Token Address
ERC-20 token contract address you want to sell. Must have 18 decimals.
Token Owner
Address from which the tokens will be transferred during claims. Must approve this contract to spend the tokens.
Sale Recipient
Address that will receive payment from token sales.
Example Flow

Deploy
DropAllowanceERC20
with your token address, token owner address, and sale recipient address.Token Owner runs
approve(contractAddress, amount)
on the ERC-20 token contract.Set your claim conditions via the dashboard or programmatically.
Buyers claim tokens according to your rules.
The contract automatically transfers tokens from the token owner to buyers until allowance runs out or conditions expire.
Claim Conditions

The Token Allowance Drop supports the same claim condition settings as the regular Token Drop:
Start time
Maximum quantity per transaction
Claim phases
Whitelist settings
Payment token configuration (native token or ERC20)
You can set and manage claim conditions via the dashboard after deployment.
Notes & Best Practices
Ensure your ERC-20 token uses 18 decimals—other configurations are not supported.
The
Token Owner
must maintain enough token balance and allowance for claims to succeed.Allowance can be increased or decreased at any time to control sale supply.
Use a secure wallet for the
Token Owner
address—anyone with its private key can change allowances or transfer tokens directly.
Last updated