rooch-network / rooch

VApp Container with Move Language for Bitcoin ecosystem
https://rooch.network
Apache License 2.0
162 stars 85 forks source link

[cli] Display the transaction info when sign tx #2619

Closed vegetabledogdog closed 2 months ago

vegetabledogdog commented 2 months ago

The readability of the args of the function is not good.

rooch tx sign /tmp/6716d5ff7ff8fe42.rtd
Transaction data:
 Sender: rooch1xm3k80jyqh9hf5m8vjm4xjcna99xx0vrjyylzts3zmuks379kzusp270zj
 Sequence number: 0
 Chain id: 4
 Max gas amount: 100000000
 Action: MoveAction::FunctionCall( function_id: 0x0000000000000000000000000000000000000000000000000000000000000003::gas_coin::faucet_entry,  type_args: [], args: ["0x00e40b5402000000000000000000000000000000000000000000000000000000"])
 Transaction hash: 0x6716…5efb

Do you want to sign this transaction? [yes/no] > 
y
Signed transaction is written to "/tmp/6716d5ff7ff8fe42.srt"
You can submit the transaction with `rooch tx submit /tmp/6716d5ff7ff8fe42.srt`
Partially signed transaction data:
 Sender: rooch14gjawvfc9spxrnrdcuwhv2vlt39dt7fs6w78d4d0j8zmyrjqk32saxxg8t
 Sequence number: 0
 Chain id: 4
 Max gas amount: 100000000
 Action: MoveAction::FunctionCall( function_id: 0x0000000000000000000000000000000000000000000000000000000000000003::empty::empty,  type_args: [], args: [])
 Transaction hash: 0xcc78…648a
 Collected signatures: 1/2

Do you want to sign this transaction? [yes/no] > 
y
Signed transaction is written to "/tmp/cc7808a8f3f8fa1f.srt"
You can submit the transaction with `rooch tx submit /tmp/cc7808a8f3f8fa1f.srt`
vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rooch-portal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 5:22am
rooch-portal-v2.1 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 5:22am
1 Skipped Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **rooch** | ⬜️ Ignored ([Inspect](https://vercel.com/rooch/rooch/4gfZV7imeqKgK7bPnZHYhpp1fYYR)) | [Visit Preview](https://rooch-git-fork-vegetabledogdog-cli-rooch.vercel.app) | | Sep 12, 2024 5:22am |
jolestar commented 2 months ago

The rooch bitcoin sign-tx also needs this option. It can be in a new PR.