Skip to content

Rename the compilation result from script to bytecode - #196

Merged
someone235 merged 1 commit into
kaspanet:masterfrom
someone235:script-bytecode
Aug 3, 2026
Merged

Rename the compilation result from script to bytecode#196
someone235 merged 1 commit into
kaspanet:masterfrom
someone235:script-bytecode

Conversation

@someone235

Copy link
Copy Markdown
Contributor

Closes #165

Use bytecode consistently for SilverScript compiler output, while retaining established transaction terms such as signature scripts, redeem scripts, and script public keys.

This is a breaking terminology change for SilverScript source, serialized compiler artifacts, and the Rust API.

Language Behavior Changes

  • Rename the compile-time expressions this.scriptSize and this.scriptSizeDataPrefix:
entry main(int expectedSize, byte[] expectedPrefix) {
    require(expectedSize == this.bytecodeSize);
    require(expectedPrefix == this.bytecodeSizeDataPrefix);
}
  • Rename the compiled artifact’s JSON field from script to bytecode:
{
  "contract_name": "Example",
  "bytecode": [81]
}
  • Rename CompiledContract::script to CompiledContract::bytecode for programmatic compiler consumers:
let compiled = compile_contract(source, &args, options)?;
println!("Bytecode length: {}", compiled.bytecode.len());
  • Update debugger output and APIs to describe execution in terms of compiled bytecode.

@someone235
someone235 merged commit 4d88ded into kaspanet:master Aug 3, 2026
4 checks passed
@someone235
someone235 deleted the script-bytecode branch August 3, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename the compilation result from script to bytecode

1 participant