createAndDepositVault

Create turbos vault and deposit from specific vault.

Signature

createAndDepositVault(options: CreateAndDepositVaultArguments): Promise<Transaction>

Params

interface CreateAndDepositVaultArguments {
  strategyId: string;
  poolId: string;
  coinTypeA: string;
  coinTypeB: string;
  amountA: string;
  amountB: string;
  baseLowerIndex: number;
  baseUpperIndex: number;
  limitLowerIndex: number;
  limitUpperIndex: number;
  // tick interval steps
  baseTickStep: number;
  // min tick interval steps
  limitTickStep: number;
  address: string;
  deadline?: number;
  txb?: Transaction;
}

Examples

const txb = await sdk.trade.computeSwapResultV2({
    "strategyId": "0x4880c0a3ea02c10382321828894f1c15d75348a965840d358f7127bc62d7e55c",
    "address": "0x4f1ea95397d7136f1892cfe95d0ae8af6cf37175925c4a2e08be82c1b6940e44",
    "poolId": "0x5eb2dfcdd1b15d2021328258f6d5ec081e9a0cdcfa9e13a0eaeb9b5f7505ca78",
    "coinTypeA": "0x2::sui::SUI",
    "coinTypeB": "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN",
    "amountA": "57403027762",
    "amountB": "50000000",
    "baseLowerIndex": -87240,
    "baseUpperIndex": -53520,
    "limitLowerIndex": -71520,
    "limitUpperIndex": -69240,
    "baseTickStep": 280,
    "limitTickStep": 6
});

Last updated