Skill — Copyable reference implementation. Use as-is or customize. See Skills Philosophy.
Ethers-style Interface
A copyable reference implementation that follows ethers v6 Interface patterns, built on Voltaire primitives.Overview
This Skill provides:- Interface: Main ABI abstraction with ethers v6 API
- Fragment classes: FunctionFragment, EventFragment, ErrorFragment
- Encoding/Decoding: Function data, event logs, error results
- Parsing: Parse transactions, logs, and errors from raw data
Quick Start
Encoding Function Calls
Encode function call data for transactiondata field:
Decoding Function Data
Decode function call data back to arguments:Event Encoding/Decoding
Encode event logs for testing or mocking:Error Encoding/Decoding
Handle custom error reverts:Parsing Raw Data
Parse unknown data to discover its type:Fragment Inspection
Inspect ABI fragments:Human-Readable Format
Convert ABI to human-readable format:Constructor Encoding
Encode constructor arguments for deployment:Filter Topics
Create filter topics foreth_getLogs:
Fragment Classes
Work with fragments directly:ParamType
Inspect parameter types:Source Code
Full implementation available at:examples/ethers-interface/Interface.js- Main Interface classexamples/ethers-interface/Fragment.js- Fragment classesexamples/ethers-interface/errors.ts- Error classesexamples/ethers-interface/EthersInterfaceTypes.ts- TypeScript typesexamples/ethers-interface/EthersInterface.test.ts- Comprehensive tests

