Skip to main content
100%

Gist 58395de02e4f931d520a4cf3901d3cf3

✓ Published0🌍 Public
Aamazingandyyy
Last edited Feb 10, 2022
Created on Feb 10, 2022

This example demonstrates how to query and display liquidity reserves for the Uniswap V2 UNI/USDC trading pair on the Ethereum blockchain. The Solidity contract `Play` calls the UniswapV2Factory interface to retrieve the pair address, then uses the UniswapV2Pair interface’s `getReserves()` method to obtain the current reserve amounts. The visualization renders these reserve values as raw numerical data, relying on the contract’s public `findReserve()` function to expose the pair’s token balances. The code references the deployed UniswapV2 factory at `0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f` and fetches reserves directly from the on-chain pair contract.

AI-generated description

Similar vizzes