Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd: Show ParaTime transaction details #24

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

matevz
Copy link
Member

@matevz matevz commented Feb 6, 2023

Fixes #8.

Depends on oasisprotocol/oasis-sdk#1269.

Before:

$ oasis accounts deposit 10 test:dave
Unlock your account.
? Passphrase: 
You are about to sign the following transaction:
{
  "v": 1,
  "call": {
    "method": "consensus.Deposit",
    "body": "omJ0b1UA7UP3UlAm/VN6C/UkSIt8VJ8DmCVmYW1vdW50gkiKxyMEiegAAEA="
  },
  "ai": {
    "si": [
      {
        "address_spec": {
          "signature": {
            "ed25519": "MJ2XCjkj132C9YWpDUSQFjkCTI8bSw8bi0w9EwwE1Bg="
          }
        },
        "nonce": 0
      }
    ],
    "fee": {
      "amount": {
        "Amount": "1131000000000000",
        "Denomination": ""
      },
      "gas": 11310,
      "consensus_messages": 1
    }
  }
}

Network:  testnet
Paratime: sapphire
Account:  test

After:

$ oasis accounts transfer 10 test:dave
Unlock your account.
? Passphrase: 
You are about to sign the following transaction:
Format: plain
Method: accounts.Transfer
Body:
  To: test:dave (oasis1qrk58a6j2qn065m6p06jgjyt032f7qucy5wqeqpt)
  Amount: 10.0 TEST
Authorized signer(s):
  1. MJ2XCjkj132C9YWpDUSQFjkCTI8bSw8bi0w9EwwE1Bg= (ed25519)
     Nonce: 0
Fee:
  Amount: 0.000231 TEST
  Gas limit: 2310
  (gas price: 0.0000001 TEST per gas unit)

Network:  testnet
ParaTime: sapphire
Account:  test

Before:

$ oasis tx show testtx2.json 
{
  "Body": "o2F2AWJhaaJic2mBomVub25jZQFsYWRkcmVzc19zcGVjoWlzaWduYXR1cmWhZ2VkMjU1MTlYIDXD8zVt2FNk/roDVLVFraEJ0b2zi/XWEmgX24xyz9aRY2ZlZaJjZ2FzAWZhbW91bnSCQEBkY2FsbKJkYm9keaJidG9VAMjQ9FnbOOXMMcp35m0sRFbcvrUCZmFtb3VudIJIDeC2s6dkAABAZm1ldGhvZHFhY2NvdW50cy5UcmFuc2Zlcg==",
  "AuthProofs": [
    {
      "signature": "mxOARaaRkHrHiUObGO2KbUXZhmbIS2h3hsRM+3Y/DzvMtbVdwcZm2EZ7oP7dR5XHKkrQnjMwZnkT0mdZUsLIBw=="
    }
  ]
}

Network:  testnet
ParaTime: sapphire

After:

$ oasis tx show testtx2.json 
Hash: 3013be1ba6e1ef17921382f01b53f519174b2f35753d1fc37ad11bfc382f51f5
Signer(s):
  1. NcPzNW3YU2T+ugNUtUWtoQnRvbOL9dYSaBfbjHLP1pE=
     (signature: mxOARaaRkHrHiUObGO2KbUXZhmbIS2h3hsRM+3Y/DzvMtbVdwcZm2EZ7oP7dR5XHKkrQnjMwZnkT0mdZUsLIBw==)
Content:
  Format: plain
  Method: accounts.Transfer
  Body:
    To: test:bob (oasis1qrydpazemvuwtnp3efm7vmfvg3tde044qg6cxwzx)
    Amount: 1.0 TEST
  Authorized signer(s):
    1. NcPzNW3YU2T+ugNUtUWtoQnRvbOL9dYSaBfbjHLP1pE= (ed25519)
       Nonce: 1
  Fee:
    Amount: 0.0 TEST
    Gas limit: 1
    (gas price: 0.0 TEST per gas unit)

Network:  testnet
ParaTime: sapphire

cmd/common/transaction.go Outdated Show resolved Hide resolved
@matevz matevz force-pushed the matevz/show-paratime-tx-details branch from e742fb0 to 81abdb2 Compare February 21, 2023 13:36
cmd/common/transaction.go Outdated Show resolved Hide resolved
cmd/common/transaction.go Outdated Show resolved Hide resolved
@matevz matevz force-pushed the matevz/show-paratime-tx-details branch 2 times, most recently from 6e789b1 to f27c8b2 Compare March 2, 2023 22:24
@matevz matevz force-pushed the matevz/show-paratime-tx-details branch 5 times, most recently from 2e464f0 to 7ea8bbd Compare March 13, 2023 16:27
cmd/common/transaction.go Outdated Show resolved Hide resolved
@matevz matevz force-pushed the matevz/show-paratime-tx-details branch from 7ea8bbd to c10ca74 Compare March 14, 2023 10:08
@matevz matevz enabled auto-merge March 14, 2023 10:09
@matevz matevz merged commit 183fd65 into master Mar 14, 2023
@matevz matevz deleted the matevz/show-paratime-tx-details branch March 14, 2023 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show ParaTime transaction details
2 participants