Skip to content

Conversation

yash-atreya
Copy link
Contributor

@yash-atreya yash-atreya commented Sep 26, 2024

Motivation

Ref #21

Solution

Adds builder methods to instantiate BlockchainDbMeta

 let block =
        provider.get_block(BlockId::latest(), BlockTransactionsKind::Hashes).await?.unwrap();

 let meta = BlockchainDbMeta::default()
        .with_chain_id(31337)
        .with_block(block.inner)
        .with_url(anvil.endpoint());

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@yash-atreya
Copy link
Contributor Author

yash-atreya commented Sep 26, 2024

This is not breaking, keeping the BlockchainDbMeta::new() method as is.

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

type nits

yash-atreya and others added 3 commits September 26, 2024 14:11
@mattsse

This comment was marked as resolved.

@mattsse mattsse merged commit 58b7ce2 into main Sep 26, 2024
16 checks passed
@mattsse mattsse deleted the yash/blockchain-db-builder branch September 26, 2024 14:26
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.

3 participants