Multiple amounts support for multi-recipients transactions
Two solutions for CLI:
-
--amount1
--output1
,--amount2
--output2
,…--amountn
--outputn
pubkey1!pubkey_checksum1?amount1:pubkey2!pubkey_checksum2?amount2
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Moul changed the description
changed the description
- Moul mentioned in issue #234 (closed)
mentioned in issue #234 (closed)
- matograine assigned to @matograine
assigned to @matograine
- Moul changed title from Allow specifying different amounts for multi-output transactions to Allow to specify different amounts for multi-output transactions
changed title from Allow specifying different amounts for multi-output transactions to Allow to specify different amounts for multi-output transactions
- Maintainer
I think of another structure, maybe less human-friendly :
--output <output1>:<output2>:<output3> --amount <amount1>:<amount2>:<amount3>
With a function checking that the outputs number and the amounts number match.
Edited by matograine - Maintainer
OK, I'll use the syntax :
silkaj tx --output <pubkey1>:<pubkey2>:... --amount(UD) <amount1>:<amount2>:...
I think it is more adapted for scripts. I keep the feature
--output <pubkey1>:<pubkey2> --amount(UD) <amount>
to send the same amount to many recipients.
However, the confirmation table looks quite big for a single tx :
╒════════════════════════════╤══════════════════════════════════════════════╕ │ pubkey’s balance before tx │ 2278.02 ĞTest │ ├────────────────────────────┼──────────────────────────────────────────────┤ │ total amount (unit) │ 15.7 ĞTest │ ├────────────────────────────┼──────────────────────────────────────────────┤ │ total amount (relative) │ 0.018 UD ĞTest │ ├────────────────────────────┼──────────────────────────────────────────────┤ │ pubkey’s balance after tx │ 2262.32 ĞTest │ ├────────────────────────────┼──────────────────────────────────────────────┤ │ from (pubkey) │ 3i7jBZz1bYVTtao3C6e7cN21JHYjHCDR9pKeReE4rdVe │ ├────────────────────────────┼──────────────────────────────────────────────┤ │ to (pubkey) │ d88fPFbDdJXJANHH7hedFMaRyGcnVZj9c5cDaE76LRN │ ├────────────────────────────┼──────────────────────────────────────────────┤ │ to (id) │ matograine-G1Test │ ├────────────────────────────┼──────────────────────────────────────────────┤ │ amount (unit) │ 8.7 ĞTest │ ├────────────────────────────┼──────────────────────────────────────────────┤ │ amount (relative) │ 0.01 UD ĞTest │ ├────────────────────────────┼──────────────────────────────────────────────┤ │ to (pubkey) │ 5tKxzdi43AKPnYb4Bzjs1LZecceouvJ3ZaCrFTde2chf │ ├────────────────────────────┼──────────────────────────────────────────────┤ │ amount (unit) │ 2.6 ĞTest │ ├────────────────────────────┼──────────────────────────────────────────────┤ │ amount (relative) │ 0.003 UD ĞTest │ ├────────────────────────────┼──────────────────────────────────────────────┤ │ to (pubkey) │ BpERUYSfdzFPGWuE1y3VoHxamnTnK4Q6dZTNbaSkL1j3 │ ├────────────────────────────┼──────────────────────────────────────────────┤ │ amount (unit) │ 4.4 ĞTest │ ├────────────────────────────┼──────────────────────────────────────────────┤ │ amount (relative) │ 0.005 UD ĞTest │ ├────────────────────────────┼──────────────────────────────────────────────┤ │ comment │ BABA YAGA │ ╘════════════════════════════╧══════════════════════════════════════════════╛
I'd like to make it lighter :
╒════════════════════════════════╤══════════════════════════════════════════════╕ │ pubkey’s balance before tx │ 2272.32 ĞTest │ ├────────────────────────────────┼──────────────────────────────────────────────┤ │ total amount (unit | relative) │ 15.7 ĞTest || 0.018 UD │ ├────────────────────────────────┼──────────────────────────────────────────────┤ │ pubkey’s balance after tx │ 2256.62 ĞTest │ ├────────────────────────────────┼──────────────────────────────────────────────┤ │ from (pubkey) │ 3i7jBZz1bYVTtao3C6e7cN21JHYjHCDR9pKeReE4rdVe │ ├────────────────────────────────┼──────────────────────────────────────────────┤ │ to (pubkey) │ d88fPFbDdJXJANHH7hedFMaRyGcnVZj9c5cDaE76LRN │ ├────────────────────────────────┼──────────────────────────────────────────────┤ │ to (id) │ matograine-G1Test │ ├────────────────────────────────┼──────────────────────────────────────────────┤ │ amount (unit | relative) │ 8.7 ĞTest || 0.01 UD │ ├────────────────────────────────┼──────────────────────────────────────────────┤ │ to (pubkey) │ 5tKxzdi43AKPnYb4Bzjs1LZecceouvJ3ZaCrFTde2chf │ ├────────────────────────────────┼──────────────────────────────────────────────┤ │ amount (unit | relative) │ 2.6 ĞTest || 0.003 UD │ ├────────────────────────────────┼──────────────────────────────────────────────┤ │ to (pubkey) │ BpERUYSfdzFPGWuE1y3VoHxamnTnK4Q6dZTNbaSkL1j3 │ ├────────────────────────────────┼──────────────────────────────────────────────┤ │ amount (unit | relative) │ 4.4 ĞTest || 0.005 UD │ ├────────────────────────────────┼──────────────────────────────────────────────┤ │ comment │ BABA YAGA │ ╘════════════════════════════════╧══════════════════════════════════════════════╛
What do you think ? Is there a good reason to separate the amount (unit) and the amount (UD) on two lines ?
Edited by matograine This CLI syntax looks great. You can go into this direction.
Concerning the display of the amounts in relative and absolute, there is no reason, except that features get piled up. And this improvement is a nice idea.
I would suggest you to open a new ticket to tackle it separetely as is it not linked to this ticket. And that would make things easier to treat it.
- matograine mentioned in issue #237 (closed)
mentioned in issue #237 (closed)
- Moul removed enhancement label
removed enhancement label
- matograine mentioned in merge request !105 (closed)
mentioned in merge request !105 (closed)
- matograine mentioned in issue #242 (closed)
mentioned in issue #242 (closed)
- matograine added Doing label
added Doing label
- matograine mentioned in issue #248 (closed)
mentioned in issue #248 (closed)
- matograine mentioned in merge request !108 (merged)
mentioned in merge request !108 (merged)
- matograine mentioned in commit 4405ee78
mentioned in commit 4405ee78
- matograine mentioned in commit fc2b73f0
mentioned in commit fc2b73f0
- matograine mentioned in commit 259af22f
mentioned in commit 259af22f
- matograine mentioned in commit 840d7352
mentioned in commit 840d7352