Request form
Cookbook may introduce a token in the future. Share and contribute to be eligible for future airdrops.
close icon
relevant tag icon
Crowd fund ERC20 token
copy icon
solidity-by-example
• version 1.0.0
ERC20
Crowdfund
Finance
Deployable

Crowd fund ERC20 token

1) User creates a campaign. 2) Users can pledge, transferring their token to a campaign. 3) After the campaign ends, campaign creator can claim the funds if total amount pledged is more than the campaign goal. 4) Otherwise, campaign did not reach its goal, users can withdraw their pledge.

*Visit desktop site to download or deploy

Version

1.0.0

Recent Use

🍞 0xc6eC downloaded
🥐 0x572F downloaded

Last Publish

12/12/2022
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code
campaigns(uint256) :
A list of the current campaigns.
cancel(uint256) :
Cancels a campaign.
claim(uint256) :
Claims the crowd funded amount for a campaign. Only callable if the campaign is successful.
count() :
The number of campaigns created.
launch(uint256,uint32,uint32) :
Launches a new campaign, using - a target goal amount - a start time - an end time
pledge(uint256,uint256) :
Pledges a specific number of tokens to a specific campaign.
pledgedAmount(uint256,address) :
The amount an address has pledged to a specific campaign.
refund(uint256) :
Refunds the pledged amounts to a failed campaign.
token() :
The address of the token that is being pledged.
unpledge(uint256,uint256) :
Unpledges an amount from a campaign.

Get Cookin'
share iconShare

copy iconNo-Code Deploy
copy iconDownload Source
copy iconnpx cookbookdev i crowd-fund-erc20-token
copy icon

Bytecode

Download

Verification

Download

Recent Use

🍞 0xc6eC downloaded
🥐 0x572F downloaded

Last Publish

12/12/2022

Solidity Compiler

v0.8.17+commit.8df45f5f

Version

1.0.0

Cookbook is free.
Any contract you deploy is yours.
Your contract is owned and controlled by you.