@soku-dex/sdk
    Preparing search index...

    Class LiquidityPoolWrapper

    Implements

    • Contract
    Index

    Constructors

    • Parameters

      • address: Address
      • Optionalinit: { code: Cell; data: Cell }

      Returns LiquidityPoolWrapper

    Properties

    abi: ContractABI = ...
    address: Address
    init?: { code: Cell; data: Cell }
    errors: {
        "'Unknown' error": 11;
        "Access denied": 132;
        "Account state size exceeded limits": 50;
        "Action is invalid or not supported": 34;
        "Action list is invalid": 32;
        "Action list is too long": 33;
        "Already initialized": 2977;
        "Already split": 35179;
        "amount in message is not enough": 12712;
        "amountIn cannot be 0": 16659;
        "Balance underflow": 7792;
        "Cannot process a message": 40;
        "Cell overflow": 8;
        "Cell underflow": 9;
        "Code of a contract was not found": 135;
        "Constraints error": 131;
        "Contract stopped": 133;
        "ctx.value is not enough": 17474;
        "Dictionary error": 10;
        "Exceeded maximum number of cells in the library or the maximum depth of the Merkle tree": 43;
        "Failed expectedOut condition": 15373;
        "Fatal error": 12;
        "Forbidden to have both sides as native TON": 13172;
        "Insufficient TON for amount + fees": 25202;
        "Integer out of expected range": 5;
        "Integer overflow": 4;
        "Invalid amount": 17062;
        "Invalid argument": 134;
        "Invalid child values": 51895;
        "Invalid destination address in outbound message": 36;
        "Invalid incoming message": 130;
        "Invalid left shard": 23493;
        "Invalid left shard value": 13280;
        "Invalid opcode": 6;
        "Invalid right shard": 43487;
        "Invalid right shard value": 41469;
        "Invalid sender": 4429;
        "Invalid sender!": 42708;
        "Invalid serialization prefix": 129;
        "Invalid source address in outbound message": 35;
        "Invalid standard address": 136;
        "Invalid value — Burn": 37079;
        "Invalid value for JettonTransfer": 49372;
        "Left target not inactive": 50002;
        "Library change action error": 42;
        "Library reference is null": 41;
        "Locked jetton0 underflow": 36179;
        "Locked jetton1 underflow": 5696;
        "No active shards": 14451;
        "No children to merge": 25768;
        "No native TON side configured": 27323;
        "Not a basechain address": 138;
        "Not enough extra currencies": 38;
        "Not enough TON to cover fees": 8424;
        "Not enough Toncoin": 37;
        "Not enough value for pending tokens transfer": 18887;
        "Not enough value to cover swap": 54734;
        "Not initialized": 7657;
        "Null reference exception": 128;
        "Out of gas error": 13;
        "Outbound message does not fit into a cell after rewriting": 39;
        "Right target not inactive": 44329;
        "Root shard not active": 23446;
        "Root shard not inactive": 27099;
        "Root value must be zero": 35118;
        "Shard value not divisible by 2": 3507;
        "Stack overflow": 3;
        "Stack underflow": 2;
        "tokenWallet0 mismatch": 2712;
        "tokenWallet1 mismatch": 2817;
        "Ton in and Ton out swaps are not supported": 49478;
        "Total supply overflow": 1623;
        "Type check error": 7;
        "Unknown token in LP‐wallet": 55577;
        "Unsupported token transfer op": 61837;
        "Virtualization error": 14;
        "Wrong amount to recover": 60924;
    } = LiquidityPool_errors_backward
    gasConsumption: 10000000n
    minTonsForStorage: 10000000n
    opcodes: {
        AddLiquidityOp: number;
        ChangeOwner: number;
        ChangeOwnerOk: number;
        Deploy: number;
        DeployOk: number;
        DexAddLiquidity: number;
        DexCollectFees: number;
        DexInitialize: number;
        DexInitialized: number;
        DexMerge: number;
        DexMergeNotification: number;
        DexRemoveLiquidity: number;
        DexSplit: number;
        DexSplitNotification: number;
        FactoryDeploy: number;
        LiquidityPoolAddLiquidityNotification: number;
        LiquidityPoolAddTonLiquidity: number;
        LiquidityPoolInitialize: number;
        LiquidityPoolInitialized: number;
        LiquidityPoolMergeLiquidity: number;
        LiquidityPoolRecoveryBouncedPendingToken: number;
        LiquidityPoolRemoveLiquidity: number;
        LiquidityPoolSplitLiquidity: number;
        LiquidityPoolTransferPendingAmounts: number;
        LiquidityPoolUpdateRerserves: number;
        LiquidityPoolWalletAddLiquidity: number;
        Mint: number;
        NativeTonTransfer: number;
        SwapOp: number;
        TokenBurn: number;
        TokenBurnNotification: number;
        TokenExcesses: number;
        TokenNotification: number;
        TokenTransfer: number;
        TokenTransferInternal: number;
        TokenUpdateContent: number;
    } = LiquidityPool_opcodes
    storageReserve: 0n

    Methods

    • Parameters

      • provider: ContractProvider

      Returns Promise<
          {
              $$type: "LiquidityPoolData";
              active: Dictionary<bigint, LiquidityPoolDex>;
              activeCount: bigint;
              curve: bigint;
              dexTransferReserve: bigint;
              inactive: Dictionary<bigint, LiquidityPoolDex>;
              initialized: boolean;
              lpLockedAmount0: bigint;
              lpLockedAmount1: bigint;
              operationId: bigint;
              owner: Address;
              pendingAmount0: bigint;
              pendingAmount1: bigint;
              reserve0: bigint;
              reserve1: bigint;
              tokenType0: bigint;
              tokenType1: bigint;
              tokenWallet0: null | Address;
              tokenWallet1: null | Address;
              totalSupply: bigint;
          },
      >

    • Parameters

      • provider: ContractProvider

      Returns Promise<
          {
              $$type: "JettonData";
              adminAddress: Address;
              content: Cell;
              mintable: boolean;
              totalSupply: bigint;
              walletCode: Cell;
          },
      >

    • Parameters

      • provider: ContractProvider

      Returns Promise<Address>

    • Parameters

      • provider: ContractProvider
      • owner: Address

      Returns Promise<Address>

    • Parameters

      • provider: ContractProvider
      • via: Sender
      • args: { bounce?: null | boolean; value: bigint }
      • message:
            | TokenNotification
            | TokenBurnNotification
            | LiquidityPoolInitialize
            | LiquidityPoolUpdateRerserves
            | LiquidityPoolAddTonLiquidity
            | LiquidityPoolAddLiquidityNotification
            | LiquidityPoolTransferPendingAmounts
            | LiquidityPoolRecoveryBouncedPendingToken
            | LiquidityPoolSplitLiquidity
            | LiquidityPoolMergeLiquidity

      Returns Promise<void>

    • Parameters

      • initialized: boolean
      • owner: Address
      • totalSupply: bigint
      • curve: bigint
      • tokenType0: bigint
      • tokenType1: bigint
      • tokenWallet0: null | Address
      • tokenWallet1: null | Address
      • dexTransferReserve: bigint
      • lpLockedAmount0: bigint
      • lpLockedAmount1: bigint
      • pendingAmount0: bigint
      • pendingAmount1: bigint
      • reserve0: bigint
      • reserve1: bigint
      • operationId: bigint
      • activeCount: bigint
      • active: Dictionary<bigint, LiquidityPoolDex>
      • inactive: Dictionary<bigint, LiquidityPoolDex>
      • seed: bigint

      Returns Promise<LiquidityPoolWrapper>

    • Parameters

      • initialized: boolean
      • owner: Address
      • totalSupply: bigint
      • curve: bigint
      • tokenType0: bigint
      • tokenType1: bigint
      • tokenWallet0: null | Address
      • tokenWallet1: null | Address
      • dexTransferReserve: bigint
      • lpLockedAmount0: bigint
      • lpLockedAmount1: bigint
      • pendingAmount0: bigint
      • pendingAmount1: bigint
      • reserve0: bigint
      • reserve1: bigint
      • operationId: bigint
      • activeCount: bigint
      • active: Dictionary<bigint, LiquidityPoolDex>
      • inactive: Dictionary<bigint, LiquidityPoolDex>
      • seed: bigint

      Returns Promise<{ code: Cell; data: Cell }>