Account
account
Description
Account contract. This a contract that stores the funds that the user would use for minting. The account also proxies the minting message and collects proof that both jettons were actually funded correctly
Data Storage
1
addr
267 / 0
1
account::user_address
Address of the user ton wallet of the user that owns this two jetton account
2
addr
267 / 0
1
account::pool_address
Address of the pool that created this two jetton account
3
coins
124 / 0
11
account::amount0
Amount of jetton0 (in pool terms) currently stored in the account
4
coins
124 / 0
11
account::amount1
Amount of jetton1 (in pool terms) currently stored in the account
5
coins
124 / 0
11
account::enough0
Amount of jetton0 (in pool terms) that is enough to make a mint operation. When reached for both tokens, mint is triggered
6
coins
124 / 0
11
account::enough1
Amount of jetton1 (in pool terms) that is enough to make a mint operation.
Cells
1
534
489
11
496
527
Interface
get_account_data
(slice, slice, int, int, int, int) get_account_data ()
This function provides current state of the user account
Return Values
0
slice
account::user_address Address of the owner of the account
1
slice
account::pool_address Address of the pool that this account is attached to
2
int
account::amount0 Amount of jetton0 that was deposited for mint
3
int
account::amount1 Amount of jetton1 that was deposited for mint
4
int
account::enough0 Amount of jetton0 that is enough to send message to the pool and actually do the mint
5
int
account::enough1 Amount of jetton1 that is enough to send message to the pool and actually do the mint
Messages
ACCOUNTV3_ADD_LIQUIDITY
Opcode : 0x3ebe5431
This operation adds liquidity and a minting request to the account. This contract is used as a barrier to collect together data about the proofs of funding two tokens and the request to mint some liquidity. Common usage is as follows - send one jetton with the mint instructions and the second jetton with the mint instructions. And as soon as they will both arrive AccountV3 would trigger the minting request in the pool. This makes minting independent of the order in which jettons arrive. Account refers to jettons in the pool (account::pool_address) order Access Rights: This operation is allowed for account::pool_address
op
Uint(32),op
query_id
Uint(64)
queryid as of the TON documentation
new_amount0
Coins(124)
Amount of jetton0 that is funded for the mint
new_amount1
Coins(124)
Amount of jetton1 that is funded for the mint
new_enough0
Coins(124)
Minimum amount of jetton0 totally collected on the account that is required to start the mint
new_enough1
Coins(124)
Minimum amount of jetton1 totally collected on the account that is required to start the mint
liquidity
Uint(128)
Amount of liquidity to mint
tickLower
Int(24)
lower bound of the range in which to mint
tickUpper
Int(24)
upper bound of the range in which to mint
ACCOUNTV3_RESET_GAS
Opcode : 0x42a0fb43
This operation allows user to get back the gas it too much was sent Access Rights: This operation is allowed for account::user_address
op
Uint(32),op
query_id
Uint(64)
queryid as of the TON documentation
ACCOUNTV3_REFUND_ME
Opcode : 0xbf3f447
This operation allows user to get back the coins if sending of the second coin in the mint failed. This method allows to trigger mint of 0 liquidity that Would allow to return funds. Access Rights: This operation is allowed for account::user_address
op
Uint(32),op
query_id
Uint(64)
queryid as of the TON documentation
Last updated