Skip to content

feat: create a script generator #65

Description

@tdelabro

Currently we create scripts in order to test our opcodes implementation.
It is done with a []u8 looking like this:

const bytes: [?]u8 = [_]u8{ 0x12, 0x34, 0x56, 0x78 };

Where everything (opcode and data) is written as u8.
This is unreadable and unmaintainable.

I want it to look like this:

const my_script = ScriptBuilder.new().pushOpcode(Opcode.OP_ADD).pushInt(1).pushInt(1).addOpcode(Opcode.OP_NUMEQUAL).addInt(2).build();

Create in as an independent lib, script/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions