The main goal of this challenge is to create a backend application writen in nodejs/typescript that consumes, processes and store blockchain data.
To achieve this, the following items are required.
- Create a fork of the current repository, once the challenge is done submit a proper PR.
- Instantiate a web3 o etherjs object with an public RPC (in this case we will use Avalanche EVM C-Chain)
- create a MongoDB database connection withing the runtime
Having this transaction as a starting point 0x508217c172c3cfe006ee9ca5bef621ba11a359461bacfc0494f1449a7d00f443 it is required to:
-
Use web3.js or ethers.js proper methods to fetch transaction data details
-
Fetch and save main contract ABI and bytecode and save them into a file and database
-
Understand and parse the event log to show in a básic REST response the decoded events and its parameters
-
Create a basic REST endpoint that once queried saves the parsed data into a MongoDB document.
-
Create a basic REST endpoint to get the previously saved data.
Must have:
- Basic error handling
- Basic README file
- Basic explaination of the work done
Extra points:
- unit testing
- Docker build