| 78 | } |
| 79 | |
| 80 | async getTransactionEvent(event) { |
| 81 | let filters = "0123456789".split(""); |
| 82 | let result = { |
| 83 | chain: this.chain, |
| 84 | address: event.address, |
| 85 | blockHash: event.blockHash, |
| 86 | blockNumber: event.blockNumber, |
| 87 | txHash: event.transactionHash, |
| 88 | txIndex: event.transactionIndex, |
| 89 | logIndex: event.logIndex, |
| 90 | event: event.event, |
| 91 | args: {}, |
| 92 | }; |
| 93 | |
| 94 | for (let [key, value] of Object.entries(event.args)) { |
| 95 | if (!lodash.includes(filters, key)) { |
| 96 | result.args[key] = Ethers.BigNumber.isBigNumber(value) ? value.toString() : value; |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | return result; |
| 101 | } |
| 102 | |
| 103 | async getEventList(filter, fromBlock, toBlock) { |
| 104 | const contract = new Ethers.Contract(filter.contract, filter.abi, this.provider); |