MCPcopy Create free account
hub / github.com/ccxt/ccxt / parseLog

Method parseLog

ts/src/static_dependencies/ethers/interface.ts:1176–1187  ·  view source on GitHub ↗

* Parses a receipt log, finding the matching event and extracts * the parameter values along with other useful event details. * * If the matching event cannot be found, returns null.

(log: { topics: Array<string>, data: string})

Source from the content-addressed store, hash-verified

1174 * If the matching event cannot be found, returns null.
1175 */
1176 parseLog(log: { topics: Array<string>, data: string}): null | LogDescription {
1177 const fragment = this.getEvent(log.topics[0]);
1178
1179 if (!fragment || fragment.anonymous) { return null; }
1180
1181 // @TODO: If anonymous, and the only method, and the input count matches, should we parse?
1182 // Probably not, because just because it is the only event in the ABI does
1183 // not mean we have the full ABI; maybe just a fragment?
1184
1185
1186 return new LogDescription(fragment, fragment.topicHash, this.decodeEventLog(fragment, log.data, log.topics));
1187 }
1188
1189 /**
1190 * Parses a revert data, finding the matching error and extracts

Callers

nothing calls this directly

Calls 2

getEventMethod · 0.95
decodeEventLogMethod · 0.95

Tested by

no test coverage detected