Private constructor. Instead, use PolygonOnPolygonSDK.getInstance
.
Contract addresses by current network mode.
currentAccount — connected account.
Network mode.
readProvider — provider which allows to read data without connecting the wallet.
stakeGasFee — cached stake gas fee.
writeProvider — provider which has signer for signing transactions.
instance — SDK instance.
Returns true
if instance is initialized with production mode.
Add token to wallet.
token symbol (aPOLb or ankrPOL)
Approve ankrPOL for SwapPool, i.e. allow SwapPool smart contract to access and transfer ankrPOL tokens.
Internal function to convert wei value to human-readable format.
value in wei
Internal function to convert wei value to human-readable format.
value in wei
Return aPOLb token balance.
Return aPOLb ratio.
Internal function to get aPOLb token contract.
Return ankrPOL token allowance.
Return ankrPOL token balance.
Returns amount of the ankrPOL token pool liquidity from SwapPool contract.
Returns amount of the ankrPOL token pool liquidity in POL from SwapPool contract.
Return ankrPOL/POL ratio.
Internal function to get ankrPOL token contract.
Internal function to return increased gas limit.
initial gas limit
Get minimum stake amount.
Returns amount of the POL token pool liquidity in ankrPOL from SwapPool contract.
Get total pending unstake amount.
Get pending data for aPOLb and ankrPOL.
Return POL token balance.
Internal function to get POL token contract.
Get stake fee in percents.
Get stake gas fee.
amount to stake
token symbol (aPOLb or ankrPOL) as reserved value (not using now)
Internal function to get SwapPool contract.
Get transaction data.
transaction hash
Get transaction receipt.
transaction hash
Get unstake fee in percents.
Internal function get write provider. If provider is not connected, it will be connected.
Internal function to check the current network.
current selected provider
Stake token.
amount of token
choose which token to receive (aPOLb or ankrPOL)
Unstake token.
amount to unstake
choose which token to unstake (aPOLb or ankrPOL)
Initialization method for the SDK.
Auto-connects writeProvider if chains are the same. Initializes readProvider to support multiple chains.
user defined providers
Generated using TypeDoc
PolygonOnPolygonSDK allows you to interact with Polygon Liquid Staking smart contracts on the Polygon blockchain: POL, aPOLb, ankrPOL, and SwapPool.
For more information on Polygon Liquid Staking from Ankr, refer to the development details.