Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dex swap fees #1252

Open
wants to merge 23 commits into
base: manta
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wait 24 seconds
Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>
  • Loading branch information
ghzlatarev committed Aug 30, 2023
commit 0257d6f97dfe124658e54d9e54f724935b87ffda
4 changes: 4 additions & 0 deletions tests/tests/test-dex.ts
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ import {
USDT_METADATA
} from "../constants";
import {BN} from "@polkadot/util";
import { delay } from "../test-util";

describeWithManta("Manta RPC (Dex)", (context) => {
step("dex add liquidity should work", async function () {
@@ -91,6 +92,9 @@ describeWithManta("Manta RPC (Dex)", (context) => {

callData = api.tx.zenlinkProtocol.swapExactAssetsForAssets(100,10,[1,8],alice,1000000);
await executeTx(context, callData);

await delay(24000);

const swapFeesBalance = (await api.query.system.account("0x2f73776170706f74000000000000000000000000000000000000000000000000")).data.free.toString();
console.log("Swap fees pot balance: ", swapFeesBalance);
const swapFeesBalance2 = (await api.query.system.account("0x2f73776170706f7400000000000000000000000000000000000000000000000000")).data.free.toString();