Skip to content

Commit

Permalink
feat: update script start dex contract
Browse files Browse the repository at this point in the history
  • Loading branch information
dtkhanh-smartosc committed May 4, 2024
1 parent 1242c2d commit 8dcf80d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 111 deletions.
8 changes: 0 additions & 8 deletions chains/osmosis/ingest/README.md

This file was deleted.

16 changes: 0 additions & 16 deletions chains/osmosis/ingest/sqs/README.md

This file was deleted.

14 changes: 8 additions & 6 deletions chains/osmosis/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ cd ${SCRIPT_DIR}/../cosmwasm && bash ./build_wasm.sh
# Gen code_id swaprouter
cd ${SCRIPT_DIR}/../cosmwasm/artifacts && osmosisd --node http://localhost:26658 tx wasm store swaprouter.wasm --from ${VALIDATOR} "${TX_FLAGS[@]}"
sleep 5
SWAPROUTER_CODE_ID=$(osmosisd --node http://localhost:26658 query wasm list-code -o json | jq -r '.code_infos[-1].code_id')

SWAPRUOTER_CODE_ID=$(osmosisd --node http://localhost:26658 query wasm list-code -o json | jq -r '.code_infos[-1].code_id')
echo "SWAPRUOTER_CODE_ID" $SWAPRUOTER_CODE_ID
# Initial contract swaprouter
MSG=$(cat <<EOF
{
Expand All @@ -27,14 +27,14 @@ MSG=$(cat <<EOF
EOF
)
sleep 3
echo "osmosisd tx wasm instantiate $SWAPRUOTER_CODE_ID "$MSG" --label "swaprouter" --from ${VALIDATOR} --admin ${VALIDATOR} "${TX_FLAGS[@]}" --node http://localhost:26658"
osmosisd tx wasm instantiate $SWAPRUOTER_CODE_ID "$MSG" --label "swaprouter" --from ${VALIDATOR} --admin ${VALIDATOR} "${TX_FLAGS[@]}" --node http://localhost:26658
sleep 3
export SWAPROUTER_ADDRESS=$(osmosisd --node http://localhost:26658 query wasm list-contract-by-code "$SWAPROUTER_CODE_ID" -o json | jq -r '.contracts[-1]')

export SWAPROUTER_ADDRESS=$(osmosisd --node http://localhost:26658 query wasm list-contract-by-code "$SWAPRUOTER_CODE_ID" -o json | jq -r '.contracts[-1]')
echo "SWAPROUTER_ADDRESS" $SWAPROUTER_ADDRESS
# Set up channel
## Using hermes
rm ${HOME}/.hermes/config.toml && cp ${SCRIPT_DIR}/hermes/config.toml ${HOME}/.hermes/config.toml

hermes keys add --chain sidechain --mnemonic-file ${SCRIPT_DIR}/hermes/cosmos
hermes keys add --chain localosmosis --mnemonic-file ${SCRIPT_DIR}/hermes/osmosis
hermes create client --host-chain localosmosis --reference-chain sidechain
Expand All @@ -55,4 +55,6 @@ EOF
)
sleep 3
osmosisd tx wasm instantiate $CROSSCHAINSWAPS_CODE_ID "$MSG" --label "crosschain_swaps" --from ${VALIDATOR} --admin ${VALIDATOR} "${TX_FLAGS[@]}" --node http://localhost:26658

sleep 3
export CROSSCHAINSWAPS_ADDRESS=$(osmosisd --node http://localhost:26658 query wasm list-contract-by-code "$CROSSCHAINSWAPS_CODE_ID" -o json | jq -r '.contracts[-1]')
echo "CROSSCHAINSWAPS_ADDRESS" $CROSSCHAINSWAPS_ADDRESS
40 changes: 0 additions & 40 deletions chains/osmosis/scripts/upgrades/3/test_script.sh

This file was deleted.

41 changes: 0 additions & 41 deletions chains/osmosis/scripts/upgrades/4/test_script.sh

This file was deleted.

0 comments on commit 8dcf80d

Please sign in to comment.