There is the inconsistent packing/unpacking of "tonos-cli message" JSONs here in src/call.rs. And then the "offline transactions/messages" feature of tonos-cli is not working.
Steps to reproduce the issue
Run tonos-cli message <wallet_address> submitTransaction '{"dest":"<wallet_address>","value":1000000000,"bounce":true,"allBalance":false,"payload":""}' --abi SafeMultisigWallet.abi.json --sign wallet-key.json --lifetime 3600 (as per the docs: https://docs.ton.dev/86757ecb2/p/94921e-multisignature-wallet-management-in-tonos-cli/t/364e69 "4.8. Create new transaction offline")
Issue description
There is the inconsistent packing/unpacking of "tonos-cli message" JSONs here in src/call.rs. And then the "offline transactions/messages" feature of tonos-cli is not working.
Steps to reproduce the issue
tonos-cli message <wallet_address> submitTransaction '{"dest":"<wallet_address>","value":1000000000,"bounce":true,"allBalance":false,"payload":""}' --abi SafeMultisigWallet.abi.json --sign wallet-key.json --lifetime 3600
(as per the docs: https://docs.ton.dev/86757ecb2/p/94921e-multisignature-wallet-management-in-tonos-cli/t/364e69 "4.8. Create new transaction offline")tonos-cli send --abi SafeMultisigWallet.abi.json '<message_body>'
(as per the docs: https://docs.ton.dev/86757ecb2/p/94921e-multisignature-wallet-management-in-tonos-cli/t/364e69 "4.10. Broadcast previously generated message")What's the expected result?
And the transaction message is sent to the network.
What's the actual result?
And the transaction message is not sent to the network.
Additional details
Please note the difference in
pack_message
: https://github.com/tonlabs/tonos-cli/blob/90c1385039dc08737c737341b2fef570a556f703/src/call.rs#L112-L119 Andunpack_message
: https://github.com/tonlabs/tonos-cli/blob/90c1385039dc08737c737341b2fef570a556f703/src/call.rs#L144-L145unpack_message
expectsmsg->address
field in JSON here: https://github.com/tonlabs/tonos-cli/blob/90c1385039dc08737c737341b2fef570a556f703/src/call.rs#L144, while thepack_message
method is not providing it.This commit added the "address" JSON field packing/unpacking: https://github.com/tonlabs/tonos-cli/commit/577d54b756463140a156264a7e13eefee3a25576#diff-c5c022d135afc2c596bb0084c03b78ed And this commit removed the packing, but there is unpacking left: https://github.com/tonlabs/tonos-cli/commit/2ba9f080dedc81282e1ec97922a39358f0abd694#diff-c5c022d135afc2c596bb0084c03b78ed
Please make a decision - whether you need this field or not :)