- I am writing this tutorial to help other developers to implement a thorough test for Smart Contracts on Polygon.
- We'll learn how to implement a smart-contract from scratch and unit test them using Truffle
- This tutorials goal is to help developers to get a deep understanding of how unit testing works with Smart Contract on Polygon Network as a developer.
- Write our own Smart Contract for testing with solidity.
- Compile & Deploy them with Truffle.
- Unit test each functionalities of the Smart Contract with Truffle-Assertion.
We'll explore each of the Smart Contract functionalities and unit test each of them using the Truffle Framework.
- Deploy the Smart Contract
- Make Contract calls or transactions to alter the state of the Contract.
- Check if the altered contract state is what we expected using the Truffle-Assertion library.
- If the Contract works correctly, we'll set the result of the test to be true.
- If the Contract doesn't work correctly, we'll set the result of the test to be false.
- This tutorial is for developers who have some knowledge about Truffle Framework and Solidity.
- It's good for readers to have prior knowlege about Truffle Framework and Ethereum network.
This tutorial contains
- [o] Smart Contract
- [o] Front-End (javascript)
- [o] Polygon(Matic)
- [o] Advanced