Skip to content

Commit

Permalink
added deploy sets to dispatch and auto-add code IDs to config JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Nov 8, 2024
1 parent 919c133 commit 1680704
Show file tree
Hide file tree
Showing 13 changed files with 1,065 additions and 447 deletions.
3 changes: 0 additions & 3 deletions packages/dispatch/.env.example

This file was deleted.

2 changes: 1 addition & 1 deletion packages/dispatch/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
.env
config.toml
15 changes: 8 additions & 7 deletions packages/dispatch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ DAO DAO Dispatch. Control center for DAO DAO.

## Usage

Make sure to copy `.env.example` to `.env` and set the environment variables
correctly.
Make sure to copy `config.toml.example` to `config.toml` and configure it
appropriately.

### Deploy

Expand All @@ -20,11 +20,12 @@ behalf of the granter you pass to `-a`.
Usage: yarn deploy [options]
Options:
-c, --chain <ID> chain ID
-p, --polytone only deploy polytone contracts
-a, --authz <granter> upload contracts via authz exec as this granter
-x, --exclude <substrings> ignore contracts containing any of these comma-separated substrings (e.g. cw721)
-h, --help display help for command
-c, --chain <ID> chain ID
-m, --mode <mode> deploy mode (dao = deploy DAO contracts and instantiate admin factory, polytone = deploy Polytone contracts, factory = instantiate admin factory) (default: "dao")
-v, --version <version> contract version to save code IDs under in the config when deploying DAO contracts (e.g. 1.0.0)
-a, --authz <granter> upload contracts via authz exec as this granter
-r, --restrict-instantiation restrict instantiation to only the uploader; this must be used on some chains to upload contracts, like Kujira
-h, --help display help for command
```

### Polytone
Expand Down
8 changes: 8 additions & 0 deletions packages/dispatch/config.toml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
### The mnemonic to use for signing transactions.
mnemonic = "abc def ghi"

### The directories to look in for compiled contracts.
contract_dirs = [
"/Users/user/Developer/dao-contracts/artifacts",
"/Users/user/Developer/polytone/artifacts",
]
9 changes: 6 additions & 3 deletions packages/dispatch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@
"scripts": {
"format": "eslint . --fix",
"lint": "eslint .",
"deploy": "tsx ./scripts/deploy.ts",
"polytone": "tsx ./scripts/polytone.ts"
"deploy": "tsx ./scripts/deploy/run.ts",
"polytone": "tsx ./scripts/polytone/run.ts"
},
"devDependencies": {
"@confio/relayer": "^0.12.0",
"@dao-dao/config": "2.5.0-rc.3",
"@dao-dao/state": "2.5.0-rc.3",
"@dao-dao/types": "2.5.0-rc.3",
"@dao-dao/utils": "2.5.0-rc.3",
"@types/proper-lockfile": "^4.1.4",
"chalk": "^4",
"commander": "^11.0.0",
"dotenv": "^16.4.5",
"eslint": "^8.23.1",
"sinon": "^18.0.0",
"toml": "^3.0.0",
"tsx": "^4.19.0",
"typescript": "5.3.3"
},
Expand All @@ -29,6 +31,7 @@
"@cosmjs/crypto": "^0.32.3",
"@cosmjs/proto-signing": "^0.32.3",
"@cosmjs/stargate": "^0.32.3",
"@cosmjs/tendermint-rpc": "^0.32.3"
"@cosmjs/tendermint-rpc": "^0.32.3",
"proper-lockfile": "^4.1.2"
}
}
Loading

0 comments on commit 1680704

Please sign in to comment.