stack-orchestrator/app/data/config/ponder/ponder.config.ts
Nabarun Gogoi 5d19c56b0c
Upgrade Nitro version in stack and add nitro-rpc-client CLI (#557)
* Changes required for ponder container and upgrade ts-nitro version

* Fix empty CERC_RELAY_MULTIADDR env variable

* Add curl output for ponder payment channel

* Add `nitro-rpc-client` container in payments stack (#1)

* Add container for nitro-rpc-client

* Add nitro-rpc-client service

* Update nitro-rpc-client container

* Update demo.md in payments stack

---------

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>

* Update env variables used for go-nitro container

* Pass Nitro chain URL in watcher config

* Update ponder config chainUrl

* Remove curl check in ponder start script

* Upgrade node version to 18 in watcher-ts Dockerfile

* Update ponder section in the demo instructions

---------

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2023-10-05 14:57:47 +05:30

51 lines
1.4 KiB
TypeScript

import type { Config } from "@ponder/core";
import contractAddresses from "./nitro-addresses.json";
export const config: Config = {
networks: [
{
name: "fixturenet",
chainId: Number(process.env.PONDER_CHAIN_ID),
rpcUrl: process.env.PONDER_RPC_URL_1,
maxRpcRequestConcurrency: 1,
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!,
},
},
],
contracts: [
{
name: "AdventureGold",
network: "fixturenet",
abi: "./abis/AdventureGold.json",
address: "0x32353A6C91143bfd6C7d363B546e62a9A2489A20",
startBlock: 5,
maxBlockRange: 100,
},
],
nitro: {
privateKey: process.env.PONDER_NITRO_PK!,
chainPrivateKey: process.env.PONDER_NITRO_CHAIN_PK!,
chainUrl: process.env.PONDER_NITRO_CHAIN_URL!,
contractAddresses,
relayMultiAddr: process.env.RELAY_MULTIADDR!,
store: "./.ponder/nitro-db",
},
};