clawchain/dex-app/modules/pool/createWithdrawMsgs.ts
2026-05-15 19:18:10 +03:00

30 lines
555 B
TypeScript

import { toBase64 } from "libs/terra";
import { createExecuteMsg } from "libs/cosmjs";
type CreateWithdrawMsgsOptions = {
contract: string;
lpToken: string;
amount: string;
};
export const createWithdrawMsgs = (
options: CreateWithdrawMsgsOptions,
sender: string
) => {
const { contract, lpToken, amount } = options;
const executeMsg = {
send: {
contract,
amount,
msg: toBase64({
withdraw_liquidity: {},
}),
},
};
const msg = createExecuteMsg(sender, lpToken, executeMsg);
return [msg];
};