交換(Exchange)
Last updated
(int, int, int, int, int, int, cell) get_lp_mining_data() method_id(cell) get_lp_user_info_dict() method_id(int, int, int, int) get_lp_user_info(slice user_address) method_idslice get_wallet_address(slice owner_address) method_id// 1. add liquidity tokenA
await sendInternalMessageWithWallet({
walletContract,
secretKey,
to: userJettonAWalletAddress,
value: toNano(0.7),
body: beginCell()
.storeUint(0xf8a7ea5, 32)
.storeUint(query_id, 64)
.storeCoins(jettonAAmount)
.storeAddress(lpAddress)
.storeAddress(responseAddress)
.storeDict(beginCell().endCell())
.storeCoins(toNano(0.5))
.storeDict(beginCell()
.storeCoins(minAmountForJettonA)
.storeCoins(minAmountForJettonB)
.endCell())
.endCell()
});
// 2. add liquidity tokenB
await sendInternalMessageWithWallet({
walletContract,
secretKey,
to: userJettonBWalletAddress,
value: toNano(0.7),
body: beginCell()
.storeUint(0xf8a7ea5, 32)
.storeUint(query_id, 64)
.storeCoins(jettonBAmount)
.storeAddress(lpAddress)
.storeAddress(responseAddress)
.storeDict(beginCell().endCell())
.storeCoins(toNano(0.5))
.storeDict(beginCell()
.storeCoins(minAmountForJettonA)
.storeCoins(minAmountForJettonB)
.endCell())
.endCell()
});await sendInternalMessageWithWallet({
walletContract,
secretKey,
to: lpAddress,
value: toNano(0.35),
body: beginCell()
.storeUint(0x595f07bc, 32)
.storeUint(query_id, 64)
.storeCoins(lpAmount)
.storeDict(beginCell()
.storeCoins(minAmountForJettonA)
.storeCoins(minAmountForJettonB)
.endCell())
.endCell()
});await sendInternalMessageWithWallet({
walletContract,
secretKey,
to: lpAddress,
value: toNano(0.15),
body: beginCell()
.storeUint(0x6b14cfe1, 32)
.storeUint(query_id, 64)
.endCell()
});(int, slice, slice, cell) get_wallet_data() method_id(int, int, slice, slice) get_wallet_extra_data() method_id