Skip to content

better support for hand-written/hand-optimized contract bytecode #214

Open
@mr-zwets

Description

@mr-zwets

Currently a contract's constructor-inputs are kept in the artifact as constructorInputs, and not repeated in the bytecode property on the artifact because they are assumed to be put in front of the bytecode (in reversed order).

For developers who want to hand-optimize their contracts, they will often not have these constructorInputs at the beginning.

To support constructorInputs at any place on the stack, we should allow for a templating syntax in the bytecode field.

For hand optimized contracts the debug info will be non existent, so they won't be able to leverage the debug tooling.
This change would make it easy for developers to still continue using the CashScript SDK for transaction building even for hand optimized contracts.

These changes are a precursor to 'enable placing constructor params in any part of function body' (#156) but don't necessarily require any changes to the cashscript contract language itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingbreaking changecashc-compilerRelates to the cashc compiler

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions