@uniswap/v4-sdk
Version:
⚒️ An SDK for building applications on top of Uniswap V4
11 lines • 499 B
JavaScript
import { ADDRESS_ZERO } from '../internalConstants';
// Uniswap v4 supports native pools. Those currencies are represented by the zero address.
// TODO: Figure out if this is how we should be handling weird edge case tokens like CELO/Polygon/etc..
// Does interface treat those like ERC20 tokens or NATIVE tokens?
export function toAddress(currency) {
if (currency.isNative)
return ADDRESS_ZERO;
else
return currency.wrapped.address;
}
//# sourceMappingURL=currencyMap.js.map