Skip to content

Commit

Permalink
update acala tests (#162)
Browse files Browse the repository at this point in the history
* update acala tests

* update test
  • Loading branch information
ermalkaleci authored Feb 5, 2024
1 parent a895902 commit 4288096
Show file tree
Hide file tree
Showing 8 changed files with 415 additions and 443 deletions.
4 changes: 2 additions & 2 deletions tests/acala/__snapshots__/aggregated-dex.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`acala aggregatedDex' > swapWithExactSupply > events 1`] = `
exports[`'acala' aggregatedDex > swapWithExactSupply > events 1`] = `
[
{
"data": {
Expand Down Expand Up @@ -28,7 +28,7 @@ exports[`acala aggregatedDex' > swapWithExactSupply > events 1`] = `
]
`;

exports[`karura aggregatedDex' > swapWithExactSupply > events 1`] = `
exports[`'karura' aggregatedDex > swapWithExactSupply > events 1`] = `
[
{
"data": {
Expand Down
248 changes: 124 additions & 124 deletions tests/acala/__snapshots__/dex.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,102 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`acala dex > addLiquidity removeLiquidity works with stake false > addLiquidity 1`] = `
exports[`'acala' dex > 'swapWithExactSupply' works > events 1`] = `
[
{
"data": {
"amount": "(number)",
"currencyId": {
"Token": "AUSD",
},
"from": "23y3WetbNi6rDMgHmyRDjgpb7PnhgPotuPPawxruTMLYTLzG",
"to": "23M5ttkmR6KcnxentoqchgBdUjzMDSzFoUyf5qMs7FsmRMvV",
},
"method": "Transfer",
"section": "tokens",
},
{
"data": {
"amount": "(number)",
"currencyId": {
"Token": "LDOT",
},
"from": "23M5ttkmR6KcnxentoqchgBdUjzMDSzFoUyf5qMs7FsmRMvV",
"to": "23y3WetbNi6rDMgHmyRDjgpb7PnhgPotuPPawxruTMLYTLzG",
},
"method": "Transfer",
"section": "tokens",
},
{
"data": {
"liquidityChanges": [
"(number)",
"(number)",
],
"path": [
{
"Token": "AUSD",
},
{
"Token": "LDOT",
},
],
"trader": "23y3WetbNi6rDMgHmyRDjgpb7PnhgPotuPPawxruTMLYTLzG",
},
"method": "Swap",
"section": "dex",
},
]
`;

exports[`'acala' dex > 'swapWithExactTarget' works > events 1`] = `
[
{
"data": {
"amount": "(number)",
"currencyId": {
"Token": "AUSD",
},
"from": "23y3WetbNi6rDMgHmyRDjgpb7PnhgPotuPPawxruTMLYTLzG",
"to": "23M5ttkmR6KcnxentoqchgBdUjzMDSzFoUyf5qMs7FsmRMvV",
},
"method": "Transfer",
"section": "tokens",
},
{
"data": {
"amount": "(number)",
"currencyId": {
"Token": "LDOT",
},
"from": "23M5ttkmR6KcnxentoqchgBdUjzMDSzFoUyf5qMs7FsmRMvV",
"to": "23y3WetbNi6rDMgHmyRDjgpb7PnhgPotuPPawxruTMLYTLzG",
},
"method": "Transfer",
"section": "tokens",
},
{
"data": {
"liquidityChanges": [
"(number)",
"(number)",
],
"path": [
{
"Token": "AUSD",
},
{
"Token": "LDOT",
},
],
"trader": "23y3WetbNi6rDMgHmyRDjgpb7PnhgPotuPPawxruTMLYTLzG",
},
"method": "Swap",
"section": "dex",
},
]
`;

exports[`'acala' dex > addLiquidity removeLiquidity works with stake false > addLiquidity 1`] = `
[
{
"data": {
Expand Down Expand Up @@ -81,7 +177,7 @@ exports[`acala dex > addLiquidity removeLiquidity works with stake false > addLi
]
`;

exports[`acala dex > addLiquidity removeLiquidity works with stake false > removeLiquidity 1`] = `
exports[`'acala' dex > addLiquidity removeLiquidity works with stake false > removeLiquidity 1`] = `
[
{
"data": {
Expand Down Expand Up @@ -144,7 +240,7 @@ exports[`acala dex > addLiquidity removeLiquidity works with stake false > remov
]
`;

exports[`acala dex > addLiquidity removeLiquidity works with stake true > addLiquidity 1`] = `
exports[`'acala' dex > addLiquidity removeLiquidity works with stake true > addLiquidity 1`] = `
[
{
"data": {
Expand Down Expand Up @@ -262,7 +358,7 @@ exports[`acala dex > addLiquidity removeLiquidity works with stake true > addLiq
]
`;

exports[`acala dex > addLiquidity removeLiquidity works with stake true > removeLiquidity 1`] = `
exports[`'acala' dex > addLiquidity removeLiquidity works with stake true > removeLiquidity 1`] = `
[
{
"data": {
Expand Down Expand Up @@ -380,16 +476,16 @@ exports[`acala dex > addLiquidity removeLiquidity works with stake true > remove
]
`;

exports[`acala dex > swapWithExactSupply works > events 1`] = `
exports[`'karura' dex > 'swapWithExactSupply' works > events 1`] = `
[
{
"data": {
"amount": "(number)",
"currencyId": {
"Token": "AUSD",
"Token": "KSM",
},
"from": "23y3WetbNi6rDMgHmyRDjgpb7PnhgPotuPPawxruTMLYTLzG",
"to": "23M5ttkmR6KcnxentoqchgBdUjzMDSzFoUyf5qMs7FsmRMvV",
"from": "rPizfonc8MPuEsMxufAytHjpRW7a2YrXWHKibaJXe9ZtjKx",
"to": "qmmNufxeWaAUqqs5k5ZwsenBmhm75jDRbsPrU5GBYgnrf5c",
},
"method": "Transfer",
"section": "tokens",
Expand All @@ -398,10 +494,10 @@ exports[`acala dex > swapWithExactSupply works > events 1`] = `
"data": {
"amount": "(number)",
"currencyId": {
"Token": "LDOT",
"Token": "LKSM",
},
"from": "23M5ttkmR6KcnxentoqchgBdUjzMDSzFoUyf5qMs7FsmRMvV",
"to": "23y3WetbNi6rDMgHmyRDjgpb7PnhgPotuPPawxruTMLYTLzG",
"from": "qmmNufxeWaAUqqs5k5ZwsenBmhm75jDRbsPrU5GBYgnrf5c",
"to": "rPizfonc8MPuEsMxufAytHjpRW7a2YrXWHKibaJXe9ZtjKx",
},
"method": "Transfer",
"section": "tokens",
Expand All @@ -414,30 +510,30 @@ exports[`acala dex > swapWithExactSupply works > events 1`] = `
],
"path": [
{
"Token": "AUSD",
"Token": "KSM",
},
{
"Token": "LDOT",
"Token": "LKSM",
},
],
"trader": "23y3WetbNi6rDMgHmyRDjgpb7PnhgPotuPPawxruTMLYTLzG",
"trader": "rPizfonc8MPuEsMxufAytHjpRW7a2YrXWHKibaJXe9ZtjKx",
},
"method": "Swap",
"section": "dex",
},
]
`;

exports[`acala dex > swapWithExactTarget works > events 1`] = `
exports[`'karura' dex > 'swapWithExactTarget' works > events 1`] = `
[
{
"data": {
"amount": "(number)",
"currencyId": {
"Token": "AUSD",
"Token": "KSM",
},
"from": "23y3WetbNi6rDMgHmyRDjgpb7PnhgPotuPPawxruTMLYTLzG",
"to": "23M5ttkmR6KcnxentoqchgBdUjzMDSzFoUyf5qMs7FsmRMvV",
"from": "rPizfonc8MPuEsMxufAytHjpRW7a2YrXWHKibaJXe9ZtjKx",
"to": "qmmNufxeWaAUqqs5k5ZwsenBmhm75jDRbsPrU5GBYgnrf5c",
},
"method": "Transfer",
"section": "tokens",
Expand All @@ -446,10 +542,10 @@ exports[`acala dex > swapWithExactTarget works > events 1`] = `
"data": {
"amount": "(number)",
"currencyId": {
"Token": "LDOT",
"Token": "LKSM",
},
"from": "23M5ttkmR6KcnxentoqchgBdUjzMDSzFoUyf5qMs7FsmRMvV",
"to": "23y3WetbNi6rDMgHmyRDjgpb7PnhgPotuPPawxruTMLYTLzG",
"from": "qmmNufxeWaAUqqs5k5ZwsenBmhm75jDRbsPrU5GBYgnrf5c",
"to": "rPizfonc8MPuEsMxufAytHjpRW7a2YrXWHKibaJXe9ZtjKx",
},
"method": "Transfer",
"section": "tokens",
Expand All @@ -462,21 +558,21 @@ exports[`acala dex > swapWithExactTarget works > events 1`] = `
],
"path": [
{
"Token": "AUSD",
"Token": "KSM",
},
{
"Token": "LDOT",
"Token": "LKSM",
},
],
"trader": "23y3WetbNi6rDMgHmyRDjgpb7PnhgPotuPPawxruTMLYTLzG",
"trader": "rPizfonc8MPuEsMxufAytHjpRW7a2YrXWHKibaJXe9ZtjKx",
},
"method": "Swap",
"section": "dex",
},
]
`;

exports[`karura dex > addLiquidity removeLiquidity works with stake false > addLiquidity 1`] = `
exports[`'karura' dex > addLiquidity removeLiquidity works with stake false > addLiquidity 1`] = `
[
{
"data": {
Expand Down Expand Up @@ -557,7 +653,7 @@ exports[`karura dex > addLiquidity removeLiquidity works with stake false > addL
]
`;

exports[`karura dex > addLiquidity removeLiquidity works with stake false > removeLiquidity 1`] = `
exports[`'karura' dex > addLiquidity removeLiquidity works with stake false > removeLiquidity 1`] = `
[
{
"data": {
Expand Down Expand Up @@ -620,7 +716,7 @@ exports[`karura dex > addLiquidity removeLiquidity works with stake false > remo
]
`;

exports[`karura dex > addLiquidity removeLiquidity works with stake true > addLiquidity 1`] = `
exports[`'karura' dex > addLiquidity removeLiquidity works with stake true > addLiquidity 1`] = `
[
{
"data": {
Expand Down Expand Up @@ -738,7 +834,7 @@ exports[`karura dex > addLiquidity removeLiquidity works with stake true > addLi
]
`;

exports[`karura dex > addLiquidity removeLiquidity works with stake true > removeLiquidity 1`] = `
exports[`'karura' dex > addLiquidity removeLiquidity works with stake true > removeLiquidity 1`] = `
[
{
"data": {
Expand Down Expand Up @@ -855,99 +951,3 @@ exports[`karura dex > addLiquidity removeLiquidity works with stake true > remov
},
]
`;

exports[`karura dex > swapWithExactSupply works > events 1`] = `
[
{
"data": {
"amount": "(number)",
"currencyId": {
"Token": "KSM",
},
"from": "rPizfonc8MPuEsMxufAytHjpRW7a2YrXWHKibaJXe9ZtjKx",
"to": "qmmNufxeWaAUqqs5k5ZwsenBmhm75jDRbsPrU5GBYgnrf5c",
},
"method": "Transfer",
"section": "tokens",
},
{
"data": {
"amount": "(number)",
"currencyId": {
"Token": "LKSM",
},
"from": "qmmNufxeWaAUqqs5k5ZwsenBmhm75jDRbsPrU5GBYgnrf5c",
"to": "rPizfonc8MPuEsMxufAytHjpRW7a2YrXWHKibaJXe9ZtjKx",
},
"method": "Transfer",
"section": "tokens",
},
{
"data": {
"liquidityChanges": [
"(number)",
"(number)",
],
"path": [
{
"Token": "KSM",
},
{
"Token": "LKSM",
},
],
"trader": "rPizfonc8MPuEsMxufAytHjpRW7a2YrXWHKibaJXe9ZtjKx",
},
"method": "Swap",
"section": "dex",
},
]
`;

exports[`karura dex > swapWithExactTarget works > events 1`] = `
[
{
"data": {
"amount": "(number)",
"currencyId": {
"Token": "KSM",
},
"from": "rPizfonc8MPuEsMxufAytHjpRW7a2YrXWHKibaJXe9ZtjKx",
"to": "qmmNufxeWaAUqqs5k5ZwsenBmhm75jDRbsPrU5GBYgnrf5c",
},
"method": "Transfer",
"section": "tokens",
},
{
"data": {
"amount": "(number)",
"currencyId": {
"Token": "LKSM",
},
"from": "qmmNufxeWaAUqqs5k5ZwsenBmhm75jDRbsPrU5GBYgnrf5c",
"to": "rPizfonc8MPuEsMxufAytHjpRW7a2YrXWHKibaJXe9ZtjKx",
},
"method": "Transfer",
"section": "tokens",
},
{
"data": {
"liquidityChanges": [
"(number)",
"(number)",
],
"path": [
{
"Token": "KSM",
},
{
"Token": "LKSM",
},
],
"trader": "rPizfonc8MPuEsMxufAytHjpRW7a2YrXWHKibaJXe9ZtjKx",
},
"method": "Swap",
"section": "dex",
},
]
`;
Loading

0 comments on commit 4288096

Please sign in to comment.