cardano-community/koios-artifacts

BUG: `tx_info` endpoint is missing spending datum in `plutus_contracts` list

fallen-icarus opened this issue · 5 comments

Describe the bug
In the preproduction transaction 27fedf54ffd8c907fb5e5231a4933a5fa84ae0585097478c5dbb7fbbfcb1578d, I executed a spending script with the hash d5aa5b3a201f619874373b381328443066e76a7506bb6a052b73d0e9. When I query the transaction using the tx_info endpoint, the plutus_contracts list has the spending script execution, but the datum field is null.

This is the exact query I used:

curl -X POST "https://preprod.koios.rest/api/v1/tx_info?select=plutus_contracts,inputs"  -H "accept: application/json" -H "content-type: application/json"  -d '{"_tx_hashes":["27fedf54ffd8c907fb5e5231a4933a5fa84ae0585097478c5dbb7fbbfcb1578d"]}'

The datum is correct in the inputs list of the response, and it says it is protected by the correct spending script.

To Reproduce
Execute the above query and see the discrepancy.

Expected behavior
The plutus_contracts list should have the correct datum for the spending script execution.

Additional context
I am trying to match up which redeemer was used for which input. Some inputs from the same script can use different redeemers in a single transaction so I need to be able to tell them apart in the plutus_contracts list. For my particular use case, the datums are all guaranteed to be unique so I am trying to use the datum to distinguish between executions.

However, being able to use the datums like this may not be possible for all use cases. Would it be possible to add the corresponding input's output reference to plutus_contract when a spending script is executed? Sorry about asking this question in this issue, but it is related to my use case. I currently use the datums to prevent double satisfaction which is why they are all unique. If I use another method in the future, I won't be able to easily tell spending script executions apart using the tx_info endpoint.

Hi,
Just to be sure (havent looked deeper at tx itself):
You're expecting plutus_contracts => input => datum to be not null in this case and use 5f7a1a192023e0219912b1b5b37cfb51da56f66cf13d7779113829b3556d8915 , while plutus_contracts => input => redeemer => datum is correct?

Yup, that is correct. According to the documentation, it should have both the datum hash and the value. For reference, here is a query for a different transaction that I believe has it correct:

curl -X POST "https://preprod.koios.rest/api/v1/tx_info?select=plutus_contracts,inputs"  -H "accept: application/json" -H "content-type: application/json"  -d '{"_tx_hashes":["b0c01d20f93919a725c2382cc7f0386f8cb76724d10c72f2ee672d12c9d0f2ec"]}'

It seems the spending datum is only missing for some transactions.

Pushed the change suggested by @Scitz0 to v1.1.1rc, sample result:

