sails-ethexe-implementer
Skill17 starsChanged 8 months agoMITView on GitHub
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.
In this repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- vara-skillsSkill
- vara-skillsSkill
- awesome-sails-vftSkill
- gear-architecture-plannerSkill
- gear-builtin-actorsSkill
- gear-gstd-api-mapSkill
- gear-message-executionSkill
- gtest-tdd-loopSkill
- idea-to-specSkill
- sails-architectureSkill
- sails-dev-envSkill
- sails-ethexe-architectureSkill
- sails-feature-workflowSkill
- sails-frontendSkill
- sails-gtestSkill
- sails-idl-clientSkill
- sails-indexerSkill
- sails-local-smokeSkill
- sails-new-appSkill
- sails-program-evolutionSkill
- sails-rust-implementerSkill
- ship-sails-appSkill
- task-decomposerSkill
- vara-skills-upgradeSkill
- vara-walletSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 1 is distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
If the task does NOT need the ethexe feature, use ../sails-rust-implementer/SKILL.md instead.
- Very specific: line 30
Use #[sails_type] for all custom types.
- Very specific: line 36
Use emit_eth_event() for Ethereum-style events, emit_event() for standard Gear events.
- Very specific: line 38
Use Syscall::* for runtime accessors.
- Very specific: line 90
Do not use signal_from(), signal_code(), or system_reserve_gas() — they are gated out under ethexe.
- Very specific: line 91
Do not use raw gcore::*, msg::*, or exec::* calls — use Syscall::*.
- Very specific: line 92
Do not mark more than 3 fields as #[indexed] per event variant.
- Distinctive: line 93
Do not use reserved event variant names.
- Very specific: line 94
Do not assume payable works with scale-only transport — it requires ethabi.
- Very specific: line 97
Use Syscall::message_source() == Syscall::program_id() for self-message guards.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Sails Ethexe Implementer
Overview
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.
Inputs
../../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 routing
Consume the approved spec, architecture, and tasks artifacts before changing code.
Workflow
- Confirm the task is specified and architecture-approved.
- Confirm the crate has
sails-rswithfeatures = ["ethexe"]inCargo.toml. - Identify the smallest code change that satisfies the task.
- Use
#[sails_type]for all custom types. Types used in ethabi-exported methods must also be ABI-encodable as Solidity tuples (SolValue). - Choose the correct transport per method:
#[export]— both scale + ethabi (default with ethexe)#[export(scale)]— scale only, no ethabi#[export(ethabi)]— ethabi only#[export(ethabi, payable)]— ethabi with value acceptance
- Use
emit_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. - Mark
#[indexed]on up to 3 event fields per variant for Ethereum topic indexing. - Use
Syscall::*for runtime accessors. Three syscalls are unavailable:signal_from,signal_code,system_reserve_gas. - Hand verification to the gtest loop before claiming done.
Transport Decision Guide
| 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) |
Payable Methods
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 { ... }
Eth Events
#[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 });- Max 3
#[indexed]fields per variant - Forbidden variant names: ExecutableBalanceTopUpRequested, Message, MessageQueueingRequested, Reply, ReplyQueueingRequested, StateChanged, ValueClaimed, ValueClaimingRequested
Guardrails
- Do not use
signal_from(),signal_code(), orsystem_reserve_gas()— they are gated out under ethexe. - Do not use raw
gcore::*,msg::*, orexec::*calls — useSyscall::*. - Do not mark more than 3 fields as
#[indexed]per event variant. - Do not use reserved event variant names.
- Do not assume
payableworks with scale-only transport — it requires ethabi. - Service names must be PascalCase and must not collide with Solidity reserved keywords.
- Preserve released routes, reply shapes, and events unless the task explicitly changes them.
- Use
Syscall::message_source() == Syscall::program_id()for self-message guards. - Hand verification to the gtest loop before claiming done.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

