-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* upload codes * disable migration * fix script & deploy * bump deps * rc8 * release * readme * fix workflow * env * final
- Loading branch information
1 parent
d1979e9
commit 43576f2
Showing
14 changed files
with
734 additions
and
566 deletions.
There are no files selected for viewing
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,53 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
artifact: | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
name: artifact | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Rust | ||
run: | | ||
rustup toolchain install 1.72 \ | ||
--profile minimal \ | ||
--target wasm32-unknown-unknown \ | ||
--no-self-update | ||
- name: Cache dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Install Deps | ||
run: make install-prod | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build wasm | ||
run: | | ||
cargo generate-lockfile | ||
make ci-build | ||
mv wasm_codes.zip ${{ env.ARTIFACT_NAME }} | ||
sha256sum ${{ env.ARTIFACT_NAME }} > ${{ env.ARTIFACT_NAME }}.CHECKSUM | ||
md5sum ${{ env.ARTIFACT_NAME }} > ${{ env.ARTIFACT_NAME }}.CHECKSUM.MD5 | ||
env: | ||
ARTIFACT_NAME: ${{ github.event.repository.name }}-${{ github.ref_name }}.zip | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
${{ env.ARTIFACT_NAME }} | ||
${{ env.ARTIFACT_NAME }}.CHECKSUM | ||
${{ env.ARTIFACT_NAME }}.CHECKSUM.MD5 | ||
env: | ||
ARTIFACT_NAME: ${{ github.event.repository.name }}-${{ github.ref_name }}.zip |
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 |
---|---|---|
|
@@ -27,7 +27,7 @@ panic = "abort" | |
rpath = false | ||
|
||
[workspace.package] | ||
version = "0.0.6-rc6" | ||
version = "0.0.6-rc8" | ||
authors = [ | ||
"byeongsu-hong <[email protected]>", | ||
"Eric <[email protected]>", | ||
|
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,85 @@ | ||
# Deploy Scripts | ||
|
||
## Prerequisites | ||
|
||
- [pnpm](https://pnpm.io/) | ||
|
||
## Configuration | ||
|
||
Create a `config.yaml` file in the root directory of the project. Default option for Osmosis testnet is following. | ||
|
||
Also, you can check the full list of options in the [config.ts](./src/config.ts) file. | ||
|
||
```yaml | ||
network: | ||
id: "osmo-test-5" | ||
hrp: "osmo" | ||
url: "https://rpc.osmotest5.osmosis.zone/" | ||
gas: | ||
price: "0.025" | ||
denom: "uosmo" | ||
domain: 1037 # osmo-test-5 -> ascii / decimal -> sum | ||
|
||
signer: { PRIVATE_KEY } | ||
|
||
deploy: | ||
ism: | ||
type: multisig | ||
owner: { SIGNER_ADDRESS } | ||
validators: | ||
5: | ||
addrs: | ||
- { SIGNER_ETH_ADDRESS } | ||
threshold: 1 | ||
420: | ||
addrs: | ||
- { SIGNER_ETH_ADDRESS } | ||
threshold: 1 | ||
421613: | ||
addrs: | ||
- { SIGNER_ETH_ADDRESS } | ||
threshold: 1 | ||
|
||
hooks: | ||
default: | ||
type: mock | ||
|
||
required: | ||
type: aggregate | ||
owner: { SIGNER_ADDRESS } | ||
hooks: | ||
- type: merkle | ||
|
||
- type: pausable | ||
owner: { SIGNER_ADDRESS } | ||
paused: false | ||
- type: fee | ||
owner: { SIGNER_ADDRESS } | ||
fee: | ||
denom: uosmo | ||
amount: 1 | ||
``` | ||
## Usage | ||
### Uploading Contract Codes | ||
```bash | ||
pnpm upload | ||
``` | ||
|
||
### Deploying Contracts | ||
|
||
```bash | ||
pnpm deploy | ||
``` | ||
|
||
## Maintaining | ||
|
||
### Adding a new contract | ||
|
||
1. Add a new module with actual contract output name in the [contracts](./src/contracts/) directory. | ||
2. Class name should be upper camel case conversion of the contract name. | ||
3. Import new module [contracts/index.ts](./src/index.ts) file. | ||
4. If a new contract is ISM or Hook, add a new option to config type. | ||
5. Add a new field to the Contracts class in the [deploy.ts](./src/deploy.ts) file. |
Oops, something went wrong.