MCPcopy Index your code
hub / github.com/Bot80926/ethers-scripts / getTransactionEvent

Method getTransactionEvent

utils/provider.js:80–101  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

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);

Callers 1

getEventListMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected