Skip to content
Snippets Groups Projects
  • View options
    • View options
  • Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    • Moul changed the description
    • Moul mentioned in issue #234 (closed)
    • Moul changed title from Allow specifying different amounts for multi-output transactions to Allow to specify different amounts for multi-output transactions
    • matograine
      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
    • 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
    • Moul
      Owner

      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.

    • Moul changed milestone to %0.8.0
    • Moul removed enhancement label
    • matograine mentioned in merge request !105 (closed)
    • matograine added Doing label
    • matograine mentioned in merge request !108 (merged)
    • matograine mentioned in commit 4405ee78
    • matograine mentioned in commit fc2b73f0
    • matograine mentioned in commit 259af22f
    • matograine mentioned in commit 840d7352