DistributedCollective / DistributedCollective/Sovryn-smart-contracts
Create a step-by-step guide for the Smart Contract development FLOW
@jjmr007 is already working on this.
Since Jun 14, 2021.
- Dominant language
- JavaScript
- Stars
- 132
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
SC (Smart/Contracts) DEVELOPMENT FLOW/STARDARD-PROCEDURE (to be documented)
1°. Task statement
Appear as a result of a 2-weeks sprints development planning
2°. Development cycle
2.1.- Implementation:
Implementation of the functionality described in the task
It is very much desired to use TDD (Test-Driven-Development) approach: first tests then Red-Green-Refactor cycle (ideally)
2.2.- Testing & deployment scripts
We use hardhat + ethers (preferably) + waffle plugin (preferably) for testing
We use python scripts for deployment (e.g.: sovryn contracts repo, scripts/contractInteraction/contract_interaction.py and setting_and_running doc).
The scripts for the testnet and mainnet should be prepared and executed after the review approved accordingly.
2.3.- Review:
All the task's functionality must have been implemented; all tests are throwing green results; now it's time to create a PR (Pull-Request) and send it for review.
Ask with your circle leader who is the best to chose as reviewer(s).
3°. Testnet Testing: deploy & test on the testnet
3.1- Run the testnet deployment scripts from 2.2 to deploy contracts to the testnet.
3.2- immediately after the deployment, create the flattenized file for the .sov contract to verify the contract. Check if the verification pass the tests of the explorer. Otherwise check all the dependencies you used, to generate the right flattenized contract version, until it passes the VM check. If it is not possible to verify, repeat the deployment, until this step is successful.
3.3- Update contracts addresses in the repo [some references will be placed here] for the testnet.
3.4- Notify FE (the "Front-End" guys) if there are any changes in the contract's ABI or vital contract address(es) changed [where to get the list of those contracts?: there is a reference in the wiki platform for mainnet and testnet and also a spreadsheet for TESTNET and for MAINNET addresses].
3.5- Notify BE (the "Back-End" guys) if there are any changes affecting BE.
4°. Create Change Request if Mainnet Deployment affect users (interface, behavior, result changes). Change Requests are addressed to: __________________ . (The details of a Change requests are to be described for this point)
5°. Deploying on Mainnet and Update where necessary, but ONLY AFTER the changes being approved; and, (if point 5 is relevant), repeat steps from point-3 but for the mainnet. However, the point 3.2 is MANDATORY for all contracts deployed on mainnet.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.