Cannot use Bytes type properly
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Reproduce the soroban contract invoke call against the initialize entry point shown in token/src/contract.rs, comparing the --name and --symbol Bytes arguments. Trace the CLI's argument parsing for these values; done when both hexadecimal values are accepted and the contract initialization transaction succeeds.
Written by the indexing model from the issue text.
Description
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.
$ soroban contract invoke \
--id 6885ed6b904a6cead909c99cdc482ffa4a74c181803f678cacbfbe831e9efac6 \
--secret-key S... \
--rpc-url http://localhost:8000/soroban/rpc \
--network-passphrase 'Test SDF Future Network ; October 2022' \
--fn initialize \
-- \
--admin GCGORBD5DB4JDIKVIA536CJE3EWMWZ6KBUBWZWRQM7Y3NHFRCLOKYVAL \
--decimal 7 \
--name 467265696768746572205465737420546f6b656e \
--symbol 465454
error: parsing argument symbol: invalid type: integer `465454`, expected string or map
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.
- Dominant language
- Rust
- Stars
- 123
- Forks
- 141
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 17
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stellar/stellar-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
stellar/stellar-cli#2384 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
stellar/stellar-cli#2347 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
stellar/stellar-cli#2723 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
stellar/stellar-cli#2722 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
stellar/stellar-cli#2703 ·
All issues in stellar/stellar-cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100