2023-10-12 08:46:44 +00:00
|
|
|
import { type Config, AppMode } from "@ponder/core";
|
2023-10-03 12:10:34 +00:00
|
|
|
|
2023-10-12 08:46:44 +00:00
|
|
|
import contractAddresses from "./nitro-addresses.json" assert { type: "json" };
|
2023-10-03 12:10:34 +00:00
|
|
|
|
|
|
|
export const config: Config = {
|
|
|
|
networks: [
|
|
|
|
{
|
|
|
|
name: "fixturenet",
|
|
|
|
chainId: Number(process.env.PONDER_CHAIN_ID),
|
|
|
|
rpcUrl: process.env.PONDER_RPC_URL_1,
|
|
|
|
maxRpcRequestConcurrency: 1,
|
2023-10-05 09:27:47 +00:00
|
|
|
pollingInterval: 5000,
|
|
|
|
payments: {
|
|
|
|
nitro: {
|
|
|
|
address: process.env.UPSTREAM_NITRO_ADDRESS!,
|
|
|
|
multiAddr: process.env.UPSTREAM_NITRO_MULTIADDR!,
|
|
|
|
fundingAmounts: {
|
|
|
|
// TODO: Pass amounts from env
|
|
|
|
directFund: "1000000000000",
|
|
|
|
virtualFund: "1000000000",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
paidRPCMethods: [
|
|
|
|
"eth_getLogs",
|
|
|
|
"eth_getBlockByNumber",
|
|
|
|
"eth_getBlockByHash",
|
|
|
|
],
|
|
|
|
amount: process.env.UPSTREAM_NITRO_PAY_AMOUNT!,
|
|
|
|
},
|
2023-10-03 12:10:34 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
contracts: [
|
|
|
|
{
|
|
|
|
name: "AdventureGold",
|
|
|
|
network: "fixturenet",
|
|
|
|
abi: "./abis/AdventureGold.json",
|
2023-10-18 12:10:55 +00:00
|
|
|
address: process.env.ERC20_CONTRACT,
|
2023-10-19 06:56:10 +00:00
|
|
|
startBlock: 1,
|
2023-10-03 12:10:34 +00:00
|
|
|
maxBlockRange: 100,
|
|
|
|
},
|
|
|
|
],
|
2023-10-12 08:46:44 +00:00
|
|
|
options: {
|
|
|
|
mode: AppMode.Indexer,
|
|
|
|
},
|
2023-10-03 12:10:34 +00:00
|
|
|
nitro: {
|
2023-10-05 09:27:47 +00:00
|
|
|
privateKey: process.env.PONDER_NITRO_PK!,
|
|
|
|
chainPrivateKey: process.env.PONDER_NITRO_CHAIN_PK!,
|
|
|
|
chainUrl: process.env.PONDER_NITRO_CHAIN_URL!,
|
2023-10-03 12:10:34 +00:00
|
|
|
contractAddresses,
|
2023-10-05 09:27:47 +00:00
|
|
|
relayMultiAddr: process.env.RELAY_MULTIADDR!,
|
2023-10-03 12:10:34 +00:00
|
|
|
store: "./.ponder/nitro-db",
|
2023-10-17 10:51:40 +00:00
|
|
|
payments: {
|
|
|
|
cache: {
|
|
|
|
maxAccounts: 1000,
|
|
|
|
accountTTLInSecs: 1800,
|
|
|
|
maxVouchersPerAccount: 1000,
|
|
|
|
voucherTTLInSecs: 300,
|
|
|
|
maxPaymentChannels: 10000,
|
|
|
|
paymentChannelTTLInSecs: 1800,
|
|
|
|
},
|
|
|
|
ratesFile: "./base-rates-config.json",
|
|
|
|
requestTimeoutInSecs: 10,
|
|
|
|
},
|
2023-10-03 12:10:34 +00:00
|
|
|
},
|
|
|
|
};
|