Skip to content

Commit

Permalink
Merge pull request #146 from EjembiEmmanuel/verify-contracts
Browse files Browse the repository at this point in the history
feat: add verify-contracts script
  • Loading branch information
Darlington02 authored Aug 31, 2024
2 parents 5bb3a86 + f5acec9 commit be9b247
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Scripts exists to make your life easier! Here are available scripts and features
| :---: | :---: |
| Build Contract ||
| Format Contract ||
| Verify Contract ||
| Run custom scripts ||
| Generate SRC5 Interface ||
| Prepare Account ||
Expand Down Expand Up @@ -93,6 +94,14 @@ Scarb comes with an in-built cairo formatter. To utilize it run:
npm run format-contracts
```

#### Verify contracts

To verify your smart contracts, from the base repository run:

```
npm run verify-contracts --contract-address=<CONTRACT_ADDRESS> --contract-name=<CONTRACT_NAME> --network=<NETWORK>
```

#### Test contracts

To run your tests:
Expand Down
8 changes: 8 additions & 0 deletions docs/src/chapter_5.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ Leverage `Scarb’s` native formatting capabilities by running:
npm run format-contracts
```

#### Verify contracts

To verify your smart contracts, from the base repository run:

```
npm run verify-contracts --contract-address=<CONTRACT_ADDRESS> --contract-name=<CONTRACT_NAME> --network=<NETWORK>
```

### Test contracts
To run your Starknet Foundry tests:
```
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build-contracts": "cd contracts && scarb build",
"test-contracts": "cd contracts && snforge test",
"format-contracts": "cd contracts && scarb fmt",
"verify-contracts": "cd contracts && sncast verify --contract-address ${npm_config_contract-address} --contract-name ${npm_config_contract-name} --verifier walnut --network ${npm_config-network}",
"contract-scripts": "cd contracts/scripts && sncast script run ${npm_config_script} --url ${npm_config_url}",
"generate-interface": "cd contracts && src5_rs parse",
"prepare-account": "cd contracts && sncast account create --url ${npm_config_url} --name ${npm_config_name} --add-profile",
Expand Down

0 comments on commit be9b247

Please sign in to comment.