Skip to content

Feature: Merge mangata-node repository code #2141

Feature: Merge mangata-node repository code

Feature: Merge mangata-node repository code #2141

GitHub Actions / E2E report yarn test-multiswap failed Jan 21, 2025 in 0s

27 passed, 6 failed and 3 skipped

Tests failed

❌ e2eTests/reports/junit.xml-7f2b4100-d827-11ef-adf5-db51499a89ff.xml

36 tests were completed in 618s with 27 passed, 6 failed and 3 skipped.

Test suite Passed Failed Skipped Time
test/parallel/utility-pallet.swapOperations.test.ts 16✅ 1⚪ 222s
test/parallel/xyk-pallet.multiswap.errors.test.ts 4✅ 1❌ 2⚪ 150s
test/parallel/xyk-pallet.multiswap.test.ts 4✅ 3❌ 144s
test/parallel/xyk-pallet.multiswap2hops.test.ts 3✅ 2❌ 102s

✅ test/parallel/utility-pallet.swapOperations.test.ts

⚪ Validate that the error enum is about filtered call
Utility - batched swaps are not allowed
  ✅ multiswapSellAsset operation is not allowed in batchAll
  ✅ multiswapBuyAsset operation is not allowed in batchAll
  ✅ sellAsset operation is not allowed in batchAll
  ✅ buyAsset operation is not allowed in batchAll
  ✅ multiswapSellAsset operation is not allowed in batch
  ✅ multiswapBuyAsset operation is not allowed in batch
  ✅ sellAsset operation is not allowed in batch
  ✅ buyAsset operation is not allowed in batch
  ✅ multiswapSellAsset operation is not allowed in forceBatch
  ✅ multiswapBuyAsset operation is not allowed in forceBatch
  ✅ sellAsset operation is not allowed in forceBatch
  ✅ buyAsset operation is not allowed in forceBatch
  ✅ multiswapSellAsset operation is not allowed in singleBatch with some allowed
  ✅ multiswapBuyAsset operation is not allowed in singleBatch with some allowed
  ✅ sellAsset operation is not allowed in singleBatch with some allowed
  ✅ buyAsset operation is not allowed in singleBatch with some allowed

❌ test/parallel/xyk-pallet.multiswap.errors.test.ts

Multiswap - error cases: disabled tokens
  ✅ [gasless] disabled on token of the chained polls
  ✅ [gasless] disabled on token of the chained polls - Fail on tx execution-2
  ✅ [gasless] disabled on token of the chained polls - Fail on tx execution-4
Multiswap - error cases: pool status & gasless integration
  ⚪ [gasless] High value swaps are disabled on multiswap
  ❌ [gasless] Fail on client when not enough MGAs to lock AND tokens that exist whitelist
	Error: expect(received).rejects.toThrow(expected)
  ⚪ [gasless] Fail on swap when selling remove all MGAs
  ✅ [gasless] Fails on client when pool does not exist

❌ test/parallel/xyk-pallet.multiswap.test.ts

Multiswap - happy paths
  ❌ [gasless] Happy path - multi-swap - buy
	Error: expect(received).toEqual(expected) // deep equality
  ✅ [gasless] Happy path - multi-swap - sell
  ✅ [gasless] Happy path - multi-swap uses feeLocks
  ❌ [gasless] Fees - multi-swap roll backs all the swaps when one fail but we take fees in GASP tokens
	Error: expect(received).toHaveLength(expected)
  ✅ [gasless] accuracy - Sum of calculate_sell_asset chained is equal to the multiswap operation
  ✅ [gasless] accuracy - Sum of calculate_buy_asset chained is equal to the multiswap operation
  ❌ [gasless] alternative scenario - one pool is highly unbalanced -> zero swap output
	Error: Expected: 999990000000000000000

❌ test/parallel/xyk-pallet.multiswap2hops.test.ts

