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

Method parseLog

js/src/static_dependencies/ethers/interface.js:927–936  ·  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)

Source from the content-addressed store, hash-verified

925 * If the matching event cannot be found, returns null.
926 */
927 parseLog(log) {
928 const fragment = this.getEvent(log.topics[0]);
929 if (!fragment || fragment.anonymous) {
930 return null;
931 }
932 // @TODO: If anonymous, and the only method, and the input count matches, should we parse?
933 // Probably not, because just because it is the only event in the ABI does
934 // not mean we have the full ABI; maybe just a fragment?
935 return new LogDescription(fragment, fragment.topicHash, this.decodeEventLog(fragment, log.data, log.topics));
936 }
937 /**
938 * Parses a revert data, finding the matching error and extracts
939 * the parameter values along with other useful error details.

Callers

nothing calls this directly

Calls 2

getEventMethod · 0.95
decodeEventLogMethod · 0.95

Tested by

no test coverage detected