-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added readme.md - removed github job to run e2e tests since they just instantiate the contracts
- Loading branch information
1 parent
68e5772
commit 066d078
Showing
6 changed files
with
15 additions
and
16 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...ub/workflows/deploy-latest-on-testnet.yml → ...hub/workflows/deploy-latest-contracts.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Deploy contracts on Neutron testnet | ||
name: Deploy latest contracts | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## The Purpose | ||
|
||
This directory contains a set of shell scripts and JSON configuration files that allow us to easily store, instantiate and prepare our smart contracts for testing. | ||
These scripts are used in two places: | ||
1. In the GitHub [workflow](./../../.github/workflows/deploy-latest-contracts.yml) that will store, instantiate and populate the smart contracts on the Neutron testnet each time a PR is merged into the main branch. | ||
2. To manually deploy contracts on the Neutron mainnet. | ||
|
||
### Shell scripts | ||
- `store_instantiate.sh` sends transactions to store the codes from the `artifacts` directory to the specified blockchain. Then it uses stored codes to instantiate Hydro and Tribute smart contracts. It relies on a JSON configuration file that is passed to it. It populates and exports two environment variables: `HYDRO_CONTRACT_ADDRESS` and `TRIBUTE_CONTRACT_ADDRESS`. | ||
- `populate_contracts.sh` sends transactions to create proposals in the Hydro smart contract, and to add tributes for those proposals in the Tribute smart contract. It relies on `HYDRO_CONTRACT_ADDRESS` and `TRIBUTE_CONTRACT_ADDRESS` being previously set by the `store_instantiate.sh` script. | ||
- `setup_on_mainnet.sh` executes previous two scripts by providing `config_mainnet.json` configuration that will result in smart contracts being set up on the Neutron mainnet. Prerequisite for running this script is to have the `neutrond` binary in your `PATH` and to import mnemonic that has enough NTRN tokens on the Neutron mainnet. If this mnemonic is for a different address than the one in `config_mainnet.json` file, then the configuration file needs to be adjusted as well. |
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
tools/deployment/setup_on_mainet.sh → tools/deployment/setup_on_mainnet.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
set -eux | ||
|
||
source tools/deployment/store_instantiate.sh "tools/deployment/config_mainet.json" false | ||
source tools/deployment/populate_contracts.sh "tools/deployment/config_mainet.json" | ||
source tools/deployment/store_instantiate.sh "tools/deployment/config_mainnet.json" false | ||
source tools/deployment/populate_contracts.sh "tools/deployment/config_mainnet.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters