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

Update tx view to render inline datums and reference inputs #4089

Merged
merged 2 commits into from
Jun 24, 2022

Conversation

Jimbo4350
Copy link
Contributor

@Jimbo4350 Jimbo4350 commented Jun 23, 2022

Resolves: #4045 and #4039

cardano-node --version
cardano-node 1.35.0 - linux-x86_64 - ghc-8.10
git rev 9d59676141f9a0210a964191cb5f64f0d68d4d0c

cardano-cli transaction build --babbage-era --testnet-magic 42 \
--tx-in 242ebe529d8a2834f00343113a0c32243729be8f946c9d6ea5663b21aa32aff0#1 \
--tx-in-script-file typedGuessGame.plutus \
--tx-in-inline-datum-present \
--tx-in-redeemer-file rightGuess.json \
--tx-in-collateral 242ebe529d8a2834f00343113a0c32243729be8f946c9d6ea5663b21aa32aff0#0 \
--change-address $(cat utxo-keys/utxo1.addr) \
--protocol-params-file pparams.json \
--out-file utxo-keys/tx.body

cardano-cli transaction view --tx-body-file utxo-keys/tx.body 
auxiliary scripts: null
certificates: null
collateral inputs: []
era: Babbage
fee: 166249 Lovelace
inputs:
- c162401b82dbd05cfc9f4fbd31c84cc124db494cb8a5c605039d4afb5cc640b3#0
metadata: null
mint: null
outputs:
- address: addr_test1vqkutxhel46zttgp5mtlndaasaakrd3amnupxnqagw6xzeq4d8c72
  address era: Shelley
  amount:
    lovelace: 899949833751
  datum: null
  network: Testnet
  payment credential key hash: 2dc59af9fd7425ad01a6d7f9b7bd877b61b63ddcf8134c1d43b46164
  reference script: null
  stake reference: null
- address: addr_test1wzrgg3gpqpgyyuxrk69j0tr0t6wujgegd05v8rcaerjujqcq0znk8
  address era: Shelley
  amount:
    lovelace: 50000000
  datum:
    constructor: 0
    fields:
    - int: 42
  network: Testnet
  payment credential script hash: 8684450100504270c3b68b27ac6f5e9dc923286be8c38f1dc8e5c903
  reference script: null
  stake reference: null
reference inputs: []
required signers (payment key hashes needed for scripts): null
update proposal: null
validity range:
  lower bound: null
  upper bound: null
withdrawals: null

@@ -452,6 +456,10 @@ friendlyAuxScripts = \case
TxAuxScriptsNone -> Null
TxAuxScripts _ scripts -> String $ textShow scripts

friendlyReferenceInputs :: TxInsReference build era -> Aeson.Value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

json = friendly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently. I was just following the pattern implemented by Yuri. All of it needs to be refactored though.

Copy link
Contributor

@JaredCorduan JaredCorduan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Jimbo4350 Jimbo4350 force-pushed the jordan/update-tx-view-with-inline-datums-ref-inputs branch from a870281 to 76d2bc5 Compare June 24, 2022 16:41
@Jimbo4350
Copy link
Contributor Author

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jun 24, 2022

Build succeeded:

@iohk-bors iohk-bors bot merged commit 9d59676 into master Jun 24, 2022
@iohk-bors iohk-bors bot deleted the jordan/update-tx-view-with-inline-datums-ref-inputs branch June 24, 2022 20:01
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.

[FR] - transaction view doesn't show reference inputs
3 participants