Skip to content

Commit 70ddf41

Browse files
Merge pull request #108 from oraichain/feat/script-test-txfees
feat: update script test for txfees
2 parents 1b8e3c7 + bf2ad98 commit 70ddf41

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

scripts/json/txfees-add-fee-proposal.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
{
44
"@type": "/cosmwasm.txfees.v1.MsgAddFeeToken",
55
"authority": "orai10d07y265gmmuvt4z0w9aw880jnsr700jf39xhq",
6-
"config": {
7-
"denom": "factory/orai1d66z2gp6dr0ptrdvjdqhs8vkqlqnz5d7lxpmw2/usdai"
8-
}
6+
"denom": "factory/orai1r3n94y6vm8e0evd65pmysaa72g7kkg7smw4733/usdai"
97
}
108
],
119
"metadata": "foobar",

scripts/tests-0.50.9/test-txfees.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
set -ux
3+
set -eu
44

55
PRICE_QUERY_WASM_PATH=${PRICE_QUERY_WASM_PATH:-"$PWD/scripts/wasm_file/price-query-local.wasm"}
66
WASM_MOCK_ORAIDEX_PATH=${WASM_MOCK_ORAIDEX_PATH:-"$PWD/scripts/wasm_file/mock-oraidex-v3.wasm"}
@@ -122,7 +122,7 @@ update_proposal() {
122122
cat $ADD_FEE_PROPOSAL_FILE | jq "$1" >$PWD/scripts/json/temp_proposal.json && mv $PWD/scripts/json/temp_proposal.json $ADD_FEE_PROPOSAL_FILE
123123
}
124124

125-
update_proposal ".messages[0][\"config\"][\"denom\"]=\"$full_denom_name\""
125+
update_proposal ".messages[0][\"denom\"]=\"$full_denom_name\""
126126

127127
tx_hash=$(oraid tx gov submit-proposal $ADD_FEE_PROPOSAL_FILE $ARGS --output json | jq -r '.txhash')
128128
sleep 2
@@ -131,8 +131,8 @@ proposal_id=$(oraid query tx $tx_hash --output json | jq -r '.events[] | select(
131131
oraid tx gov vote $proposal_id yes $ARGS >$HIDE_LOGS
132132
sleep 30
133133

134-
query_denom_config=$(oraid query txfees token-config $full_denom_name --output json | jq -r '.config.denom')
135-
if ! [[ $query_denom_config =~ $full_denom_name ]]; then
134+
query_denom_allowed=$(oraid query txfees allowed-tokens --output json | jq -r '.tokens[0]')
135+
if ! [[ $query_denom_allowed =~ $full_denom_name ]]; then
136136
echo "Txfees tests failed. Can not add token fee"
137137
exit 1
138138
fi

0 commit comments

Comments
 (0)