cashscript icon indicating copy to clipboard operation
cashscript copied to clipboard

Add support for reusable function definition / invocation (2026 network upgrade)

Open rkalis opened this issue 5 months ago • 0 comments

The 2026 network upgrade will add OP_DEFINE and OP_INVOKE which allows us to define and invoke reusable functions. We should add a syntax to the CashScript language that allows users to define these "internal" functions and call them inside other contract functions.

This is related to https://github.com/CashScript/cashscript/issues/153. We may want to take some ideas from that issue, such as "libraries" which only contain "internal" functions that can be imported into smart contracts.

rkalis avatar Oct 07 '25 08:10 rkalis