Scripts for testing Substrate-based Cere Network
April 7, 2022 ยท View on GitHub
Overview
This repository supposed to be used for testing Substrate-based Cere Network. It also consist of some other helpful tools.
Packaging
1. Up and run Private Node
In order to start testing Private Network, you need to up and run node locally using command:
docker-compose up -d node
2. Create application wallet/account
In order to run script you need to have application wallet/account with some funded amount of native tokens to process transactions. Use Create a new account guide for this purpose.
3. Deploy Smart Contract
Now you need to deploy Smart Contract using just created application wallet to the network using How to deploy Smart Contract guide.
4. Configure script environment variables
Update environment variables in ./env file in this repo. You need to update the following parameters:
SMART_CONTRACT_ADDRESS
APP_WALLET_JSON
APP_WALLET_PASSPHRASE
5. Run tests using docker-compose
Scenario 1: Generate user's wallet and send assets to it.
Scenario 1 contains implementation of basic asset transfer.
Run first scenario using command:
docker-compose up scenario_1
Scenario 2: Fee Abstraction for user's wallet.
Scenario 2 contains implementation of fee abstraction.
Run second scenario using command:
docker-compose up scenario_2
Scenario 3: Batch transactions for transfer assets.
Scenario 3 contains implementation of batch tx call.
Run third scenario using command:
docker-compose up scenario_3
Scenario 4: Issue Restricted Assets.
Scenario 4 contains implementation of issuing of Restricted Assets.
Run fourth scenario using command:
docker-compose up scenario_4
Scenario 5: Data transaction.
Scenario 5 contains implementation of submitting of data transaction.
Run fifth scenario using command:
docker-compose up scenario_5
Scenario 6: Tokens transfer.
Scenario 6 contains implementation of tokens transferring.
Run sixth scenario using command:
docker-compose up scenario_6
Scenario 7: Calculate inflation-based rewards.
Scenario 7 contains implementation of inflation based rewards for validators and nominators in Era calculations.
Run seventh scenario using command:
docker-compose up scenario_7
Scenario 8: Tokens distribution in batch transaction signed by multisig.
Scenario 8 contains implementation of tokens distribution in batch transaction signed by multisig.
Run 8th scenario using command:
docker-compose up scenario_8
Known issues
- If you're going to execute
scenario 5with private-standalone-network-node the DDC-pallet name should be returned back totemplateModuleby reverting commit40f5ae1d.
License
License info can be found in the LICENSE section.