I have several OPCODES where I need real worlds examples…

However they are rarely used. So how to search and disassemble an existing mined transaction using it ?


2 Answers 2


I don't think this is possible. Most, if not all, block explorers and blockchain indexers do not completely disassemble scripts and index them so that they are searchable. No software or service I know of allows you to search by opcode use in a transaction. It would be pretty useless for a service to provide this as probably no one would actually use it and having such an index would be a huge resource cost.

I think the best you will be able to do is to do write a program to look through every single transaction's scriptSig and looking for the opcodes that you want. However, be careful that you don't interpret random bytes as being opcodes. You will need to have something that can disassemble scripts and check the disassembled scripts for the opcodes that you want. Furthermore, such disassemblers won't be able to disassemble a redeemScript which is the actual script where opcodes will actually be for P2SH inputs.

Instead of searching for an example of an opcode which probably hasn't been used, just try using it yourself. I recommend that you read https://en.bitcoin.it/wiki/Script to get an idea of how the opcode works. Then you can use a tool like https://github.com/kallewoof/btcdeb to execute and debug your script. This way you can learn how the opcode works through experimentation and see exactly how a script interpreter will execute the script.

  • What about blockchainsql.io which inlude Opcode searching in transactions by ɪᴅ (though I have too limited knwolwedge to write the request) ? I only need basic dissaembly, not full.For trying, I don’t know how to compile a script nor I know how to convert an address into a hash for Scripting nor I know how to broadcast a transaction on Bitcoin testnet (I’m not aware of any online services allowing that). What I need is to verify some opcodes don’t create a new virtual address in block explorer (I mean that the money appear to be received to everyone).Hence the need for a block explorer. Mar 28, 2019 at 11:44
  • AFAICT blockchainsql.io does not allow searching by opcode. It has a table which has all of the opcodes, but that does not mean that you can search for a transaction containing an opcode as the fields for transactions do not contain any reference to their opcodes table. Instead of trying to do something that you do not understand, why not simply ask exactly what it is that you want to understand and people here can help you. You are asking a question that you think will help you understand something you don't, so just ask the thing that you don't understand.
    – Ava Chow
    Mar 28, 2019 at 14:26
  • Ah yes… Correct, but asking directly is something I did already. Mar 28, 2019 at 16:12
  • Ok, then this exactly what I said since the beginning, I definitely need a real world example of OP_CHECKLOCKTIMEVERIFY for starting because as I understand, I need to construct signing in the transaction script manually which means there’s simply too much too do for just seeing the result in a block explorer anyway whatever happends. Mar 28, 2019 at 22:47

BitDB is an API to access (unfortunately) Bitcoin SV transactions. You can find instructions for opcode search if you scroll down at https://docs.bitdb.network/docs/indexer#level-2-script

  • I don't think this deserved the downvote! I gave a +1 just now! I saw that you committed to "Bitcoin Cash". Since you've been active on Chemistry and Quantum Computing and Mathematics too, could you consider committing also to Materials Modeling which covers design of materials for solar cells, photo-voltaics, energy storage materials, new developments in batteries, and lighter or Feb 15, 2020 at 16:00
  • stronger materials for cars, airplanes, spaceships, etc. It would be very lovely to have you in the Private Beta! Please commit if you don't think it would be inconvenient! Feb 15, 2020 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.