Multiswap [2 hops] - happy paths
  ❌ [gasless] Happy path - multi-swap - buy
	Error: expect(received).toEqual(expected) // deep equality
  ✅ [gasless] Happy path - multi-swap - sell
  ✅ [gasless] Happy path - multi-swap uses feeLocks
  ❌ [gasless] Fees - multi-swap roll backs all the swaps when one fail but 0.3% is charged
	Error: expect(received).toHaveLength(expected)
  ✅ [gasless] accuracy - Sum of calculate_sell_asset chained is equal to the multiswap operation

Annotations

Check failure on line 0 in e2eTests/reports/junit.xml-7f2b4100-d827-11ef-adf5-db51499a89ff.xml

See this annotation in the file changed.

@github-actions github-actions / E2E report yarn test-multiswap

test/parallel/xyk-pallet.multiswap.errors.test.ts ► Multiswap - error cases: pool status & gasless integration ► [gasless] Fail on client when not enough MGAs to lock AND tokens that exist whitelist

Failed test found in:
  e2eTests/reports/junit.xml-7f2b4100-d827-11ef-adf5-db51499a89ff.xml
Error:
  Error: expect(received).rejects.toThrow(expected)
Raw output
Error: expect(received).rejects.toThrow(expected)

Expected substring: "1010: Invalid Transaction: Fee lock processing has failed either due to not enough funds to reserve or an unexpected error"
Received message:   "1010: Invalid Transaction: Inability to pay some fees , e.g. account balance too low"

      158 |         (reason) => {
      159 |           exception = true;
    > 160 |           throw new Error(reason.data);
          |                 ^
      161 |         },
      162 |       ),
      163 |     ).rejects.toThrow(feeLockErrors.FeeLockFail);

      at test/parallel/xyk-pallet.multiswap.errors.test.ts:160:17
    at Object.toThrow (/home/runner/_work/gasp-monorepo/gasp-monorepo/e2eTests/node_modules/expect/build/index.js:218:22)
    at /home/runner/_work/gasp-monorepo/gasp-monorepo/e2eTests/test/parallel/xyk-pallet.multiswap.errors.test.ts:163:15
    at Generator.next (<anonymous>)
    at fulfilled (/home/runner/_work/gasp-monorepo/gasp-monorepo/e2eTests/test/parallel/xyk-pallet.multiswap.errors.test.ts:4:58)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Check failure on line 0 in e2eTests/reports/junit.xml-7f2b4100-d827-11ef-adf5-db51499a89ff.xml

See this annotation in the file changed.

@github-actions github-actions / E2E report yarn test-multiswap

test/parallel/xyk-pallet.multiswap.test.ts ► Multiswap - happy paths ► [gasless] Happy path - multi-swap - buy

Failed test found in:
  e2eTests/reports/junit.xml-7f2b4100-d827-11ef-adf5-db51499a89ff.xml
Error:
  Error: expect(received).toEqual(expected) // deep equality
Raw output
Error: expect(received).toEqual(expected) // deep equality

Expected: -1
Received: 40
    at /home/runner/_work/gasp-monorepo/gasp-monorepo/e2eTests/test/parallel/xyk-pallet.multiswap.test.ts:82:7
    at Generator.next (<anonymous>)
    at fulfilled (/home/runner/_work/gasp-monorepo/gasp-monorepo/e2eTests/test/parallel/xyk-pallet.multiswap.test.ts:4:58)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Check failure on line 0 in e2eTests/reports/junit.xml-7f2b4100-d827-11ef-adf5-db51499a89ff.xml

See this annotation in the file changed.

@github-actions github-actions / E2E report yarn test-multiswap

test/parallel/xyk-pallet.multiswap.test.ts ► Multiswap - happy paths ► [gasless] Fees - multi-swap roll backs all the swaps when one fail but we take fees in GASP tokens

Failed test found in:
  e2eTests/reports/junit.xml-7f2b4100-d827-11ef-adf5-db51499a89ff.xml
Error:
  Error: expect(received).toHaveLength(expected)
Raw output
Error: expect(received).toHaveLength(expected)

