Skip to content

Uniswap events fetcher and visualizer with Rust supporting block reorganization protection.

License

Notifications You must be signed in to change notification settings

gagiuntoli/Rust_Uniswap_Fetcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

This programs prints swap events information from the Uniswap USDC/DAI protocol. In case a block reorganization of the last 5 blocks takes place the program stops automatically.

Instructions

  1. Creates an .env file in the main folder with a valid Infura web sockets endpoint, e.g:
INFURA_WSS_ENDPOINT=wss://mainnet.infura.io/ws/v3/<INFURA_KEY>
  1. Build the project
cargo build
  1. Check the unit tests pass:
cargo test
  1. Run the main program:
cargo run

You will see in the console the current block numbers and hashes, as well as for the current block number - 5. The programs prints swap log events that happened in not reorganized blocks (current block number - 5).

About

Uniswap events fetcher and visualizer with Rust supporting block reorganization protection.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages