Skip to content

Conversation

@bbyalcinkaya
Copy link
Member

@bbyalcinkaya bbyalcinkaya commented Nov 24, 2025

This PR adds support for creating Stylus and Solidity contracts from raw bytecode directly inside test contracts.

  • Implemented the Pyk hooks mechanism for exposing external operations to the semantics, including file reads and WASM binary parsing. This enables deploying contracts from bytecode files.
  • Implemented the readFile and readFileBinary Foundry cheatcodes through Pyk hooks.
  • Added support for creating Stylus contracts directly from bytecode using the WASM parser hook.
  • Implemented the semantics for calling Foundry cheatcodes from Stylus.
  • Implemented the static_call_contract host function.
  • Implemented the create1 host function to support deploying bytecode from Stylus contracts.
  • Deprecated contract creation via skribe.json in favor of bytecode-based deployment.
  • Optimized WASM memory representation to reduce fragmentation in SparseBytes.

Testing:

  • Added test-stylus-from-foundry: fuzz-tests a Stylus counter contract deployed from its .wasm bytecode.
  • Added test-foundry-from-stylus: fuzz-tests a Solidity counter contract deployed from its .bin bytecode.
  • Updated existing Stylus test contracts to deploy from bytecode instead of skribe.json.

@bbyalcinkaya bbyalcinkaya marked this pull request as ready for review December 4, 2025 10:56
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.

3 participants