curl -X POST "http://127.0.0.1:8053/api/v1/tx_info?select=plutus_contracts"  -H "accept: application/json" -H "content-type: application/json"  -d '{"_tx_hashes":["27fedf54ffd8c907fb5e5231a4933a5fa84ae0585097478c5dbb7fbbfcb1578d"]}'
[
  {
    "plutus_contracts": [
      {
        "size": 5030,
        "input": {
          "datum": {
            "hash": "5f7a1a192023e0219912b1b5b37cfb51da56f66cf13d7779113829b3556d8915",
            "value": {
              "fields": [
                {
                  "bytes": "ba42442d92fbdab9f1fcf814313b7df4cf19100d620a3f963c1de128"
                },
                {
                  "bytes": "d3df1218bfec0da007e87ea80ee8697588340232b04e156712b91ade"
                },
                {
                  "bytes": "c4a151fcb59347b845f9c31e609f642eba94c3ae2cace75e08a75555"
                },
                {
                  "bytes": "41a751eddf4ac95a18879745df778342586e13e86d1b64e014a3ae47"
                },
                {
                  "bytes": "3cefec09a27b6894e2ed9a78b9cc01f083973d7c0afb8cec8bda33fa"
                },
                {
                  "fields": [
                    {
                      "fields": [
                        {
                          "bytes": "ae0d001455a855e6c00f98fa9061028f5c00d297926383bc501be2d2"
                        }
                      ],
                      "constructor": 0
                    },
                    {
                      "fields": [],
                      "constructor": 1
                    }
                  ],
                  "constructor": 0
                },
                {
                  "list": [
                    {
                      "bytes": ""
                    },
                    {
                      "bytes": ""
                    }
                  ]
                },
                {
                  "bytes": "80d298c9f240900f00b327f5b611dc41aa785788d6fd3edbe35812ca88f02e9a"
                },
                {
                  "int": 10000000
                },
                {
                  "fields": [
                    {
                      "int": 1200000
                    }
                  ],
                  "constructor": 0
                },
                {
                  "int": 1712851002000
                },
                {
                  "int": 3600000
                },
                {
                  "list": [
                    {
                      "int": 3602879701896397
                    },
                    {
                      "int": 36028797018963970
                    }
                  ]
                },
                {
                  "int": 2000000
                },
                {
                  "fields": [
                    {
                      "int": 500000
                    }
                  ],
                  "constructor": 1
                },
                {
                  "map": [
                    {
                      "k": {
                        "list": [
                          {
                            "bytes": "c0f8644a01a6bf5db02f4afe30d604975e63dd274f1098a1738e561d"
                          },
                          {
                            "bytes": "4f74686572546f6b656e0a"
                          }
                        ]
                      },
                      "v": {
                        "list": [
                          {
                            "int": 1
                          },
                          {
                            "int": 1000000
                          }
                        ]
                      }
                    },
                    {
                      "k": {
                        "list": [
                          {
                            "bytes": "c0f8644a01a6bf5db02f4afe30d604975e63dd274f1098a1738e561d"
                          },
                          {
                            "bytes": "54657374546f6b656e31"
                          }
                        ]
                      },
                      "v": {
                        "list": [
                          {
                            "int": 1
                          },
                          {
                            "int": 500000
                          }
                        ]
                      }
                    }
                  ]
                },
                {
                  "fields": [],
                  "constructor": 0
                },
                {
                  "int": 1712858202000
                },
                {
                  "int": 1712854602000
                },
                {
                  "list": [
                    {
                      "int": 3.096224743817216e+21
                    },
                    {
                      "int": 281474976710656
                    }
                  ]
                },
                {
                  "int": 0
                },
                {
                  "bytes": "0f7deb6eca31425e357b1a7a9284f0e60782f5b2a36c80c5ef4b89bcbc4b5ced"
                }
              ],
              "constructor": 2
            }
          },
          "redeemer": {
            "fee": "12376",
            "unit": {
              "mem": "148244",
              "steps": "53002179"
            },
            "datum": {
              "hash": "af952e804dd726526286f1656be98885e4ce479ebaab0f71346a8af51792da5e",
              "value": {
                "fields": [
                  {
                    "int": 4000000
                  }
                ],
                "constructor": 3
              }
            },
            "purpose": "spend"
          }
        },
        "address": "addr_test1zr265ke6yq0krxr5xuansyeggscxdem2w5rtk6s99deap6fualkqngnmdz2w9mv60zuucq0sswtn6lq2lwxwez76x0aqlgq56x",
        "bytecode": "5913a30100003232323232323232323222232323232533300a3232323232323253330113370e90000038991919191919191919191919191919191919299981199b8748008c08803c4c8c8c94ccc098cdc3a4000604a002264646464646464646464646464a66606666e2120003330240050014890341736b00153330333370e9000181900109919299981a99b8748000c0d00044cc0a12413b4e65676f74696174696f6e20626561636f6e20736372697074206e6f7420657865637574656420776974682070726f7065722072656465656d6572003330290133374a90001981d181d9819800a5eb8000c58c0e8004c0c4008584cc09924118426f72726f77657220646964206e6f7420617070726f7665003330280020160133253330333370e900000089bae303930310301533034491175554784f206973206e6f7420616e2041736b205554784f0016303102f30370013037001302d0033756606800260680046064002605200260600026060002604c002605a00260480022c6602a01e0026054002604201e2c6eacc0a0004c0a0008dd61813000981300098128011bab30230013023001302200130210013020001301f001301e002375860380026026006603400260340046030002601e0182a66602266e1d2002007132323232323232323232323232323232323253330233370e900118110078991919299981319b8748000c0940044c8c8c8c8c8c8c8c8c8c8c8c8c8c8c94ccc0d4cdc42400066604c00e004911054f666665720013302849013b4e65676f74696174696f6e20626561636f6e20736372697074206e6f7420657865637574656420776974682070726f7065722072656465656d6572003330290133374a90011981d1919299981b99b8f002488101000013374a90001981e1ba90014bd700a99981b99b8f00248901010013374a90011981e1ba90014bd700b199b8c48008cdc09b8d00248008008ccdc6240009001000a5eb800084cc0a124118426f72726f77657220646964206e6f7420617070726f76650033302a004018015375c606e0046eb8c0d4004c94ccc0cccdc3a400400226466ec0c0e8004c0e8c0ecc0ec004c0c40c054cc0d12401195554784f206973206e6f7420616e204f66666572205554784f0016303102f30370013037001302d0033756606800260680046064002605200260600026060002604c002605a00260480022c6602a01e0026054002604201e2c6eacc0a0004c0a0008dd61813000981300098128011bab30230013023001302200130210013020001301f001301e002375860380026026006603400260340046030002601e018264a66602466e1d2004008132323232323232323232323232323253330213370e900118100060991980aa493641637469766520626561636f6e20736372697074206e6f7420657865637574656420776974682070726f7065722072656465656d6572003375e6602200466e9520003302730250014bd7019ba548000cc09ccdd2a40006604e604800297ae04bd7019299981119b87480000044c8cdd8181480098149815000981000f8a99981119b87480080044c8cdd8181480098149815000981000f8a99811a49205554784f206973206e6f7420616e2041736b206f72204f66666572205554784f0016302001e163756604c002604c002604a00260480026046002604400260420026040002603e002603c0026028006603600260360046032002602001a264a66602666e1d20060091323232323232323232323232533301f3370e9001180f0048998092481395061796d656e74206f6273657276657220736372697074206e6f7420657865637574656420776974682070726f7065722072656465656d6572003300d0013253330203370e900200089bae30263027301e01d153302149011a5554784f206973206e6f7420616e20416374697665205554784f0016301e01c163756604800260480026046002604400260420026040002603e002602a006603800260380046034002602201c2a66602666e1d20080091323232323232323232323232533301f3370e9001180f0048998092493a496e746572657374206f6273657276657220736372697074206e6f7420657865637574656420776974682070726f7065722072656465656d6572003300d0013253330203370e900200089bae302630273027301e01d153302149011a5554784f206973206e6f7420616e20416374697665205554784f0016301e01c163756604800260480026046002604400260420026040002603e002602a006603800260380046034002602201c2a66602666e1d200a009132323232323232323232323232323253330223370e9001181080609980aa493641637469766520626561636f6e20736372697074206e6f7420657865637574656420776974682070726f7065722072656465656d6572003375e6602200266e95200033027375264a66604666e1d20040011375c605260420402a660489211a5554784f206973206e6f7420616e20416374697665205554784f0016302101f4bd7019ba548000cc09d30103d87a80004bd700b1bab302700130270013026001302500130240013023001302200130210013020001301f0013015003301c001301c002301a001301100e153330133370e90060048991919191919191919191919299980f99b8748008c0780244cc049241404164647265737320757064617465206f6273657276657220736372697074206e6f7420657865637574656420776974682070726f7065722072656465656d6572003300d0013253330203370e900200089bae3026302730273027301e01d153302149011a5554784f206973206e6f7420616e20416374697665205554784f0016301e01c163756604800260480026046002604400260420026040002603e002602a006603800260380046034002602201c2646464646464646464646464646464646464a66604a66e1d2002302400f132323253330283370e90001813800899191919191919191919191919299981a99981a99299981d0008a5114a06464a66606e66e1d200200114bd6f7b63009bab303d30350023035001330270050014a09444cc0a12413641637469766520626561636f6e20736372697074206e6f7420657865637574656420776974682070726f7065722072656465656d6572003375e6604802266e9520003303a375200297ae03374a90001981d26103d87b80004bd7009981424923426f72726f7765722063726564656e7469616c20646964206e6f7420617070726f76650033302a0020160133253330353370e900200089bae303b303303215330364911a5554784f206973206e6f7420616e20416374697665205554784f0016303303130390013039001302f0033756606c002606c00460680026056002606400260640026050002605e002604c0022c6602e01e0026058002604601e2c6eacc0a8004c0a8008dd61814000981400098138011bab30250013025001302400130230013022001302100130200023758603c002602a006603800260380046034002602201c446464a66602c66e1d200000114a22940c050004c8c8cc004004010894ccc06c004530103d87a8000132323232533301b3375e00e004266e95200033020375000297ae0133006006003375a603a0066036004603e004603a00266e952000330193374a90011980c9ba90014bd7025eb8088c8cc00400400c894ccc0640045300103d87a800013232323253330193375e00e004266e9520003301e0014bd70099803003001980d801980c801180e801180d80091191980080080191299980c0008a60103d87a80001323253330163375e6038602800400a266e9520003301b0024bd70099802002000980e001180d000911191919299980a99b8748008004520001375a60366026004602600264a66602866e1d200200114c103d87a8000132323300100100222533301b00114c103d87a8000132323232533301b3371e014004266e95200033020375000297ae0133006006003375a603a0066eb8c06c008c07c008c074004dd5980d180900118090009980200180111191980080080191299980b0008a60103d87a800013232323253330163371e00e004266e9520003301b374c00297ae0133006006003375660300066eb8c058008c068008c060004894ccc03cccc03c005282511533010002100110012223232323253330133370e90000008a5114a06022002646600200200c44a66602e0022980103d87a80001323253330153232533301753330173375e00401029444cdd7801003899baf00100a14a06032006602e004266e9520003301a374e66034602e00466034603000497ae04bd70099802002000980d801180c80099ba548010cc054cdd2a40006602a66e95200233015375200497ae04bd7025eb80cdd2a4000660286ea40052f5c044464a66601e66e1d200200114a2264a66602066e1d20000021323253330123370e9000180880089919299980a19b8748000c04c0044c8c8cc004004024894ccc06c00452809919299980c99b8f00200514a2266008008002603e0046eb8c074004dd7180d1809000802980c8009808000801980b8009807002800899191980080080291299980b0008a50132323253330153375e00c00229444cc014014008c058008c068008c060004c054c034010c03400cc0240185261365632533300a3370e90000008a99980718040030a4c2c2a66601466e1d20020011533300e300800614985854ccc028cdc3a40080022a66601c601000c2930b0a99980519b87480180044c8c94ccc040c04c00852616375a6022002601000c2a66601466e1d200800113232323253330123015002149858dd6980980098098011bad301100130080061533300a3370e90050008a99980718040030a4c2c2a66601466e1d200c00113232323253330123015002132498c01c00c58dd698098009809801180880098040030a99980519b874803800454ccc038c0200185261616300800532323232533300c3370e9000000899191919191919191919191919191919299981018118010991924c6602a0044646eb8c088008dd71810000991bae302000a375c603c0122c6eacc084004c084008dd6980f800980f8011bad301d001301d002375c603600260360046466ec0c068004c068c06c004dd6180c800980c8011bae30170013017002375c602a002602a0046eb8c04c004c02802454ccc030cdc3a4004002264646464646464646464646464646464646464646464646464646464646464646464a666064606a004264646464646464931815803998158071191919191bad303b003375a6072004646eb8c0e800cdd7181c0011919bb0303c001303c303d001375860700046466ec0c0ec004c0ecc0f0004dd6181b0009814007991bad3035013375a6066024604e02a646eb8c0cc06cdd7181880d181380d8b181980098198011bad30310013031002375a605e002605e00466e1d200230293754605a002605a0046eacc0ac004c0ac008c0a4004c0a4008dd6981380098138011919bb03026001302630270013758604a002604a0046eb4c08c004c08c008c084004c084008dd6980f800980f8011bae301d001301d002323376060380026038603a0026eb0c06c004c06c008c064004c064008dd7180b800980b8011bae30150013015002375c602600260140122a66601866e1d200400113232323232323232323232323232323232323232323232323232323232323232323232323232323232323232533303c303f002132323232323232498c8dd698210061bad304000b33035012232323232375a608a0066eb4c10c008c8dd718220019bae30420023233760608c002608c608e0026eb0c108008c8cdd81822800982298230009bac3040001303201332375a607e02e6eb4c0f4058c0c406cc8dd7181e8109bae303b020303102116375c607a002607a0046eb4c0ec004c0ec008c8cdd8181d000981d181d8009bac30390013039002375a606e002606e0046eb4c0d4004c0d4008cdc3a4004605e6ea8c0cc004c0cc008dd598188009818801181780098178011bad302d001302d002323376060580026058605a0026eb0c0ac004c0ac008dd6981480098148011bad3027001302700230250013025002375a604600260460046eb8c084004c084008c8cdd81810000981018108009bac301f001301f002301d001301d002375c603600260360046eb8c064004c064008dd7180b800980b8011bae30150013015002375c602600260140122c6014010464a66601866e1d200000115333010300a00214985854ccc030cdc3a400400226464a666024602a0042930b1bad3013001300a0021533300c3370e9002000899192999809180a80109924c646eb4c048008dd698080008b1919bb03014001301430150013758602600260140042c6014002464a66601666e1d20000011323253330113014002149858dd6980900098048010a99980599b874800800454ccc03cc0240085261616300900122323300100100322533301000114984c8cc00c00cc050008c00cc0480048c94ccc024cdc3a4000002264646464a6660226028004264649319299980799b87480000044c8c94ccc054c0600084c9263253330123370e900000089919299980c180d80109924c601c0022c603200260200042a66602466e1d20020011323232323232533301c301f002149858dd6980e800980e8011bad301b001301b002375a603200260200042c60200022c602c002601a0062a66601e66e1d200200115333013300d00314985858c034008c01c00c58c048004c048008c040004c01c00858c01c0048c94ccc020cdc3a400000226464a66601c60220042930b1bae300f0013006002153330083370e900100089919299980718088010a4c2c6eb8c03c004c01800858c0180048c018dd5000918021baa0015734ae7155ceaab9e5573eae815d0aba21",
        "script_hash": "d5aa5b3a201f619874373b381328443066e76a7506bb6a052b73d0e9",
        "valid_contract": true
      },
      {
        "size": 8652,
        "input": {
          "datum": null,
          "redeemer": {
            "fee": "91791",
            "unit": {
              "mem": "1072192",
              "steps": "415055739"
            },
            "datum": {
              "hash": "923918e403bf43c34b4ef6b48eb2ee04babed17320d8d1b9ff9ad086e86f44ec",
              "value": {
                "fields": [],
                "constructor": 0
              }
            },
            "purpose": "reward"
          }
        },
        "address": null,
        "bytecode": "5921c9010000332323232323232323232232223253330083253330093370e900100089919191919299980719b8748018c0340044c8c94ccc040cdc3a4000601e0022944018c054004c030004010c04c004c04c004c02401454cc02d24146546869732072656465656d65722063616e206f6e6c79206265207573656420746f20726567697374657220746865207061796d656e74206f6273657276657220736372697074001630080031323232323232323232323232323232323232323232533301e3370e9002180e8090991919192999811199811000a504a22a6604692123426f72726f7765722063726564656e7469616c20646964206e6f7420617070726f766500100110013253330223370e90010008a5113253330233370e900000109919299981299b8748000c0900044c8c94ccc09ccdc3a4000604c002264646600200201c44a66605c00229404c8c94ccc0b0cdc78010028a511330040040013032002375c60600026eb8c0b4c094004014c0b0004c08c00400cc0a8004c08400c0044c8c8cc004004034894ccc0a40045280991919299981419baf00600114a226600a00a0046052004605a0046056002605060400046040002604c002604c0026038666464646464646464646464644464646464646464a66606666e1d20020011533034491174e6f207061796d656e7420696e7075747320666f756e64001613232323253330373370e900100088018991919191919191929998218008a99820248118426f72726f7765724964287329206e6f74206275726e6564001613253330440011323232533304333020490118426f72726f7765724964287329206e6f74206275726e65640053330433371e00200c266e1c008cdc0a40000142940403c58dd718220011bad304400130460021533041490125426f72726f7765724964287329206e6f74206275726e656420696e2069736f6c6174696f6e00163046001323253330403370e90010008a5eb7bdb1804dd59823181f001181f0009980c00a0019bae30430013043002375c608200260820046eb4c0fc004dd6181f000981a801181a8009919999800800803802812a60103d87a800022222323232323253330430020011323253330450051533304500600313232323232323232323232323232323232323232323232323232323232323232533306153330613375e03a05a266ebc06400c5280991919192999832807899299983319b87480080044ccccc0c40c40992f5c004866e9520003306b374e660d698010101003306b3752030660d66ea40492f5c097ae0132323232323232533306d3304a4912b46756c6c207061796d656e7420666f756e6420666f72206120646966666572656e7420626f72726f77657200533306d3371e00603e266e3c00406452809999981c01c016a5eb800accdd2a4000660e46e9ccc1c8dd419b8000548008cc1c8dd4801998391ba90014bd7025eb8058dd7183900098390011bae30700013070002375a60dc0026eb0c1b4004c1900b4c1900b054ccc194cc109240119546f6f206d75636820636f6c6c61746572616c2074616b656e003371266e08018cdc080100099b823370400401a00a26666606006004a97ae002302c16375a60ce0046eb4c194004cccc0e40200040592f7b630101000001010000333333303c01b01701301100f00d33306100b4a09444ccccc0b00b00ad2f5c003e0506eb4c18c010dd69830801983200098320011919bb0306300130633064001375860c400260c40046eacc180004c180008dd6982f000982f00119b8748008c160dd5182e000982e0011bae305a001305a002375c60b000260b00046eb8c158004c158008dd7182a000982a00119b8748008c138dd5182900098290011bab3050001304700a304e001304e00237566098002609800460940026082004609200e608e00c006608e006608a004264a6660860042a66608600600226464a66608a00c00626464646464646464646464646464646464646464a6660aaa6660aa66ebc0440244cdd780699ba548010cc168c8dd39982d982c0009982d982c800a5eb80cdd81ba900b375200a97ae014a02a6660aa660649212d4c656e646572207061796d656e7420616d6f756e7420646f6573206e6f74206d617463682072656465656d6572003371200666605a01e00400226666604004097ae001501301c161333330200204bd7000f00980e1bae3057006375c60aa00a6eb4c160004c160008dd7182b000982b0011919bb0305500130553056001375860a800260a800460a400260a40046eb8c140004c11c028c138004c138008dd59826000982600118250009820801182480398238031823802182280180089929998218010008991929998228028018991929998238040028991919191919191919191919191919191919191919191919191919191919191919191919191919191919192999837299983719baf02803a13375e04801c29404c8c8c8c94ccc1c80684c94ccc1cccdc3a400400226666607c07c06607805e66e95200033078374e660f09801010100330783752046660f06ea40752f5c097ae0132323232323232533307a330574912b46756c6c207061796d656e7420666f756e6420666f72206120646966666572656e7420626f72726f77657200533307a3371e006054266e3c00409052809999982282281d02181b19ba548000cc1fcdd39983f9ba83370000a90011983f9ba90033307f375200297ae04bd700b1bae307f001307f002375c60fa00260fa0046eb4c1ec004dd6183d000983881d183881c8a99983919827a4919546f6f206d75636820636f6c6c61746572616c2074616b656e003371266e08044cdc080100099b823370400403002026666607a07a06407605c0722c6eb4c1d0008dd698390009999823009800810a5ef6c60101000001010000333333304902602201e01c01a01833306e0164a094454ccc1b94ccc1b8cdd7814004899baf0243374a900219839991ba73307430710013307430720014bd7019bb0375203c6ea40152f5c0294054ccc1b8cc12d2412d4c656e646572207061796d656e7420616d6f756e7420646f6573206e6f74206d617463682072656465656d6572003371200666608c04c00400226666607207207005805406a2c26666607207207006e05406a6eb8c1c0018dd718370029bad30710013071002375c60de00260de0046466ec0c1b8004c1b8c1bc004dd6183680098368011835800983580098308111bad3065004375a60c600660cc00260cc0046466ec0c194004c194c198004dd6183200098320011bab30620013062002375a60c000260c000466e1d2002305a375460bc00260bc0046eb8c170004c170008dd7182d000982d0011bae30580013058002375c60ac00260ac00466e1d20023050375460a800260a80046eacc148004c124030c140004c140008dd5982700098270011826000982180118258049824804182480318238029823801982280109929998218010a99982180188030008008a9981fa4811e4e6f7420616c6c207265717569726564206f75747075747320666f756e640016375860860066eb0c108c10c008dd61820982118210009981f9ba70043303f374e0066607e6e9c0092f5c06074002606200c606200a6eb0c0dc004c0dc008dd6181a800981a801181980099199980080080f80825eb8503d87a800081018000810180001111191919191919191919299981e801000899191919191919191919191919192999825808807899191919299982599b8748008c1280044c8c94ccc134cdd780399ba548008cc148dd4824a5eb8054ccc134cc0a92412d416c6c206c6f616e20696e70757473206d75737420626520666f72207468652073616d6520626f72726f7765720032533304e3370e90010008a5113375e01c60a8609803c609803a2a66609a6605492127496e7075747320617265206e6f7420696e206c657869636f67726170686963616c206f72646572003375e02200226464a66609e66e1d20060011323232333302602601800a330573374a90001982b80925eb80cc15cdd3998158101982b982a000a5eb80cc15cdd39981580f1982b982a800a5eb812f5c06464a6660a666e1d20040011323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232533308301330604910f4c6f616e206973206578706972656400337120020162a66610602660c09201314e65787420696e74657265737420616e642f6f722070656e616c7479206170706c69636174696f6e207265717569726564005333083015333083013370e0089000099baf0134c103d879800014a029444c94ccc21004cdc3a400400229444cdc480119b8001c375a61140261040203c61040203a26466ec0cdd2a400066112026e98048cc22404ccc2100404130103d87a80004c0103d87980003308901375206066112026ea4018cc22404dd481119844809ba90283308901333084010014c103d87a80004c0103d87980003308901375006866112026e98ccccccc17c1080480c00180880a12899844809ba7330890130860100a330890130870100a4bd70198448099ba548010cc22404cdd2a400866112026ea40c0cc22404dd481719844809ba902c3308901375205466112026ea40a0cc22404098cc22404dd39984480984300812198448098438081225eb80cc22404dd481119844809ba8020330890101e3308901375003866112026ea0068cc22404dd3998448098430080c198448098438080c25eb80cc22404dd400b198448080a19844809ba60123308901333084010104c103d87a80004c0103d87980003308901375001c66112026ea0030cc22404c8dd399845009843808009984500984400800a5eb80cdd81ba83370200666e080100d0dd400219844809ba83370001006866112026ea40192f5c097ae04bd7019ba548000cc22404dd4818198448081319844809ba7330890130860102433089013087010244bd7019844809ba90063308901375006897ae03371200466e080cc00c5858c94ccc20c04cdc3a40040022a66108029211f696e76616c69642d686572656166746572206e6f742073706563696669656400161375a6112026102020b06102020ae6eb4c20c0401cdd69841808031bad308101013375c6108020026108020046eb4c20804004c20804008c8cdd81840808009840809841008009bac308001001308001002375a60fc00260fc0046eb4c1f0004c1f0008cdc3a400460ec6ea8c1e8004c1e8008dd5983c000983c001183b000983b0011bad30740013074002323376060e600260e660e80026eb0c1c8004c1c8008dd6983800098380011bad306e001306e002306c001306c002375a60d400260d40046eb8c1a0004c1a0008c8cdd81833800983398340009bac3066001306600230640013064002375c60c400260c40046eb8c180004c180008dd7182f000982f0011bae305c001305c002375c60b400260a20042a660a89211b496e707574206973206e6f7420616e20416374697665205554784f001630510013253330523370e9002000899191900119299982a99b87480000044c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c94ccc1a4c1b00084c8c92633044002232375c60d60046eb8c1a4004c8dd718348051bae306700916375660d400260d40046eb4c1a0004c1a0008dd6983300098330011bae30640013064002323376060c600260c660c80026eb0c188004c188008dd7183000098300011bae305e001305e002375c60b800260a60042a6660aa66e1d2002001132323232323232323232323232323232323232323232323232323232323232323232533307b307e002132323232323232498c17401ccc1680388c8c8c8c8dd69842008019bad30820100232375c6106020066eb8c20404008c8cdd81842808009842809843008009bac3081010023233760610802002610802610a020026eb0c1fc004c17003cc8dd6983f0099bad307c012305901532375c60f80366eb8c1e8068c15806c58c1f0004c1f0008dd6983d000983d0011bad307800130780023370e900118391baa30760013076002375660e800260e800460e400260e40046eb4c1c0004c1c0008c8cdd81837800983798380009bac306e001306e002375a60d800260d800460d400260d40046eb4c1a0004c1a0008dd7183300098330011919bb0306500130653066001375860c800260c800460c400260c40046eb8c180004c180008dd7182f000982f0011bae305c0013053002153330553370e90020008991919191919191919191919191919191919191919191919191919191919191919191919191919191919191929998428098440080109919191919191924c646eb4c22c04030dd6984480805998320091191919191bad308e01003375a611802004646eb8c2340400cdd71845808011919bb0308f01001308f0130900100137586116020046466ec0c23804004c23804c23c04004dd61844808009833009991bad308801017375a610c0202c60c6036646eb8c21804084dd718420081018300108b1bae308601001308601002375a6108020026108020046466ec0c20c04004c20c04c21004004dd61841008009841008011bad308001001308001002375a60fc00260fc00466e1d20023078375460f800260f80046eacc1e8004c1e8008c1e0004c1e0008dd6983b000983b0011919bb0307500130753076001375860e800260e80046eb4c1c8004c1c8008dd698380009838001183700098370011bad306c001306c002375c60d400260d40046466ec0c1a4004c1a4c1a8004dd618340009834001183300098330011bae30640013064002375c60c400260c40046eb8c180004c180008dd7182f000982f0011bae305c00130530021630530013059001305000e153305349120416c6c20646174756d73206d75737420626520696e6c696e6520646174756d730016305000d375a60ac002609a00c2666604604602a00e040609a00a64a66609c66e1d200000115333052304c00514985854ccc138cdc3a40040022a6660a4609800a2930b0a99982719b874801000454ccc148c130014526161533304e3370e900300089919299982a182b8010a4c2c6eb4c154004c13001454ccc138cdc3a4010002264646464a6660ac60b20042930b1bad30570013057002375a60aa002609800a2a66609c66e1d200a00115333052304c00514985854ccc138cdc3a4018002264646464a6660ac60b20042649318188018b1bad305700130570023055001304c0051533304e3370e90070008a99982918260028a4c2c2c60980082c2c2a66609a64a66609c66e1d200000114a22940c13001c4cccc08408404c07c0784cccc08408404c014078c148004c12400404cc13000cc130008c13c048c134044c130004c10c014c128004c128008dd5982400098240011823000981e800982200098220011821000981c8011820801981f8010a99981e001080489999806006005981f8010049bac30390023756607200266ec0dd38041ba60073758607400260740046eb0c0e0004c0e0008c0d80048888c8cccc0040040140100088888c8c8c8c94ccc0e40080044c8c8c8c94ccc0f401c0144c8c8c8c8c8c8c8c94ccc104cdc3a40040022a6660826603c9211b436f6c6c61746572616c206973206e6f7420737761707061626c650053330413371266e04018029200014a2202c2666602802801600e66ec0dd419b8000400a375066e0000c0185854ccc104cdc3a40000022a6660826603c9211b436f6c6c61746572616c206973206e6f7420737761707061626c650001613333014014013007337606ea0010dd419b80003006161333301401400b012337606ea0cdc00020051ba8003303f00132323232323253330453370e90000008a60103d8798000153330453370e90020008a6103d87b80001323253330473370e90000008a6103d8798000153330473370e90020008a6103d87b800014c103d87a800030450013302100500330430013301f004002375c608a00c6eb8c10c014dd718218041bae3041007375a608201c6eb4c0fc034c8cdd81821800982198220009bac303e003375a607c0046082010607e00e6466ec0c0fc004c0fcc100004dd6181d0019bad303a002303d003303b00213253330390020011323232533303c0061333300b00b0024bd6f7b63019bb0375066e00dd6981d004000981d8040021bad303a002303d003303b00213253330390021533303900300113232323232533303a3301749011b436f6c6c61746572616c206973206e6f7420737761707061626c650000f1333300d00d4bd6f7b63000219bb037500046ea0cdc00008018b1bad303c009375a60740106eb4c0e8008c0f4010c0ec00c0044010dd5981a8011bab3035001337606e9800cdd3001111191919299981719b8748008004520001375a60686058004605800264a66605a66e1d200200114c103d87a8000132323300100100222533303400114c103d87a800013232323253330343371e014004266e95200033039375000297ae0133006006003375a606c0066eb8c0d0008c0e0008c0d8004dd598199815801181580099802801801111919800800801912999817800880189981818188009980100118190009119198008008019129998170008a6103d87a8000132323232533302e3371e00e004266e95200033033374c00297ae0133006006003375660600066eb8c0b8008c0c8008c0c00048888888c8c8c94ccc0bccc0312411c5061796d656e74205554784f206d697373696e6720626561636f6e73000011002163370e900118181baa30310023756605e0026466600200201097bdb18101a0000103d87980002225333033002100113330030033036002323232323253330343371e00801a2646464646464a6660740042a6660740062a6660740080022a66607400a2a66607401e2a66076921295554784f20646f6573206e6f7420686176652065786163746c79206f6e6520426f72726f776572496400161337606e98020ccc0e928a6103d87a80004c0103d8798000001001001132533303a0021533303a0031533303a0041533303a0051533303a00f1337606e98020ccc0e928a6103d87a80004c0103d8798000153303b4912946696e6973686564206c6f616e277320426f72726f7765724964206d757374206265206275726e65640016001001001001153303a491245554784f20646f6573206e6f7420686176652074686520726967687420626561636f6e7300163370e9001181d1baa303e0043370e9001181c9baa303d303e0033370e9001181c1baa303c303d303d0023370e9001181b9baa303b303c303c303c001323330010010044bd70903d87980008103d87980008103d87980008103d8798000111299981d80108008999801801981f00119191919191919191919299982099b8f00948906416374697665001330463330413301e491205554784f2068617320746f6f206d616e792041637469766520626561636f6e73003370e0109001260103d87a80004c0103d8798000330463330410054c0103d87a80004c0103d8798000330463330410034c0103d87a80004c0103d8798000330463330410014c0103d87a80004c0103d87980004bd700a99982099b8f0090181330463330410074c103d87a80004c0103d8798000330463330413301e49011f5554784f2068617320746f6f206d616e7920417373657420626561636f6e73003370e0109001260103d87a80004c0103d8798000330463330410034c0103d87a80004c0103d8798000330463330410014c0103d87a80004c0103d87980004bd700a99982099b8f0090171330463330410074c103d87a80004c0103d8798000330463330410054c0103d87a80004c0103d8798000330463330413370e010900126103d87a80004c0103d8798000330463330410014c0103d87a80004c0103d87980004bd700a99982099b8f0090191330463330410074c103d87a80004c0103d8798000330463330410054c0103d87a80004c0103d8798000330463330410034c0103d87a80004c0103d8798000330463330413301e4901195554784f2068617320746f6f206d616e79204c6f616e496473003370e0109001260103d87a80004c0103d87980004bd700a998212481255554784f20686173206120626561636f6e2077697468207468652077726f6e67206e616d6500163370e900118211baa304600130460023370e900118201baa304400130440023370e9001181f1baa304200130420053370e9001181e1baa3040004375a60780046eb8c0e8004c0f40084cdd81ba632333001001004003222533303b00210011333003003303e0023232323232533303c3370e90010008803099191919299982019b870024800040284cc114cdd8191ba73304630430013304630440014bd7019bb037520206ea4020dd419b833370400e0020040146eb4c108008dd698200009919bb0304400130443045001375860860026074004607400264646600200202c44a6660820022980103d87a800013232323253330413375e6e98cc1180092f5bded8c06e98cc11801d2f5bded8c0266e95200033046374e6608c60860026608c608800297ae04bd700998030030019919bb0304700130473048001375860860066466ec0c118004c118c11c004dd618208011822801182180099bb037520146ea4008dd6981e0011bae303a001303d0023330340014c103d87a80004c0103d87980003370e9001181a9baa3036005375660680086eacc0d0008dd71819000981a80111299981319b9000200114c0103d8798000153330263371e0040022980103d87a800014c103d87b80002253330253330250014a094454cc09800858400488c8cc00400400c894ccc0a800452613233003003302e0023003302c00123253330233370e9000000899191919299981598170010991924c64a66605266e1d200000113232533302f3032002132498c94ccc0b0cdc3a400000226464a666064606a0042649318080008b181980098150010a99981619b87480080044c8c8c8c8c8c94ccc0d8c0e400852616375a606e002606e0046eb4c0d4004c0d4008dd6981980098150010b18150008b181800098138018a99981499b874800800454ccc0b4c09c00c52616163027002300900316302c001302c002302a001302100216302100123253330223370e900000089919299981418158010a4c2c6eb4c0a4004c08000854ccc088cdc3a40040022a66604c60400042930b0b1810000919299981099b874800000454ccc094c07c00852616153330213370e900100089919299981398150010a4c2c6eb4c0a0004c07c00854ccc084cdc3a400800226464a66604e605400426493191bad3027002375a604a0022c6466ec0c0a4004c0a4c0a8004dd61814000980f8010b180f800919299981019b87480000044c8c94ccc098c0a400852616375c604e002603c0042a66604066e1d20020011323253330263029002149858dd71813800980f0010b180f00099198008008059129998120008a5eb7bdb1804c8c8c8c94ccc090cdc7a45000021003133029337606ea4008dd3000998030030019bab3026003375c60480046050004604c002646464646464a66604866e1d2002302300113374a90001981498151811000a5eb805300103d87a80003029001302000130270013027001301d006301d005163756604600260460046eb0c084004c084008c07c004c07c008dd5980e800980e800980e0011bab301a001301a00130190023758602e002602e002602c0046eb0c050004c02c00cc048004c048008c040004c01c00cc01c00c526136563253330083370e90000008a99980618030018a4c2c2a66601066e1d20020011533300c300600314985858c018008dd7000918031baa001230043754002ae695ce2ab9d5573caae7d5d02ba1574498011e581cd5aa5b3a201f619874373b381328443066e76a7506bb6a052b73d0e90001",
        "script_hash": "d3df1218bfec0da007e87ea80ee8697588340232b04e156712b91ade",
        "valid_contract": true
      }
    ]
  }
]

That solves my immediate issue. Thanks!

I am trying to match up which redeemer was used for which input. Some inputs from the same script can use different redeemers in a single transaction so I need to be able to tell them apart in the plutus_contracts list. For my particular use case, the datums are all guaranteed to be unique so I am trying to use the datum to distinguish between executions.

However, being able to use the datums like this may not be possible for all use cases. Would it be possible to add the corresponding input's output reference to plutus_contract when a spending script is executed? Sorry about asking this question in this issue, but it is related to my use case. I currently use the datums to prevent double satisfaction which is why they are all unique. If I use another method in the future, I won't be able to easily tell spending script executions apart using the tx_info endpoint.

Should I make this a separate feature request Issue?

Should I make this a separate feature request Issue?

Might be good, yes (would be great if can be with example of desired vs current) - I think our way forward is towards simplying (reducing overload) in the tx_info instead of adding more - except where that information is part of tx CBOR, as against that - would be easier to make such details on seperate endpoint that shows contract info alongwith corresponding input/output details where possible