Op Codes

This section contains table of DEX v2 op codes

Token transfer payloads

NameValueDescription

swap

0x25938561

Token transfer payload op for swap

provide_lp

0xfcf9e58f

Token transfer payload op for liquidity addition

cross_swap

0xffffffef

Custom payload op in swap payload to chain swaps on the same Router

cross_provide_lp

0xfffffeff

Custom payload op in swap payload to chain swap and lp provision on the same Router

Router admin

NameValueDescription

set_fees

0x355423e5

Sent by admin to Router to set new Pool fees

reset_gas

0x42a0fb43

Sent by admin to Router to reset gas

reset_pool_gas

0xf6aa9737

Sent by admin to Router to reset Pool gas

update_status

0x78d6e3f2

Sent by admin to Router to change Router lock status

init_code_upgrade

0xdf1e233d

Sent by admin to Router to initiate code upgrade

init_admin_upgrade

0x2fb94384

Sent by admin to Router to initiate admin update

cancel_code_upgrade

0x357ccc67

Sent by admin to Router to cancel code upgrade

cancel_admin_upgrade

0xa4ed9981

Sent by admin to Router to cancel admin update

finalize_upgrades

0x6378509f

Sent by admin to Router to apply all pending updates if cooldown passed

update_pool_status

0x5377909a

Sent by admin to Router to change Pool lock status

set_params

0x2b8b3b62

Sent by admin to Router to update pool-specific params if present

Other calls

NameValueDescription

direct_add_liquidity

0x4cf82803

Sent by user to LpAccount to initiate liquidity addition

refund_me

0x0bf3f447

Sent by user to LpAccount to refund deposited tokens

withdraw_fee

0x45ed2dc7

Sent by user to Vault to collect their tokens

set_rate

0x4a2bddb0

Sent by setter to Pool to change ratio variable (if present)

collect_fees

0x1fcb7d3d

Sent by protocol address to Pool to collect fees

Internal transactions

NameValueDescription

set_fees

0x355423e5

Sent from Router to Pool to change fees

reset_gas

0x42a0fb43

Sent from Router to Pool to rest gas

update_status

0x78d6e3f2

Sent from Router to Pool to change Pool lock status

internal_set_params

0xf163444a

Sent from Router to Pool to update pool-specific params if present

deposit_ref_fee

0x537c5a70

Sent from Router to Vault to deposit tokens in Vault

pay_to

0xf93bb43f

Sent from Pool to Router to initiate token transfer

add_liquidity

0x3ebe5431

Sent from Pool to LpAccount to add tokens

pay_vault

0xb7d1e6b8

Sent from Pool to Router to deposit tokens in Vault

cb_add_liquidity

0x56dfeb8a

Sent from LpAccount to Pool to add liquidity

cb_refund_me

0x89446a42

Sent from LpAccount to Pool to refund tokens

burn_notification_ext

0x302e7dda

Sent from LpWallet to Pool after lp tokens burn

vault_pay_to

0x3eb18447

Sent from Vault to Router to transfer tokens from Vault to user

Transfer exit codes

NameValueDescription

swap_refund_no_liq

0x5ffe1295

No liquidity in Pool

swap_refund_reserve_err

0x38976e9b

Not enough liquidity to perform a swap

swap_refund_0_out

0x5f954434

Swap out token amount is 0

swap_refund_slippage

0x39603190

Swap out token amount is less than provided minimum value

swap_pool_locked

0x365c484d

Pool is locked

swap_fee_out_of_bounds

0xa768c0d1

Ref fee is too big

swap_ok

0xc64370e5

Transfer after swap

burn_ok

0xdda48b6a

Transfer after liquidity withdraw (lp token burn)

refund_ok

0xde7dbbc2

Transfer after LpAccount refund

transfer_bounce_locked

0x0a0dbdcb

Router is locked

transfer_bounce_invalid_pool

0x09a8afbf

Incorrect Pool (both token addresses are the same)

transfer_bounce_wrong_wc

0x720f5b17

Call was done from the wrong workchain

transfer_bounce_low_gas

0x8368a711

Not enough gas to preform operation

transfer_bounce_invalid_request

0x19727ea8

Incorrect token transfer payload op

Getters

NameValueDescription

provide_wallet_address

0x2c76b973

Received by Pool to return lp wallet address for a specified user

take_wallet_address

0xd1735400

Send as a response to provide_wallet_address with lp wallet address

getter_lp_account_data

0x1d439ae0

On-chain getter with LpAccount data

getter_pool_data

0x43c034e6

On-chain getter with Pool common data

getter_lp_account_address

0x9163a98a

On-chain getter with LpAccount address

getter_pool_address

0xd1db969b

On-chain getter with Pool address

Last updated