- CREATOR_ACCOUNT_ADDRESS (Does not change)
- Create unique PROJECT_ID (new ID incremented +1 for each new project)
- PERCENTAGE of transfer to return to CREATOR_ACCOUNT_ADDRESS on payout to PROJECT_ACCOUNT_ADDRESS (profits)
- DELAY for payouts
Note: The contract needs to specifically emit details so it can be called
- PROJECT_ID
- Project owner PROJECT_ACCOUNT_ADDRESS
- MIN_CRYPTO contribution
- TOTAL_CRYPTO sum of contributions
- PAYOUT_CALL (BINARY - YES/NO) if TOTAL_CRYPTO > MIN_CRYPTO then PROJECT_ACCOUNT_ADDRESS can make PAYOUT_CALL can = YES, otherwise NO
- START_TIME
- END_TIME if reached, wait DELAY, then if PAYOUT_CALL is YES, transfer TOTAL_CRYPTO less PERCENTAGE to PROJECT_ACCOUNT_ADDRESS, if PAYOUT_CALL is NO, transfer MY_CRYPTO to FUNDER_ID (crypto is returned to the participant)
- PROJECT_ID for project
- FUNDER_ID Participant identified by wallet
- MY_CRYPTO participant contribution amount
- Initiates a project
- That makes calls to the contract and reports contract details
In preparation to deploy: in ./src directory:
cargo generate \
--name KickStarter \
--git https://github.com/cennznet/contract-template
# Use rust nightly toolchain for contract dev.
cd KickStarter && rustup override set nightly