Detailed explanation of solidity case (7) Complex crowdfunding contract

Create your own original smart contract. If you have homework needs, you can add the skirt in the picture below.

1. In Remix, use Account1 to complete the compilation and deployment of the "crowdfunding project" contract. (Display the naming of contracts, functions, state variables, structures, and events)

2. In Remix, use Account2 to complete the compilation and deployment of the "Participate in Crowdfunding" contract.

3. Display the number of crowdfunding projects in the contract.

4. Account2 donates to Account1’s crowdfunding project (the operation is successful and 1 token is obtained)

5. Account3 seconded the crowdfunding project of Account1 (the operation was successful and 1 token was obtained)

6. Account2 seconded the crowdfunding project of Account1 (the crowdfunding has reached the upper limit and the operation failed)

7. Account4 seconded the crowdfunding project of Account1 (the fee was insufficient and the operation failed)

8. Account5 seconded the crowdfunding project of Account1 (the operation failed after the deadline)

9. Display the crowdfunding results of Account1 (number of crowdfunders, total crowdfunding amount)

10. Set Account6 ​​and Account7 as legal balance withdrawal accounts

11. Account6 ​​withdraws the balance in the contract (operation successful)

12. Account2 withdraws the balance in the contract (not in the legal account list, the operation failed)

 5d5775b27e8d4353a7a93901ff5e4554.png

 c322c37a67a845e5a204e1dc3c70f138.jpeg

 

 

 

Supongo que te gusta

Origin blog.csdn.net/2302_77339802/article/details/135241234
Recomendado
Clasificación