Skip to content

Commit

Permalink
mainnet and testnet upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Jul 31, 2023
1 parent 5f7344f commit d5aab6e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/mainnet_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
# Usage: sh scripts/mainnet_upload.sh
#

KEY="reece"
KEY="reece-main"
CHAINID="juno-1"
JUNOD_HOME="$HOME/.juno"
KEYALGO="secp256k1"
KEYRING="os"

export JUNOD_NODE="https://rpc.juno.strange.love:443"
export JUNOD_COMMAND_ARGS="--gas=auto -y --from $KEY --broadcast-mode block --output json --chain-id=$CHAINID --gas-prices=0.005ujuno --gas-adjustment=1.4 --home "$JUNOD_HOME" --keyring-backend $KEYRING"
export JUNOD_COMMAND_ARGS="--gas=auto -y --from $KEY --broadcast-mode block --output json --chain-id=$CHAINID --gas-prices=0.075ujuno --gas-adjustment=1.3 --home "$JUNOD_HOME" --keyring-backend $KEYRING"

middleware_tx=$(junod tx wasm store artifacts/tokenfactory_core.wasm $JUNOD_COMMAND_ARGS | jq -r .txhash)
middleware_code_id=$(junod q tx $middleware_tx --output=json | jq -r '.logs[0].events[] | select(.type=="store_code")' | jq -r .attributes[1].value) && echo "Middleware code_id: $middleware_code_id"
Expand Down
20 changes: 20 additions & 0 deletions scripts/testnet_upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
# Uploads the contracts & returns their code_ids
#
# Usage: sh scripts/testnet_upload.sh
#

KEY="validator"
CHAINID="uni-6"
JUNOD_HOME="$HOME/.juno"
KEYALGO="secp256k1"
KEYRING="os"

export JUNOD_NODE="https://uni-rpc.reece.sh:443"
export JUNOD_COMMAND_ARGS="--gas=auto -y --from $KEY --broadcast-mode=sync --output json --chain-id=$CHAINID --gas-prices=0.003ujunox --gas-adjustment=1.5 --home "$JUNOD_HOME" --keyring-backend $KEYRING"

middleware_tx=$(junod tx wasm store artifacts/tokenfactory_core.wasm $JUNOD_COMMAND_ARGS | jq -r .txhash)
middleware_code_id=$(junod q tx $middleware_tx --output=json | jq -r '.logs[0].events[] | select(.type=="store_code")' | jq -r .attributes[1].value) && echo "Middleware code_id: $middleware_code_id"

migrate_tx=$(junod tx wasm store artifacts/migrate.wasm $JUNOD_COMMAND_ARGS | jq -r .txhash) # && echo "Migrate tx: $migrate_tx"
migrate_code_id=$(junod q tx $migrate_tx --output=json | jq -r '.logs[].events[] | select(.type=="store_code")' | jq -r .attributes[1].value) && echo "Migrate code_id: $migrate_code_id"

0 comments on commit d5aab6e

Please sign in to comment.