Token
currencyEquals
Returns true if the currencies are equivalent, false otherwise
currencyEquals(
currencyA: Currency!
currencyB: Currency!
): Boolean!
tokenEquals
Returns true if the tokens are equivalent, false otherwise
tokenEquals(
tokenA: Token!
tokenB: Token!
): Boolean!
tokenAmountEquals
Returns true if the token amounts are equivalent, false otherwise
tokenAmountEquals(
tokenAmountA: TokenAmount!
tokenAmountB: TokenAmount!
): Boolean!
tokenSortsBefore
Returns true if the address of tokenA would precede the address of token B when sorted alphabetically
tokenSortsBefore(
tokenA: Token!
tokenB: Token!
): Boolean!
getEther
Returns a native token (e.g. Ether) on the specified chain
getNative(
chainId: ChainId!
): Token!
getWETH
Returns a Wrapped Ether token on the specified chain
getWETH(
chainId: ChainId!
): Token!
isNative
Returns true if the token is native (e.g. Ether), false otherwise. A token representing Ether must have an empty string in its address field.
isNative(
token: Token!
): Boolean!
wrapToken
If the input token is Ether, the return value is Wrapped Ether; otherwise, the return value is the same as the input value.
wrapToken(
token: Token!
): Token!
wrapAmount
If the input token amount represents an amount of Ether, the return value represents the same amount in Wrapped Ether; otherwise, the return value is the same as the input value.
wrapAmount(
amount: TokenAmount!
): TokenAmount!