op return – How can I acknowledge an OP_RETURN transaction trying solely on the hex?

on

|

views

and

comments


You need to use bitcoin-cli to decode the transaction and get a way of what’s going on:

bitcoin-cli decoderawtransaction 0100000000010173...275d9a2100000000

That returns:

{
  "txid": "00fddd900b735a88ab0ef5eeaa3efbc869d4e52493da8a9467ec782355cb39ff",
  "hash": "b4c4817e908d9ba317e9b1a08180b51c0ce77adca946e7f894560fb07447acf8",
  "model": 1,
  "measurement": 246,
  "vsize": 195,
  "weight": 780,
  "locktime": 0,
  "vin": [
    {
      "txid": "d6d23dff986dc84f4ebaf0394e69273faac76551885c8ad26236a838fbeaa973",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "7ac1f8560a33867cdfa3ad136488ed7f4f5d1f4fc6a32822d8dd6c5e47e9317f0f2a4381349a803d223773711d6df8303e9c23e60782633450c735b2275d9a21"
      ],
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 0.00000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_RETURN 4575726f7065206973207469726564206f66206265696e67207375627365727669656e7420746f207468652055532e204c6f6e67206c6976652052757373696120f09f87b7f09f87ba",
        "desc": "raw(6a494575726f7065206973207469726564206f66206265696e67207375627365727669656e7420746f207468652055532e204c6f6e67206c6976652052757373696120f09f87b7f09f87ba)#vxme4rep",
        "hex": "6a494575726f7065206973207469726564206f66206265696e67207375627365727669656e7420746f207468652055532e204c6f6e67206c6976652052757373696120f09f87b7f09f87ba",
        "type": "nulldata"
      }
    },
    {
      "value": 0.00431146,
      "n": 1,
      "scriptPubKey": {
        "asm": "1 3e4c971ecd3ad020833cbd4b2ecdf1f229d430dfa48adc3203f5f79c801dfb99",
        "desc": "rawtr(3e4c971ecd3ad020833cbd4b2ecdf1f229d430dfa48adc3203f5f79c801dfb99)#nkpjq33l",
        "hex": "51203e4c971ecd3ad020833cbd4b2ecdf1f229d430dfa48adc3203f5f79c801dfb99",
        "address": "bcrt1p8exfw8kd8tgzpqeuh49jan037g5agvxl5j9dcvsr7hmeeqqalwvs884ffw",
        "type": "witness_v1_taproot"
      }
    }
  ]
}

You possibly can see how, within the output part of the transaction, the primary output is an OP_RETURN output, and that the info related to it’s:

4575726f7065206973207469726564206f66206265696e67207375627365727669656e7420746f207468652055532e204c6f6e67206c6976652052757373696120f09f87b7f09f87ba

Additionally, discover how the OP_RETURN opcode is 0x6a (you may verify the bitcoin wiki for that).

Subsequently, the piece you are searching for contained in the hex transaction is:

6a494575726f7065206973207469726564206f66206265696e67207375627365727669656e7420746f207468652055532e204c6f6e67206c6976652052757373696120f09f87b7f09f87ba

You may additionally discover there may be an extra byte of knowledge between the OP_RETURN opocode and the info: 0x49. That is the dimensions of the related knowledge in bytes (encoded in hex). 49 hex equals 73 dec, so the size is 73 bytes or 146 hex characters.

Share this
Tags

Must-read

Waymo raises $16bn to gas international robotaxi enlargement | Know-how

Self-driving automobile firm Waymo on Monday stated it raised $16bn in a funding spherical that valued the Alphabet subsidiary at $126bn.Waymo co-chief executives...

Self-driving taxis are coming to London – ought to we be anxious? | Jack Stilgoe

At the top of the nineteenth century, the world’s main cities had an issue. The streets had been flooded with manure, the unintended...

US regulators open inquiry into Waymo self-driving automobile that struck youngster in California | Expertise

The US’s federal transportation regulator stated Thursday it had opened an investigation after a Waymo self-driving car struck a toddler close to an...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here