-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: added test for all networks (Flex, Stax)
- Loading branch information
1 parent
c8bcc3e
commit 813607c
Showing
152 changed files
with
246 additions
and
168 deletions.
There are no files selected for viewing
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.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { processTest, populateTransaction} from "../../test.fixture"; | ||
|
||
const contractName = "Paraswap V5"; | ||
|
||
const testLabel = "Simple Buy"; // <= Name of the test | ||
const testDirSuffix = "simple_buy"; // <= directory to compare device snapshots to | ||
const testNetwork = "fantom"; | ||
const signedPlugin = false; | ||
|
||
const contractAddr = "0xdef171fe48cf0115b1d80b88dc8eab59176fee57"; | ||
const chainID = 250; // FANTOM | ||
|
||
// From : https://ftmscan.com/tx/0x6cedcf02015c3d8c87bf41e4b829aa79201ce161918b742071e74983d7a44c1b | ||
const inputData = "0x2298207a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000604d32503a66feacf4f9783f2aacfc627ae1550000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000000000000000000000012e6e5fd93ee0d2a3e13a000000000000000000000000000000000000000000000002ed6689e54f180000000000000000000000000000000000000000000000012b6fd0f582b0f91bebac00000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000004000000000000000000000000006deef4ef54a77187746fd39dd69c5030313b84b300000000000000000000000035099fb9446cfa57259948411c54d33a96c7dd3d01000000000000000000000000000000000000000000000000000000000313880000000000000000000000000000000000000000000000000000000000000460000000000000000000000000000000000000000000000000000000006747bbde4166aa15385a4821b66d8c525bb94d9e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000ab86e2bc9ec5485a9b60e684ba6d49bf4686acc2000000000000000000000000def171fe48cf0115b1d80b88dc8eab59176fee5700000000000000000000000000000000000000000000000000000000000001083f1c8c530000000000000000000000000604d32503a66feacf4f9783f2aacfc627ae1550000000000000000000000000000000000000000000012e6e5fd93ee0d2a3e13a000000000000000000000000000000000000000000000002ed6689e54f180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000004df865394f32eb8d9c91a0d355ddf45fda1cbcf27593e1829cfe00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c830000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e400000000000000000000000000000000000000000000000000000000000001080000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" | ||
|
||
// Create serializedTx and remove the "0x" prefix | ||
const serializedTx = populateTransaction(contractAddr, inputData, chainID, "101.508501444720532639"); | ||
|
||
const devices = [ | ||
{ | ||
name: "nanos", | ||
label: "Nano S", | ||
steps: 8 // <= Define the number of steps for this test case and this device | ||
}, | ||
{ | ||
name: "nanosp", | ||
label: "Nano S+", | ||
steps: 7 // <= 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 | ||
}, | ||
{ | ||
name: "stax", | ||
label: "Stax", | ||
}, | ||
{ | ||
name: "flex", | ||
label: "Flex", | ||
} | ||
]; | ||
|
||
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,47 @@ | ||
import { processTest, populateTransaction} from "../../test.fixture"; | ||
|
||
const contractName = "Paraswap V5"; | ||
|
||
const testLabel = "Simple Swap"; // <= Name of the test | ||
const testDirSuffix = "simple_swap"; // <= directory to compare device snapshots to | ||
const testNetwork = "fantom"; | ||
const signedPlugin = false; | ||
|
||
const contractAddr = "0xdef171fe48cf0115b1d80b88dc8eab59176fee57"; | ||
const chainID = 250; // FANTOM | ||
|
||
// From : https://ftmscan.com/tx/0x1d525917727e360782afc6a1cd1156bde42095e53d74130450fe11d530415d3e | ||
const inputData = "0x54e3f31b0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000007381ed41f6de418dde5e84b55590422a57917886000000000000000000000000000000000000000000000000088a0c344f6efb000000000000000000000000000000000000000000000000000889054abcb76af80000000000000000000000000000000000000000000000000889054abcb76af800000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000036000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000a6b66b1d2d433bddd7fe99289908d1013be1915d00000000000000000000000035099fb9446cfa57259948411c54d33a96c7dd3d01000000000000000000000000000000000000000000000000000000000313880000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000006747bcee1a559578d4624efb8083578c98f8984100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83000000000000000000000000ab86e2bc9ec5485a9b60e684ba6d49bf4686acc200000000000000000000000000000000000000000000000000000000000000e8d0e30db091a32b6900000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83000000000000000000000000000000000000000000000000088a0c344f6efb000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000004df8b5512e3fa8304d33cdae4a40c21f1d3f70eba45a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000e80000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000088a0c344f6efb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" | ||
|
||
// Create serializedTx and remove the "0x" prefix | ||
const serializedTx = populateTransaction(contractAddr, inputData, chainID,"30"); | ||
|
||
const devices = [ | ||
{ | ||
name: "nanos", | ||
label: "Nano S", | ||
steps: 11 // <= Define the number of steps for this test case and this device | ||
}, | ||
{ | ||
name: "nanosp", | ||
label: "Nano S+", | ||
steps: 7 // <= 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 | ||
}, | ||
{ | ||
name: "stax", | ||
label: "Stax", | ||
}, | ||
{ | ||
name: "flex", | ||
label: "Flex", | ||
} | ||
]; | ||
|
||
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
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
Oops, something went wrong.