2 Comments

Thank you for this informative tutorial! I've learned a lot as a crypto-newbie.

I forked your SQL code, and tried to organize and add detailed comments to help me understand the ideas, but I was struggling to figure out the complex logic at:

1. line 151~154

2. line 128~133

does it only works for this specific contract (where maybe on trace just emit exactly one event) or does it always works for any smart contract? why?

Thank you

- Andrew's original SQL: https://dune.com/queries/2458023/4041368?tx+hash_t6c1ea=0x9d88a973b5bf82bde66ffc9bdefb7318911868509c7da97a06cd2219081354f8&blocknumber_n26d66=20098820

- my fork & commented version: https://dune.com/queries/4785529/7936487?blocknumber_n26d66=20098820&tx+hash_t6c1ea=0x9d88a973b5bf82bde66ffc9bdefb7318911868509c7da97a06cd2219081354f8

they produced same result. I just wonder how the complicated logic worked for above 2 line ranges.

Expand full comment

Thanks a lot for your content! It is really helpful.

Expand full comment