LpWallet
This section contains op codes of the lp wallet contract as well as corresponding SDK methods
This is a standard Jetton token wallet for holding liquidity tokens. Only specific modifications for this implementation will be described.
Burn an amount of liquidity tokens.
burn#595f07bc query_id:uint64 amount:Grams response_destination:MsgAddress custom_payload:Maybe ^Cell = InternalMsgBody;
Name | Type | Description |
---|---|---|
op | uint32 | Operation code is equal to burn |
query_id | uint64 | Query id |
amount | coins | Amount of coins to burn (in basic token units) |
response_destination | address | Address of a user |
Sends a message with
burn_notification
op code to the router contract with the amount of token burnt.Build
burn
transaction.TypeScript
async buildBurnTxParams(params: {
amount: AmountType;
responseAddress: AddressType;
queryId?: QueryIdType;
}): Promise<MessageData>
Key | Type | Description |
---|---|---|
amount | AmountType | Amount of lp tokens to burn (in basic token units) |
responseAddress | AddressType | Address of a user |
queryId | QueryIdType | undefined | Optional; query id |
Name | Type | Description |
---|---|---|
to | Address | Address of the lp wallet of a user, returned by getPoolWalletAddress |
payload | Cell | Payload created by createBurnBody |
gasAmount | BN | Recommended amount of $TON (in nanoTons) sent as gas |
Notes:
- the default value for
gasAmount
is equal to 1.1 $TON
Create a payload to initiate a
burn
transaction; params
structure is the same a the tx builder.TypeScript
async createBurnBody(params: {
amount: AmountType;
responseAddress: AddressType;
queryId?: QueryIdType;
}): Promise<Cell>
Last modified 6mo ago