hello!
How does one retrieve all events from a given block? Not events from a certain contract, but all events of the block.
Is it achievable? If yes, then what should I know to achieve this?
Dec 13, 2022, 10:38 AM
doing it in general it's kinda intensive, you should
1) get all the tx in the block
2) get all the events in a single tx, for all the tx in the block
while looping all blocks
https://www.quicknode.com/docs/ethereum/eth_getLogs
1) get all the tx in the block
2) get all the events in a single tx, for all the tx in the block
while looping all blocks
https://www.quicknode.com/docs/ethereum/eth_getLogs
proxies are dangerous and complex, you want to use the library made by the creators of those, that does some "checks" to your contracts, before deploy and before an upgrade
Dec 13, 2022, 12:13 PM
when using ethers, pass null as the contract address and cast it to unknown and then to string
it accepts it and behaves accordingly but the type doesn't allow null
Dec 13, 2022, 1:22 PM