I am trying to create a view to get all information about an asset from the explorer database

+1 vote

i want the issue amount and every transaction with details associated with the asset but I am having a difficult time 

This is about as far as I got, but it isn't sufficient

select tx_id, hex(tx_hash), tx_version, tx_lockTime, tx_size 
from tx 
where hex(tx_hash) = '0FD1430357B91DE24FBC5B24491A40A64AE5D05D50BA34D74FEFE38AF733FD28';
       tx_id = 3183
hex(tx_hash) = 0FD1430357B91DE24FBC5B24491A40A64AE5D05D50BA34D74FEFE38AF733FD28
  tx_version = 1
 tx_lockTime = 0
     tx_size = 273

select
  txin_id,
    tx_id,
    txin_pos,
    txout_id,
    hex(txin_scriptSig),
    txin_sequence
from txin 
where tx_id = (
    select tx_id
    from tx 
    where hex(tx_hash) = '0FD1430357B91DE24FBC5B24491A40A64AE5D05D50BA34D74FEFE38AF733FD28'
    );
            txin_id = 3183
              tx_id = 3183
           txin_pos = 0
           txout_id = 3213
hex(txin_scriptSig) = 47304402202D418131AF289A5E85596B10EB8D9B8C3EE23A5ABC6788BA3B5502632EADF64F02206A8F0D03D5D9A162312CDB39704B24A2C6D802CEEDAD1E2927FD1B8596F49DAC012103E146B4A6D00C3BB961E93960FBF1CE0F16877CC5DAE5D07C33F43528C9A1201D
      txin_sequence = 4294967295

select
    txout_id,
    txout_pos,
    txout_value,
    hex(txout_scriptPubKey)
    pubkey_id
from txout 
where tx_id = (
    select tx_id
    from tx 
    where hex(tx_hash) = '0FD1430357B91DE24FBC5B24491A40A64AE5D05D50BA34D74FEFE38AF733FD28'
    );
   txout_id = 3214
  txout_pos = 0
txout_value = 0
  pubkey_id = 76A9143F7E7F3DE155929525ED6168C2E4245A6C031BE688AC1673706B71130300000A010000E093F40100000000000075

   txout_id = 3215
  txout_pos = 1
txout_value = 0
  pubkey_id = 76A91432325480550F7858346894E5498E2FE97EEB1B7188AC1673706B71130300000A010000E093482100000000000075

 

But explorer shows 500 units and  8520 units, which is correct.

 

 
Is this buried in txin_scriptSig?
asked Feb 8, 2017 by Jim Schmidt

1 Answer

0 votes

I'm afraid we can't provide support for reverse engineering the explorer database, but you might also want to consider subscribing to the asset in MultiChain and then using APIs like listassettransactions.

answered Feb 8, 2017 by MultiChain
...