Skip to content

Commit

Permalink
Split networks (#49)
Browse files Browse the repository at this point in the history
* Split networks

* Split networks

* docker compose

* Testnets
  • Loading branch information
fewensa authored Jun 19, 2024
1 parent 539cbce commit 9af7d0a
Show file tree
Hide file tree
Showing 27 changed files with 945 additions and 267 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ yarn-error.log*

/ponder.config.ts
*.local.*

.data
45 changes: 45 additions & 0 deletions definition/mainnets/ponder.arbitrum.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { createConfig, loadBalance } from "@ponder/core";
import { http } from "viem";

import { ORMPAbi as ORMPAbiV2 } from "./abis/v2/ORMPAbi";
import { SignaturePubAbi } from "./abis/v2/SignaturePubAbi";

const INFURA_API_KEY = process.env.INFURA_API_KEY;
const BLAST_API_KEY = process.env.BLAST_API_KEY;
const MAX_REQUESTS_PER_SECOND = 5;
const FAST_MAX_REQUESTS_PER_SECOND = 20;

export default createConfig({
networks: {
arbitrum: {
chainId: 42161,
transport: loadBalance([
http(`https://arbitrum-one.blastapi.io/${BLAST_API_KEY}`),
// "https://arb1.arbitrum.io/rpc"
http("https://hrpc.darwinia.network/arbitrum"),
// "https://rpc.ankr.com/arbitrum"
]),
maxRequestsPerSecond: FAST_MAX_REQUESTS_PER_SECOND,
},
},
contracts: {
// === V2
ORMPV2: {
abi: ORMPAbiV2,
address: "0x13b2211a7cA45Db2808F6dB05557ce5347e3634e",
network: {
arbitrum: {
startBlock: 217891600,
},
},
filter: {
event: [
"MessageAccepted",
"MessageDispatched",
"MessageAssigned",
"HashImported",
],
},
},
},
});
40 changes: 40 additions & 0 deletions definition/mainnets/ponder.blast.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { createConfig, loadBalance } from "@ponder/core";
import { http } from "viem";

import { ORMPAbi as ORMPAbiV2 } from "./abis/v2/ORMPAbi";
import { SignaturePubAbi } from "./abis/v2/SignaturePubAbi";

const INFURA_API_KEY = process.env.INFURA_API_KEY;
const BLAST_API_KEY = process.env.BLAST_API_KEY;
const MAX_REQUESTS_PER_SECOND = 5;
const FAST_MAX_REQUESTS_PER_SECOND = 20;

export default createConfig({
networks: {
blast: {
chainId: 81457,
transport: http("https://rpc.blast.io"),
maxRequestsPerSecond: MAX_REQUESTS_PER_SECOND,
},
},
contracts: {
// === V2
ORMPV2: {
abi: ORMPAbiV2,
address: "0x13b2211a7cA45Db2808F6dB05557ce5347e3634e",
network: {
blast: {
startBlock: 4293849,
},
},
filter: {
event: [
"MessageAccepted",
"MessageDispatched",
"MessageAssigned",
"HashImported",
],
},
},
},
});
122 changes: 0 additions & 122 deletions definition/mainnets/ponder.config.ts

This file was deleted.

44 changes: 44 additions & 0 deletions definition/mainnets/ponder.crab.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { createConfig, loadBalance } from "@ponder/core";
import { http } from "viem";

import { ORMPAbi as ORMPAbiV2 } from "./abis/v2/ORMPAbi";
import { SignaturePubAbi } from "./abis/v2/SignaturePubAbi";

const INFURA_API_KEY = process.env.INFURA_API_KEY;
const BLAST_API_KEY = process.env.BLAST_API_KEY;
const MAX_REQUESTS_PER_SECOND = 5;
const FAST_MAX_REQUESTS_PER_SECOND = 20;

export default createConfig({
networks: {
crab: {
chainId: 44,
transport: loadBalance([
http("http://c1.crab-rpc.itering.io:9944/"),
// http("https://hrpc.darwinia.network/crab"),
// http("http://c2.crab-rpc.itering.io:9944/"),
]),
maxRequestsPerSecond: MAX_REQUESTS_PER_SECOND,
},
},
contracts: {
// === V2
ORMPV2: {
abi: ORMPAbiV2,
address: "0x13b2211a7cA45Db2808F6dB05557ce5347e3634e",
network: {
crab: {
startBlock: 2900604,
},
},
filter: {
event: [
"MessageAccepted",
"MessageDispatched",
"MessageAssigned",
"HashImported",
],
},
},
},
});
50 changes: 50 additions & 0 deletions definition/mainnets/ponder.darwinia.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import {createConfig} from "@ponder/core";
import {http} from "viem";

import {ORMPAbi as ORMPAbiV2} from "./abis/v2/ORMPAbi";
import {SignaturePubAbi} from "./abis/v2/SignaturePubAbi";

const INFURA_API_KEY = process.env.INFURA_API_KEY;
const BLAST_API_KEY = process.env.BLAST_API_KEY;
const MAX_REQUESTS_PER_SECOND = 5;
const FAST_MAX_REQUESTS_PER_SECOND = 20;

export default createConfig({
networks: {
darwinia: {
chainId: 46,
transport: http("http://c1.darwinia-rpc.itering.io:9944/"),
// transport: http("https://hrpc.darwinia.network/darwinia"),
maxRequestsPerSecond: MAX_REQUESTS_PER_SECOND,
},
},
contracts: {
// === V2
ORMPV2: {
abi: ORMPAbiV2,
address: "0x13b2211a7cA45Db2808F6dB05557ce5347e3634e",
network: {
darwinia: {
startBlock: 2830100,
},
},
filter: {
event: [
"MessageAccepted",
"MessageDispatched",
"MessageAssigned",
"HashImported",
],
},
},
SignaturePub: {
abi: SignaturePubAbi,
address: "0x57aa601a0377f5ab313c5a955ee874f5d495fc92",
network: {
darwinia: {
startBlock: 2849900,
},
},
},
},
});
41 changes: 41 additions & 0 deletions definition/mainnets/ponder.ethereum.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import {createConfig} from "@ponder/core";
import {http} from "viem";

import {ORMPAbi as ORMPAbiV2} from "./abis/v2/ORMPAbi";

const INFURA_API_KEY = process.env.INFURA_API_KEY;
const BLAST_API_KEY = process.env.BLAST_API_KEY;
const MAX_REQUESTS_PER_SECOND = 5;
const FAST_MAX_REQUESTS_PER_SECOND = 20;

export default createConfig({
networks: {
ethereum: {
chainId: 1,
// transport: http(`https://eth-mainnet.blastapi.io/${BLAST_API_KEY}`),
transport: http(`https://mainnet.infura.io/v3/${INFURA_API_KEY}`),

maxRequestsPerSecond: MAX_REQUESTS_PER_SECOND,
},
},
contracts: {
// === V2
ORMPV2: {
abi: ORMPAbiV2,
address: "0x13b2211a7cA45Db2808F6dB05557ce5347e3634e",
network: {
ethereum: {
startBlock: 20009605,
},
},
filter: {
event: [
"MessageAccepted",
"MessageDispatched",
"MessageAssigned",
"HashImported",
],
},
},
},
});
39 changes: 39 additions & 0 deletions definition/mainnets/ponder.moonbeam.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import {createConfig} from "@ponder/core";
import {http} from "viem";

import {ORMPAbi as ORMPAbiV2} from "./abis/v2/ORMPAbi";

const INFURA_API_KEY = process.env.INFURA_API_KEY;
const BLAST_API_KEY = process.env.BLAST_API_KEY;
const MAX_REQUESTS_PER_SECOND = 5;
const FAST_MAX_REQUESTS_PER_SECOND = 20;

export default createConfig({
networks: {
moonbeam: {
chainId: 1284,
transport: http(`https://moonbeam.blastapi.io/${BLAST_API_KEY}`),
maxRequestsPerSecond: MAX_REQUESTS_PER_SECOND,
},
},
contracts: {
// === V2
ORMPV2: {
abi: ORMPAbiV2,
address: "0x13b2211a7cA45Db2808F6dB05557ce5347e3634e",
network: {
moonbeam: {
startBlock: 6294138,
},
},
filter: {
event: [
"MessageAccepted",
"MessageDispatched",
"MessageAssigned",
"HashImported",
],
},
},
},
});
Loading

0 comments on commit 9af7d0a

Please sign in to comment.