UNPKG

@uniswap/v4-sdk

Version:

⚒️ An SDK for building applications on top of Uniswap V4

15 lines 656 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toAddress = void 0; const internalConstants_1 = require("../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? function toAddress(currency) { if (currency.isNative) return internalConstants_1.ADDRESS_ZERO; else return currency.wrapped.address; } exports.toAddress = toAddress; //# sourceMappingURL=currencyMap.js.map