Do not hold back with comments.. The reason I have to rebuild is because I did not write enough comments and coming back to older stuff after a while I would easily get lost.
Work through completing functions in following order: Functions in Yellow state, Functions in Red state, Functions in Green state, Functions in Complete state. A lot of functions have crossover or are even state irrelevant, follow this as best as possible
Truffle tests will have to be done without chainlink pricefeed. Make sure to test with chainlink pricefeed through remix after truffle tests are finished
Consider breaking entire contract up into smaller easier to digest contracts that are connected via inheritance. Possible divisions
- BountyFactory
- Yellow state and Red state functions
- Green state and Complete state functions
- Modifiers
- PriceFeed
Contribute Set State
Refund
Important to make sure refund can only be called once Contribute function should be locked in this state
Get on Viplist Set target
Standard ticket holders and VIP ticket holders should be marked as such through using their balance (Not by single contribution)
This state should only be allowed to trigger if target is met.
Close contribution function (This will also prevent expiration from triggering)
Withdraw funds
Important information to display- Band/Artist Location/City Contributor no. Contract Balance (Funds raised) Contract state (Early stage, Confirmed, Complete, Expired) Funds Target Expiration time / deadline List of Bounties
Important functions needed- The ability to add funds to a Bounty (contribute) The ability to claim a standard ticket The ability to claim a vip ticket(max 1) Need to create a countdown timer for expiring bounties? Need to set target from frontend (convert Eth to Wei)
Tackle next Figure out AdminOnly situation. ✓ Create The BountyFactory. ✓ Before deploying decide on what variables need to be public / which ones need to be accessed by frontend I need a way to convert all wei balances into eth (This can probably be done in front end)
Make a getter page and turn all public variables into private
Once those are resolved move on to Front-end.
Hit a wall.. hooking up front end to smart contract. How do I hook it up to factory not bounty contract.