Open aristidesstaffieri opened 1 year ago
Hmm interesting. Does it still happen if you change symbol to symbol_b
? We do have a test for bytes. But I'll add one with an arg named symbol
.
Hmm interesting. Does it still happen if you change symbol to
symbol_b
? We do have a test for bytes. But I'll add one with an arg namedsymbol
.
Not sure I understand, do you mean change the arg name to symbol_b
, just to clarify this is the symbol used to identify the token in this instance, not a Symbol type but a Bytes type.
Just ran into this on RPCiege day 3, which required sending in a Symbol
of which the hash included a certain pattern. I was unable to pass any symbols on the CLI that consisted of just numbers, likely because they were being parsed as integers and then failed a type check later on when invoking the contract's function:
$ soroban contract invoke --id a9f195600907c6204a55831ce0347b03a3409c7194e3c944c604cf7c16f495de --source ... --rpc-url https://rpc-futurenet.fastcheapandoutofcontrol.com:443 --network-passphrase 'Test SDF Future Network ; October 2022' -- game_3 --symbol 123 --_nft_dest ...
error: parsing argument symbol: invalid type: integer `123`, expected string or map
Versions:
soroban 0.8.0 (6bdd01a190e30805955fba11c60eed4aa452387c)
soroban-env 0.0.16 (0c0cae6fa22b751e7fd95d7ce7556ac6d7b7010e)
soroban-env interface version 85899345957
stellar-xdr 0.0.16 (53e1a9cf2335aff29305c72deb6f075e78915dad)
xdr next (2f16687fdf6f4bcfb56805e2035f69997f4b34c4)
Did you try the symbol in quotes? "123"?
Did you try the symbol in quotes? "123"?
Yes, but that didn't make a difference because the shell would strip them. I had not tried the '"123"'
variant though.
What version are you using?
0.6.0
What did you do?
I have deployed an instance of the token interface on futurenet, and I'm trying to call initialize with this fn sig. The last two args are Bytes that I believe are supposed to be the hex string representation of the value. I am trying the following and am wondering why it wouldn't be able to parse the --symbol arg but had no problem with the --name arg, both are hex strings of the value that I want to pass for name and symbol.
What did you expect to see?
A successful transaction for initializing this contract
What did you see instead?
cli cannot parse the hex string provided for the bytes arg called symbol, it seems to be fine with the hex string for bytes for the arg called name.