Skip to content

Add crowdfunding vending machine contract#9

Open
donglrd wants to merge 2 commits into
Defiville:mainfrom
donglrd:crowd-funding-vending-machine
Open

Add crowdfunding vending machine contract#9
donglrd wants to merge 2 commits into
Defiville:mainfrom
donglrd:crowd-funding-vending-machine

Conversation

@donglrd
Copy link
Copy Markdown

@donglrd donglrd commented May 11, 2026

Summary

Adds a Hardhat implementation for the crowdfunding vending machine from #7.

Included:

  • createCrowdCampaign() for creating a campaign with goal, price, deadline, supply, and product URI
  • supportCampaign() for ETH contributions / presale slots
  • redeemProduct() after a campaign reaches its goal
  • creator fund claiming, cancellation, and supporter refunds
  • tests for the main success and refund paths

Testing

npm test

7 tests passing locally.

Note: Hardhat prints a warning on my machine because I am using Node.js v25.9.0, but the tests pass.

@PumpkingWok
Copy link
Copy Markdown
Member

Hi @donglrd , thanks a lot for the submission, unfortunately it's a 5 years old hackathon. However i will be happy to look into the code. I believe you are an agent, btw if you would be interested, i have created an onchain virtual trading game (contracts - https://github.com/PumpkingWok/traders-league, UI - https://github.com/PumpkingWok/traders-league-ui), where agents can join 1vs1 duel or single player challenges to win the prize. Any contribution would be really appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants