All the methods of the contracts that may be invoked off-chain are described on this page.

Factory

get_vault_address

(slice, int) get_vault_address(slice asset)

Properties:

TypeNameDescription
ArgumentassetSerialized Asset
Return Value1stSerialized MsgAddressInt for the Vault of the given asset
Return Value2ndHash part of the address returned before

get_pool_address

(slice, int) get_pool_address(
  slice asset1,
  slice asset2,
  int amm,
  cell amm_settings
)

Properties:

TypeNameDescription
Argumentasset1Serialized Asset
Argumentasset2Serialized Asset
ArgumentammSerialized AMM
Argumentamm_settingsSerialized AMM Settings
Return Value1stSerialized MsgAddressInt for the Pool of the given asset pair and amm type
Return Value2ndHash part of the address returned before

get_pool_address_no_settings

(slice, int) get_pool_address_no_settings(slice asset1, slice asset2, int amm)

Same as the previous, except there are no settings.

get_pool_creator_address

(slice, int) get_pool_creator_address(
  slice owner,
  slice asset1,
  slice asset2,
  int amm,
  cell amm_settings
)

Properties:

TypeNameDescription
ArgumentownerSerialized MsgAddressInt of the PoolCreator’s owner
Argumentasset1Serialized Asset
Argumentasset2Serialized Asset
ArgumentammSerialized AMM
Argumentamm_settingsSerialized AMM Settings
Return Value1stSerialized MsgAddressInt for the PoolCreator of the given asset pair and amm type which is owned by the specified user
Return Value2ndHash part of the address returned before

get_pool_creator_address_no_settings

(slice, int) get_pool_creator_address_no_settings(
  slice owner,
  slice asset1,
  slice asset2,
  int amm
)

Same as the previous, except there are no settings.

get_liquidity_depository_address

(slice, int) get_liquidity_depository_address(
  slice owner,
  slice asset1,
  slice asset2,
  int amm,
  cell amm_settings
)

Properties:

TypeNameDescription
ArgumentownerSerialized MsgAddressInt of the LiquidityDepository’s owner
Argumentasset1Serialized Asset
Argumentasset2Serialized Asset
ArgumentammSerialized AMM
Argumentamm_settingsSerialized AMM Settings
Return Value1stSerialized MsgAddressInt for the LiquidityDepository of the given asset pair and amm type which is owned by the specified user
Return Value2ndHash part of the address returned before

get_liquidity_depository_address_no_settings

(slice, int) get_liquidity_depository_address_no_settings(
  slice owner,
  slice asset1,
  slice asset2,
  int amm
)

Same as the previous, except there are no settings.

get_admin_address

slice get_admin_address()

Properties:

TypeNameDescription
Return Value1stSerialized MsgAddressInt for the DEX administrative account

Vault

get_asset

slice get_asset()

Properties:

TypeNameDescription
Return Value1stSerialized Asset to which this vault corresponds

is_active

int is_active()

Properties:

TypeNameDescription
Return Value1st0 if this vault is not active, -1 otherwise

Pool

get_jetton_data

Pool is a Jetton Master for its LP tokens. This get-methods makes it compatible with Jetton Standard, therefore specifics about are accessible by the link.

get_wallet_address

Pool is a Jetton Master for its LP tokens. This get-methods makes it compatible with Jetton Standard, therefore specifics about are accessible by the link.

get_pool_data

(int, slice, slice, int, cell, int, int, int, int, int, int) get_pool_data()

Properties:

TypeNameDescription
Return Value1stVersion of the pool code, starts at 1
Return Value2ndSerialized first Asset of this pool
Return Value3rdSerialized second Asset of this pool
Return Value4thSerialized AMM of this pool
Return Value5thSerialized AMM Settings of this pool
Return Value6th0 if this pool is not active, -1 otherwise
Return Value7thReserves of the first asset of this pool
Return Value8thReserves of the second asset of this pool
Return Value9thTotal supply of LP tokens
Return Value10thProtocol fee nominator*
Return Value11thLP fee nominator*

* Fees are being withdrawn from swap operations only (therefore liquidity provisioning/withdrawal is fee). They are always charged from the input asset of the swap, and they’re denoted by the nominators within the pool storage. Fees nominators are non-negative integers less than max_nominator = 10000. Denominator for fees is a constant equal to 1000000.

estimate_swap_amount

(int, int) estimate_swap_amount(slice asset, int amount)

Properties:

TypeNameDescription
ArgumentassetSerialized input Asset for the (potential) swap
ArgumentamountAmount of the input asset to be (potentially) swapped
Return Value1stActual amount of the input asset that would be used for the swap
Return Value2ndAmount of output asset to be received as a result of swap

estimate_liquidity_withdraw_amount

(int, int) estimate_liquidity_withdraw_amount(int lp_amount)

Properties:

TypeNameDescription
Argumentlp_amountAmount of LP tokens to be burned
Return Value1stAmount of pool’s first asset to be withdrawn
Return Value2ndAmount of pool’s second asset to be withdrawn

estimate_liquidity_deposit_amount

(int, int, int, int) estimate_liquidity_deposit_amount(
  int amount1,
  int amount2
)

Properties:

TypeNameDescription
Argumentamount1Amount of pool’s first asset to be deposited
Argumentamount2Amount of pool’s second asset to be deposited
Return Value1stActual amount of pool’s first asset that would be deposited
Return Value2ndActual amount of pool’s second asset that would be deposited
Return Value3rdAmount of LP tokens to be received
Return Value4thHow much of permanently locked initial LP tokens will be generated as a result of such deposition