* 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)
| 1047 | * If the matching event cannot be found, returns null. |
| 1048 | */ |
| 1049 | parseLog(log) { |
| 1050 | const fragment = this.getEvent(log.topics[0]); |
| 1051 | if (!fragment || fragment.anonymous) { |
| 1052 | return null; |
| 1053 | } |
| 1054 | // @TODO: If anonymous, and the only method, and the input count matches, should we parse? |
| 1055 | // Probably not, because just because it is the only event in the ABI does |
| 1056 | // not mean we have the full ABI; maybe just a fragment? |
| 1057 | return new LogDescription(fragment, fragment.topicHash, this.decodeEventLog(fragment, log.data, log.topics)); |
| 1058 | } |
| 1059 | /** |
| 1060 | * Parses a revert data, finding the matching error and extracts |
| 1061 | * the parameter values along with other useful error details. |
no test coverage detected