skills/sails-ethexe-implementer/SKILL.md
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.
npx skillsauth add gear-foundation/vara-skills sails-ethexe-implementerInstall 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.
Implement approved tasks in Sails ethexe workspaces where the ethexe feature is enabled and methods may be exported via ethabi transport, accept value (payable), or emit Ethereum-style events.
If the task does NOT need the ethexe feature, use ../sails-rust-implementer/SKILL.md instead.
../../references/sails-ethexe-patterns.md — ethexe diff table, type requirements, transport rules, event patterns../../references/sails-syscall-mapping.md — Syscall::* API (note gated syscalls)../../references/sails-cheatsheet.md — core Sails patterns../../references/sails-rs-imports.md — import paths../../references/sails-idl-v2-syntax.md — IDL v2 annotations../../references/sails-header-wire-format.md — Sails Header routingConsume the approved spec, architecture, and tasks artifacts before changing code.
sails-rs with features = ["ethexe"] in Cargo.toml.#[sails_type] for all custom types. Types used in ethabi-exported methods must also be ABI-encodable as Solidity tuples (SolValue).#[export] — both scale + ethabi (default with ethexe)#[export(scale)] — scale only, no ethabi#[export(ethabi)] — ethabi only#[export(ethabi, payable)] — ethabi with value acceptanceemit_eth_event() for Ethereum-style events, emit_event() for standard Gear events. Do not mix them on the same event type without explicit architecture guidance.#[indexed] on up to 3 event fields per variant for Ethereum topic indexing.Syscall::* for runtime accessors. Three syscalls are unavailable: signal_from, signal_code, system_reserve_gas.| Scenario | Attribute |
|----------|-----------|
| Standard method, both transports | #[export] |
| Method only callable from Gear programs (no EVM) | #[export(scale)] |
| Method only callable from EVM | #[export(ethabi)] |
| Method that accepts value from EVM | #[export(ethabi, payable)] or #[export(scale, ethabi, payable)] |
| Query (read-only) | #[export] (transport flags orthogonal to query semantics) |
Non-payable methods panic at runtime if msg::value() > 0. To accept value:
#[export(payable)]
pub fn deposit(&mut self) -> u64 {
let value = Syscall::message_value();
// handle deposit...
value as u64
}
Constructors can also be payable: #[export(payable)] pub fn create() -> Self { ... }
#[event]
pub enum MyEvent {
Transfer {
#[indexed]
from: ActorId,
#[indexed]
to: ActorId,
value: u64,
},
Paused,
}
// In service method:
self.emit_eth_event(MyEvent::Transfer { from, to, value });
#[indexed] fields per variantsignal_from(), signal_code(), or system_reserve_gas() — they are gated out under ethexe.gcore::*, msg::*, or exec::* calls — use Syscall::*.#[indexed] per event variant.payable works with scale-only transport — it requires ethabi.Syscall::message_source() == Syscall::program_id() for self-message guards.development
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.
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.