2022-01-20 07:22:44 +00:00
|
|
|
# BBG Contracts
|
|
|
|
------------
|
2021-11-20 15:09:02 +00:00
|
|
|
|
2022-01-20 07:22:44 +00:00
|
|
|
### 1. Before Start
|
2021-11-20 15:09:02 +00:00
|
|
|
|
2022-01-20 07:22:44 +00:00
|
|
|
Create and modify the following files in this directory, the secret key inside the files are dummy ones from truffle dev server:
|
|
|
|
- development-secret.json
|
|
|
|
- polygon-secret.json
|
|
|
|
- bsc-secret.json
|
2021-11-20 15:09:02 +00:00
|
|
|
|
2022-01-20 07:22:44 +00:00
|
|
|
### 2. Prepare the dependencies
|
|
|
|
|
|
|
|
```bash
|
|
|
|
npm i
|
2024-03-07 10:38:58 +00:00
|
|
|
# if you want to develop in localhost, try to run npm run devserver separately
|
2022-01-20 07:22:44 +00:00
|
|
|
# ex: npm run devserver
|
|
|
|
# it will give you a set of secrets and account addresses
|
|
|
|
```
|
|
|
|
|
|
|
|
### 3. Deploy
|
|
|
|
|
|
|
|
Migrate:
|
|
|
|
```bash
|
|
|
|
npm run migrate:dev
|
|
|
|
# npm run migrate:polygon
|
|
|
|
# npm run migrate:polygon-test
|
|
|
|
# npm run migrate:bsc
|
|
|
|
# npm run migrate:bsc-test
|
|
|
|
```
|
|
|
|
|
|
|
|
Lint:
|
|
|
|
```bash
|
|
|
|
npm run lint
|
|
|
|
# # fix solidity issue
|
|
|
|
# npm run lint:sol:fix
|
|
|
|
# # fix js issue
|
|
|
|
# npm run lint:js:fix
|
|
|
|
```
|
|
|
|
|
|
|
|
Test:
|
|
|
|
```bash
|
|
|
|
npm run test
|
|
|
|
```
|
|
|
|
|
|
|
|
```bash
|
2021-11-20 15:09:02 +00:00
|
|
|
truffle run verify ChildMintableERC20 --network polygon
|
2022-01-20 07:22:44 +00:00
|
|
|
```
|
2021-11-20 15:09:02 +00:00
|
|
|
|
2022-01-20 07:22:44 +00:00
|
|
|
```bash
|
2021-11-20 15:09:02 +00:00
|
|
|
truffle run verify ChildMintableERC20@0x3Afe98235d680e8d7A52e1458a59D60f45F935C0 --network polygon
|
2022-01-20 07:22:44 +00:00
|
|
|
```
|