-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from blooo-io/test/INCH-17-create-the-unoswap-…
…test-on-polygon test(unoswap): created the test on unoswap for polygon blockchain
- Loading branch information
Showing
133 changed files
with
248 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { processTest, populateTransaction } from "../test.fixture"; | ||
|
||
const contractName = "AggregationRouterV3"; | ||
|
||
const testLabel = "unoswapKnowTokenSwapV3"; // <= Name of the test | ||
const testDirSuffix = "unoswap_known_v3"; // <= directory to compare device snapshots to | ||
const testNetwork = "polygon"; | ||
const signedPlugin = false; | ||
|
||
const contractAddr = "0x11111112542d85b3ef69ae05771c2dccff4faa26"; | ||
const chainID = 137; | ||
|
||
// From : https://polygonscan.com/tx/0xdbc7c46bb0ef3f312d28f7e4b0ff06a89dfba7a0a41ede5d7ee7b7c9d0dfe006 | ||
const inputData = "0x2e95b6c80000000000000000000000007ceb23fd6bc0add59e62ac25578270cff1b9f6190000000000000000000000000000000000000000000000000319f0d23587ff690000000000000000000000000000000000000000000000000319f0d23587ff690000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000300000000000000003b6d0340fc2fc983a411c4b1e238f7eb949308cf0218c75080000000000000003b6d0340addc9c73f3cbad4e647eaff691715898825ac20c00000000000000003b8b87c0173e90f2a94af3b075deec7e64df4d70efb4ac3d"; | ||
|
||
// Create serializedTx and remove the "0x" prefix | ||
const serializedTx = populateTransaction(contractAddr, inputData, chainID); | ||
|
||
const devices = [ | ||
{ | ||
name: "nanos", | ||
label: "Nano S", | ||
steps: 10, // <= Define the number of steps for this test case and this device | ||
}, | ||
{ | ||
name: "nanox", | ||
label: "Nano X", | ||
steps: 7, // <= Define the number of steps for this test case and this device | ||
} | ||
]; | ||
|
||
devices.forEach((device) => | ||
processTest(device, contractName, testLabel, testDirSuffix, "", signedPlugin, serializedTx, testNetwork) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { processTest, populateTransaction } from "../test.fixture"; | ||
|
||
const contractName = "AggregationRouterV3"; | ||
|
||
const testLabel = "unoswapNativeTokenSwapV3"; // <= Name of the test | ||
const testDirSuffix = "unoswap_native_v3"; // <= directory to compare device snapshots to | ||
const testNetwork = "polygon"; | ||
const signedPlugin = false; | ||
|
||
const contractAddr = "0x11111112542d85b3ef69ae05771c2dccff4faa26"; | ||
const chainID = 137; | ||
|
||
// From : https://polygonscan.com/tx/0xbf0bcced72e9a7d3827ff4466bd653d986cfa1d8893ab2c4780523b22a2982bc | ||
const inputData = "0x2e95b6c80000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf127000000000000000000000000000000000000000000000001f7a15b31aeaf0516a00000000000000000000000000000000000000000000001f7a15b31aeaf0516a0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000200000000000000003b6d0340289cf2b63c5edeeeab89663639674d9233e8668e00000000000000003b6d03409e2fbb31fbd68472f6cd54a1635b8cd64d78fc1c"; | ||
|
||
// Create serializedTx and remove the "0x" prefix | ||
const serializedTx = populateTransaction(contractAddr, inputData, chainID); | ||
|
||
const devices = [ | ||
{ | ||
name: "nanos", | ||
label: "Nano S", | ||
steps: 10, // <= Define the number of steps for this test case and this device | ||
}, | ||
{ | ||
name: "nanox", | ||
label: "Nano X", | ||
steps: 7, // <= Define the number of steps for this test case and this device | ||
} | ||
]; | ||
|
||
devices.forEach((device) => | ||
processTest(device, contractName, testLabel, testDirSuffix, "", signedPlugin, serializedTx, testNetwork) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { processTest, populateTransaction } from "../test.fixture"; | ||
|
||
const contractName = "AggregationRouterV3"; | ||
|
||
const testLabel = "unoswapUnknowTokenSwapV3"; // <= Name of the test | ||
const testDirSuffix = "unoswap_unknown_v3"; // <= directory to compare device snapshots to | ||
const testNetwork = "polygon"; | ||
const signedPlugin = false; | ||
|
||
const contractAddr = "0x11111112542d85b3ef69ae05771c2dccff4faa26"; | ||
const chainID = 137; | ||
|
||
// From : https://polygonscan.com/tx/0xae22ab349dc90c1cb1fa7f13049d7590a611441c7201d3e558556d2ed1fde1ba | ||
const inputData = "0x2e95b6c80000000000000000000000004c28f48448720e9000907bc2611f73022fdce1fa00000000000000000000000000000000000000000000000cd359a2e18f2911ba00000000000000000000000000000000000000000000000cd359a2e18f2911ba0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000300000000000000003b6d034080b3902afc046e6c41dba93bedb1872f78e541a100000000000000003b6d0340e88e24f49338f974b528ace10350ac4576c5c8a180000000000000003b6d03409b5c71936670e9f1f36e63f03384de7e06e60d2a"; | ||
|
||
// Create serializedTx and remove the "0x" prefix | ||
const serializedTx = populateTransaction(contractAddr, inputData, chainID); | ||
|
||
const devices = [ | ||
{ | ||
name: "nanos", | ||
label: "Nano S", | ||
steps: 10, // <= Define the number of steps for this test case and this device | ||
}, | ||
{ | ||
name: "nanox", | ||
label: "Nano X", | ||
steps: 8, // <= Define the number of steps for this test case and this device | ||
} | ||
]; | ||
|
||
devices.forEach((device) => | ||
processTest(device, contractName, testLabel, testDirSuffix, "", signedPlugin, serializedTx, testNetwork) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { processTest, populateTransaction } from "../test.fixture"; | ||
|
||
const contractName = "AggregationRouterV4"; | ||
|
||
const testLabel = "unoswapKnowTokenSwapV4"; // <= Name of the test | ||
const testDirSuffix = "unoswap_known_v4"; // <= directory to compare device snapshots to | ||
const testNetwork = "polygon"; | ||
const signedPlugin = false; | ||
|
||
const contractAddr = "0x1111111254fb6c44bac0bed2854e76f90643097d"; | ||
const chainID = 137; | ||
|
||
const selector = "0x2e95b6c8"; | ||
const srcToken = "0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270"; | ||
const amount = "00000000000000000000000000000000000000000000001f7a15b31aeaf0516a"; | ||
const minReturn = "00000000000000000000000000000000000000000000001f7a15b31aeaf0516a"; | ||
const pools = "0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000280000000000000003b6d034006da0fd433c1a5d7a4faa01111c044910a18455380000000000000003b6d0340336ef4e633b1117dca08c1a57f4139c62c32c935e26b9977"; | ||
|
||
const inputData = selector + srcToken + amount + minReturn + pools; | ||
// Create serializedTx and remove the "0x" prefix | ||
const serializedTx = populateTransaction(contractAddr, inputData, chainID); | ||
|
||
const devices = [ | ||
{ | ||
name: "nanos", | ||
label: "Nano S", | ||
steps: 10, // <= Define the number of steps for this test case and this device | ||
}, | ||
{ | ||
name: "nanox", | ||
label: "Nano X", | ||
steps: 7, // <= Define the number of steps for this test case and this device | ||
} | ||
]; | ||
|
||
devices.forEach((device) => | ||
processTest(device, contractName, testLabel, testDirSuffix, "", signedPlugin, serializedTx, testNetwork) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { processTest, populateTransaction } from "../test.fixture"; | ||
|
||
const contractName = "AggregationRouterV4"; | ||
|
||
const testLabel = "unoswapNativeTokenSwapV4"; // <= Name of the test | ||
const testDirSuffix = "unoswap_native_v4"; // <= directory to compare device snapshots to | ||
const testNetwork = "polygon"; | ||
const signedPlugin = false; | ||
|
||
const contractAddr = "0x1111111254fb6c44bac0bed2854e76f90643097d"; | ||
const chainID = 137; | ||
|
||
|
||
const selector = "0x2e95b6c8"; | ||
const srcToken = "0000000000000000000000000000000000000000000000000000000000000000"; | ||
const amount = "00000000000000000000000000000000000000000000000000b1a2bc2ec50000"; | ||
const minReturn = "00000000000000000000000000000000000000000000048c48c63f0944606781"; | ||
const pools = "0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000180000000000000003b6d0340c06dadbfde48c0bdeb4608ddc7f232fd07a02da1cfee7c08"; | ||
|
||
const inputData = selector + srcToken + amount + minReturn + pools; | ||
// Create serializedTx and remove the "0x" prefix | ||
const serializedTx = populateTransaction(contractAddr, inputData, chainID); | ||
|
||
const devices = [ | ||
{ | ||
name: "nanos", | ||
label: "Nano S", | ||
steps: 8, // <= Define the number of steps for this test case and this device | ||
}, | ||
{ | ||
name: "nanox", | ||
label: "Nano X", | ||
steps: 7, // <= Define the number of steps for this test case and this device | ||
} | ||
]; | ||
|
||
devices.forEach((device) => | ||
processTest(device, contractName, testLabel, testDirSuffix, "", signedPlugin, serializedTx, testNetwork) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { processTest, populateTransaction } from "../test.fixture"; | ||
|
||
const contractName = "AggregationRouterV4"; | ||
|
||
const testLabel = "unoswapUnknowTokenSwapV4"; // <= Name of the test | ||
const testDirSuffix = "unoswap_unknown_v4"; // <= directory to compare device snapshots to | ||
const testNetwork = "polygon"; | ||
const signedPlugin = false; | ||
|
||
const contractAddr = "0x1111111254fb6c44bac0bed2854e76f90643097d"; | ||
const chainID = 137; | ||
|
||
|
||
const selector = "0x2e95b6c8"; | ||
const srcToken = "0000000000000000000000003f1421cb90d26b28e7495cb952f6f4eb1b8681fa"; | ||
const amount = "00000000000000000000000000000000000000000000000000b1a2bc2ec50000"; | ||
const minReturn = "00000000000000000000000000000000000000000000048c48c63f0944606781"; | ||
const pools = "0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000180000000000000003b6d0340c06dadbfde48c0bdeb4608ddc7f232fd07a02da1cfee7c08"; | ||
|
||
const inputData = selector + srcToken + amount + minReturn + pools;; | ||
// Create serializedTx and remove the "0x" prefix | ||
const serializedTx = populateTransaction(contractAddr, inputData, chainID); | ||
|
||
const devices = [ | ||
{ | ||
name: "nanos", | ||
label: "Nano S", | ||
steps: 9, // <= Define the number of steps for this test case and this device | ||
}, | ||
{ | ||
name: "nanox", | ||
label: "Nano X", | ||
steps: 8, // <= Define the number of steps for this test case and this device | ||
} | ||
]; | ||
|
||
devices.forEach((device) => | ||
processTest(device, contractName, testLabel, testDirSuffix, "", signedPlugin, serializedTx, testNetwork) | ||
); |