UniswapV2PriceProviderMock
Overview
License: MIT
This implementation can be affected by price manipulation due to not using TWAP. For development purposes only
Structs info
PriceInfo
UniswapV2Metadata
Events info
GrantModeratorRole
RevokeModeratorRole
SetTokenAndPrice
ChangeActive
SetTokenDecimals
Constants info
MODERATOR_ROLE (0x797669c9)
DESCRIPTION (0xf1ae8856)
State variables info
tokenDecimals (0x3b97e856)
uniswapV2Metadata (0x809205db)
tokenPrice (0x84ba3f69)
Modifiers info
onlyAdmin
onlyModerator
Functions info
initialize (0x8129fc1c)
grantModerator (0x6981c7ae)
revokeModerator (0x36445636)
setTokenDecimals (0xf2cf47be)
Sets the number of decimals used by the token. Only the moderator can call this function.
Parameters:
setTokenAndPrice (0x179750ec)
changeActive (0x258a4532)
Changes the active status of a token.
Parameters:
isListed (0xf794062e)
Returns a boolean indicating whether the given token address is listed in the price provider.
Parameters:
Return values:
isActive (0x9f8a13d7)
Returns whether a token is active or not.
Parameters:
Return values:
getPrice (0x41976e09)
Returns the price of the specified token.
Parameters:
Return values:
getReserves (0x32749461)
getPriceDecimals (0x1b30aafc)
Returns the number of decimal places for the price returned by the price provider.
Return values:
Last updated