UniswapV3PriceProvider
Overview
License: MIT
Structs info
UniswapV3Metadata
UniswapV3MetadataPair
Events info
SetTokenAndPair
Emitted when the token and pair addresses are set for the UniswapV3PriceProvider contract.
Parameters:
ChangeActive
Emitted when the active status of a token changes.
Parameters:
SetTokenDecimals
Emitted when the token decimals is set.
Parameters:
SetTokenAndAggregator
Emitted when a token and its corresponding UniswapV3 aggregator path are set.
Parameters:
Constants info
MODERATOR_ROLE (0x797669c9)
DESCRIPTION (0xf1ae8856)
MAX_PRICE_PATH_LENGTH (0x01a9a5d3)
State variables info
tokenDecimals (0x3b97e856)
uniswapV3Metadata (0xe84cbb89)
uniswapV3MetadataPair (0x918d7a98)
Modifiers info
onlyModerator
Modifier to restrict access to functions to only the contract moderator.
Functions info
initialize (0x8129fc1c)
Initializes the contract by setting up the access control roles and the number of decimals for the USD token. decimals
is set to 18.
setTokenDecimals (0xf2cf47be)
Sets the number of decimals used by the token. Only the moderator can call this function.
Parameters:
setTokenAndPair (0x8d46526f)
Set token and aggregator path.
Requirements:
The token must be listed in the UniswapV3PriceProvider contract.
Only the contract moderator can call this function.
Parameters:
changeActive (0x258a4532)
Changes the active status of a token in the UniswapV3PriceProvider con tract.
Requirements:
The token must be listed in the UniswapV3PriceProvider contract.
Only the contract moderator can call this function.
Parameters:
isListed (0xf794062e)
Check if a token is listed on UniswapV3.
Parameters:
Return values:
isActive (0x9f8a13d7)
Returns whether the specified token is active or not.
Parameters:
Return values:
getPrice (0x41976e09)
This function requires that the token is active in the price provider. Returns the price of a given token in pairAsset, and the number of decimals for the price.
Parameters:
Return values:
getUnderlyingTokenPrice (0x8020c854)
getPriceDecimals (0x1b30aafc)
Returns the number of decimals used for the USD price.
Return values:
getUniswapV3Metadata (0xb790348b)
Returns the metadata set up for token.
Parameters:
Return values:
Last updated