Conversation
This comment was marked as resolved.
This comment was marked as resolved.
| tssKeypair, | ||
| tssKeypair.publicKey, | ||
| null, | ||
| 9 |
There was a problem hiding this comment.
same question for createEVMToken, just to double check, there is no need to customize decimals?
| import { uniswapV2AddLiquidity } from "./uniswapV2"; | ||
| import { uniswapV3AddLiquidity } from "./uniswapV3"; | ||
|
|
||
| export const createToken = async ( |
There was a problem hiding this comment.
up to you, but i think it would be helpful to add some doc comments for functions, maybe just for exported since there is a lot of going on
| const suiNotSupported = chainID === NetworkID.Sui && !contracts.suiContracts; | ||
|
|
||
| if (solanaNotSupported || suiNotSupported) { | ||
| return; |
There was a problem hiding this comment.
i see below other networks token are created, why do we return if solana or sui are not supported?
There was a problem hiding this comment.
This function returns if we're creating a Solana token and Solana has not been initialized. Same for Sui.
|
|
||
| let asset; | ||
|
|
||
| if (isGasToken) { |
There was a problem hiding this comment.
maybe its more clear to use switch for chain id part
|
|
||
| foreignCoins.push({ | ||
| asset, | ||
| coin_type: isGasToken ? "Gas" : chainID === NetworkID.Sui ? "SUI" : "ERC20", |
| wzetaAmount: any, | ||
| uniswapV3Factory: any, | ||
| uniswapV3PositionManager: any, | ||
| verbose: boolean = false |
There was a problem hiding this comment.
is this flag used around localnet?
There was a problem hiding this comment.
It's not used yet, but we'll need to add support for this.
| console.error("Error adding liquidity to Uniswap V3:", error); | ||
| if (error.message?.includes("LOK")) { | ||
| console.error( | ||
| "Pool initialization error - pool may already be initialized" |
There was a problem hiding this comment.
nit but maybe in case pool is created we still allow liq to be added?
There was a problem hiding this comment.
This is inside catch, so we're not throwing an error if a pool has been initialized, we're just explaining why adding liquidity may have failed.
--verboseflag.Can be tested with: