Skip to content

Comments

✨ add blockchain polling service#62

Merged
oscarwroche merged 17 commits intomainfrom
indexer_new
Sep 30, 2025
Merged

✨ add blockchain polling service#62
oscarwroche merged 17 commits intomainfrom
indexer_new

Conversation

@oscarwroche
Copy link
Collaborator

No description provided.

@oscarwroche oscarwroche force-pushed the indexer_new branch 3 times, most recently from f152412 to be5cce7 Compare September 24, 2025 09:05
@oscarwroche oscarwroche linked an issue Sep 24, 2025 that may be closed by this pull request
@oscarwroche oscarwroche force-pushed the indexer_new branch 5 times, most recently from 5d31501 to 4671a70 Compare September 30, 2025 08:51
@oscarwroche oscarwroche changed the title 🚧 wip ✨ add blockchain polling service Sep 30, 2025
@oscarwroche oscarwroche marked this pull request as ready for review September 30, 2025 09:00
Copy link
Contributor

@joelamouche joelamouche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A quick readme/md file would be nice. And renaming the service to blockchain-indexer would make it easier to understand for new contributors

#[async_trait]
impl EthereumEventPollingService for AlloyEthereumEventPollingService {
async fn poll(&self) -> Result<Vec<EthereumEvent>, Box<dyn Error>> {
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc".parse()?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should load rpc_url and chain id from env. Well here it looks like chain_id is not provided but comes from whatever rpc is provided

// Create a filter to get all logs from the latest block.
let filter = Filter::new()
.from_block(latest_block)
.event("Transfer(from,to,value)");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what's the plan for this? Shouldn't it be an input of the function?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha I see the whole logic here is specific to activity token minting.
So how do we support badge creation indexing in the future?

@oscarwroche oscarwroche merged commit 331a7cc into main Sep 30, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Be able to fetch attestations from the EAS graph in the backend

2 participants