File tree Expand file tree Collapse file tree 4 files changed +20
-21
lines changed Expand file tree Collapse file tree 4 files changed +20
-21
lines changed Original file line number Diff line number Diff line change @@ -112,9 +112,9 @@ syntax: `npm run {script-name} {startTimestamp} {endTimestamp} {bridgeName}`
112112
113113Example:
114114` ` `
115- npm run adapter arbitrum 1704690402 1704949602
116- npm run aggregate arbitrum 1704690402 1704949602
117- npm run daily -volume arbitrum 1704690402 1704949602
115+ npm run adapter 1704690402 1704949602 arbitrum
116+ npm run aggregate 1704690402 1704949602 arbitrum
117+ npm run daily -volume 1704690402 1704949602 arbitrum
118118` ` `
119119Returns:
120120` ` `
Original file line number Diff line number Diff line change 3737 "@aws-sdk/client-s3" : " ^3.749.0" ,
3838 "@aws-sdk/client-sts" : " ^3.749.0" ,
3939 "@aws-sdk/credential-providers" : " ^3.749.0" ,
40- "@defillama/sdk" : " ^5.0.137 " ,
40+ "@defillama/sdk" : " ^5.0.154 " ,
4141 "@fastify/cors" : " ^9.0.1" ,
4242 "@graphql-typed-document-node/core" : " ^3.2.0" ,
4343 "@solana/web3.js" : " ^1.87.3" ,
Original file line number Diff line number Diff line change 1- import { getLogs } from "@defillama/sdk/build/util" ;
21import { ethers } from "ethers" ;
32import { Chain } from "@defillama/sdk/build/general" ;
43import { get } from "lodash" ;
54import { ContractEventParams , PartialContractEventParams } from "../helpers/bridgeAdapter.type" ;
65import { EventData } from "../utils/types" ;
76import { PromisePool } from "@supercharge/promise-pool" ;
87import { getProvider } from "../utils/provider" ;
8+ import { getEventLogs } from "@defillama/sdk" ;
99
1010const EventKeyTypes = {
1111 blockNumber : "number" ,
@@ -125,18 +125,17 @@ export const getTxDataFromEVMEventLogs = async (
125125 let logs = [ ] as any [ ] ;
126126 for ( let i = 0 ; i < 5 ; i ++ ) {
127127 try {
128- logs = (
129- await getLogs ( {
130- target : target ! ,
131- topic : topic ,
132- keys : [ ] ,
133- fromBlock : fromBlock ,
134- toBlock : toBlock ,
135- topics : topics as string [ ] ,
136- chain : overriddenChain ,
137- } )
138- ) . output ;
139- //console.log(logs)
128+ logs = await getEventLogs ( {
129+ target : target ! ,
130+ topic : topic ,
131+ keys : [ ] ,
132+ fromBlock : fromBlock ,
133+ toBlock : toBlock ,
134+ topics : topics as string [ ] ,
135+ chain : overriddenChain ,
136+ noTarget : ! target // set noTarget to true, if target is null
137+ } ) ;
138+
140139 if ( logs . length === 0 ) {
141140 console . info (
142141 `No logs received for ${ adapterName } from ${ fromBlock } to ${ toBlock } with topic ${ topic } (${
You can’t perform that action at this time.
0 commit comments