Skip to content

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

@rkalis

Description

@rkalis

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    cashc-compilerRelates to the cashc compiler

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions