From 2b4745c771cc7712c97e9b0da2f34e21464fedee Mon Sep 17 00:00:00 2001 From: Nabarun Date: Thu, 19 Oct 2023 12:19:51 +0530 Subject: [PATCH] Decrease Ponder start block to process contract transfer event at deployment --- app/data/config/ponder/ponder.indexer-1.config.ts | 2 +- app/data/config/ponder/ponder.indexer-2.config.ts | 2 +- app/data/config/ponder/ponder.watcher.config.ts | 2 +- app/data/stacks/fixturenet-payments/ponder-demo.md | 8 ++++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/data/config/ponder/ponder.indexer-1.config.ts b/app/data/config/ponder/ponder.indexer-1.config.ts index dac02724..31ae699c 100644 --- a/app/data/config/ponder/ponder.indexer-1.config.ts +++ b/app/data/config/ponder/ponder.indexer-1.config.ts @@ -35,7 +35,7 @@ export const config: Config = { network: "fixturenet", abi: "./abis/AdventureGold.json", address: process.env.ERC20_CONTRACT, - startBlock: 5, + startBlock: 1, maxBlockRange: 100, }, ], diff --git a/app/data/config/ponder/ponder.indexer-2.config.ts b/app/data/config/ponder/ponder.indexer-2.config.ts index 7d69dc5b..c8e1b610 100644 --- a/app/data/config/ponder/ponder.indexer-2.config.ts +++ b/app/data/config/ponder/ponder.indexer-2.config.ts @@ -34,7 +34,7 @@ export const config: Config = { network: "fixturenet", abi: "./abis/AdventureGold.json", address: process.env.ERC20_CONTRACT, - startBlock: 5, + startBlock: 1, maxBlockRange: 100, }, ], diff --git a/app/data/config/ponder/ponder.watcher.config.ts b/app/data/config/ponder/ponder.watcher.config.ts index ab62f246..19e4ecb1 100644 --- a/app/data/config/ponder/ponder.watcher.config.ts +++ b/app/data/config/ponder/ponder.watcher.config.ts @@ -15,7 +15,7 @@ export const config: Config = { network: "fixturenet", abi: "./abis/AdventureGold.json", address: process.env.ERC20_CONTRACT, - startBlock: 5, + startBlock: 1, maxBlockRange: 100, }, ], diff --git a/app/data/stacks/fixturenet-payments/ponder-demo.md b/app/data/stacks/fixturenet-payments/ponder-demo.md index aecdef49..c915883b 100644 --- a/app/data/stacks/fixturenet-payments/ponder-demo.md +++ b/app/data/stacks/fixturenet-payments/ponder-demo.md @@ -158,8 +158,6 @@ Stack components: } } ``` - - * No entities will be returned at this point * Transfer an ERC20 token on chain @@ -175,4 +173,10 @@ Stack components: docker exec -it payments-ponder-er20-contracts-1 bash -c "yarn token:transfer:docker --token ${TOKEN_ADDRESS} --to 0xe22AD83A0dE117bA0d03d5E94Eb4E0d80a69C62a --amount 5000" ``` +* Wait for a log in watcher Ponder app + + ```bash + 06:40:47.567 INFO handlers Processed 1 event (up to Oct 19, 2023) + ``` + * Check the GQL query again in http://localhost:42069 to see a new `TransferEvent` entity