Pair class

Constructors

Pair(TokenAmount tokenAmountA, TokenAmount tokenAmountB, {Token? liqToken})

Properties

chainId → int
no setter
hashCode → int
The hash code for this object.
no setteroverride
liquidityToken ↔ Token?
getter/setter pair
reserve0 → TokenAmount
no setter
reserve1 → TokenAmount
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
token0 → Token
no setter
token0Price → Price
no setter
token1 → Token
no setter
token1Price → Price
no setter
tokenAmounts0 ↔ BigInt
getter/setter pair
tokenAmounts1 ↔ BigInt
getter/setter pair

Methods

getInputAmount(TokenAmount outputAmount) → List
returns list of values : 0 = inputAmount : TokenAmount 1 = nextPair : Pair
getLiquidityMinted(TokenAmount totalSupply, TokenAmount tokenAmountA, TokenAmount tokenAmountB) → TokenAmount
getLiquidityValue(Token token, TokenAmount totalSupply, TokenAmount liquidity, BigInt kLast, [bool feeOn = false]) → TokenAmount
getOutputAmount(TokenAmount inputAmount) → List
returns list of values : 0 = outputAmount : TokenAmount 1 = nextPair : Pair
involvesToken(Token token) → bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
priceOf(Token token) → Price
reserveOf(Token token) → TokenAmount
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

getAddress(Token tokenA, Token tokenB) → EthereumAddress?