How to remove liquidity?
Both tokens accounts should be opened
import { SwapActionGenerator } from "@a-dex/a-dex-sdk";
const actionsGen = new SwapActionGenerator("swap.adex");
const action = await actionsGen.withdraw(
[
{
actor: "trader.adex",
permission: "active",
},
],
"trader.adex",
"1000 LPA"
);
cleos -u https://eos.greymass.com push transaction '{
"delay_sec": 0,
"max_cpu_usage_ms": 0,
"actions": [
{
"account": "swap.adex",
"name": "withdraw",
"data": {
"owner": "trader.adex",
"quantity": "1000 LPA"
},
"authorization": [
{
"actor": "trader.adex",
"permission": "active"
}
]
}
]
}'
const result = await api.transact({
actions: [{
account: 'swap.adex',
name: 'withdraw',
authorization: [{
actor: 'trader.adex',
permission: 'active',
}],
data: {
owner: 'trader.adex',
lq_tokens: '1000 LQA'
},
}]
}, {
blocksBehind: 3,
expireSeconds: 30,
});
Last updated