Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ syntax: `npm run {script-name} {startTimestamp} {endTimestamp} {bridgeName}`

Example:
```
npm run adapter arbitrum 1704690402 1704949602
npm run aggregate arbitrum 1704690402 1704949602
npm run daily-volume arbitrum 1704690402 1704949602
npm run adapter 1704690402 1704949602 arbitrum
npm run aggregate 1704690402 1704949602 arbitrum
npm run daily-volume 1704690402 1704949602 arbitrum
```
Returns:
```
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@aws-sdk/client-s3": "^3.749.0",
"@aws-sdk/client-sts": "^3.749.0",
"@aws-sdk/credential-providers": "^3.749.0",
"@defillama/sdk": "^5.0.137",
"@defillama/sdk": "^5.0.154",
"@fastify/cors": "^9.0.1",
"@graphql-typed-document-node/core": "^3.2.0",
"@solana/web3.js": "^1.87.3",
Expand Down
25 changes: 12 additions & 13 deletions src/helpers/processTransactions.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { getLogs } from "@defillama/sdk/build/util";
import { ethers } from "ethers";
import { Chain } from "@defillama/sdk/build/general";
import { get } from "lodash";
import { ContractEventParams, PartialContractEventParams } from "../helpers/bridgeAdapter.type";
import { EventData } from "../utils/types";
import { PromisePool } from "@supercharge/promise-pool";
import { getProvider } from "../utils/provider";
import { getEventLogs } from "@defillama/sdk";

const EventKeyTypes = {
blockNumber: "number",
Expand Down Expand Up @@ -125,18 +125,17 @@ export const getTxDataFromEVMEventLogs = async (
let logs = [] as any[];
for (let i = 0; i < 5; i++) {
try {
logs = (
await getLogs({
target: target!,
topic: topic,
keys: [],
fromBlock: fromBlock,
toBlock: toBlock,
topics: topics as string[],
chain: overriddenChain,
})
).output;
//console.log(logs)
logs = await getEventLogs({
target: target!,
topic: topic,
keys: [],
fromBlock: fromBlock,
toBlock: toBlock,
topics: topics as string[],
chain: overriddenChain,
noTarget: !target // set noTarget to true, if target is null
});

if (logs.length === 0) {
console.info(
`No logs received for ${adapterName} from ${fromBlock} to ${toBlock} with topic ${topic} (${
Expand Down