Skip to content

Commit

Permalink
RFQ-Indexer Adding events (#3227)
Browse files Browse the repository at this point in the history
* fixing terminology

* rfq-indexer-docs

* Update RFQ Indexer API Readme (#3221)

* adding dispute events to ponder and linting

* numbering typo

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* small fixes

* sync with master

---------

Co-authored-by: parodime <jordan@protochainresearch.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 4, 2024
1 parent 7bdb63d commit be9caf7
Show file tree
Hide file tree
Showing 7 changed files with 373 additions and 331 deletions.
2 changes: 1 addition & 1 deletion docs/bridge/docs/06-Services/06-RFQ-Indexer-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ The RFQ Indexer API is a service designed to provide access to indexed RFQ bridg
## Key Features
1. **Real-Time and Historical Data** Indexes from a specified start block up to real-time events.
2. **On-chain Tracing** Tracks all on-chain transactions and events, helping to debug.
4. **GraphQL API**: Provides a GraphQL/IQL endpoint for easy data querying.
3. **GraphQL API**: Provides a GraphQL/IQL endpoint for easy data querying.


350 changes: 175 additions & 175 deletions packages/rfq-indexer/indexer/ponder.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,212 +15,212 @@ const lineaChainId = 59144
const bnbChainId = 56

const configByChainId = {
[1]: {
transport: http(process.env.ETH_MAINNET_RPC),
chainName: 'ethereum',
FastBridgeV2Address: '0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E',
// FastBridgeV2StartBlock: 19420718, first block
FastBridgeV2StartBlock: 20426589,// new block
},
[10]: {
transport: http(process.env.OPTIMISM_MAINNET_RPC),
chainName: 'optimism',
FastBridgeV2Address: '0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E',
// FastBridgeV2StartBlock: 117334308, first block
FastBridgeV2StartBlock: 123416470, // new block
},
[42161]: {
transport: http(process.env.ARBITRUM_MAINNET_RPC),
chainName: 'arbitrum',
FastBridgeV2Address: '0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E',
// FastBridgeV2StartBlock: 189700328, first block
FastBridgeV2StartBlock: 237979967, // new block
},
[8453]: {
transport: http(process.env.BASE_MAINNET_RPC),
chainName: 'base',
FastBridgeV2Address: '0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E',
// FastBridgeV2StartBlock: 12478374, first block
FastBridgeV2StartBlock: 17821292, // new block
},
[81457]: {
transport: http(process.env.BLAST_MAINNET_RPC),
chainName: 'blast',
FastBridgeV2Address: '0x34F52752975222d5994C206cE08C1d5B329f24dD',
// FastBridgeV2StartBlock: 6378234, first block
FastBridgeV2StartBlock: 6811045, // new block
},
[534352]: {
transport: http(process.env.SCROLL_MAINNET_RPC),
chainName: 'scroll',
FastBridgeV2Address: '0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E',
// FastBridgeV2StartBlock: 5357000, first block
FastBridgeV2StartBlock: 7941653, // new block
},
[59144]: {
transport: http(process.env.LINEA_MAINNET_RPC),
chainName: 'linea',
FastBridgeV2Address: '0x34F52752975222d5994C206cE08C1d5B329f24dD',
FastBridgeV2StartBlock: 7124666, // first block and new block
},
[56]: {
transport: http(process.env.BNB_MAINNET_RPC),
chainName: 'bnb',
FastBridgeV2Address: '0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E',
FastBridgeV2StartBlock: 40497843, // first block and new block
},
disableCache: true,
[1]: {
transport: http(process.env.ETH_MAINNET_RPC),
chainName: 'ethereum',
FastBridgeV2Address: '0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E',
// FastBridgeV2StartBlock: 19420718, first block
FastBridgeV2StartBlock: 20426589, // new block
},
[10]: {
transport: http(process.env.OPTIMISM_MAINNET_RPC),
chainName: 'optimism',
FastBridgeV2Address: '0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E',
// FastBridgeV2StartBlock: 117334308, first block
FastBridgeV2StartBlock: 123416470, // new block
},
[42161]: {
transport: http(process.env.ARBITRUM_MAINNET_RPC),
chainName: 'arbitrum',
FastBridgeV2Address: '0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E',
// FastBridgeV2StartBlock: 189700328, first block
FastBridgeV2StartBlock: 237979967, // new block
},
[8453]: {
transport: http(process.env.BASE_MAINNET_RPC),
chainName: 'base',
FastBridgeV2Address: '0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E',
// FastBridgeV2StartBlock: 12478374, first block
FastBridgeV2StartBlock: 17821292, // new block
},
[81457]: {
transport: http(process.env.BLAST_MAINNET_RPC),
chainName: 'blast',
FastBridgeV2Address: '0x34F52752975222d5994C206cE08C1d5B329f24dD',
// FastBridgeV2StartBlock: 6378234, first block
FastBridgeV2StartBlock: 6811045, // new block
},
[534352]: {
transport: http(process.env.SCROLL_MAINNET_RPC),
chainName: 'scroll',
FastBridgeV2Address: '0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E',
// FastBridgeV2StartBlock: 5357000, first block
FastBridgeV2StartBlock: 7941653, // new block
},
[59144]: {
transport: http(process.env.LINEA_MAINNET_RPC),
chainName: 'linea',
FastBridgeV2Address: '0x34F52752975222d5994C206cE08C1d5B329f24dD',
FastBridgeV2StartBlock: 7124666, // first block and new block
},
[56]: {
transport: http(process.env.BNB_MAINNET_RPC),
chainName: 'bnb',
FastBridgeV2Address: '0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E',
FastBridgeV2StartBlock: 40497843, // first block and new block
},
disableCache: true,
}

export const networkDetails = {
[ethereumChainId]: {
name: configByChainId[ethereumChainId].chainName,
FastBridgeV2: {
address: configByChainId[ethereumChainId].FastBridgeV2Address,
abi: FastBridgeV2Abi,
startBlock: configByChainId[ethereumChainId].FastBridgeV2StartBlock,
},
[ethereumChainId]: {
name: configByChainId[ethereumChainId].chainName,
FastBridgeV2: {
address: configByChainId[ethereumChainId].FastBridgeV2Address,
abi: FastBridgeV2Abi,
startBlock: configByChainId[ethereumChainId].FastBridgeV2StartBlock,
},
[optimismChainId]: {
name: configByChainId[optimismChainId].chainName,
FastBridgeV2: {
address: configByChainId[optimismChainId].FastBridgeV2Address,
abi: FastBridgeV2Abi,
startBlock: configByChainId[optimismChainId].FastBridgeV2StartBlock,
},
},
[optimismChainId]: {
name: configByChainId[optimismChainId].chainName,
FastBridgeV2: {
address: configByChainId[optimismChainId].FastBridgeV2Address,
abi: FastBridgeV2Abi,
startBlock: configByChainId[optimismChainId].FastBridgeV2StartBlock,
},
[arbitrumChainId]: {
name: configByChainId[arbitrumChainId].chainName,
FastBridgeV2: {
address: configByChainId[arbitrumChainId].FastBridgeV2Address,
abi: FastBridgeV2Abi,
startBlock: configByChainId[arbitrumChainId].FastBridgeV2StartBlock,
},
},
[arbitrumChainId]: {
name: configByChainId[arbitrumChainId].chainName,
FastBridgeV2: {
address: configByChainId[arbitrumChainId].FastBridgeV2Address,
abi: FastBridgeV2Abi,
startBlock: configByChainId[arbitrumChainId].FastBridgeV2StartBlock,
},
[baseChainId]: {
name: configByChainId[baseChainId].chainName,
FastBridgeV2: {
address: configByChainId[baseChainId].FastBridgeV2Address,
abi: FastBridgeV2Abi,
startBlock: configByChainId[baseChainId].FastBridgeV2StartBlock,
},
},
[baseChainId]: {
name: configByChainId[baseChainId].chainName,
FastBridgeV2: {
address: configByChainId[baseChainId].FastBridgeV2Address,
abi: FastBridgeV2Abi,
startBlock: configByChainId[baseChainId].FastBridgeV2StartBlock,
},
[blastChainId]: {
name: configByChainId[blastChainId].chainName,
FastBridgeV2: {
address: configByChainId[blastChainId].FastBridgeV2Address,
abi: FastBridgeV2Abi,
startBlock: configByChainId[blastChainId].FastBridgeV2StartBlock,
},
},
[blastChainId]: {
name: configByChainId[blastChainId].chainName,
FastBridgeV2: {
address: configByChainId[blastChainId].FastBridgeV2Address,
abi: FastBridgeV2Abi,
startBlock: configByChainId[blastChainId].FastBridgeV2StartBlock,
},
[scrollChainId]: {
name: configByChainId[scrollChainId].chainName,
FastBridgeV2: {
address: configByChainId[scrollChainId].FastBridgeV2Address,
abi: FastBridgeV2Abi,
startBlock: configByChainId[scrollChainId].FastBridgeV2StartBlock,
},
},
[scrollChainId]: {
name: configByChainId[scrollChainId].chainName,
FastBridgeV2: {
address: configByChainId[scrollChainId].FastBridgeV2Address,
abi: FastBridgeV2Abi,
startBlock: configByChainId[scrollChainId].FastBridgeV2StartBlock,
},
[lineaChainId]: {
name: configByChainId[lineaChainId].chainName,
FastBridgeV2: {
address: configByChainId[lineaChainId].FastBridgeV2Address,
abi: FastBridgeV2Abi,
startBlock: configByChainId[lineaChainId].FastBridgeV2StartBlock,
},
},
[lineaChainId]: {
name: configByChainId[lineaChainId].chainName,
FastBridgeV2: {
address: configByChainId[lineaChainId].FastBridgeV2Address,
abi: FastBridgeV2Abi,
startBlock: configByChainId[lineaChainId].FastBridgeV2StartBlock,
},
[bnbChainId]: {
name: configByChainId[bnbChainId].chainName,
FastBridgeV2: {
address: configByChainId[bnbChainId].FastBridgeV2Address,
abi: FastBridgeV2Abi,
startBlock: configByChainId[bnbChainId].FastBridgeV2StartBlock,
},
},
[bnbChainId]: {
name: configByChainId[bnbChainId].chainName,
FastBridgeV2: {
address: configByChainId[bnbChainId].FastBridgeV2Address,
abi: FastBridgeV2Abi,
startBlock: configByChainId[bnbChainId].FastBridgeV2StartBlock,
},
},
} as Record<number, AddressConfig>

const config = createConfig({
networks: {
networks: {
[configByChainId[ethereumChainId].chainName]: {
chainId: ethereumChainId,
transport: configByChainId[ethereumChainId].transport,
// disableCache: configByChainId.disableCache,
},
[configByChainId[optimismChainId].chainName]: {
chainId: optimismChainId,
transport: configByChainId[optimismChainId].transport,
// disableCache: configByChainId.disableCache,
},
[configByChainId[arbitrumChainId].chainName]: {
chainId: arbitrumChainId,
transport: configByChainId[arbitrumChainId].transport,
// disableCache: configByChainId.disableCache,
},
[configByChainId[baseChainId].chainName]: {
chainId: baseChainId,
transport: configByChainId[baseChainId].transport,
// disableCache: configByChainId.disableCache,
},
[configByChainId[blastChainId].chainName]: {
chainId: blastChainId,
transport: configByChainId[blastChainId].transport,
// disableCache: configByChainId.disableCache,
},
[configByChainId[scrollChainId].chainName]: {
chainId: scrollChainId,
transport: configByChainId[scrollChainId].transport,
// disableCache: configByChainId.disableCache,
},
[configByChainId[lineaChainId].chainName]: {
chainId: lineaChainId,
transport: configByChainId[lineaChainId].transport,
// disableCache: configByChainId.disableCache,
},
[configByChainId[bnbChainId].chainName]: {
chainId: bnbChainId,
transport: configByChainId[bnbChainId].transport,
// disableCache: configByChainId.disableCache,
},
},
contracts: {
FastBridgeV2: {
network: {
[configByChainId[ethereumChainId].chainName]: {
chainId: ethereumChainId,
transport: configByChainId[ethereumChainId].transport,
// disableCache: configByChainId.disableCache,
address: networkDetails[ethereumChainId]?.FastBridgeV2.address,
startBlock: networkDetails[ethereumChainId]?.FastBridgeV2.startBlock,
},
[configByChainId[optimismChainId].chainName]: {
chainId: optimismChainId,
transport: configByChainId[optimismChainId].transport,
// disableCache: configByChainId.disableCache,
address: networkDetails[optimismChainId]?.FastBridgeV2.address,
startBlock: networkDetails[optimismChainId]?.FastBridgeV2.startBlock,
},
[configByChainId[arbitrumChainId].chainName]: {
chainId: arbitrumChainId,
transport: configByChainId[arbitrumChainId].transport,
// disableCache: configByChainId.disableCache,
address: networkDetails[arbitrumChainId]?.FastBridgeV2.address,
startBlock: networkDetails[arbitrumChainId]?.FastBridgeV2.startBlock,
},
[configByChainId[baseChainId].chainName]: {
chainId: baseChainId,
transport: configByChainId[baseChainId].transport,
// disableCache: configByChainId.disableCache,
address: networkDetails[baseChainId]?.FastBridgeV2.address,
startBlock: networkDetails[baseChainId]?.FastBridgeV2.startBlock,
},
[configByChainId[blastChainId].chainName]: {
chainId: blastChainId,
transport: configByChainId[blastChainId].transport,
// disableCache: configByChainId.disableCache,
address: networkDetails[blastChainId]?.FastBridgeV2.address,
startBlock: networkDetails[blastChainId]?.FastBridgeV2.startBlock,
},
[configByChainId[scrollChainId].chainName]: {
chainId: scrollChainId,
transport: configByChainId[scrollChainId].transport,
// disableCache: configByChainId.disableCache,
address: networkDetails[scrollChainId]?.FastBridgeV2.address,
startBlock: networkDetails[scrollChainId]?.FastBridgeV2.startBlock,
},
[configByChainId[lineaChainId].chainName]: {
chainId: lineaChainId,
transport: configByChainId[lineaChainId].transport,
// disableCache: configByChainId.disableCache,
address: networkDetails[lineaChainId]?.FastBridgeV2.address,
startBlock: networkDetails[lineaChainId]?.FastBridgeV2.startBlock,
},
[configByChainId[bnbChainId].chainName]: {
chainId: bnbChainId,
transport: configByChainId[bnbChainId].transport,
// disableCache: configByChainId.disableCache,
address: networkDetails[bnbChainId]?.FastBridgeV2.address,
startBlock: networkDetails[bnbChainId]?.FastBridgeV2.startBlock,
},
},
contracts: {
FastBridgeV2: {
network: {
[configByChainId[ethereumChainId].chainName]: {
address: networkDetails[ethereumChainId]?.FastBridgeV2.address,
startBlock: networkDetails[ethereumChainId]?.FastBridgeV2.startBlock,
},
[configByChainId[optimismChainId].chainName]: {
address: networkDetails[optimismChainId]?.FastBridgeV2.address,
startBlock: networkDetails[optimismChainId]?.FastBridgeV2.startBlock,
},
[configByChainId[arbitrumChainId].chainName]: {
address: networkDetails[arbitrumChainId]?.FastBridgeV2.address,
startBlock: networkDetails[arbitrumChainId]?.FastBridgeV2.startBlock,
},
[configByChainId[baseChainId].chainName]: {
address: networkDetails[baseChainId]?.FastBridgeV2.address,
startBlock: networkDetails[baseChainId]?.FastBridgeV2.startBlock,
},
[configByChainId[blastChainId].chainName]: {
address: networkDetails[blastChainId]?.FastBridgeV2.address,
startBlock: networkDetails[blastChainId]?.FastBridgeV2.startBlock,
},
[configByChainId[scrollChainId].chainName]: {
address: networkDetails[scrollChainId]?.FastBridgeV2.address,
startBlock: networkDetails[scrollChainId]?.FastBridgeV2.startBlock,
},
[configByChainId[lineaChainId].chainName]: {
address: networkDetails[lineaChainId]?.FastBridgeV2.address,
startBlock: networkDetails[lineaChainId]?.FastBridgeV2.startBlock,
},
[configByChainId[bnbChainId].chainName]: {
address: networkDetails[bnbChainId]?.FastBridgeV2.address,
startBlock: networkDetails[bnbChainId]?.FastBridgeV2.startBlock,
},
},
abi: FastBridgeV2Abi,
},
abi: FastBridgeV2Abi,
},
},
})

export default config
export default config
Loading

0 comments on commit be9caf7

Please sign in to comment.