Skip to content

Commit

Permalink
rfq indexer with the right contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
Defi-Moses committed Oct 10, 2024
1 parent 6c02517 commit a932e29
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import { Request, Response } from 'express'

import { db } from '../db'
import {
qDeposits,
qRelays,
qProofs,
qClaims,
qRefunds,
qDisputes,
} from '../queries'
import { qDeposits, qRelays, qProofs, qClaims, qRefunds } from '../queries'
import { nest_results } from '../utils/nestResults'

const sevenDaysAgo = Math.floor(Date.now() / 1000) - 7 * 24 * 60 * 60
Expand All @@ -21,7 +14,7 @@ export const pendingTransactionsMissingClaimController = async (
const query = db
.with('deposits', () => qDeposits())
.with('relays', () => qRelays())
.with('proofs', () => qProofs({activeOnly: true}))
.with('proofs', () => qProofs({ activeOnly: true }))
.with('claims', () => qClaims())
.with('combined', (qb) =>
qb
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { Request, Response } from 'express'

import { db } from '../db'
import { qDeposits, qRelays, qProofs, qClaims, qRefunds, qDisputes } from '../queries'
import {
qDeposits,
qRelays,
qProofs,
qClaims,
qRefunds,
qDisputes,
} from '../queries'
import { nest_results } from '../utils/nestResults'

export const getTransactionById = async (req: Request, res: Response) => {
Expand All @@ -22,7 +29,11 @@ export const getTransactionById = async (req: Request, res: Response) => {
.selectFrom('deposits')
.leftJoin('relays', 'transactionId_deposit', 'transactionId_relay')
.leftJoin('proofs', 'transactionId_deposit', 'transactionId_proof')
.leftJoin('disputes', 'transactionId_deposit', 'transactionId_dispute')
.leftJoin(
'disputes',
'transactionId_deposit',
'transactionId_dispute'
)
.leftJoin('claims', 'transactionId_deposit', 'transactionId_claim')
.leftJoin('refunds', 'transactionId_deposit', 'transactionId_refund')
.selectAll('deposits')
Expand Down
4 changes: 2 additions & 2 deletions packages/rfq-indexer/indexer/ponder.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ const configByChainId = {
[480]: {
transport: http(process.env.WORLDCHAIN_MAINNET_RPC),
chainName: 'worldchain',
FastBridgeV2Address: '0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E',
FastBridgeV2StartBlock: 4616214, // first block and new block
FastBridgeV2Address: '0x05C62156C7C47E76223A560210EA648De5e6B53B',
FastBridgeV2StartBlock: 4598830, // first block and new block
},
disableCache: true,
}
Expand Down

0 comments on commit a932e29

Please sign in to comment.