scaffold-eth / create-eth-extensions

Extensions for create-eth (npx tool for Scaffold-ETH)
MIT License
6 stars 5 forks source link

Ponder extension #7

Closed Pabl0cks closed 2 months ago

Pabl0cks commented 3 months ago

We already have The Graph as curated extension, would it make sense to have also Ponder as an alternative for those that want a more minimal approach for their indexing needs?

damianmarti commented 3 months ago

Yeees! I can build it!

carletex commented 3 months ago

Great @damianmarti !!

Some ideas:

  1. We can use a well-known contract as an example (a good default schema + config with comments)
  2. Docker to test locally with postgres
  3. Index only the latest X blocks (as default). if not, if 1 it's a popular example it'll crush the indexer with requests haha

Damu, feel free to open a draft PR and we can keep discussing there!

Thanks!!

damianmarti commented 3 months ago

Great @damianmarti !!

Some ideas:

  1. We can use a well-known contract as an example (a good default schema + config with comments)

My idea is to set up Ponder to use the network config from scaffoldConfig and the ABI from the deployed contracts. I can use the simple YourContract as an example (maybe saving a log with all the greeting changes) or to be able to use another contract, I should add the contract to externalContracts (I'm not sure if it's a good idea).

  1. Docker to test locally with postgres

I think we don't need this, running ponder dev (I can add this to the root package.json scripts sections). it starts a Ponder indexer using SQLite.

  1. Index only the latest X blocks (as default). if not, if 1 it's a popular example it'll crush the indexer with requests haha

Damu, feel free to open a draft PR and we can keep discussing there!

Thanks!!

damianmarti commented 2 months ago

Done! https://github.com/scaffold-eth/create-eth-extensions/pull/12