Discover more of SonicScan Block Explorer's tools and services in one place.
Contract Source Code:
File 1 of 1 : Uniswap3PriceData.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface Uniswap3SC{ function fee() external view returns (uint24); function slot0() external view returns (uint160 sqrtPriceX96); //pay atention to be the first param returned, otherwise you get other data. } contract Uniswap3PriceData{ function getPriceData(address pool) external view returns (uint160 sqrtPriceX96, uint24 fee){ //create SC Uniswap3SC poolSC = Uniswap3SC(pool); sqrtPriceX96 = poolSC.slot0(); fee = poolSC.fee(); } }
Please enter a contract address above to load the contract details and source code.
Please DO NOT store any passwords or private keys here. A private note (up to 100 characters) can be saved and is useful for transaction tracking.
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.