skills/sails-ethexe-architecture/SKILL.md
Use when a builder needs to design or review architecture for a Sails ethexe app with dual-transport, payable methods, Solidity interface generation, or Ethereum-style events. Do not use for standard Gear/Vara Sails apps without ethexe.
npx skillsauth add gear-foundation/vara-skills sails-ethexe-architectureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Turn an approved spec into an ethexe-specific architecture artifact before implementation, covering transport strategy, payable design, event model, Solidity interface generation, and the constraints the ethexe feature imposes.
If the app does NOT need ethexe, use ../sails-architecture/SKILL.md instead.
../../references/sails-ethexe-patterns.md — ethexe diff table, transport rules, type requirements, gated syscalls../../references/sails-header-wire-format.md — interface ID stability, entry ID derivation../../references/sails-idl-v2-syntax.md — IDL v2 annotations../../assets/architecture-template.md../../references/vara-domain-overview.md../../references/sails-program-and-service-architecture.md../../references/gear-messaging-and-replies.mdWrite the result to docs/plans/YYYY-MM-DD-<topic>-architecture.md.
The architecture must name the transport per service and per method:
| Pattern | When to use |
|---------|-------------|
| Dual transport (default #[export]) | Methods callable from both Gear programs and EVM |
| Scale-only (#[export(scale)]) | Internal program-to-program calls, no EVM exposure needed |
| Ethabi-only (#[export(ethabi)]) | Methods only meaningful from EVM side |
| Payable (#[export(ethabi, payable)]) | Methods that accept value — requires ethabi |
Document the transport choice per method in the architecture artifact. Dual transport is the default but not always desirable — scale-only methods reduce the ABI surface.
Decide between:
emit_event() — standard Gear event (visible to Gear tooling, explorers)emit_eth_event() — Ethereum-style event (visible to EVM tooling, indexed topics)For emit_eth_event():
#[indexed]? (max 3 per variant, these become topics)sails-sol-gen will produce in the Solidity interface?sails-sol-gen generates Solidity contract interfaces from the IDL. Architecture must consider:
payable and indexed annotations in the IDL correct for the generated interface?Three syscalls are unavailable under ethexe:
Syscall::signal_from() — no signal handlingSyscall::signal_code() — no signal handlingSyscall::system_reserve_gas() — no system gas reservationIf the design depends on signals or system gas reservation, it cannot run under ethexe.
Ethexe apps use a separate workspace (rs/ethexe/ in the Sails repo). The architecture must name:
sails-rs = { ..., features = ["ethexe"] } for deps, build-deps, and dev-depsfeatures = ["ethexe", "wasm-builder"]#[indexed] fields chosen and within the 3-field limit?#[indexed] fields per event variant.../sails-ethexe-implementer/SKILL.md after architecture approval.development
Use when approved tasks require Rust code changes in a Sails ethexe workspace with the ethexe feature enabled. Do not use for standard Gear/Vara Sails apps without ethexe, or when the spec or architecture is still unsettled.
development
Use when a builder needs to design or debug calls from a standard Gear/Vara Sails program into runtime builtin actors such as BLS12-381, staking, proxy, or ETH bridge, including ActorId derivation, request encoding, reply decoding, and gas or ED budgeting. Do not use for regular program-to-program messaging, Vara.eth or ethexe-only work, non-Sails repositories, or runtime-maintenance tasks inside the Gear repo.
development
Use when a builder needs a read-side indexer and query API for a standard Gear/Vara Sails app using program events, IDL-driven decoding, projected read models, and optional on-chain query enrichment. Do not use for command-side backends, generic Node APIs, non-Sails repositories, Vara.eth or ethexe-first work.
development
Use when an agent needs to interact with Vara Network on-chain — deploy programs, call Sails methods, manage wallets, transfer tokens, monitor events. Do not use for building Sails programs.