<aside> 👋 Hey there! We’re very excited to move forward with your application and get a chance to dive deeper into the Senior Backend Engineer/Senior Full Stack Engineer role at LI.FI!

You can share your solution via GitHub or any similar easy-to-review format. If you want your link to stay private, you can invite our team members directly so they can review your code but make sure to still send us the link of the repository: <chybisov> and <ivansokalskyi>.

Please make sure that your submission is:

(a) carefully crafted: it's ok to take functional shortcuts, but structurally the code must be sound; (b) production-ready: in the sense that thorough error handling and tests are a must, not a good to have; (c) simple: please avoid using big opinionated frameworks like NestJS; (d) well-documented: please add comments to your code, and document any next steps you would take or any areas you didn’t have time to implement fully.

Remember, we're looking for an example of the type of work you strive for, not just a proof of concept. Please aim to demonstrate the quality and standard of work you’d bring to the team.

If you have any questions or doubts, please reach out to María [email protected].

</aside>

Background

We have a Smart Contract which is responsible for collecting fees for our transactions when certain conditions are met. This contract is called the FeeCollector and is deployed to all EVM chains that we support. You can see if for example on Polygon.

Every time a transaction is submitted that includes fee collection, an event is emitted on this contract. You can see those events here.

<aside> 💡 Transactions are grouped in EVM Chains in so called blocks. Every block has a unique tag. Emitted events on a smart contract can be queried for a range of blocks.

</aside>

We would like to have the functionality to scan those emitted events, store them in our database and request them based on the integrator that the fees were collected for.

Acceptance Criteria

Implementation Consideration

Helper Functions

The below code snippets provides some examples how to load the FeeCollector events from Polygon. Feel free to use the code for your solution but feel free to change anything to fit your and the applications needs.