Expected length: 2
Received length: 1
Received array:  [{"currencyId": "00", "diff": {"free": "-01f66369587f0a6418", "frozen": "00", "reserved": "00"}}]
    at /home/runner/_work/gasp-monorepo/gasp-monorepo/e2eTests/test/parallel/xyk-pallet.multiswap.test.ts:160:35
    at Generator.next (<anonymous>)
    at fulfilled (/home/runner/_work/gasp-monorepo/gasp-monorepo/e2eTests/test/parallel/xyk-pallet.multiswap.test.ts:4:58)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Check failure on line 0 in e2eTests/reports/junit.xml-7f2b4100-d827-11ef-adf5-db51499a89ff.xml

See this annotation in the file changed.

@github-actions github-actions / E2E report yarn test-multiswap

test/parallel/xyk-pallet.multiswap.test.ts ► Multiswap - happy paths ► [gasless] alternative scenario - one pool is highly unbalanced -> zero swap output

Failed test found in:
  e2eTests/reports/junit.xml-7f2b4100-d827-11ef-adf5-db51499a89ff.xml
Error:
  Error: Expected: 999990000000000000000 
Raw output
Error: Expected: 999990000000000000000 
 lt Actual: 999990000000000000000 
 
    at /home/runner/_work/gasp-monorepo/gasp-monorepo/e2eTests/test/parallel/xyk-pallet.multiswap.test.ts:362:63
    at Generator.next (<anonymous>)
    at fulfilled (/home/runner/_work/gasp-monorepo/gasp-monorepo/e2eTests/test/parallel/xyk-pallet.multiswap.test.ts:4:58)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Check failure on line 0 in e2eTests/reports/junit.xml-7f2b4100-d827-11ef-adf5-db51499a89ff.xml

See this annotation in the file changed.

@github-actions github-actions / E2E report yarn test-multiswap

test/parallel/xyk-pallet.multiswap2hops.test.ts ► Multiswap [2 hops] - happy paths ► [gasless] Happy path - multi-swap - buy

Failed test found in:
  e2eTests/reports/junit.xml-7f2b4100-d827-11ef-adf5-db51499a89ff.xml
Error:
  Error: expect(received).toEqual(expected) // deep equality
Raw output
Error: expect(received).toEqual(expected) // deep equality

Expected: -1
Received: 12
    at /home/runner/_work/gasp-monorepo/gasp-monorepo/e2eTests/test/parallel/xyk-pallet.multiswap2hops.test.ts:74:7
    at Generator.next (<anonymous>)
    at fulfilled (/home/runner/_work/gasp-monorepo/gasp-monorepo/e2eTests/test/parallel/xyk-pallet.multiswap2hops.test.ts:4:58)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Check failure on line 0 in e2eTests/reports/junit.xml-7f2b4100-d827-11ef-adf5-db51499a89ff.xml

See this annotation in the file changed.

@github-actions github-actions / E2E report yarn test-multiswap

test/parallel/xyk-pallet.multiswap2hops.test.ts ► Multiswap [2 hops] - happy paths ► [gasless] Fees - multi-swap roll backs all the swaps when one fail but 0.3% is charged

Failed test found in:
  e2eTests/reports/junit.xml-7f2b4100-d827-11ef-adf5-db51499a89ff.xml
Error:
  Error: expect(received).toHaveLength(expected)
Raw output
Error: expect(received).toHaveLength(expected)

Expected length: 2
Received length: 1
Received array:  [{"currencyId": "00", "diff": {"free": "-011ffafd7096f7fe70", "frozen": "00", "reserved": "00"}}]
    at /home/runner/_work/gasp-monorepo/gasp-monorepo/e2eTests/test/parallel/xyk-pallet.multiswap2hops.test.ts:155:35
    at Generator.next (<anonymous>)
    at fulfilled (/home/runner/_work/gasp-monorepo/gasp-monorepo/e2eTests/test/parallel/xyk-pallet.multiswap2hops.test.ts:4:58)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)