GoldRush Decoder
OPEN SOURCE · 200+ CHAINSOn-chain, everything is an event — but raw logs are packed hex: topics and data, no names, no meaning without the ABI and context to read them.
GoldRush Decoder solves this at the infrastructure level: a single REST endpoint takes a chain name and a transaction hash, and returns an array of fully structured, labelled event objects — enriched with token metadata and USD pricing — across 200+ EVM chains. I built it from the ground up at Covalent.
At startup, initDecoder scans a protocol directory and builds a map of decoder keys — strings like uniswap-v3:Swap — to handlers registered via .on(). Each handler gets the raw log, the full transaction, and the Covalent client for live enrichment. A fallback decoder guarantees the API always returns something meaningful.
REGISTER
scan protocols, build the key map
initDecoder · .on()
MATCH
log → the right decoder, or fallback
decoder registry
DECODE
typed, named event object
TypeScript
ENRICH
token metadata + USD pricing
Covalent API
A single transaction can emit dozens of logs from different protocols — awaiting each decoder serially was unacceptably slow. I redesigned the execution model to fan out decoder calls in parallel batches while preserving original log order in the response:
parallel batches
decoder invocations fanned out, not serialized
order preserved
responses re-sequenced to original log order
fallback decoder
unknown events still return meaning
contributor CLI
yarn add-config scaffolds a new protocol in one command
GoldRushDecoder.on(
"uniswap-v3:Swap",
["base-mainnet"],
async (log, tx, chain, covalent) => {
const { sender, amount0, amount1 } =
decodeEventLog(log);
return {
name: "Swap",
protocol: { name: "Uniswap V3" },
...await enrichWithPricing(
amount0, amount1, covalent,
),
};
},
);