Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNM - tooling: help test latest junod/wasmd combo #14

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ then
exit
fi

IMAGE_TAG=${2:-"v9.0.0"}
IMAGE_TAG=${2:-"wasmd_029_rc1"}
CONTAINER_NAME="juno_cw_unity_prop"
BINARY="docker exec -i $CONTAINER_NAME junod"
DENOM='ujunox'
CHAIN_ID='testing'
RPC='http://localhost:26657/'
TXFLAG="--gas-prices 0.1$DENOM --gas auto --gas-adjustment 1.3 -y -b block --chain-id $CHAIN_ID --node $RPC"
BLOCK_GAS_LIMIT=${GAS_LIMIT:-100000000} # mirrors mainnet
BLOCK_GAS_LIMIT=${GAS_LIMIT:-10000000} # mirrors mainnet

echo "Building $IMAGE_TAG"
echo "Configured Block Gas Limit: $BLOCK_GAS_LIMIT"
Expand All @@ -35,7 +35,7 @@ docker run --rm -d --name $CONTAINER_NAME \
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer:0.12.6
cosmwasm/rust-optimizer:0.12.8

# copy wasm to docker container
docker cp artifacts/cw_unity_prop.wasm $CONTAINER_NAME:/cw_unity_prop.wasm
Expand All @@ -56,7 +56,7 @@ echo "TX Flags: $TXFLAG"
set -e

# upload wasm
CONTRACT_CODE=$($BINARY tx wasm store "/cw_unity_prop.wasm" --from validator $TXFLAG --output json | jq -r '.logs[0].events[-1].attributes[0].value')
CONTRACT_CODE=$($BINARY tx wasm store "/cw_unity_prop.wasm" --from validator $TXFLAG --output json | jq -r '.logs[0].events[-1].attributes[-1].value')
echo "Stored: $CONTRACT_CODE"

BALANCE_2=$($BINARY q bank balances $VALIDATOR_ADDR)
Expand Down
6 changes: 3 additions & 3 deletions scripts/deploy_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ DENOM='ujunox'
CHAIN_ID='testing'
RPC='http://localhost:26657/'
TXFLAG="--gas-prices 0.1$DENOM --gas auto --gas-adjustment 1.3 -y -b block --chain-id $CHAIN_ID --node $RPC"
BLOCK_GAS_LIMIT=${GAS_LIMIT:-100000000} # mirrors mainnet
BLOCK_GAS_LIMIT=${GAS_LIMIT:-10000000} # mirrors mainnet

echo "Configured Block Gas Limit: $BLOCK_GAS_LIMIT"

# compile
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer:0.12.6
cosmwasm/rust-optimizer:0.12.8

# copy wasm to docker container
docker cp artifacts/cw_unity_prop.wasm $CONTAINER_NAME:/cw_unity_prop.wasm
Expand All @@ -41,7 +41,7 @@ echo "TX Flags: $TXFLAG"
set -e

# upload wasm
CONTRACT_CODE=$($BINARY tx wasm store "/cw_unity_prop.wasm" --from validator $TXFLAG --output json | jq -r '.logs[0].events[-1].attributes[0].value')
CONTRACT_CODE=$($BINARY tx wasm store "/cw_unity_prop.wasm" --from validator $TXFLAG --output json | jq -r '.logs[0].events[-1].attributes[-1].value')
echo "Stored: $CONTRACT_CODE"

BALANCE_2=$($BINARY q bank balances $VALIDATOR_ADDR)
Expand Down
5 changes: 2 additions & 3 deletions scripts/submit_gov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ then
exit
fi

IMAGE_TAG=${2:-"v9.0.0"}
IMAGE_TAG=${2:-"wasmd_029_rc1"}
CONTAINER_NAME="juno_cw_unity_prop"
BINARY="docker exec -i $CONTAINER_NAME junod"
DENOM='ujunox'
Expand Down Expand Up @@ -56,7 +56,7 @@ echo "TX Flags: $TXFLAG"
set -e

# upload wasm
CONTRACT_CODE=$($BINARY tx wasm store "/cw_unity_prop.wasm" --from validator $TXFLAG --output json | jq -r '.logs[0].events[-1].attributes[0].value')
CONTRACT_CODE=$($BINARY tx wasm store "/cw_unity_prop.wasm" --from validator $TXFLAG --output json | jq -r '.logs[0].events[-1].attributes[-1].value')
echo "Stored: $CONTRACT_CODE"

BALANCE_2=$($BINARY q bank balances $VALIDATOR_ADDR)
Expand Down Expand Up @@ -88,7 +88,6 @@ $BINARY tx gov submit-proposal sudo-contract $CONTRACT_ADDRESS '{"execute_send":
--from test-user $TXFLAG \
--title "Prop title" \
--description "LFG" \
--type sudo-contract \
--deposit 500000000ujunox

$BINARY q gov proposal 1
Expand Down
2 changes: 1 addition & 1 deletion scripts/submit_gov_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ echo "TX Flags: $TXFLAG"
set -e

# upload wasm
CONTRACT_CODE=$($BINARY tx wasm store "/cw_unity_prop.wasm" --from validator $TXFLAG --output json | jq -r '.logs[0].events[-1].attributes[0].value')
CONTRACT_CODE=$($BINARY tx wasm store "/cw_unity_prop.wasm" --from validator $TXFLAG --output json | jq -r '.logs[0].events[-1].attributes[-1].value')
echo "Stored: $CONTRACT_CODE"

BALANCE_2=$($BINARY q bank balances $VALIDATOR_ADDR)
Expand Down