MultiversX Tracker is Live!

How to show the Op codes of scriptPubKey?

Bitcoin Stack Exchange

Bitcoin News / Bitcoin Stack Exchange 206 Views

There is nothing special that you need to do, decoderawtransaction will always show the opcodes. In fact, what you are looking at are the opcodes for that specific output. Not all outputs are the same, and so there will be different opcodes in use.

If your first example, the scriptPubKey contains OP_HASH160 and OP_EQUAL because it is a P2SH output. P2SH outputs have those two opcodes, in addition to the hash.

In your second example, the scriptPubKey does not contain any non-push opcodes because it is a P2WPKH output. P2WPKH outputs do not use non-push opcodes (it has push opcodes, but decoderawtransaction will hide them because the useful part is the data being pushed). So there are no opcodes to show in your second example because that is how the script is.


Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments