Skip to content

Commit 004349f

Browse files
committed
add entrypointt addr as recipient
1 parent 3e42f39 commit 004349f

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

  • packages/explorer/src/app/(explorer)/api/transactions

packages/explorer/src/app/(explorer)/api/transactions/route.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Client } from "pg";
22
import { Hex } from "viem";
3+
import { entryPoint07Address } from "viem/account-abstraction";
34

45
export const dynamic = "force-dynamic";
56

@@ -28,11 +29,17 @@ export async function GET(req: Request) {
2829
'0x' || encode(tx_input, 'hex') as tx_input,
2930
tx_value, block_time
3031
FROM transactions
31-
WHERE tx_to = decode($1, 'hex') ${lastBlockNumber ? "AND block_num < $3" : ""}
32+
WHERE tx_to IN (decode($1, 'hex'), decode($2, 'hex'))
33+
${lastBlockNumber ? "AND block_num < $4" : ""}
3234
ORDER BY block_num DESC
33-
LIMIT $2
35+
LIMIT $3
3436
`,
35-
[worldAddress.replace("0x", ""), pageSize, ...(lastBlockNumber ? [lastBlockNumber] : [])],
37+
[
38+
worldAddress.replace("0x", ""),
39+
entryPoint07Address.replace("0x", ""),
40+
pageSize,
41+
...(lastBlockNumber ? [lastBlockNumber] : []),
42+
],
3643
);
3744

3845
return Response.json({ transactions: transactions.rows });

0 commit comments

Comments
 (0)