Skip to content

Commit 5f31917

Browse files
committed
fix: can not modify metadata of token factory
1 parent 77b8834 commit 5f31917

File tree

4 files changed

+73
-50
lines changed

4 files changed

+73
-50
lines changed

proto/cosmwasm/tokenfactory/v1beta1/tx.proto

+6
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ message MsgBurnResponse {}
8080
// MsgChangeAdmin is the sdk.Msg type for allowing an admin account to reassign
8181
// adminship of a denom to a new account
8282
message MsgChangeAdmin {
83+
option (cosmos.msg.v1.signer) = "sender";
84+
8385
string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
8486
string denom = 2 [ (gogoproto.moretags) = "yaml:\"denom\"" ];
8587
string new_admin = 3 [ (gogoproto.moretags) = "yaml:\"new_admin\"" ];
@@ -92,6 +94,8 @@ message MsgChangeAdminResponse {}
9294
// MsgSetDenomMetadata is the sdk.Msg type for allowing an admin account to set
9395
// the denom's bank metadata
9496
message MsgSetDenomMetadata {
97+
option (cosmos.msg.v1.signer) = "sender";
98+
9599
string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
96100
cosmos.bank.v1beta1.Metadata metadata = 2 [
97101
(gogoproto.moretags) = "yaml:\"metadata\"",
@@ -104,6 +108,8 @@ message MsgSetDenomMetadata {
104108
message MsgSetDenomMetadataResponse {}
105109

106110
message MsgForceTransfer {
111+
option (cosmos.msg.v1.signer) = "sender";
112+
107113
string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ];
108114
cosmos.base.v1beta1.Coin amount = 2 [
109115
(gogoproto.moretags) = "yaml:\"amount\"",

scripts/tests-0.42.1/local-node-tests.sh

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

3+
set -ux
4+
35
CHAIN_ID=${CHAIN_ID:-testing}
46
USER=${USER:-tupt}
57
MONIKER=${MONIKER:-node001}
@@ -33,6 +35,8 @@ oraid genesis gentx $USER "2500000orai" --chain-id="$CHAIN_ID" -y $ARGS &>$HIDE_
3335

3436
oraid genesis collect-gentxs --home $NODE_HOME &>$HIDE_LOGS
3537

38+
jq '.initial_height="1"' $NODE_HOME/config/genesis.json >tmp.$$.json && mv tmp.$$.json $NODE_HOME/config/genesis.json
39+
3640
screen -S test-gasless -d -m oraid start $START_ARGS
3741

3842
# wait for the node to start

scripts/tests-0.42.1/test-tokenfactory.sh

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

3-
set -eu
3+
set -ux
44

55
CHAIN_ID=${CHAIN_ID:-testing}
66
USER=${USER:-tupt}
@@ -39,6 +39,19 @@ if ! [[ $admin =~ $user_address ]]; then
3939
exit 1
4040
fi
4141

42+
# try to set denom metadata
43+
ticker="TICKER"
44+
description="description"
45+
exponent=6
46+
oraid tx tokenfactory modify-metadata $first_denom $ticker $description $exponent $ARGS >$HIDE_LOGS
47+
48+
sleep 1
49+
symbol=$(oraid query bank denom-metadata $first_denom --output json | jq '.symbol')
50+
if ! [[ $ticker =~ $symbol ]]; then
51+
echo "Tokenfactory tests failed. The tokenfactory ticker does not match symbol after modify metadata"
52+
exit 1
53+
fi
54+
4255
# try mint
4356
oraid tx tokenfactory mint 10$first_denom $ARGS >$HIDE_LOGS
4457

x/tokenfactory/types/tx.pb.go

+49-49
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)