How to open liquidity account?
import { SwapActionGenerator } from "@a-dex/a-dex-sdk";
const actionsGen = new SwapActionGenerator("swap.adex");
const act = await actionsGen.open(
[
{
actor: "trader.adex",
permission: "active",
},
],
"swap.adex",
"trader.adex",
"0,LPA",
"trader.adex"
);
cleos -u https://eos.greymass.com push transaction '{
"delay_sec": 0,
"max_cpu_usage_ms": 0,
"actions": [
{
"account": "swap.adex",
"name": "open",
"data": {
"owner": "trader.adex",
"symbol": "0,LPA",
"ram_payer": "trader.adex"
},
"authorization": [
{
"actor": "trader.adex",
"permission": "active"
}
]
}
]
}'
const result = await api.transact({
actions: [{
account: 'swap.adex',
name: 'open',
authorization: [{
actor: 'trader.adex',
permission: 'active',
}],
data: {
owner: 'trader.adex',
symbol: '0,LPA',
ram_payer: 'trader.adex'
},
}]
}, {
blocksBehind: 3,
expireSeconds: 30,
});
Last updated