* Parses a transaction, finding the matching function and extracts * the parameter values along with other useful function details. * * If the matching function cannot be found, return null.
(tx)
| 1036 | * If the matching function cannot be found, return null. |
| 1037 | */ |
| 1038 | parseTransaction(tx) { |
| 1039 | const data = (0, index_js_3.getBytes)(tx.data, "tx.data"); |
| 1040 | const value = (0, index_js_3.getBigInt)((tx.value != null) ? tx.value : 0, "tx.value"); |
| 1041 | const fragment = this.getFunction((0, index_js_3.hexlify)(data.slice(0, 4))); |
| 1042 | if (!fragment) { |
| 1043 | return null; |
| 1044 | } |
| 1045 | const args = this.#abiCoder.decode(fragment.inputs, data.slice(4)); |
| 1046 | return new TransactionDescription(fragment, fragment.selector, args, value); |
| 1047 | } |
| 1048 | parseCallResult(data) { |
| 1049 | throw new Error("@TODO"); |
| 1050 | } |
no test coverage detected