Transaction Decoder
How It Works
Usage
// Decoder initialization
const addressMap = buildAddressToProtocolMap();
const decoder = new ProtocolDecoder(addressMap);
// Decode a transaction
const result = decoder.decode({
to: "0x90CCA7d8...", // Alluria TroveManager
input: "0x...", // Raw calldata
value: "0", // ETH value
logs: [...] // Receipt logs
});
// Result:
// {
// protocol: "alluria",
// actionType: "Opened Alluria Trove",
// functionName: "openTrove",
// decodedArgs: { collateral: "0x34b1...", amount: "1000..." },
// decodedEvents: [{ name: "TroveOpened", ... }]
// }Decoder Output
Fallback Chain
ABI Fragments
Adding a New Protocol
Last updated