Init Process Flow:
Flows: Connect wallet Function giveSeeds ◦ Hit button for seeds ◦ Send 10 seeds to msg.sender ◦ Maybe Add wallet to list to keep balance of seeds dispensed
Function createProp ◦ Send 1 seed with txt idea of proposal ◦ Msg.sender balance ==-1 ◦ Add proposal to billboard
Function Accept Proposal ◦ Contract owner can accept proposals and return 3 seeds ◦ Add text for funding, other details
◦ Contract setup in openzeplin wizard
◦ Mint 33k SEEDS as ERC20 or 1155
◦ Contract is payable
◦ Wallet can receive seeds
◦ SubmitProposal should be 1 seed
◦ Accept Proposals should return 2 seeds
◦
Future Ideas: ◦ Use seeds for purchases ◦ Integrate ETH payment into the approveProposal so people gets Seeds and ETH on the same step or a following step.
npm install truffle init npm install @openzeppelin/contracts
//**** //OLD SimpleBank Readme.md
SimpleBank is a Truffle project that contains a starter contract, migration and Truffle JavaScript test files. In this exercise you are going to implement the SimpleBank.sol contract.
contracts/SimpleBank.sol
: the partial implementation of a Solidity Contract you will complete.test/simpleBank.test.js
: the Truffle test file that describes the behavior of a correct SimpleBank contract.
- Latest truffle version.
npm -g uninstall truffle && npm -g install truffle
- Your preferred code editor.
- Familiarity with terminals.
Follow the comments outlined in SimpleBank.sol to implement its functionality. The test are there to determine correct contract behavior as well as guide you through the implementation.
The general workflow is to use Test Drive Development's red green process:
- Run
truffle test
from a terminal. - Use the failed test output along with the hints in
contracts/SimpleBank.sol
to make the test pass.