Hans Schmidt :  Feb 1st 2021

hans_schm1dt@protonmail.com

Breakdown of a Ravencoin Asset Transfer Transaction

This document presents the raw transaction for an asset transfer on the Ravencoin testnet blockchain, and decodes the purpose of every byte in the transaction.

Note that asset operations are always encoded as extra information appended to the scriptPubKey of outputs having a value=0

For details about the Ravencoin asset operation encoding method, please see HERE

To see this particular transaction in an online Ravencoin blockchain explorer, please see HERE


Transaction ID (hash):
1cfac553cc7d70528775ce865436bc20d7f1beb69cae94e1089698941698f082




Raw Transaction:

0200000002696ef042e4ac0fe159ceb1282c41c69057368b21efd7cfdfe5f81bef7d5abd6e000000006b4830450221009ccdc7f50f9dd96ff9de374dbae93ac44a6799153b0c0aaacbf90af5de9191a002202914cea6ec22becf89acaca7522db96e22daffe8603db74d524dfed0d3fd7ed00121030c070f72421baea0272d00099480af8288890c8ecbc6f4016351d32cbb58a94afeffffff016b8aa576daf46a573a2efb99f76f8064e167620847cbf4a84e954a35a3f317030000006a473044022033f3b9d81aeb8fe8b8efaf5364fbc84d5165c620b8308fb2ee1e1078acbc174a0220753664bcd75b01629424718cd879eea11988acd98def4cd93863b30fc2fc517101210287bf8adbf3535eebe73937183499554a08df9652f27e15b7a0c027391fb3ce80feffffff0300000000000000003376a9143228f10a2ec7991be2df386cbe1a3658a071cac588acc01772766e740a544553545f544f4b454e00e40b54020000007534afee05000000001976a91495a69d8872bea6e25e5652f8ef062664b73d738d88ac00000000000000003376a91495a69d8872bea6e25e5652f8ef062664b73d738d88acc01772766e740a544553545f544f4b454e00046bf414000000759ceb0800




Transaction Structure
:

2 inputs:
0) the source of RVN for the transaction fees
1) the source of the asset tokens
3 output:
0) the target for the asset tokens   
1) change for the remaining RVN
2) the change back for the remaining assets
Note that asset operations are always encoded as extra information appended to the scriptPubKey of outputs having a value=0           




Decoded Transaction:


{
  "txid": "1cfac553cc7d70528775ce865436bc20d7f1beb69cae94e1089698941698f082",
  "hash": "1cfac553cc7d70528775ce865436bc20d7f1beb69cae94e1089698941698f082",
  "version": 2,
  "size": 459,
  "vsize": 459,
  "locktime": 584604,
  "vin": [
    {
      "txid": "6ebd5a7def1bf8e5dfcfd7ef218b365790c6412c28b1ce59e10face442f06e69",
      "vout": 0,
      "scriptSig": {
        "asm": "30450221009ccdc7f50f9dd96ff9de374dbae93ac44a6799153b0c0aaacbf90af5de9191a002202914cea6ec22becf89acaca7522db96e22daffe8603db74d524dfed0d3fd7ed0[ALL] 030c070f72421baea0272d00099480af8288890c8ecbc6f4016351d32cbb58a94a",
        "hex": "4830450221009ccdc7f50f9dd96ff9de374dbae93ac44a6799153b0c0aaacbf90af5de9191a002202914cea6ec22becf89acaca7522db96e22daffe8603db74d524dfed0d3fd7ed00121030c070f72421baea0272d00099480af8288890c8ecbc6f4016351d32cbb58a94a"
      },
      "sequence": 4294967294
    },
    {
      "txid": "17f3a3354a954ea8f4cb47086267e164806ff799fb2e3a576af4da76a58a6b01",
      "vout": 3,
      "scriptSig": {
        "asm": "3044022033f3b9d81aeb8fe8b8efaf5364fbc84d5165c620b8308fb2ee1e1078acbc174a0220753664bcd75b01629424718cd879eea11988acd98def4cd93863b30fc2fc5171[ALL] 0287bf8adbf3535eebe73937183499554a08df9652f27e15b7a0c027391fb3ce80",
        "hex": "473044022033f3b9d81aeb8fe8b8efaf5364fbc84d5165c620b8308fb2ee1e1078acbc174a0220753664bcd75b01629424718cd879eea11988acd98def4cd93863b30fc2fc517101210287bf8adbf3535eebe73937183499554a08df9652f27e15b7a0c027391fb3ce80"
      },
      "sequence": 4294967294
    }
  ],
  "vout": [
    {
      "value": 0.00000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 3228f10a2ec7991be2df386cbe1a3658a071cac5 OP_EQUALVERIFY OP_CHECKSIG OP_RVN_ASSET 1772766e740a544553545f544f4b454e00e40b540200000075",
        "hex": "76a9143228f10a2ec7991be2df386cbe1a3658a071cac588acc01772766e740a544553545f544f4b454e00e40b540200000075",
        "reqSigs": 1,
        "type": "transfer_asset",
        "asset": {
          "name": "TEST_TOKEN",
          "amount": 100.00000000
        },
        "addresses": [
          "mk6B8KEJDug4zKJMFzGvmwq4r5RasSkCoD"
        ]
      }
    },
    {
      "value": 0.99528500,
      "n": 1,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 95a69d8872bea6e25e5652f8ef062664b73d738d OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a91495a69d8872bea6e25e5652f8ef062664b73d738d88ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "muAEaGur5Wnc7WG8Wir9mfFbstVtKj1HUS"
        ]
      }
    },
    {
      "value": 0.00000000,
      "n": 2,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 95a69d8872bea6e25e5652f8ef062664b73d738d OP_EQUALVERIFY OP_CHECKSIG OP_RVN_ASSET 1772766e740a544553545f544f4b454e00046bf41400000075",
        "hex": "76a91495a69d8872bea6e25e5652f8ef062664b73d738d88acc01772766e740a544553545f544f4b454e00046bf41400000075",
        "reqSigs": 1,
        "type": "transfer_asset",
        "asset": {
          "name": "TEST_TOKEN",
          "amount": 900.00000000
        },
        "addresses": [
          "muAEaGur5Wnc7WG8Wir9mfFbstVtKj1HUS"
        ]
      }
    }
  ]
}







