Description: Twik is a simple Web3 crowdfunding platform on Sui. Creators launch campaigns, donors contribute funds, and creators withdraw once the funding goal is reached. All transactions are on-chain, safe, and trackable.
- Create Campaigns – Launch a crowdfunding campaign with a funding goal.
- Donate – Contributors send SUI to campaigns.
- Withdraw – Creators withdraw funds once the goal is reached.
- Check Status – Anyone can query whether a campaign is Active, Funded, or Closed.
Holds the campaign details and collected funds.
Fields:
id: u64– Unique campaign identifiername: vector<u8>– Campaign titledescription: vector<u8>– Campaign descriptioncreator: address– Creator’s addresstarget_amount: u64– Funding goalcollected_amount: u64– Total donatedcontributors: vector<address>– List of donor addresses
Capability object allowing only the creator to withdraw funds.
Fields:
campaign_id: u64– Links to the Campaign objectowner: address– Owner of the capability
-
create_campaign(creator, name, description, target_amount, id)
- Creates a new campaign and a
WithdrawCapfor the creator
- Creates a new campaign and a
-
donate(donor, campaign, amount)
- Add a donor and increment collected amount
- Auto-update status to Funded if goal reached
-
withdraw(creator, campaign, cap)
- Transfer funds to creator if goal is reached
- Close campaign and destroy
WithdrawCap
- Deploy
CampaignandWithdrawCapviacreate_campaign. - Donate to the campaign with
contribute. - Creator withdraws with
withdrawonce funded.
Campaign:
- Name:
Save Developers from vibecoders - Description:
Contribte to arrest people who sit and tell an ai agent to build a full app/website from scratch, without making any misakes. - Target:
11000 SUI
Flow:
- Idorocodes creates Save developers from vibecoders campaign
- Rex donates 200 SUI
- Amos donates 300 SUI
- Idorocodes withdraws once 11000 SUI is reached