MESHSwapView
This contract can check asset details and exchange estimates of meshswap service
Address
Polygon Mainnet : 0xF61e4ede9128A9FA9a128cB7D161F4e73bd464Da
Read-Only Functions
getPoolData
Details of the pool
Airdrop only between startBlock and endBlock of blocks in the network
Parameters
miningRate
: MESH distribution ratio numerator valuerateDecimals
: MESH distribution ratio denominator예) Daily MESH distribution ratio
miningRate - 130323276365080043, rateDecimals - 10000000000000000
130323276365080043 / 10000000000000000 = 13.03...%
token0
: LP token0reserveA
: Amount of token0 held by LPtoken1
: LP token1reserveB
: Amount of token1 held by LPairdropCount
: Number of airdrop plans in progress at LPairdropTokens
: Airdrop token address arrayairdropSettings
: Airdrop info array[0]: blockAmount, [1]: startBlock, [2]: endBlock
airdropSettings
Data format예) Token0, Token1 Airdrop
airdropTokens = [ Token0 address, Token1 address]
airdropSettings = [ Token0 blockAmount, Token0 startBlock, Token0 endBlock, Token1 blockAmount, Token1 startBlock, Token1 endBlock ]
getPendingReward
User's claimable reward information
Parameters
meshReward
: Claimable MESHairdropCount
: Number of airdrop plans the LP hasairdropTokens
: Airdrop token address arrayairdropRewards
: Arrangement of Airdrop token amount Information claimable
airdrop
data format예) Token0, Token1 Airdrop
airdropTokens = [ Token0 address, Token1 address]
airdropSettings = [ Token0 reward, Token1 reward ]
estimateSwap
MESHswap swap estimate lookup function
Input Parameters
amountIn
: Token amount to be exchangedpath
: exchange token path
example
WMATIC -> MESH
amountIn = 1000000000000000000 ( =1 WMATIC )
path =
["0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270", "0x82362Ec182Db3Cf7829014Bc61E9BE8a2E82868a"]
WMATIC -> USDC -> MESH
path =
["0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270", "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", "0x82362Ec182Db3Cf7829014Bc61E9BE8a2E82868a"]
Last updated