Pay for queries from watcher to indexer mode Ponder apps in payments stack #573

Merged
nikugogoi merged 8 commits from sk-split-ponder-container into main 2023-10-12 08:46:44 +00:00
3 changed files with 36 additions and 3 deletions
Showing only changes of commit bee88d81a4 - Show all commits

View File

@ -1,8 +1,9 @@
version: '3.7'
services:
ponder-app:
ponder-app-indexer:
restart: unless-stopped
hostname: ponder-app-indexer
image: cerc/ponder:local
working_dir: /app/examples/token-erc20
environment:
@ -16,6 +17,34 @@ services:
CERC_UPSTREAM_NITRO_MULTIADDR: ${CERC_UPSTREAM_NITRO_MULTIADDR:-/dns4/go-nitro/tcp/5005/ws/p2p/16Uiu2HAmSjXJqsyBJgcBUU2HQmykxGseafSatbpq5471XmuaUqyv}
CERC_UPSTREAM_NITRO_PAY_AMOUNT: ${CERC_UPSTREAM_NITRO_PAY_AMOUNT:-5000}
command: ["bash", "./ponder-start.sh"]
volumes:
- ../config/ponder/ponder-start.sh:/app/examples/token-erc20/ponder-start.sh
- ../config/ponder/ponder.config.ts:/app/examples/token-erc20/ponder.config.ts
- peers_ids:/peers
- nitro_deployment:/nitro
- ponder_nitro_data:/app/examples/token-erc20/.ponder/nitro-db
ports:
- "42070"
extra_hosts:
- "host.docker.internal:host-gateway"
ponder-app-watcher:
depends_on:
- ponder-app-indexer
restart: unless-stopped
image: cerc/ponder:local
working_dir: /app/examples/token-erc20
# TODO: Use different keys for nitro
environment:
CERC_PONDER_CHAIN_ID: ${PONDER_CHAIN_ID:-99}
CERC_PONDER_NITRO_PK: ${CERC_PONDER_NITRO_PK:-58368d20ff12f17669c06158c21d885897aa56f9be430edc789614bf9851d53f}
CERC_PONDER_NITRO_CHAIN_PK: ${CERC_PONDER_NITRO_CHAIN_PK:-fb1e9af328c283ca3e2486e7c24d13582b7912057d8b9542ff41503c85bc05c0}
CERC_PONDER_NITRO_CHAIN_URL: ${CERC_PONDER_NITRO_CHAIN_URL:-http://fixturenet-eth-geth-1:8546}
CERC_RELAY_MULTIADDR: ${CERC_RELAY_MULTIADDR}
CERC_UPSTREAM_NITRO_ADDRESS: ${CERC_UPSTREAM_NITRO_ADDRESS:-0xAAA6628Ec44A8a742987EF3A114dDFE2D4F7aDCE}
CERC_UPSTREAM_NITRO_MULTIADDR: ${CERC_UPSTREAM_NITRO_MULTIADDR:-/dns4/go-nitro/tcp/5005/ws/p2p/16Uiu2HAmSjXJqsyBJgcBUU2HQmykxGseafSatbpq5471XmuaUqyv}
CERC_UPSTREAM_NITRO_PAY_AMOUNT: ${CERC_UPSTREAM_NITRO_PAY_AMOUNT:-5000}
command: ["bash", "./ponder-start.sh"]
volumes:
- ../config/ponder/ponder-start.sh:/app/examples/token-erc20/ponder-start.sh
- ../config/ponder/ponder.config.ts:/app/examples/token-erc20/ponder.config.ts

View File

@ -1,6 +1,6 @@
import type { Config } from "@ponder/core";
import contractAddresses from "./nitro-addresses.json";
import contractAddresses from "./nitro-addresses.json" assert { type: "json" };
export const config: Config = {
networks: [
@ -47,4 +47,8 @@ export const config: Config = {
relayMultiAddr: process.env.RELAY_MULTIADDR!,
store: "./.ponder/nitro-db",
},
options: {
/** GQL endpoint of the indexer, required when running app in watcher mode */
indexerGqlEndpoint: "http://ponder-app-indexer:42070/graphql"
}
};

View File

@ -18,7 +18,7 @@ repos:
- github.com/cerc-io/mobymask-snap
- github.com/cerc-io/mobymask-ui@v0.2.1
# ponder repo
- github.com/cerc-io/ponder@laconic
- github.com/cerc-io/ponder@laconic-esm
containers:
# fixturenet images
- cerc/go-ethereum