Function: assertCanonicalPair
assertCanonicalPair(
token0,token1):void
Asserts that a pair is in the contract's canonical order (token0 < token1 by plain string
comparison), which every write DTO requires. A pair a caller took from a stale quote or
position can be reversed; signing it would sign something other than what was priced.
Parameters
| Parameter | Type |
|---|---|
token0 | string |
token1 | string |
Returns
void
Throws
GSwapSDKError NON_CANONICAL_PAIR (params.token0, params.token1) otherwise.
non canonical pair