Detailed Transaction Description:


02000000    version type-2
02            the number of inputs
696ef042e4ac0fe159ceb1282c41c69057368b21efd7cfdfe5f81bef7d5abd6e        the reversed hash of the transaction for the first input

00000000    the output index of the first input (=0)
6b            the length of the scriptSig for the first input
The scriptSig for the first input:
4830450221009ccdc7f50f9dd96ff9de374dbae93ac44a6799153b0c0aaacbf90af5de9191a002202914cea6ec22becf89acaca7522db96e22daffe8603db74d524dfed0d3fd7ed00121030c070f72421baea0272d00099480af8288890c8ecbc6f4016351d32cbb58a94a
feffffff    reversed sequence code

016b8aa576daf46a573a2efb99f76f8064e167620847cbf4a84e954a35a3f317        the reversed hash of the transaction for the second input
03000000    the output index of the third input (=3)
6a            the length of the scriptSig for the second input
The scriptSig for the second input:
473044022033f3b9d81aeb8fe8b8efaf5364fbc84d5165c620b8308fb2ee1e1078acbc174a0220753664bcd75b01629424718cd879eea11988acd98def4cd93863b30fc2fc517101210287bf8adbf3535eebe73937183499554a08df9652f27e15b7a0c027391fb3ce80
feffffff    reversed sequence code

03            the number of outputs

0000000000000000    the value of the first output (always =0 for an asset operation)
33            the length of the scriptPubKey for the first output
The scriptPubKey for the first output:
    76a914        OP_DUP OP_HASH160
    3228f10a2ec7991be2df386cbe1a3658a071cac5
    88ac        OP_EQUALVERIFY OP_CHECKSIG
    The Ravencoin asset operation:
        c0        OP_RVN_ASSET (always =c0 and indicates an asset operation)
        17        the length of the asset script
        72766e    asset type header (always =rvn)
        74        asset operation type (transfer=74 or new=71 or owner=6f)
        0a        length of the asset name
        544553545f544f4b454e    the ascii of the asset name
        00e40b5402000000        the quantity of assets affected in satoshis
    75            OP_DROP

34afee0500000000    the value of the second output
19            the length of the scriptPubKey for the second output
The scriptPubKey for the second output:
    76a914        OP_DUP OP_HASH160
    95a69d8872bea6e25e5652f8ef062664b73d738d
    88ac        OP_EQUALVERIFY OP_CHECKSIG

0000000000000000    the value of the third output (always =0 for an asset operation)
33            the length of the scriptPubKey for the third output
The scriptPubKey for the third output:
    76a914        OP_DUP OP_HASH160
    95a69d8872bea6e25e5652f8ef062664b73d738d
    88ac        OP_EQUALVERIFY OP_CHECKSIG
    The Ravencoin asset operation:   
        c0        OP_RVN_ASSET (always =c0 and indicates an asset operation)
        17        the length of the asset script
        72766e    asset type header (always =rvn)
        74        asset operation type (transfer=74 or new=71 or owner=6f)
        0a        length of the asset name
        544553545f544f4b454e    the ascii of the asset name
        00046bf414000000        the quantity of assets affected in satoshis
    75            OP_DROP

9ceb0800    block lock time




Copyright 2021 by Hans Schmidt