Skip to content

AnomalyFi/seq-wasm

Repository files navigation

SEQ-WASM

WASM smart contracts for SEQ chain.

Structure:

  • SDK: A frame work for writing smart contracts deployable to SEQ.

  • SDK-Macros: Macros for most commonly used artifacts.

  • blobstream-rs: A WASM compilable Blobstream version written in rust, compatible with SEQ.

  • vector-rs: A WASM compilable Vector version written in rust, compatible with SEQ.

  • Solidity Gen: Solidity Bindings for function inputs of blobstream-rs, vector-rs and gnark precompile.

  • input tests: Tests for state module of sdk, blobstream and vector.

  • vk.bin: Verification key used for plonk verification in SP1.

TODO:

  • State revamp

  • RPC for fetching values at contract storage slot with rust sdk support.

  • Add tests.

    • for simple state
    • for dynamic state
  • Fallbacks getBalance and setBalance for fund dispersion.

  • Transfer native token TKN, with empty ID.

  • Use macros for:

    • public functions.
    • state variables.
  • Blobstream wasm contract size ~110KiB is in limits. If size increases by a large factor, then try optimizing by inlining state functions.

  • Call initializer during contract deployment.

  • automate github tests to run on wasm32-unknown-unknown

  • consider caching the abi(initialising abi is taking significant time)

  • Handle unwrap errors. Should the program panic and runtime return error. or the error should be handled by rust program for state access?