Liquid Tapscript on Script Wizard

Burak
Script Wizard
Published in
2 min readDec 8, 2021

Taproot brings highly expressive smart contracts to Liquid, and today we’re excited to announce Script Wizard now supports new extension opcodes bundled with Taproot on Liquid. The new Tapscript opcodes will enable a set of new compelling use cases that were previously not possible while making the overall smart-contracting more efficient.

The newly added extension opcodes are:

Direct Introspection Opcodes Over Transaction Template:
OP_INSPECTINPUTOUTPOINT
OP_INSPECTINPUTASSET
OP_INSPECTINPUTVALUE
OP_INSPECTINPUTSCRIPTPUBKEY
OP_INSPECTINPUTSEQUENCE
OP_PUSHCURRENTINPUTINDEX
OP_INSPECTOUTPUTASSET
OP_INSPECTOUTPUTVALUE
OP_INSPECTOUTPUTSCRIPTPUBKEY
OP_INSPECTVERSION
OP_INSPECTLOCKTIME
OP_INSPECTNUMINPUTS
OP_INSPECTNUMOUTPUTS

64-bit Arithmetic Opcodes:
OP_ADD64
OP_SUB64
OP_MUL64
OP_DIV64
OP_NEG64
OP_LESSTHAN64
OP_LESSTHANOREQUAL64
OP_GREATERTHAN64
OP_GREATERTHANOREQUAL64

Conversion Opcodes:
OP_SCIPTNUMTOLE64
OP_LE64TOSCIPTNUM
OP_LE32TOLE64

Crypto Opcodes:
OP_TWEAKVERIFY

In order to work with new extension opcodes, you can choose the “Liquid (Tapscript)” section from the top-right corner of the IDE.

Please note that streaming opcodes are currently not supported, and OP_CHECKSIGFROMSTACKVERIFY now checks schnorr signatures.

New Transaction Template

Inspection opcodes push asset/value/script values based on filled data over transaction template. The template can be accessed via the editor interface.

Try it Out

Script Wizard is built on script-wiz-lib, and you can try out the compiler online at ide.scriptwiz.app. Please keep in mind this is a beta version, and we recommend testing your script on testnet prior to mainnet deployment.

Web app: https://ide.scriptwiz.app/

GitHub: https://github.com/bit-matrix/script-wiz-lib

NPM: https://www.npmjs.com/package/@script-wiz/lib

Twitter: https://twitter.com/script_wizard

Join community: https://t.me/+bEiJnTeu-mA1ODRk

--

--