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.
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