Skip to content

Instantly share code, notes, and snippets.

View hernan-erasmo's full-sized avatar
🤓
Working from home

Hernán Erasmo hernan-erasmo

🤓
Working from home
  • Buenos Aires, Argentina
View GitHub Profile
@hernan-erasmo
hernan-erasmo / foundry.Dockerfile
Created March 11, 2024 00:46
Foundry on Docker
FROM ghcr.io/foundry-rs/foundry
WORKDIR /app
ENV INFURA_URL=""
ENV ALCHEMY_URL=""
CMD ["sh"]
@hernan-erasmo
hernan-erasmo / check_bloom.py
Last active November 2, 2023 02:12
How to check the logsBloom of an Ethereum block for topics?
from eth_bloom import BloomFilter
def check_bloom():
logs_bloom = "0x123..."
logs_bloom_bytes = int(logs_bloom, 16)
topic = "0x321..."
topic_bytes = bytes.fromhex(topic[2:])
filter = BloomFilter(logs_bloom_bytes)