diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 52b89b7..43f6b51 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -21,6 +21,10 @@ jobs: name: "nanox" - sdk: "$NANOSP_SDK" name: "nanosp" + - sdk: "$STAX_SDK" + name: "stax" + - sdk: "$FLEX_SDK" + name: "flex" runs-on: ubuntu-latest container: @@ -47,6 +51,10 @@ jobs: name: "nanox" - sdk: "$NANOSP_SDK" name: "nanosp" + - sdk: "$STAX_SDK" + name: "stax" + - sdk: "$FLEX_SDK" + name: "flex" runs-on: ubuntu-latest container: @@ -83,6 +91,10 @@ jobs: name: "nanox" - sdk: "$NANOSP_SDK" name: "nanosp" + - sdk: "$STAX_SDK" + name: "stax" + - sdk: "$FLEX_SDK" + name: "flex" runs-on: ubuntu-latest container: diff --git a/.gitignore b/.gitignore index a914922..99385f8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ bin/ debug/ dep/ obj/ -tests/elfs/plugin_nano*.elf +tests/elfs/ build/ # Editors diff --git a/Makefile b/Makefile index f30d4d9..0588c40 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ APPNAME = "Paraswap" # Application version APPVERSION_M = 2 -APPVERSION_N = 1 -APPVERSION_P = 1 +APPVERSION_N = 2 +APPVERSION_P = 0 include ethereum-plugin-sdk/standard_plugin.mk diff --git a/README.md b/README.md index 0105c62..6df0237 100644 --- a/README.md +++ b/README.md @@ -27,13 +27,18 @@ Need more information about the interface, the architecture, or general stuff ab Smart contracts covered by this plugin are: | Network | Version | Smart Contract | -| --- | --- | --- | -| Ethereum | V4 | `0x1bd435f3c054b6e901b7b108a0ab7617c808677b` | -| Ethereum | V5 | `0xdef171fe48cf0115b1d80b88dc8eab59176fee57`| -| BSC | V4 | `0x55a0e3b6579972055faa983482aceb4b251dcf15`| -| BSC | V5 | `0xdef171fe48cf0115b1d80b88dc8eab59176fee57`| -| Polygon | V4 | `0x90249ed4d69d70e709ffcd8bee2c5a566f65dade`| -| Polygon | V5 | `0xdef171fe48cf0115b1d80b88dc8eab59176fee57`| +| --- | --- | --- | +| Arbitrum | V5 | `0xdef171fe48cf0115b1d80b88dc8eab59176fee57`| +| Base | V5 | `0x59c7c832e96d2568bea6db468c1aadcbbda08a52`| +| BSC | V4 | `0x55a0e3b6579972055faa983482aceb4b251dcf15`| +| BSC | V5 | `0xdef171fe48cf0115b1d80b88dc8eab59176fee57`| +| Ethereum | V4 | `0x1bd435f3c054b6e901b7b108a0ab7617c808677b`| +| Ethereum | V5 | `0xdef171fe48cf0115b1d80b88dc8eab59176fee57`| +| Fantom | V5 | `0xdef171fe48cf0115b1d80b88dc8eab59176fee57`| +| Optimism | V5 | `0xdef171fe48cf0115b1d80b88dc8eab59176fee57`| +| Polygon | V4 | `0x90249ed4d69d70e709ffcd8bee2c5a566f65dade`| +| Polygon | V5 | `0xdef171fe48cf0115b1d80b88dc8eab59176fee57`| +| Polygon ZK EVM | V5 | `0xb83b554730d29ce4cb55bb42206c3e2c03e4a40a`| diff --git a/glyphs/stax_paraswap_64px.gif b/glyphs/stax_paraswap_64px.gif new file mode 100644 index 0000000..cb9bace Binary files /dev/null and b/glyphs/stax_paraswap_64px.gif differ diff --git a/icons/flex_app_paraswap.gif b/icons/flex_app_paraswap.gif new file mode 100644 index 0000000..f3cc8d4 Binary files /dev/null and b/icons/flex_app_paraswap.gif differ diff --git a/icons/stax_app_paraswap.gif b/icons/stax_app_paraswap.gif new file mode 100644 index 0000000..71ee863 Binary files /dev/null and b/icons/stax_app_paraswap.gif differ diff --git a/tests/build_local_test_elfs.sh b/tests/build_local_test_elfs.sh index 08900f9..1398d23 100755 --- a/tests/build_local_test_elfs.sh +++ b/tests/build_local_test_elfs.sh @@ -11,35 +11,81 @@ mkdir -p elfs # move to repo's root to build apps cd .. -echo "*Building elfs for Nano S..." -export BOLOS_SDK="$NANOS_SDK" +# echo "*Building elfs for Nano S..." +# export BOLOS_SDK="$NANOS_SDK" -echo "**Building app-paraswap for Nano S..." +# echo "**Building app-paraswap for Nano S..." +# make clean +# make -j DEBUG=1 +# cp bin/app.elf "tests/elfs/plugin_nanos.elf" + +# echo "**Building app-ethereum for Nano S..." +# cd $APP_ETHEREUM || exit +# make clean +# make -j DEBUG=1 CHAIN=ethereum BYPASS_SIGNATURES=1 ALLOW_DATA=1 +# cd - || exit +# cp "${APP_ETHEREUM}/bin/app.elf" "tests/elfs/ethereum_nanos.elf" + + +# echo "*Building elfs for Nano X..." +# export BOLOS_SDK="$NANOX_SDK" + +# echo "**Building app-paraswap for Nano X..." +# make clean +# make -j DEBUG=1 +# cp bin/app.elf "tests/elfs/plugin_nanox.elf" + +# echo "**Building app-ethereum for Nano X..." +# cd $APP_ETHEREUM || exit +# make clean +# make -j DEBUG=1 CHAIN=ethereum BYPASS_SIGNATURES=1 ALLOW_DATA=1 +# cd - || exit +# cp "${APP_ETHEREUM}/bin/app.elf" "tests/elfs/ethereum_nanox.elf" + +# echo "*Building elfs for Nano S+..." +# export BOLOS_SDK="$NANOSP_SDK" + +# echo "**Building app-1inch for Nano S+..." +# make clean +# make -j DEBUG=1 +# cp bin/app.elf "tests/elfs/plugin_nanosp.elf" + +# echo "**Building app-ethereum for Nano S+..." +# cd $APP_ETHEREUM +# make clean BOLOS_SDK=$NANOSP_SDK +# make -j DEBUG=1 BOLOS_SDK=$NANOSP_SDK CHAIN=ethereum BYPASS_SIGNATURES=1 +# cd - +# cp "${APP_ETHEREUM}/bin/app.elf" "tests/elfs/ethereum_nanosp.elf" + +echo "*Building elfs for Flex..." +export BOLOS_SDK="$FLEX_SDK" + +echo "**Building app-1inch for Flex..." make clean make -j DEBUG=1 -cp bin/app.elf "tests/elfs/plugin_nanos.elf" +cp bin/app.elf "tests/elfs/plugin_flex.elf" -echo "**Building app-ethereum for Nano S..." -cd $APP_ETHEREUM || exit -make clean -make -j DEBUG=1 CHAIN=ethereum BYPASS_SIGNATURES=1 ALLOW_DATA=1 -cd - || exit -cp "${APP_ETHEREUM}/bin/app.elf" "tests/elfs/ethereum_nanos.elf" +echo "**Building app-ethereum for Flex..." +cd $APP_ETHEREUM +make clean BOLOS_SDK=$FLEX_SDK +make -j DEBUG=1 BOLOS_SDK=$FLEX_SDK CHAIN=ethereum BYPASS_SIGNATURES=1 +cd - +cp "${APP_ETHEREUM}/bin/app.elf" "tests/elfs/ethereum_flex.elf" -echo "*Building elfs for Nano X..." -export BOLOS_SDK="$NANOX_SDK" +echo "*Building elfs for Stax..." +export BOLOS_SDK="$STAX_SDK" -echo "**Building app-paraswap for Nano X..." +echo "**Building app-1inch for Stax..." make clean make -j DEBUG=1 -cp bin/app.elf "tests/elfs/plugin_nanox.elf" +cp bin/app.elf "tests/elfs/plugin_stax.elf" -echo "**Building app-ethereum for Nano X..." -cd $APP_ETHEREUM || exit -make clean -make -j DEBUG=1 CHAIN=ethereum BYPASS_SIGNATURES=1 ALLOW_DATA=1 -cd - || exit -cp "${APP_ETHEREUM}/bin/app.elf" "tests/elfs/ethereum_nanox.elf" +echo "**Building app-ethereum for Stax..." +cd $APP_ETHEREUM +make clean BOLOS_SDK=$STAX_SDK +make -j DEBUG=1 BOLOS_SDK=$STAX_SDK CHAIN=ethereum BYPASS_SIGNATURES=1 +cd - +cp "${APP_ETHEREUM}/bin/app.elf" "tests/elfs/ethereum_stax.elf" echo "done" diff --git a/tests/networks/arbitrum/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json b/tests/networks/arbitrum/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json new file mode 100644 index 0000000..f15631a --- /dev/null +++ b/tests/networks/arbitrum/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json @@ -0,0 +1,1966 @@ +[ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_feeWallet", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "adapter", + "type": "address" + } + ], + "name": "AdapterInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "router", + "type": "address" + } + ], + "name": "RouterInitialized", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ROUTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WHITELISTED_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "getAdapterData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "partner", + "type": "address" + } + ], + "name": "getPartnerFeeStructure", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "partnerShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "noPositiveSlippage", + "type": "bool" + }, + { + "internalType": "bool", + "name": "positiveSlippageToUser", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "feePercent", + "type": "uint16" + }, + { + "internalType": "string", + "name": "partnerId", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct AugustusStorage.FeeStructure", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "getRouterData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTokenTransferProxy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVersion", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "adapter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "initializeAdapter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "router", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "initializeRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "isAdapterInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "isRouterInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_partnerShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_noPositiveSlippage", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_positiveSlippageToUser", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "_feePercent", + "type": "uint16" + }, + { + "internalType": "string", + "name": "partnerId", + "type": "string" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "registerPartner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_feeWallet", + "type": "address" + } + ], + "name": "setFeeWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address payable", + "name": "destination", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + }, + { + "indexed": false, + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "srcToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "srcAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + } + ], + "name": "Bought", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "partnerShare", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "paraswapShare", + "type": "uint256" + } + ], + "name": "FeeTaken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + }, + { + "indexed": false, + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "srcToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "srcAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + } + ], + "name": "Swapped", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "buyOnUniswap", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "factory", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "initCode", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "buyOnUniswapFork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "weth", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "pools", + "type": "uint256[]" + } + ], + "name": "buyOnUniswapV2Fork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "fromAmountPercent", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.MegaSwapPath[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.MegaSwapSellData", + "name": "data", + "type": "tuple" + } + ], + "name": "megaSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SellData", + "name": "data", + "type": "tuple" + } + ], + "name": "multiSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "fromAmountPercent", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.MegaSwapPath[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.MegaSwapSellData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedMegaSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SellData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedMultiSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedSimpleBuy", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedSimpleSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "simpleBuy", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "simpleSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "swapOnUniswap", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "factory", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "initCode", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "swapOnUniswapFork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "weth", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "pools", + "type": "uint256[]" + } + ], + "name": "swapOnUniswapV2Fork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "exchange", + "type": "address" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "swapOnZeroXv2", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "exchange", + "type": "address" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "swapOnZeroXv4", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ] \ No newline at end of file diff --git a/tests/networks/arbitrum/paraswap/b2c.json b/tests/networks/arbitrum/paraswap/b2c.json new file mode 100644 index 0000000..759fbf8 --- /dev/null +++ b/tests/networks/arbitrum/paraswap/b2c.json @@ -0,0 +1,100 @@ +{ + "chainId": 42161, + "contracts": [ + { + "address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57", + "contractName": "AugustusSwapper", + "selectors": { + "0x54840d1a": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "swapOnUniswap", + "plugin": "Paraswap" + }, + "0xf5661034": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "swapOnUniswapFork", + "plugin": "Paraswap" + }, + "0x0b86a4c1": { + "erc20OfInterest": [ + "tokenIn" + ], + "method": "swapOnUniswapV2Fork", + "plugin": "Paraswap" + }, + "0x54e3f31b": { + "erc20OfInterest": [ + "data.fromToken", + "data.toToken" + ], + "method": "SimpleSwap", + "plugin": "Paraswap" + }, + "0x935fb84b": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "buyOnUniswap", + "plugin": "Paraswap" + }, + "0xc03786b0": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "buyOnUniswapFork", + "plugin": "Paraswap" + }, + "0xa94e78ef": { + "erc20OfInterest": [ + "data.fromToken", + "data.path.-1.to" + ], + "method": "multiSwap", + "plugin": "Paraswap" + }, + "0x46c67b6d": { + "erc20OfInterest": [ + "data.fromToken", + "data.path.0.path.-1.to" + ], + "method": "megaSwap", + "plugin": "Paraswap" + }, + "0x2298207a": { + "erc20OfInterest": [ + "data.fromToken", + "data.toToken" + ], + "method": "simpleBuy", + "plugin": "Paraswap" + }, + "0x64466805": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv4", + "plugin": "Paraswap" + }, + "0x81033120": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv2", + "plugin": "Paraswap" + } + } + } + + ], + "name": "Paraswap" +} \ No newline at end of file diff --git a/tests/networks/base/paraswap/abis/0x59c7c832e96d2568bea6db468c1aadcbbda08a52.abi.json b/tests/networks/base/paraswap/abis/0x59c7c832e96d2568bea6db468c1aadcbbda08a52.abi.json new file mode 100644 index 0000000..f15631a --- /dev/null +++ b/tests/networks/base/paraswap/abis/0x59c7c832e96d2568bea6db468c1aadcbbda08a52.abi.json @@ -0,0 +1,1966 @@ +[ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_feeWallet", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "adapter", + "type": "address" + } + ], + "name": "AdapterInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "router", + "type": "address" + } + ], + "name": "RouterInitialized", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ROUTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WHITELISTED_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "getAdapterData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "partner", + "type": "address" + } + ], + "name": "getPartnerFeeStructure", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "partnerShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "noPositiveSlippage", + "type": "bool" + }, + { + "internalType": "bool", + "name": "positiveSlippageToUser", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "feePercent", + "type": "uint16" + }, + { + "internalType": "string", + "name": "partnerId", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct AugustusStorage.FeeStructure", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "getRouterData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTokenTransferProxy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVersion", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "adapter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "initializeAdapter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "router", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "initializeRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "isAdapterInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "isRouterInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_partnerShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_noPositiveSlippage", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_positiveSlippageToUser", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "_feePercent", + "type": "uint16" + }, + { + "internalType": "string", + "name": "partnerId", + "type": "string" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "registerPartner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_feeWallet", + "type": "address" + } + ], + "name": "setFeeWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address payable", + "name": "destination", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + }, + { + "indexed": false, + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "srcToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "srcAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + } + ], + "name": "Bought", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "partnerShare", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "paraswapShare", + "type": "uint256" + } + ], + "name": "FeeTaken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + }, + { + "indexed": false, + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "srcToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "srcAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + } + ], + "name": "Swapped", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "buyOnUniswap", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "factory", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "initCode", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "buyOnUniswapFork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "weth", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "pools", + "type": "uint256[]" + } + ], + "name": "buyOnUniswapV2Fork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "fromAmountPercent", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.MegaSwapPath[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.MegaSwapSellData", + "name": "data", + "type": "tuple" + } + ], + "name": "megaSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SellData", + "name": "data", + "type": "tuple" + } + ], + "name": "multiSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "fromAmountPercent", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.MegaSwapPath[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.MegaSwapSellData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedMegaSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SellData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedMultiSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedSimpleBuy", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedSimpleSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "simpleBuy", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "simpleSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "swapOnUniswap", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "factory", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "initCode", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "swapOnUniswapFork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "weth", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "pools", + "type": "uint256[]" + } + ], + "name": "swapOnUniswapV2Fork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "exchange", + "type": "address" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "swapOnZeroXv2", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "exchange", + "type": "address" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "swapOnZeroXv4", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ] \ No newline at end of file diff --git a/tests/networks/base/paraswap/b2c.json b/tests/networks/base/paraswap/b2c.json new file mode 100644 index 0000000..ac849b8 --- /dev/null +++ b/tests/networks/base/paraswap/b2c.json @@ -0,0 +1,99 @@ +{ + "chainId": 8453, + "contracts": [ + { + "address": "0x59c7c832e96d2568bea6db468c1aadcbbda08a52", + "contractName": "AugustusSwapper", + "selectors": { + "0x54840d1a": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "swapOnUniswap", + "plugin": "Paraswap" + }, + "0xf5661034": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "swapOnUniswapFork", + "plugin": "Paraswap" + }, + "0x0b86a4c1": { + "erc20OfInterest": [ + "tokenIn" + ], + "method": "swapOnUniswapV2Fork", + "plugin": "Paraswap" + }, + "0x54e3f31b": { + "erc20OfInterest": [ + "data.fromToken", + "data.toToken" + ], + "method": "SimpleSwap", + "plugin": "Paraswap" + }, + "0x935fb84b": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "buyOnUniswap", + "plugin": "Paraswap" + }, + "0xc03786b0": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "buyOnUniswapFork", + "plugin": "Paraswap" + }, + "0xa94e78ef": { + "erc20OfInterest": [ + "data.fromToken", + "data.path.-1.to" + ], + "method": "multiSwap", + "plugin": "Paraswap" + }, + "0x46c67b6d": { + "erc20OfInterest": [ + "data.fromToken", + "data.path.0.path.-1.to" + ], + "method": "megaSwap", + "plugin": "Paraswap" + }, + "0x2298207a": { + "erc20OfInterest": [ + "data.fromToken", + "data.toToken" + ], + "method": "simpleBuy", + "plugin": "Paraswap" + }, + "0x64466805": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv4", + "plugin": "Paraswap" + }, + "0x81033120": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv2", + "plugin": "Paraswap" + } + } + } + ], + "name": "Paraswap" +} \ No newline at end of file diff --git a/tests/networks/fantom/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json b/tests/networks/fantom/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json new file mode 100644 index 0000000..f15631a --- /dev/null +++ b/tests/networks/fantom/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json @@ -0,0 +1,1966 @@ +[ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_feeWallet", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "adapter", + "type": "address" + } + ], + "name": "AdapterInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "router", + "type": "address" + } + ], + "name": "RouterInitialized", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ROUTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WHITELISTED_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "getAdapterData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "partner", + "type": "address" + } + ], + "name": "getPartnerFeeStructure", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "partnerShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "noPositiveSlippage", + "type": "bool" + }, + { + "internalType": "bool", + "name": "positiveSlippageToUser", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "feePercent", + "type": "uint16" + }, + { + "internalType": "string", + "name": "partnerId", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct AugustusStorage.FeeStructure", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "getRouterData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTokenTransferProxy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVersion", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "adapter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "initializeAdapter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "router", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "initializeRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "isAdapterInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "isRouterInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_partnerShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_noPositiveSlippage", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_positiveSlippageToUser", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "_feePercent", + "type": "uint16" + }, + { + "internalType": "string", + "name": "partnerId", + "type": "string" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "registerPartner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_feeWallet", + "type": "address" + } + ], + "name": "setFeeWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address payable", + "name": "destination", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + }, + { + "indexed": false, + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "srcToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "srcAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + } + ], + "name": "Bought", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "partnerShare", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "paraswapShare", + "type": "uint256" + } + ], + "name": "FeeTaken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + }, + { + "indexed": false, + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "srcToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "srcAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + } + ], + "name": "Swapped", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "buyOnUniswap", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "factory", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "initCode", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "buyOnUniswapFork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "weth", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "pools", + "type": "uint256[]" + } + ], + "name": "buyOnUniswapV2Fork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "fromAmountPercent", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.MegaSwapPath[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.MegaSwapSellData", + "name": "data", + "type": "tuple" + } + ], + "name": "megaSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SellData", + "name": "data", + "type": "tuple" + } + ], + "name": "multiSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "fromAmountPercent", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.MegaSwapPath[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.MegaSwapSellData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedMegaSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SellData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedMultiSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedSimpleBuy", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedSimpleSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "simpleBuy", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "simpleSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "swapOnUniswap", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "factory", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "initCode", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "swapOnUniswapFork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "weth", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "pools", + "type": "uint256[]" + } + ], + "name": "swapOnUniswapV2Fork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "exchange", + "type": "address" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "swapOnZeroXv2", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "exchange", + "type": "address" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "swapOnZeroXv4", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ] \ No newline at end of file diff --git a/tests/networks/fantom/paraswap/b2c.json b/tests/networks/fantom/paraswap/b2c.json new file mode 100644 index 0000000..022b45e --- /dev/null +++ b/tests/networks/fantom/paraswap/b2c.json @@ -0,0 +1,100 @@ +{ + "chainId": 250, + "contracts": [ + { + "address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57", + "contractName": "AugustusSwapper", + "selectors": { + "0x54840d1a": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "swapOnUniswap", + "plugin": "Paraswap" + }, + "0xf5661034": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "swapOnUniswapFork", + "plugin": "Paraswap" + }, + "0x0b86a4c1": { + "erc20OfInterest": [ + "tokenIn" + ], + "method": "swapOnUniswapV2Fork", + "plugin": "Paraswap" + }, + "0x54e3f31b": { + "erc20OfInterest": [ + "data.fromToken", + "data.toToken" + ], + "method": "SimpleSwap", + "plugin": "Paraswap" + }, + "0x935fb84b": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "buyOnUniswap", + "plugin": "Paraswap" + }, + "0xc03786b0": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "buyOnUniswapFork", + "plugin": "Paraswap" + }, + "0xa94e78ef": { + "erc20OfInterest": [ + "data.fromToken", + "data.path.-1.to" + ], + "method": "multiSwap", + "plugin": "Paraswap" + }, + "0x46c67b6d": { + "erc20OfInterest": [ + "data.fromToken", + "data.path.0.path.-1.to" + ], + "method": "megaSwap", + "plugin": "Paraswap" + }, + "0x2298207a": { + "erc20OfInterest": [ + "data.fromToken", + "data.toToken" + ], + "method": "simpleBuy", + "plugin": "Paraswap" + }, + "0x64466805": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv4", + "plugin": "Paraswap" + }, + "0x81033120": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv2", + "plugin": "Paraswap" + } + } + } + + ], + "name": "Paraswap" +} \ No newline at end of file diff --git a/tests/networks/optimism/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json b/tests/networks/optimism/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json new file mode 100644 index 0000000..f15631a --- /dev/null +++ b/tests/networks/optimism/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json @@ -0,0 +1,1966 @@ +[ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_feeWallet", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "adapter", + "type": "address" + } + ], + "name": "AdapterInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "router", + "type": "address" + } + ], + "name": "RouterInitialized", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ROUTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WHITELISTED_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "getAdapterData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "partner", + "type": "address" + } + ], + "name": "getPartnerFeeStructure", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "partnerShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "noPositiveSlippage", + "type": "bool" + }, + { + "internalType": "bool", + "name": "positiveSlippageToUser", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "feePercent", + "type": "uint16" + }, + { + "internalType": "string", + "name": "partnerId", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct AugustusStorage.FeeStructure", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "getRouterData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTokenTransferProxy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVersion", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "adapter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "initializeAdapter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "router", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "initializeRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "isAdapterInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "isRouterInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_partnerShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_noPositiveSlippage", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_positiveSlippageToUser", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "_feePercent", + "type": "uint16" + }, + { + "internalType": "string", + "name": "partnerId", + "type": "string" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "registerPartner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_feeWallet", + "type": "address" + } + ], + "name": "setFeeWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address payable", + "name": "destination", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + }, + { + "indexed": false, + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "srcToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "srcAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + } + ], + "name": "Bought", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "partnerShare", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "paraswapShare", + "type": "uint256" + } + ], + "name": "FeeTaken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + }, + { + "indexed": false, + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "srcToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "srcAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + } + ], + "name": "Swapped", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "buyOnUniswap", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "factory", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "initCode", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "buyOnUniswapFork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "weth", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "pools", + "type": "uint256[]" + } + ], + "name": "buyOnUniswapV2Fork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "fromAmountPercent", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.MegaSwapPath[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.MegaSwapSellData", + "name": "data", + "type": "tuple" + } + ], + "name": "megaSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SellData", + "name": "data", + "type": "tuple" + } + ], + "name": "multiSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "fromAmountPercent", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.MegaSwapPath[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.MegaSwapSellData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedMegaSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SellData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedMultiSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedSimpleBuy", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedSimpleSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "simpleBuy", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "simpleSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "swapOnUniswap", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "factory", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "initCode", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "swapOnUniswapFork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "weth", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "pools", + "type": "uint256[]" + } + ], + "name": "swapOnUniswapV2Fork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "exchange", + "type": "address" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "swapOnZeroXv2", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "exchange", + "type": "address" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "swapOnZeroXv4", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ] \ No newline at end of file diff --git a/tests/networks/optimism/paraswap/b2c.json b/tests/networks/optimism/paraswap/b2c.json new file mode 100644 index 0000000..48a066d --- /dev/null +++ b/tests/networks/optimism/paraswap/b2c.json @@ -0,0 +1,99 @@ +{ + "chainId": 10, + "contracts": [ + { + "address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57", + "contractName": "AugustusSwapper", + "selectors": { + "0x54840d1a": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "swapOnUniswap", + "plugin": "Paraswap" + }, + "0xf5661034": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "swapOnUniswapFork", + "plugin": "Paraswap" + }, + "0x0b86a4c1": { + "erc20OfInterest": [ + "tokenIn" + ], + "method": "swapOnUniswapV2Fork", + "plugin": "Paraswap" + }, + "0x54e3f31b": { + "erc20OfInterest": [ + "data.fromToken", + "data.toToken" + ], + "method": "SimpleSwap", + "plugin": "Paraswap" + }, + "0x935fb84b": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "buyOnUniswap", + "plugin": "Paraswap" + }, + "0xc03786b0": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "buyOnUniswapFork", + "plugin": "Paraswap" + }, + "0xa94e78ef": { + "erc20OfInterest": [ + "data.fromToken", + "data.path.-1.to" + ], + "method": "multiSwap", + "plugin": "Paraswap" + }, + "0x46c67b6d": { + "erc20OfInterest": [ + "data.fromToken", + "data.path.0.path.-1.to" + ], + "method": "megaSwap", + "plugin": "Paraswap" + }, + "0x2298207a": { + "erc20OfInterest": [ + "data.fromToken", + "data.toToken" + ], + "method": "simpleBuy", + "plugin": "Paraswap" + }, + "0x64466805": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv4", + "plugin": "Paraswap" + }, + "0x81033120": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv2", + "plugin": "Paraswap" + } + } + } + ], + "name": "Paraswap" +} \ No newline at end of file diff --git a/tests/networks/polygon_zk_evm/paraswap/abis/0xb83b554730d29ce4cb55bb42206c3e2c03e4a40a.abi.json b/tests/networks/polygon_zk_evm/paraswap/abis/0xb83b554730d29ce4cb55bb42206c3e2c03e4a40a.abi.json new file mode 100644 index 0000000..f15631a --- /dev/null +++ b/tests/networks/polygon_zk_evm/paraswap/abis/0xb83b554730d29ce4cb55bb42206c3e2c03e4a40a.abi.json @@ -0,0 +1,1966 @@ +[ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_feeWallet", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "adapter", + "type": "address" + } + ], + "name": "AdapterInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "router", + "type": "address" + } + ], + "name": "RouterInitialized", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ROUTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WHITELISTED_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "getAdapterData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "partner", + "type": "address" + } + ], + "name": "getPartnerFeeStructure", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "partnerShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "noPositiveSlippage", + "type": "bool" + }, + { + "internalType": "bool", + "name": "positiveSlippageToUser", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "feePercent", + "type": "uint16" + }, + { + "internalType": "string", + "name": "partnerId", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct AugustusStorage.FeeStructure", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "getRouterData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTokenTransferProxy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVersion", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "adapter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "initializeAdapter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "router", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "initializeRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "isAdapterInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "isRouterInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_partnerShare", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_noPositiveSlippage", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_positiveSlippageToUser", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "_feePercent", + "type": "uint16" + }, + { + "internalType": "string", + "name": "partnerId", + "type": "string" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "registerPartner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_feeWallet", + "type": "address" + } + ], + "name": "setFeeWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address payable", + "name": "destination", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + }, + { + "indexed": false, + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "srcToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "srcAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + } + ], + "name": "Bought", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "partnerShare", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "paraswapShare", + "type": "uint256" + } + ], + "name": "FeeTaken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + }, + { + "indexed": false, + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "srcToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "srcAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + } + ], + "name": "Swapped", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "buyOnUniswap", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "factory", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "initCode", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "buyOnUniswapFork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "weth", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "pools", + "type": "uint256[]" + } + ], + "name": "buyOnUniswapV2Fork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "fromAmountPercent", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.MegaSwapPath[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.MegaSwapSellData", + "name": "data", + "type": "tuple" + } + ], + "name": "megaSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SellData", + "name": "data", + "type": "tuple" + } + ], + "name": "multiSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "fromAmountPercent", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.MegaSwapPath[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.MegaSwapSellData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedMegaSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalNetworkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "adapter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "targetExchange", + "type": "address" + }, + { + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "networkFee", + "type": "uint256" + } + ], + "internalType": "struct Utils.Route[]", + "name": "route", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Adapter[]", + "name": "adapters", + "type": "tuple[]" + } + ], + "internalType": "struct Utils.Path[]", + "name": "path", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SellData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedMultiSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedSimpleBuy", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "protectedSimpleSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "simpleBuy", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "address", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "callees", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "exchangeData", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "startIndexes", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address payable", + "name": "partner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feePercent", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "permit", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes16", + "name": "uuid", + "type": "bytes16" + } + ], + "internalType": "struct Utils.SimpleData", + "name": "data", + "type": "tuple" + } + ], + "name": "simpleSwap", + "outputs": [ + { + "internalType": "uint256", + "name": "receivedAmount", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "swapOnUniswap", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "factory", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "initCode", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "swapOnUniswapFork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "weth", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "pools", + "type": "uint256[]" + } + ], + "name": "swapOnUniswapV2Fork", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "exchange", + "type": "address" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "swapOnZeroXv2", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "fromToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "toToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "fromAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address", + "name": "exchange", + "type": "address" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "swapOnZeroXv4", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ] \ No newline at end of file diff --git a/tests/networks/polygon_zk_evm/paraswap/b2c.json b/tests/networks/polygon_zk_evm/paraswap/b2c.json new file mode 100644 index 0000000..f335e40 --- /dev/null +++ b/tests/networks/polygon_zk_evm/paraswap/b2c.json @@ -0,0 +1,99 @@ +{ + "chainId": 1101, + "contracts": [ + { + "address": "0xb83b554730d29ce4cb55bb42206c3e2c03e4a40a", + "contractName": "AugustusSwapper", + "selectors": { + "0x54840d1a": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "swapOnUniswap", + "plugin": "Paraswap" + }, + "0xf5661034": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "swapOnUniswapFork", + "plugin": "Paraswap" + }, + "0x0b86a4c1": { + "erc20OfInterest": [ + "tokenIn" + ], + "method": "swapOnUniswapV2Fork", + "plugin": "Paraswap" + }, + "0x54e3f31b": { + "erc20OfInterest": [ + "data.fromToken", + "data.toToken" + ], + "method": "SimpleSwap", + "plugin": "Paraswap" + }, + "0x935fb84b": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "buyOnUniswap", + "plugin": "Paraswap" + }, + "0xc03786b0": { + "erc20OfInterest": [ + "path.0", + "path.-1" + ], + "method": "buyOnUniswapFork", + "plugin": "Paraswap" + }, + "0xa94e78ef": { + "erc20OfInterest": [ + "data.fromToken", + "data.path.-1.to" + ], + "method": "multiSwap", + "plugin": "Paraswap" + }, + "0x46c67b6d": { + "erc20OfInterest": [ + "data.fromToken", + "data.path.0.path.-1.to" + ], + "method": "megaSwap", + "plugin": "Paraswap" + }, + "0x2298207a": { + "erc20OfInterest": [ + "data.fromToken", + "data.toToken" + ], + "method": "simpleBuy", + "plugin": "Paraswap" + }, + "0x64466805": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv4", + "plugin": "Paraswap" + }, + "0x81033120": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv2", + "plugin": "Paraswap" + } + } + } + ], + "name": "Paraswap" +} \ No newline at end of file diff --git a/tests/snapshots/arbitrum_flex_simple_buy/00000.png b/tests/snapshots/arbitrum_flex_simple_buy/00000.png new file mode 100644 index 0000000..706d48f Binary files /dev/null and b/tests/snapshots/arbitrum_flex_simple_buy/00000.png differ diff --git a/tests/snapshots/arbitrum_flex_simple_buy/00001.png b/tests/snapshots/arbitrum_flex_simple_buy/00001.png new file mode 100644 index 0000000..b757a6f Binary files /dev/null and b/tests/snapshots/arbitrum_flex_simple_buy/00001.png differ diff --git a/tests/snapshots/arbitrum_flex_simple_buy/00002.png b/tests/snapshots/arbitrum_flex_simple_buy/00002.png new file mode 100644 index 0000000..e67b539 Binary files /dev/null and b/tests/snapshots/arbitrum_flex_simple_buy/00002.png differ diff --git a/tests/snapshots/arbitrum_flex_simple_buy/00003.png b/tests/snapshots/arbitrum_flex_simple_buy/00003.png new file mode 100644 index 0000000..dabe7af Binary files /dev/null and b/tests/snapshots/arbitrum_flex_simple_buy/00003.png differ diff --git a/tests/snapshots/arbitrum_flex_simple_swap/00000.png b/tests/snapshots/arbitrum_flex_simple_swap/00000.png new file mode 100644 index 0000000..25cf17a Binary files /dev/null and b/tests/snapshots/arbitrum_flex_simple_swap/00000.png differ diff --git a/tests/snapshots/arbitrum_flex_simple_swap/00001.png b/tests/snapshots/arbitrum_flex_simple_swap/00001.png new file mode 100644 index 0000000..2a3a788 Binary files /dev/null and b/tests/snapshots/arbitrum_flex_simple_swap/00001.png differ diff --git a/tests/snapshots/arbitrum_flex_simple_swap/00002.png b/tests/snapshots/arbitrum_flex_simple_swap/00002.png new file mode 100644 index 0000000..b039a79 Binary files /dev/null and b/tests/snapshots/arbitrum_flex_simple_swap/00002.png differ diff --git a/tests/snapshots/arbitrum_flex_simple_swap/00003.png b/tests/snapshots/arbitrum_flex_simple_swap/00003.png new file mode 100644 index 0000000..34671dc Binary files /dev/null and b/tests/snapshots/arbitrum_flex_simple_swap/00003.png differ diff --git a/tests/snapshots/arbitrum_flex_simple_swap/00004.png b/tests/snapshots/arbitrum_flex_simple_swap/00004.png new file mode 100644 index 0000000..dabe7af Binary files /dev/null and b/tests/snapshots/arbitrum_flex_simple_swap/00004.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_buy/00000.png b/tests/snapshots/arbitrum_nanos_simple_buy/00000.png new file mode 100644 index 0000000..8d84cc7 Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_buy/00000.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_buy/00001.png b/tests/snapshots/arbitrum_nanos_simple_buy/00001.png new file mode 100644 index 0000000..8b8180d Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_buy/00001.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_buy/00002.png b/tests/snapshots/arbitrum_nanos_simple_buy/00002.png new file mode 100644 index 0000000..4ca0cc5 Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_buy/00002.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_buy/00003.png b/tests/snapshots/arbitrum_nanos_simple_buy/00003.png new file mode 100644 index 0000000..3c35f8c Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_buy/00003.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_buy/00004.png b/tests/snapshots/arbitrum_nanos_simple_buy/00004.png new file mode 100644 index 0000000..bdfe01e Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_buy/00004.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_buy/00005.png b/tests/snapshots/arbitrum_nanos_simple_buy/00005.png new file mode 100644 index 0000000..99d1c4c Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_buy/00005.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_buy/00006.png b/tests/snapshots/arbitrum_nanos_simple_buy/00006.png new file mode 100644 index 0000000..96ea784 Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_buy/00006.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_buy/00007.png b/tests/snapshots/arbitrum_nanos_simple_buy/00007.png new file mode 100644 index 0000000..eeec632 Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_buy/00007.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_buy/00008.png b/tests/snapshots/arbitrum_nanos_simple_buy/00008.png new file mode 100644 index 0000000..1c9156c Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_buy/00008.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_buy/00009.png b/tests/snapshots/arbitrum_nanos_simple_buy/00009.png new file mode 100644 index 0000000..ce795f3 Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_buy/00009.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_swap/00000.png b/tests/snapshots/arbitrum_nanos_simple_swap/00000.png new file mode 100644 index 0000000..8d84cc7 Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_swap/00000.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_swap/00001.png b/tests/snapshots/arbitrum_nanos_simple_swap/00001.png new file mode 100644 index 0000000..bb7f75b Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_swap/00001.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_swap/00002.png b/tests/snapshots/arbitrum_nanos_simple_swap/00002.png new file mode 100644 index 0000000..5fd02f5 Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_swap/00002.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_swap/00003.png b/tests/snapshots/arbitrum_nanos_simple_swap/00003.png new file mode 100644 index 0000000..0599856 Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_swap/00003.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_swap/00004.png b/tests/snapshots/arbitrum_nanos_simple_swap/00004.png new file mode 100644 index 0000000..b775b10 Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_swap/00004.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_swap/00005.png b/tests/snapshots/arbitrum_nanos_simple_swap/00005.png new file mode 100644 index 0000000..30be96c Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_swap/00005.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_swap/00006.png b/tests/snapshots/arbitrum_nanos_simple_swap/00006.png new file mode 100644 index 0000000..8ebca47 Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_swap/00006.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_swap/00007.png b/tests/snapshots/arbitrum_nanos_simple_swap/00007.png new file mode 100644 index 0000000..aee45b3 Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_swap/00007.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_swap/00008.png b/tests/snapshots/arbitrum_nanos_simple_swap/00008.png new file mode 100644 index 0000000..817c45d Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_swap/00008.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_swap/00009.png b/tests/snapshots/arbitrum_nanos_simple_swap/00009.png new file mode 100644 index 0000000..96ea784 Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_swap/00009.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_swap/00010.png b/tests/snapshots/arbitrum_nanos_simple_swap/00010.png new file mode 100644 index 0000000..eeec632 Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_swap/00010.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_swap/00011.png b/tests/snapshots/arbitrum_nanos_simple_swap/00011.png new file mode 100644 index 0000000..1c9156c Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_swap/00011.png differ diff --git a/tests/snapshots/arbitrum_nanos_simple_swap/00012.png b/tests/snapshots/arbitrum_nanos_simple_swap/00012.png new file mode 100644 index 0000000..ce795f3 Binary files /dev/null and b/tests/snapshots/arbitrum_nanos_simple_swap/00012.png differ diff --git a/tests/snapshots/arbitrum_nanosp_simple_buy/00000.png b/tests/snapshots/arbitrum_nanosp_simple_buy/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/arbitrum_nanosp_simple_buy/00000.png differ diff --git a/tests/snapshots/arbitrum_nanosp_simple_buy/00001.png b/tests/snapshots/arbitrum_nanosp_simple_buy/00001.png new file mode 100644 index 0000000..a9fe18a Binary files /dev/null and b/tests/snapshots/arbitrum_nanosp_simple_buy/00001.png differ diff --git a/tests/snapshots/arbitrum_nanosp_simple_buy/00002.png b/tests/snapshots/arbitrum_nanosp_simple_buy/00002.png new file mode 100644 index 0000000..6a2cc94 Binary files /dev/null and b/tests/snapshots/arbitrum_nanosp_simple_buy/00002.png differ diff --git a/tests/snapshots/arbitrum_nanosp_simple_buy/00003.png b/tests/snapshots/arbitrum_nanosp_simple_buy/00003.png new file mode 100644 index 0000000..b314715 Binary files /dev/null and b/tests/snapshots/arbitrum_nanosp_simple_buy/00003.png differ diff --git a/tests/snapshots/arbitrum_nanosp_simple_buy/00004.png b/tests/snapshots/arbitrum_nanosp_simple_buy/00004.png new file mode 100644 index 0000000..af17584 Binary files /dev/null and b/tests/snapshots/arbitrum_nanosp_simple_buy/00004.png differ diff --git a/tests/snapshots/arbitrum_nanosp_simple_buy/00005.png b/tests/snapshots/arbitrum_nanosp_simple_buy/00005.png new file mode 100644 index 0000000..b2401b2 Binary files /dev/null and b/tests/snapshots/arbitrum_nanosp_simple_buy/00005.png differ diff --git a/tests/snapshots/arbitrum_nanosp_simple_buy/00006.png b/tests/snapshots/arbitrum_nanosp_simple_buy/00006.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/arbitrum_nanosp_simple_buy/00006.png differ diff --git a/tests/snapshots/arbitrum_nanosp_simple_buy/00007.png b/tests/snapshots/arbitrum_nanosp_simple_buy/00007.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/arbitrum_nanosp_simple_buy/00007.png differ diff --git a/tests/snapshots/arbitrum_nanosp_simple_swap/00000.png b/tests/snapshots/arbitrum_nanosp_simple_swap/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/arbitrum_nanosp_simple_swap/00000.png differ diff --git a/tests/snapshots/arbitrum_nanosp_simple_swap/00001.png b/tests/snapshots/arbitrum_nanosp_simple_swap/00001.png new file mode 100644 index 0000000..5a2d089 Binary files /dev/null and b/tests/snapshots/arbitrum_nanosp_simple_swap/00001.png differ diff --git a/tests/snapshots/arbitrum_nanosp_simple_swap/00002.png b/tests/snapshots/arbitrum_nanosp_simple_swap/00002.png new file mode 100644 index 0000000..aa8808c Binary files /dev/null and b/tests/snapshots/arbitrum_nanosp_simple_swap/00002.png differ diff --git a/tests/snapshots/arbitrum_nanosp_simple_swap/00003.png b/tests/snapshots/arbitrum_nanosp_simple_swap/00003.png new file mode 100644 index 0000000..03a74d8 Binary files /dev/null and b/tests/snapshots/arbitrum_nanosp_simple_swap/00003.png differ diff --git a/tests/snapshots/arbitrum_nanosp_simple_swap/00004.png b/tests/snapshots/arbitrum_nanosp_simple_swap/00004.png new file mode 100644 index 0000000..837bc52 Binary files /dev/null and b/tests/snapshots/arbitrum_nanosp_simple_swap/00004.png differ diff --git a/tests/snapshots/arbitrum_nanosp_simple_swap/00005.png b/tests/snapshots/arbitrum_nanosp_simple_swap/00005.png new file mode 100644 index 0000000..af17584 Binary files /dev/null and b/tests/snapshots/arbitrum_nanosp_simple_swap/00005.png differ diff --git a/tests/snapshots/arbitrum_nanosp_simple_swap/00006.png b/tests/snapshots/arbitrum_nanosp_simple_swap/00006.png new file mode 100644 index 0000000..b2401b2 Binary files /dev/null and b/tests/snapshots/arbitrum_nanosp_simple_swap/00006.png differ diff --git a/tests/snapshots/arbitrum_nanosp_simple_swap/00007.png b/tests/snapshots/arbitrum_nanosp_simple_swap/00007.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/arbitrum_nanosp_simple_swap/00007.png differ diff --git a/tests/snapshots/arbitrum_nanosp_simple_swap/00008.png b/tests/snapshots/arbitrum_nanosp_simple_swap/00008.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/arbitrum_nanosp_simple_swap/00008.png differ diff --git a/tests/snapshots/arbitrum_nanox_simple_buy/00000.png b/tests/snapshots/arbitrum_nanox_simple_buy/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/arbitrum_nanox_simple_buy/00000.png differ diff --git a/tests/snapshots/arbitrum_nanox_simple_buy/00001.png b/tests/snapshots/arbitrum_nanox_simple_buy/00001.png new file mode 100644 index 0000000..a9fe18a Binary files /dev/null and b/tests/snapshots/arbitrum_nanox_simple_buy/00001.png differ diff --git a/tests/snapshots/arbitrum_nanox_simple_buy/00002.png b/tests/snapshots/arbitrum_nanox_simple_buy/00002.png new file mode 100644 index 0000000..6a2cc94 Binary files /dev/null and b/tests/snapshots/arbitrum_nanox_simple_buy/00002.png differ diff --git a/tests/snapshots/arbitrum_nanox_simple_buy/00003.png b/tests/snapshots/arbitrum_nanox_simple_buy/00003.png new file mode 100644 index 0000000..b314715 Binary files /dev/null and b/tests/snapshots/arbitrum_nanox_simple_buy/00003.png differ diff --git a/tests/snapshots/arbitrum_nanox_simple_buy/00004.png b/tests/snapshots/arbitrum_nanox_simple_buy/00004.png new file mode 100644 index 0000000..af17584 Binary files /dev/null and b/tests/snapshots/arbitrum_nanox_simple_buy/00004.png differ diff --git a/tests/snapshots/arbitrum_nanox_simple_buy/00005.png b/tests/snapshots/arbitrum_nanox_simple_buy/00005.png new file mode 100644 index 0000000..b2401b2 Binary files /dev/null and b/tests/snapshots/arbitrum_nanox_simple_buy/00005.png differ diff --git a/tests/snapshots/arbitrum_nanox_simple_buy/00006.png b/tests/snapshots/arbitrum_nanox_simple_buy/00006.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/arbitrum_nanox_simple_buy/00006.png differ diff --git a/tests/snapshots/arbitrum_nanox_simple_buy/00007.png b/tests/snapshots/arbitrum_nanox_simple_buy/00007.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/arbitrum_nanox_simple_buy/00007.png differ diff --git a/tests/snapshots/arbitrum_nanox_simple_swap/00000.png b/tests/snapshots/arbitrum_nanox_simple_swap/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/arbitrum_nanox_simple_swap/00000.png differ diff --git a/tests/snapshots/arbitrum_nanox_simple_swap/00001.png b/tests/snapshots/arbitrum_nanox_simple_swap/00001.png new file mode 100644 index 0000000..5a2d089 Binary files /dev/null and b/tests/snapshots/arbitrum_nanox_simple_swap/00001.png differ diff --git a/tests/snapshots/arbitrum_nanox_simple_swap/00002.png b/tests/snapshots/arbitrum_nanox_simple_swap/00002.png new file mode 100644 index 0000000..aa8808c Binary files /dev/null and b/tests/snapshots/arbitrum_nanox_simple_swap/00002.png differ diff --git a/tests/snapshots/arbitrum_nanox_simple_swap/00003.png b/tests/snapshots/arbitrum_nanox_simple_swap/00003.png new file mode 100644 index 0000000..03a74d8 Binary files /dev/null and b/tests/snapshots/arbitrum_nanox_simple_swap/00003.png differ diff --git a/tests/snapshots/arbitrum_nanox_simple_swap/00004.png b/tests/snapshots/arbitrum_nanox_simple_swap/00004.png new file mode 100644 index 0000000..837bc52 Binary files /dev/null and b/tests/snapshots/arbitrum_nanox_simple_swap/00004.png differ diff --git a/tests/snapshots/arbitrum_nanox_simple_swap/00005.png b/tests/snapshots/arbitrum_nanox_simple_swap/00005.png new file mode 100644 index 0000000..af17584 Binary files /dev/null and b/tests/snapshots/arbitrum_nanox_simple_swap/00005.png differ diff --git a/tests/snapshots/arbitrum_nanox_simple_swap/00006.png b/tests/snapshots/arbitrum_nanox_simple_swap/00006.png new file mode 100644 index 0000000..b2401b2 Binary files /dev/null and b/tests/snapshots/arbitrum_nanox_simple_swap/00006.png differ diff --git a/tests/snapshots/arbitrum_nanox_simple_swap/00007.png b/tests/snapshots/arbitrum_nanox_simple_swap/00007.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/arbitrum_nanox_simple_swap/00007.png differ diff --git a/tests/snapshots/arbitrum_nanox_simple_swap/00008.png b/tests/snapshots/arbitrum_nanox_simple_swap/00008.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/arbitrum_nanox_simple_swap/00008.png differ diff --git a/tests/snapshots/arbitrum_stax_simple_buy/00000.png b/tests/snapshots/arbitrum_stax_simple_buy/00000.png new file mode 100644 index 0000000..8650abb Binary files /dev/null and b/tests/snapshots/arbitrum_stax_simple_buy/00000.png differ diff --git a/tests/snapshots/arbitrum_stax_simple_buy/00001.png b/tests/snapshots/arbitrum_stax_simple_buy/00001.png new file mode 100644 index 0000000..c54e26c Binary files /dev/null and b/tests/snapshots/arbitrum_stax_simple_buy/00001.png differ diff --git a/tests/snapshots/arbitrum_stax_simple_buy/00002.png b/tests/snapshots/arbitrum_stax_simple_buy/00002.png new file mode 100644 index 0000000..7b24474 Binary files /dev/null and b/tests/snapshots/arbitrum_stax_simple_buy/00002.png differ diff --git a/tests/snapshots/arbitrum_stax_simple_buy/00003.png b/tests/snapshots/arbitrum_stax_simple_buy/00003.png new file mode 100644 index 0000000..339db1b Binary files /dev/null and b/tests/snapshots/arbitrum_stax_simple_buy/00003.png differ diff --git a/tests/snapshots/arbitrum_stax_simple_swap/00000.png b/tests/snapshots/arbitrum_stax_simple_swap/00000.png new file mode 100644 index 0000000..794687a Binary files /dev/null and b/tests/snapshots/arbitrum_stax_simple_swap/00000.png differ diff --git a/tests/snapshots/arbitrum_stax_simple_swap/00001.png b/tests/snapshots/arbitrum_stax_simple_swap/00001.png new file mode 100644 index 0000000..c3a5cad Binary files /dev/null and b/tests/snapshots/arbitrum_stax_simple_swap/00001.png differ diff --git a/tests/snapshots/arbitrum_stax_simple_swap/00002.png b/tests/snapshots/arbitrum_stax_simple_swap/00002.png new file mode 100644 index 0000000..6b06fd9 Binary files /dev/null and b/tests/snapshots/arbitrum_stax_simple_swap/00002.png differ diff --git a/tests/snapshots/arbitrum_stax_simple_swap/00003.png b/tests/snapshots/arbitrum_stax_simple_swap/00003.png new file mode 100644 index 0000000..7e54998 Binary files /dev/null and b/tests/snapshots/arbitrum_stax_simple_swap/00003.png differ diff --git a/tests/snapshots/arbitrum_stax_simple_swap/00004.png b/tests/snapshots/arbitrum_stax_simple_swap/00004.png new file mode 100644 index 0000000..339db1b Binary files /dev/null and b/tests/snapshots/arbitrum_stax_simple_swap/00004.png differ diff --git a/tests/snapshots/base_flex_simple_buy/00000.png b/tests/snapshots/base_flex_simple_buy/00000.png new file mode 100644 index 0000000..706d48f Binary files /dev/null and b/tests/snapshots/base_flex_simple_buy/00000.png differ diff --git a/tests/snapshots/base_flex_simple_buy/00001.png b/tests/snapshots/base_flex_simple_buy/00001.png new file mode 100644 index 0000000..291b469 Binary files /dev/null and b/tests/snapshots/base_flex_simple_buy/00001.png differ diff --git a/tests/snapshots/base_flex_simple_buy/00002.png b/tests/snapshots/base_flex_simple_buy/00002.png new file mode 100644 index 0000000..e67b539 Binary files /dev/null and b/tests/snapshots/base_flex_simple_buy/00002.png differ diff --git a/tests/snapshots/base_flex_simple_buy/00003.png b/tests/snapshots/base_flex_simple_buy/00003.png new file mode 100644 index 0000000..dabe7af Binary files /dev/null and b/tests/snapshots/base_flex_simple_buy/00003.png differ diff --git a/tests/snapshots/base_flex_simple_swap/00000.png b/tests/snapshots/base_flex_simple_swap/00000.png new file mode 100644 index 0000000..25cf17a Binary files /dev/null and b/tests/snapshots/base_flex_simple_swap/00000.png differ diff --git a/tests/snapshots/base_flex_simple_swap/00001.png b/tests/snapshots/base_flex_simple_swap/00001.png new file mode 100644 index 0000000..36e39bb Binary files /dev/null and b/tests/snapshots/base_flex_simple_swap/00001.png differ diff --git a/tests/snapshots/base_flex_simple_swap/00002.png b/tests/snapshots/base_flex_simple_swap/00002.png new file mode 100644 index 0000000..3fe86f7 Binary files /dev/null and b/tests/snapshots/base_flex_simple_swap/00002.png differ diff --git a/tests/snapshots/base_flex_simple_swap/00003.png b/tests/snapshots/base_flex_simple_swap/00003.png new file mode 100644 index 0000000..34671dc Binary files /dev/null and b/tests/snapshots/base_flex_simple_swap/00003.png differ diff --git a/tests/snapshots/base_flex_simple_swap/00004.png b/tests/snapshots/base_flex_simple_swap/00004.png new file mode 100644 index 0000000..dabe7af Binary files /dev/null and b/tests/snapshots/base_flex_simple_swap/00004.png differ diff --git a/tests/snapshots/base_nanos_simple_buy/00000.png b/tests/snapshots/base_nanos_simple_buy/00000.png new file mode 100644 index 0000000..8d84cc7 Binary files /dev/null and b/tests/snapshots/base_nanos_simple_buy/00000.png differ diff --git a/tests/snapshots/base_nanos_simple_buy/00001.png b/tests/snapshots/base_nanos_simple_buy/00001.png new file mode 100644 index 0000000..8b8180d Binary files /dev/null and b/tests/snapshots/base_nanos_simple_buy/00001.png differ diff --git a/tests/snapshots/base_nanos_simple_buy/00002.png b/tests/snapshots/base_nanos_simple_buy/00002.png new file mode 100644 index 0000000..cdb893f Binary files /dev/null and b/tests/snapshots/base_nanos_simple_buy/00002.png differ diff --git a/tests/snapshots/base_nanos_simple_buy/00003.png b/tests/snapshots/base_nanos_simple_buy/00003.png new file mode 100644 index 0000000..4a68287 Binary files /dev/null and b/tests/snapshots/base_nanos_simple_buy/00003.png differ diff --git a/tests/snapshots/base_nanos_simple_buy/00004.png b/tests/snapshots/base_nanos_simple_buy/00004.png new file mode 100644 index 0000000..1f06135 Binary files /dev/null and b/tests/snapshots/base_nanos_simple_buy/00004.png differ diff --git a/tests/snapshots/base_nanos_simple_buy/00005.png b/tests/snapshots/base_nanos_simple_buy/00005.png new file mode 100644 index 0000000..eeec632 Binary files /dev/null and b/tests/snapshots/base_nanos_simple_buy/00005.png differ diff --git a/tests/snapshots/base_nanos_simple_buy/00006.png b/tests/snapshots/base_nanos_simple_buy/00006.png new file mode 100644 index 0000000..1c9156c Binary files /dev/null and b/tests/snapshots/base_nanos_simple_buy/00006.png differ diff --git a/tests/snapshots/base_nanos_simple_buy/00007.png b/tests/snapshots/base_nanos_simple_buy/00007.png new file mode 100644 index 0000000..ce795f3 Binary files /dev/null and b/tests/snapshots/base_nanos_simple_buy/00007.png differ diff --git a/tests/snapshots/base_nanos_simple_swap/00000.png b/tests/snapshots/base_nanos_simple_swap/00000.png new file mode 100644 index 0000000..8d84cc7 Binary files /dev/null and b/tests/snapshots/base_nanos_simple_swap/00000.png differ diff --git a/tests/snapshots/base_nanos_simple_swap/00001.png b/tests/snapshots/base_nanos_simple_swap/00001.png new file mode 100644 index 0000000..bb7f75b Binary files /dev/null and b/tests/snapshots/base_nanos_simple_swap/00001.png differ diff --git a/tests/snapshots/base_nanos_simple_swap/00002.png b/tests/snapshots/base_nanos_simple_swap/00002.png new file mode 100644 index 0000000..2804dbc Binary files /dev/null and b/tests/snapshots/base_nanos_simple_swap/00002.png differ diff --git a/tests/snapshots/base_nanos_simple_swap/00003.png b/tests/snapshots/base_nanos_simple_swap/00003.png new file mode 100644 index 0000000..0161a03 Binary files /dev/null and b/tests/snapshots/base_nanos_simple_swap/00003.png differ diff --git a/tests/snapshots/base_nanos_simple_swap/00004.png b/tests/snapshots/base_nanos_simple_swap/00004.png new file mode 100644 index 0000000..5a449de Binary files /dev/null and b/tests/snapshots/base_nanos_simple_swap/00004.png differ diff --git a/tests/snapshots/base_nanos_simple_swap/00005.png b/tests/snapshots/base_nanos_simple_swap/00005.png new file mode 100644 index 0000000..b9bdfbc Binary files /dev/null and b/tests/snapshots/base_nanos_simple_swap/00005.png differ diff --git a/tests/snapshots/base_nanos_simple_swap/00006.png b/tests/snapshots/base_nanos_simple_swap/00006.png new file mode 100644 index 0000000..2a50804 Binary files /dev/null and b/tests/snapshots/base_nanos_simple_swap/00006.png differ diff --git a/tests/snapshots/base_nanos_simple_swap/00007.png b/tests/snapshots/base_nanos_simple_swap/00007.png new file mode 100644 index 0000000..1f06135 Binary files /dev/null and b/tests/snapshots/base_nanos_simple_swap/00007.png differ diff --git a/tests/snapshots/base_nanos_simple_swap/00008.png b/tests/snapshots/base_nanos_simple_swap/00008.png new file mode 100644 index 0000000..eeec632 Binary files /dev/null and b/tests/snapshots/base_nanos_simple_swap/00008.png differ diff --git a/tests/snapshots/base_nanos_simple_swap/00009.png b/tests/snapshots/base_nanos_simple_swap/00009.png new file mode 100644 index 0000000..1c9156c Binary files /dev/null and b/tests/snapshots/base_nanos_simple_swap/00009.png differ diff --git a/tests/snapshots/base_nanos_simple_swap/00010.png b/tests/snapshots/base_nanos_simple_swap/00010.png new file mode 100644 index 0000000..ce795f3 Binary files /dev/null and b/tests/snapshots/base_nanos_simple_swap/00010.png differ diff --git a/tests/snapshots/base_nanosp_simple_buy/00000.png b/tests/snapshots/base_nanosp_simple_buy/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/base_nanosp_simple_buy/00000.png differ diff --git a/tests/snapshots/base_nanosp_simple_buy/00001.png b/tests/snapshots/base_nanosp_simple_buy/00001.png new file mode 100644 index 0000000..a9fe18a Binary files /dev/null and b/tests/snapshots/base_nanosp_simple_buy/00001.png differ diff --git a/tests/snapshots/base_nanosp_simple_buy/00002.png b/tests/snapshots/base_nanosp_simple_buy/00002.png new file mode 100644 index 0000000..9fca2a2 Binary files /dev/null and b/tests/snapshots/base_nanosp_simple_buy/00002.png differ diff --git a/tests/snapshots/base_nanosp_simple_buy/00003.png b/tests/snapshots/base_nanosp_simple_buy/00003.png new file mode 100644 index 0000000..fc1911e Binary files /dev/null and b/tests/snapshots/base_nanosp_simple_buy/00003.png differ diff --git a/tests/snapshots/base_nanosp_simple_buy/00004.png b/tests/snapshots/base_nanosp_simple_buy/00004.png new file mode 100644 index 0000000..2f1a5f7 Binary files /dev/null and b/tests/snapshots/base_nanosp_simple_buy/00004.png differ diff --git a/tests/snapshots/base_nanosp_simple_buy/00005.png b/tests/snapshots/base_nanosp_simple_buy/00005.png new file mode 100644 index 0000000..b2401b2 Binary files /dev/null and b/tests/snapshots/base_nanosp_simple_buy/00005.png differ diff --git a/tests/snapshots/base_nanosp_simple_buy/00006.png b/tests/snapshots/base_nanosp_simple_buy/00006.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/base_nanosp_simple_buy/00006.png differ diff --git a/tests/snapshots/base_nanosp_simple_buy/00007.png b/tests/snapshots/base_nanosp_simple_buy/00007.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/base_nanosp_simple_buy/00007.png differ diff --git a/tests/snapshots/base_nanosp_simple_swap/00000.png b/tests/snapshots/base_nanosp_simple_swap/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/base_nanosp_simple_swap/00000.png differ diff --git a/tests/snapshots/base_nanosp_simple_swap/00001.png b/tests/snapshots/base_nanosp_simple_swap/00001.png new file mode 100644 index 0000000..5a2d089 Binary files /dev/null and b/tests/snapshots/base_nanosp_simple_swap/00001.png differ diff --git a/tests/snapshots/base_nanosp_simple_swap/00002.png b/tests/snapshots/base_nanosp_simple_swap/00002.png new file mode 100644 index 0000000..cd6475d Binary files /dev/null and b/tests/snapshots/base_nanosp_simple_swap/00002.png differ diff --git a/tests/snapshots/base_nanosp_simple_swap/00003.png b/tests/snapshots/base_nanosp_simple_swap/00003.png new file mode 100644 index 0000000..7a782cc Binary files /dev/null and b/tests/snapshots/base_nanosp_simple_swap/00003.png differ diff --git a/tests/snapshots/base_nanosp_simple_swap/00004.png b/tests/snapshots/base_nanosp_simple_swap/00004.png new file mode 100644 index 0000000..d993e77 Binary files /dev/null and b/tests/snapshots/base_nanosp_simple_swap/00004.png differ diff --git a/tests/snapshots/base_nanosp_simple_swap/00005.png b/tests/snapshots/base_nanosp_simple_swap/00005.png new file mode 100644 index 0000000..2f1a5f7 Binary files /dev/null and b/tests/snapshots/base_nanosp_simple_swap/00005.png differ diff --git a/tests/snapshots/base_nanosp_simple_swap/00006.png b/tests/snapshots/base_nanosp_simple_swap/00006.png new file mode 100644 index 0000000..b2401b2 Binary files /dev/null and b/tests/snapshots/base_nanosp_simple_swap/00006.png differ diff --git a/tests/snapshots/base_nanosp_simple_swap/00007.png b/tests/snapshots/base_nanosp_simple_swap/00007.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/base_nanosp_simple_swap/00007.png differ diff --git a/tests/snapshots/base_nanosp_simple_swap/00008.png b/tests/snapshots/base_nanosp_simple_swap/00008.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/base_nanosp_simple_swap/00008.png differ diff --git a/tests/snapshots/base_nanox_simple_buy/00000.png b/tests/snapshots/base_nanox_simple_buy/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/base_nanox_simple_buy/00000.png differ diff --git a/tests/snapshots/base_nanox_simple_buy/00001.png b/tests/snapshots/base_nanox_simple_buy/00001.png new file mode 100644 index 0000000..a9fe18a Binary files /dev/null and b/tests/snapshots/base_nanox_simple_buy/00001.png differ diff --git a/tests/snapshots/base_nanox_simple_buy/00002.png b/tests/snapshots/base_nanox_simple_buy/00002.png new file mode 100644 index 0000000..9fca2a2 Binary files /dev/null and b/tests/snapshots/base_nanox_simple_buy/00002.png differ diff --git a/tests/snapshots/base_nanox_simple_buy/00003.png b/tests/snapshots/base_nanox_simple_buy/00003.png new file mode 100644 index 0000000..fc1911e Binary files /dev/null and b/tests/snapshots/base_nanox_simple_buy/00003.png differ diff --git a/tests/snapshots/base_nanox_simple_buy/00004.png b/tests/snapshots/base_nanox_simple_buy/00004.png new file mode 100644 index 0000000..2f1a5f7 Binary files /dev/null and b/tests/snapshots/base_nanox_simple_buy/00004.png differ diff --git a/tests/snapshots/base_nanox_simple_buy/00005.png b/tests/snapshots/base_nanox_simple_buy/00005.png new file mode 100644 index 0000000..b2401b2 Binary files /dev/null and b/tests/snapshots/base_nanox_simple_buy/00005.png differ diff --git a/tests/snapshots/base_nanox_simple_buy/00006.png b/tests/snapshots/base_nanox_simple_buy/00006.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/base_nanox_simple_buy/00006.png differ diff --git a/tests/snapshots/base_nanox_simple_buy/00007.png b/tests/snapshots/base_nanox_simple_buy/00007.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/base_nanox_simple_buy/00007.png differ diff --git a/tests/snapshots/base_nanox_simple_swap/00000.png b/tests/snapshots/base_nanox_simple_swap/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/base_nanox_simple_swap/00000.png differ diff --git a/tests/snapshots/base_nanox_simple_swap/00001.png b/tests/snapshots/base_nanox_simple_swap/00001.png new file mode 100644 index 0000000..5a2d089 Binary files /dev/null and b/tests/snapshots/base_nanox_simple_swap/00001.png differ diff --git a/tests/snapshots/base_nanox_simple_swap/00002.png b/tests/snapshots/base_nanox_simple_swap/00002.png new file mode 100644 index 0000000..cd6475d Binary files /dev/null and b/tests/snapshots/base_nanox_simple_swap/00002.png differ diff --git a/tests/snapshots/base_nanox_simple_swap/00003.png b/tests/snapshots/base_nanox_simple_swap/00003.png new file mode 100644 index 0000000..7a782cc Binary files /dev/null and b/tests/snapshots/base_nanox_simple_swap/00003.png differ diff --git a/tests/snapshots/base_nanox_simple_swap/00004.png b/tests/snapshots/base_nanox_simple_swap/00004.png new file mode 100644 index 0000000..d993e77 Binary files /dev/null and b/tests/snapshots/base_nanox_simple_swap/00004.png differ diff --git a/tests/snapshots/base_nanox_simple_swap/00005.png b/tests/snapshots/base_nanox_simple_swap/00005.png new file mode 100644 index 0000000..2f1a5f7 Binary files /dev/null and b/tests/snapshots/base_nanox_simple_swap/00005.png differ diff --git a/tests/snapshots/base_nanox_simple_swap/00006.png b/tests/snapshots/base_nanox_simple_swap/00006.png new file mode 100644 index 0000000..b2401b2 Binary files /dev/null and b/tests/snapshots/base_nanox_simple_swap/00006.png differ diff --git a/tests/snapshots/base_nanox_simple_swap/00007.png b/tests/snapshots/base_nanox_simple_swap/00007.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/base_nanox_simple_swap/00007.png differ diff --git a/tests/snapshots/base_nanox_simple_swap/00008.png b/tests/snapshots/base_nanox_simple_swap/00008.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/base_nanox_simple_swap/00008.png differ diff --git a/tests/snapshots/base_stax_simple_buy/00000.png b/tests/snapshots/base_stax_simple_buy/00000.png new file mode 100644 index 0000000..8650abb Binary files /dev/null and b/tests/snapshots/base_stax_simple_buy/00000.png differ diff --git a/tests/snapshots/base_stax_simple_buy/00001.png b/tests/snapshots/base_stax_simple_buy/00001.png new file mode 100644 index 0000000..6dd406d Binary files /dev/null and b/tests/snapshots/base_stax_simple_buy/00001.png differ diff --git a/tests/snapshots/base_stax_simple_buy/00002.png b/tests/snapshots/base_stax_simple_buy/00002.png new file mode 100644 index 0000000..7b24474 Binary files /dev/null and b/tests/snapshots/base_stax_simple_buy/00002.png differ diff --git a/tests/snapshots/base_stax_simple_buy/00003.png b/tests/snapshots/base_stax_simple_buy/00003.png new file mode 100644 index 0000000..339db1b Binary files /dev/null and b/tests/snapshots/base_stax_simple_buy/00003.png differ diff --git a/tests/snapshots/base_stax_simple_swap/00000.png b/tests/snapshots/base_stax_simple_swap/00000.png new file mode 100644 index 0000000..c762844 Binary files /dev/null and b/tests/snapshots/base_stax_simple_swap/00000.png differ diff --git a/tests/snapshots/base_stax_simple_swap/00001.png b/tests/snapshots/base_stax_simple_swap/00001.png new file mode 100644 index 0000000..987a75b Binary files /dev/null and b/tests/snapshots/base_stax_simple_swap/00001.png differ diff --git a/tests/snapshots/base_stax_simple_swap/00002.png b/tests/snapshots/base_stax_simple_swap/00002.png new file mode 100644 index 0000000..9fa4875 Binary files /dev/null and b/tests/snapshots/base_stax_simple_swap/00002.png differ diff --git a/tests/snapshots/base_stax_simple_swap/00003.png b/tests/snapshots/base_stax_simple_swap/00003.png new file mode 100644 index 0000000..339db1b Binary files /dev/null and b/tests/snapshots/base_stax_simple_swap/00003.png differ diff --git a/tests/snapshots/fantom_flex_simple_buy/00000.png b/tests/snapshots/fantom_flex_simple_buy/00000.png new file mode 100644 index 0000000..c029f54 Binary files /dev/null and b/tests/snapshots/fantom_flex_simple_buy/00000.png differ diff --git a/tests/snapshots/fantom_flex_simple_buy/00001.png b/tests/snapshots/fantom_flex_simple_buy/00001.png new file mode 100644 index 0000000..10fa644 Binary files /dev/null and b/tests/snapshots/fantom_flex_simple_buy/00001.png differ diff --git a/tests/snapshots/fantom_flex_simple_buy/00002.png b/tests/snapshots/fantom_flex_simple_buy/00002.png new file mode 100644 index 0000000..2801f0b Binary files /dev/null and b/tests/snapshots/fantom_flex_simple_buy/00002.png differ diff --git a/tests/snapshots/fantom_flex_simple_buy/00003.png b/tests/snapshots/fantom_flex_simple_buy/00003.png new file mode 100644 index 0000000..0739c03 Binary files /dev/null and b/tests/snapshots/fantom_flex_simple_buy/00003.png differ diff --git a/tests/snapshots/fantom_flex_simple_buy/00004.png b/tests/snapshots/fantom_flex_simple_buy/00004.png new file mode 100644 index 0000000..dabe7af Binary files /dev/null and b/tests/snapshots/fantom_flex_simple_buy/00004.png differ diff --git a/tests/snapshots/fantom_flex_simple_swap/00000.png b/tests/snapshots/fantom_flex_simple_swap/00000.png new file mode 100644 index 0000000..25cf17a Binary files /dev/null and b/tests/snapshots/fantom_flex_simple_swap/00000.png differ diff --git a/tests/snapshots/fantom_flex_simple_swap/00001.png b/tests/snapshots/fantom_flex_simple_swap/00001.png new file mode 100644 index 0000000..899ee62 Binary files /dev/null and b/tests/snapshots/fantom_flex_simple_swap/00001.png differ diff --git a/tests/snapshots/fantom_flex_simple_swap/00002.png b/tests/snapshots/fantom_flex_simple_swap/00002.png new file mode 100644 index 0000000..0663a0e Binary files /dev/null and b/tests/snapshots/fantom_flex_simple_swap/00002.png differ diff --git a/tests/snapshots/fantom_flex_simple_swap/00003.png b/tests/snapshots/fantom_flex_simple_swap/00003.png new file mode 100644 index 0000000..34671dc Binary files /dev/null and b/tests/snapshots/fantom_flex_simple_swap/00003.png differ diff --git a/tests/snapshots/fantom_flex_simple_swap/00004.png b/tests/snapshots/fantom_flex_simple_swap/00004.png new file mode 100644 index 0000000..dabe7af Binary files /dev/null and b/tests/snapshots/fantom_flex_simple_swap/00004.png differ diff --git a/tests/snapshots/fantom_nanos_simple_buy/00000.png b/tests/snapshots/fantom_nanos_simple_buy/00000.png new file mode 100644 index 0000000..8d84cc7 Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_buy/00000.png differ diff --git a/tests/snapshots/fantom_nanos_simple_buy/00001.png b/tests/snapshots/fantom_nanos_simple_buy/00001.png new file mode 100644 index 0000000..8b8180d Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_buy/00001.png differ diff --git a/tests/snapshots/fantom_nanos_simple_buy/00002.png b/tests/snapshots/fantom_nanos_simple_buy/00002.png new file mode 100644 index 0000000..2804dbc Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_buy/00002.png differ diff --git a/tests/snapshots/fantom_nanos_simple_buy/00003.png b/tests/snapshots/fantom_nanos_simple_buy/00003.png new file mode 100644 index 0000000..e2680b0 Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_buy/00003.png differ diff --git a/tests/snapshots/fantom_nanos_simple_buy/00004.png b/tests/snapshots/fantom_nanos_simple_buy/00004.png new file mode 100644 index 0000000..3546a45 Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_buy/00004.png differ diff --git a/tests/snapshots/fantom_nanos_simple_buy/00005.png b/tests/snapshots/fantom_nanos_simple_buy/00005.png new file mode 100644 index 0000000..87e102f Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_buy/00005.png differ diff --git a/tests/snapshots/fantom_nanos_simple_buy/00006.png b/tests/snapshots/fantom_nanos_simple_buy/00006.png new file mode 100644 index 0000000..6ac0cce Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_buy/00006.png differ diff --git a/tests/snapshots/fantom_nanos_simple_buy/00007.png b/tests/snapshots/fantom_nanos_simple_buy/00007.png new file mode 100644 index 0000000..8ef155a Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_buy/00007.png differ diff --git a/tests/snapshots/fantom_nanos_simple_buy/00008.png b/tests/snapshots/fantom_nanos_simple_buy/00008.png new file mode 100644 index 0000000..1c9156c Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_buy/00008.png differ diff --git a/tests/snapshots/fantom_nanos_simple_buy/00009.png b/tests/snapshots/fantom_nanos_simple_buy/00009.png new file mode 100644 index 0000000..ce795f3 Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_buy/00009.png differ diff --git a/tests/snapshots/fantom_nanos_simple_swap/00000.png b/tests/snapshots/fantom_nanos_simple_swap/00000.png new file mode 100644 index 0000000..8d84cc7 Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_swap/00000.png differ diff --git a/tests/snapshots/fantom_nanos_simple_swap/00001.png b/tests/snapshots/fantom_nanos_simple_swap/00001.png new file mode 100644 index 0000000..bb7f75b Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_swap/00001.png differ diff --git a/tests/snapshots/fantom_nanos_simple_swap/00002.png b/tests/snapshots/fantom_nanos_simple_swap/00002.png new file mode 100644 index 0000000..c2900ce Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_swap/00002.png differ diff --git a/tests/snapshots/fantom_nanos_simple_swap/00003.png b/tests/snapshots/fantom_nanos_simple_swap/00003.png new file mode 100644 index 0000000..42bd0d1 Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_swap/00003.png differ diff --git a/tests/snapshots/fantom_nanos_simple_swap/00004.png b/tests/snapshots/fantom_nanos_simple_swap/00004.png new file mode 100644 index 0000000..d5cbf2e Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_swap/00004.png differ diff --git a/tests/snapshots/fantom_nanos_simple_swap/00005.png b/tests/snapshots/fantom_nanos_simple_swap/00005.png new file mode 100644 index 0000000..214b4cc Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_swap/00005.png differ diff --git a/tests/snapshots/fantom_nanos_simple_swap/00006.png b/tests/snapshots/fantom_nanos_simple_swap/00006.png new file mode 100644 index 0000000..ade31ea Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_swap/00006.png differ diff --git a/tests/snapshots/fantom_nanos_simple_swap/00007.png b/tests/snapshots/fantom_nanos_simple_swap/00007.png new file mode 100644 index 0000000..a5e2201 Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_swap/00007.png differ diff --git a/tests/snapshots/fantom_nanos_simple_swap/00008.png b/tests/snapshots/fantom_nanos_simple_swap/00008.png new file mode 100644 index 0000000..5c29236 Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_swap/00008.png differ diff --git a/tests/snapshots/fantom_nanos_simple_swap/00009.png b/tests/snapshots/fantom_nanos_simple_swap/00009.png new file mode 100644 index 0000000..6ac0cce Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_swap/00009.png differ diff --git a/tests/snapshots/fantom_nanos_simple_swap/00010.png b/tests/snapshots/fantom_nanos_simple_swap/00010.png new file mode 100644 index 0000000..8ef155a Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_swap/00010.png differ diff --git a/tests/snapshots/fantom_nanos_simple_swap/00011.png b/tests/snapshots/fantom_nanos_simple_swap/00011.png new file mode 100644 index 0000000..1c9156c Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_swap/00011.png differ diff --git a/tests/snapshots/fantom_nanos_simple_swap/00012.png b/tests/snapshots/fantom_nanos_simple_swap/00012.png new file mode 100644 index 0000000..ce795f3 Binary files /dev/null and b/tests/snapshots/fantom_nanos_simple_swap/00012.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_buy/00000.png b/tests/snapshots/fantom_nanosp_simple_buy/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_buy/00000.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_buy/00001.png b/tests/snapshots/fantom_nanosp_simple_buy/00001.png new file mode 100644 index 0000000..a9fe18a Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_buy/00001.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_buy/00002.png b/tests/snapshots/fantom_nanosp_simple_buy/00002.png new file mode 100644 index 0000000..cd6475d Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_buy/00002.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_buy/00003.png b/tests/snapshots/fantom_nanosp_simple_buy/00003.png new file mode 100644 index 0000000..448ed53 Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_buy/00003.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_buy/00004.png b/tests/snapshots/fantom_nanosp_simple_buy/00004.png new file mode 100644 index 0000000..aeff432 Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_buy/00004.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_buy/00005.png b/tests/snapshots/fantom_nanosp_simple_buy/00005.png new file mode 100644 index 0000000..f248f9b Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_buy/00005.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_buy/00006.png b/tests/snapshots/fantom_nanosp_simple_buy/00006.png new file mode 100644 index 0000000..7c6b3b5 Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_buy/00006.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_buy/00007.png b/tests/snapshots/fantom_nanosp_simple_buy/00007.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_buy/00007.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_buy/00008.png b/tests/snapshots/fantom_nanosp_simple_buy/00008.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_buy/00008.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_swap/00000.png b/tests/snapshots/fantom_nanosp_simple_swap/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_swap/00000.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_swap/00001.png b/tests/snapshots/fantom_nanosp_simple_swap/00001.png new file mode 100644 index 0000000..5a2d089 Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_swap/00001.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_swap/00002.png b/tests/snapshots/fantom_nanosp_simple_swap/00002.png new file mode 100644 index 0000000..84bf17a Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_swap/00002.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_swap/00003.png b/tests/snapshots/fantom_nanosp_simple_swap/00003.png new file mode 100644 index 0000000..9f30a63 Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_swap/00003.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_swap/00004.png b/tests/snapshots/fantom_nanosp_simple_swap/00004.png new file mode 100644 index 0000000..f80a6d7 Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_swap/00004.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_swap/00005.png b/tests/snapshots/fantom_nanosp_simple_swap/00005.png new file mode 100644 index 0000000..f248f9b Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_swap/00005.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_swap/00006.png b/tests/snapshots/fantom_nanosp_simple_swap/00006.png new file mode 100644 index 0000000..7c6b3b5 Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_swap/00006.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_swap/00007.png b/tests/snapshots/fantom_nanosp_simple_swap/00007.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_swap/00007.png differ diff --git a/tests/snapshots/fantom_nanosp_simple_swap/00008.png b/tests/snapshots/fantom_nanosp_simple_swap/00008.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/fantom_nanosp_simple_swap/00008.png differ diff --git a/tests/snapshots/fantom_nanox_simple_buy/00000.png b/tests/snapshots/fantom_nanox_simple_buy/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_buy/00000.png differ diff --git a/tests/snapshots/fantom_nanox_simple_buy/00001.png b/tests/snapshots/fantom_nanox_simple_buy/00001.png new file mode 100644 index 0000000..a9fe18a Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_buy/00001.png differ diff --git a/tests/snapshots/fantom_nanox_simple_buy/00002.png b/tests/snapshots/fantom_nanox_simple_buy/00002.png new file mode 100644 index 0000000..cd6475d Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_buy/00002.png differ diff --git a/tests/snapshots/fantom_nanox_simple_buy/00003.png b/tests/snapshots/fantom_nanox_simple_buy/00003.png new file mode 100644 index 0000000..448ed53 Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_buy/00003.png differ diff --git a/tests/snapshots/fantom_nanox_simple_buy/00004.png b/tests/snapshots/fantom_nanox_simple_buy/00004.png new file mode 100644 index 0000000..aeff432 Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_buy/00004.png differ diff --git a/tests/snapshots/fantom_nanox_simple_buy/00005.png b/tests/snapshots/fantom_nanox_simple_buy/00005.png new file mode 100644 index 0000000..f248f9b Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_buy/00005.png differ diff --git a/tests/snapshots/fantom_nanox_simple_buy/00006.png b/tests/snapshots/fantom_nanox_simple_buy/00006.png new file mode 100644 index 0000000..7c6b3b5 Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_buy/00006.png differ diff --git a/tests/snapshots/fantom_nanox_simple_buy/00007.png b/tests/snapshots/fantom_nanox_simple_buy/00007.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_buy/00007.png differ diff --git a/tests/snapshots/fantom_nanox_simple_buy/00008.png b/tests/snapshots/fantom_nanox_simple_buy/00008.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_buy/00008.png differ diff --git a/tests/snapshots/fantom_nanox_simple_swap/00000.png b/tests/snapshots/fantom_nanox_simple_swap/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_swap/00000.png differ diff --git a/tests/snapshots/fantom_nanox_simple_swap/00001.png b/tests/snapshots/fantom_nanox_simple_swap/00001.png new file mode 100644 index 0000000..5a2d089 Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_swap/00001.png differ diff --git a/tests/snapshots/fantom_nanox_simple_swap/00002.png b/tests/snapshots/fantom_nanox_simple_swap/00002.png new file mode 100644 index 0000000..84bf17a Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_swap/00002.png differ diff --git a/tests/snapshots/fantom_nanox_simple_swap/00003.png b/tests/snapshots/fantom_nanox_simple_swap/00003.png new file mode 100644 index 0000000..9f30a63 Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_swap/00003.png differ diff --git a/tests/snapshots/fantom_nanox_simple_swap/00004.png b/tests/snapshots/fantom_nanox_simple_swap/00004.png new file mode 100644 index 0000000..f80a6d7 Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_swap/00004.png differ diff --git a/tests/snapshots/fantom_nanox_simple_swap/00005.png b/tests/snapshots/fantom_nanox_simple_swap/00005.png new file mode 100644 index 0000000..f248f9b Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_swap/00005.png differ diff --git a/tests/snapshots/fantom_nanox_simple_swap/00006.png b/tests/snapshots/fantom_nanox_simple_swap/00006.png new file mode 100644 index 0000000..7c6b3b5 Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_swap/00006.png differ diff --git a/tests/snapshots/fantom_nanox_simple_swap/00007.png b/tests/snapshots/fantom_nanox_simple_swap/00007.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_swap/00007.png differ diff --git a/tests/snapshots/fantom_nanox_simple_swap/00008.png b/tests/snapshots/fantom_nanox_simple_swap/00008.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/fantom_nanox_simple_swap/00008.png differ diff --git a/tests/snapshots/fantom_stax_simple_buy/00000.png b/tests/snapshots/fantom_stax_simple_buy/00000.png new file mode 100644 index 0000000..8650abb Binary files /dev/null and b/tests/snapshots/fantom_stax_simple_buy/00000.png differ diff --git a/tests/snapshots/fantom_stax_simple_buy/00001.png b/tests/snapshots/fantom_stax_simple_buy/00001.png new file mode 100644 index 0000000..6e1b260 Binary files /dev/null and b/tests/snapshots/fantom_stax_simple_buy/00001.png differ diff --git a/tests/snapshots/fantom_stax_simple_buy/00002.png b/tests/snapshots/fantom_stax_simple_buy/00002.png new file mode 100644 index 0000000..7b24474 Binary files /dev/null and b/tests/snapshots/fantom_stax_simple_buy/00002.png differ diff --git a/tests/snapshots/fantom_stax_simple_buy/00003.png b/tests/snapshots/fantom_stax_simple_buy/00003.png new file mode 100644 index 0000000..339db1b Binary files /dev/null and b/tests/snapshots/fantom_stax_simple_buy/00003.png differ diff --git a/tests/snapshots/fantom_stax_simple_swap/00000.png b/tests/snapshots/fantom_stax_simple_swap/00000.png new file mode 100644 index 0000000..794687a Binary files /dev/null and b/tests/snapshots/fantom_stax_simple_swap/00000.png differ diff --git a/tests/snapshots/fantom_stax_simple_swap/00001.png b/tests/snapshots/fantom_stax_simple_swap/00001.png new file mode 100644 index 0000000..16ffbf3 Binary files /dev/null and b/tests/snapshots/fantom_stax_simple_swap/00001.png differ diff --git a/tests/snapshots/fantom_stax_simple_swap/00002.png b/tests/snapshots/fantom_stax_simple_swap/00002.png new file mode 100644 index 0000000..d117c65 Binary files /dev/null and b/tests/snapshots/fantom_stax_simple_swap/00002.png differ diff --git a/tests/snapshots/fantom_stax_simple_swap/00003.png b/tests/snapshots/fantom_stax_simple_swap/00003.png new file mode 100644 index 0000000..7e54998 Binary files /dev/null and b/tests/snapshots/fantom_stax_simple_swap/00003.png differ diff --git a/tests/snapshots/fantom_stax_simple_swap/00004.png b/tests/snapshots/fantom_stax_simple_swap/00004.png new file mode 100644 index 0000000..339db1b Binary files /dev/null and b/tests/snapshots/fantom_stax_simple_swap/00004.png differ diff --git a/tests/snapshots/optimism_flex_simple_buy/00000.png b/tests/snapshots/optimism_flex_simple_buy/00000.png new file mode 100644 index 0000000..706d48f Binary files /dev/null and b/tests/snapshots/optimism_flex_simple_buy/00000.png differ diff --git a/tests/snapshots/optimism_flex_simple_buy/00001.png b/tests/snapshots/optimism_flex_simple_buy/00001.png new file mode 100644 index 0000000..47e0a4c Binary files /dev/null and b/tests/snapshots/optimism_flex_simple_buy/00001.png differ diff --git a/tests/snapshots/optimism_flex_simple_buy/00002.png b/tests/snapshots/optimism_flex_simple_buy/00002.png new file mode 100644 index 0000000..e67b539 Binary files /dev/null and b/tests/snapshots/optimism_flex_simple_buy/00002.png differ diff --git a/tests/snapshots/optimism_flex_simple_buy/00003.png b/tests/snapshots/optimism_flex_simple_buy/00003.png new file mode 100644 index 0000000..dabe7af Binary files /dev/null and b/tests/snapshots/optimism_flex_simple_buy/00003.png differ diff --git a/tests/snapshots/optimism_flex_simple_swap/00000.png b/tests/snapshots/optimism_flex_simple_swap/00000.png new file mode 100644 index 0000000..846dd16 Binary files /dev/null and b/tests/snapshots/optimism_flex_simple_swap/00000.png differ diff --git a/tests/snapshots/optimism_flex_simple_swap/00001.png b/tests/snapshots/optimism_flex_simple_swap/00001.png new file mode 100644 index 0000000..72667f1 Binary files /dev/null and b/tests/snapshots/optimism_flex_simple_swap/00001.png differ diff --git a/tests/snapshots/optimism_flex_simple_swap/00002.png b/tests/snapshots/optimism_flex_simple_swap/00002.png new file mode 100644 index 0000000..3b8947a Binary files /dev/null and b/tests/snapshots/optimism_flex_simple_swap/00002.png differ diff --git a/tests/snapshots/optimism_flex_simple_swap/00003.png b/tests/snapshots/optimism_flex_simple_swap/00003.png new file mode 100644 index 0000000..dabe7af Binary files /dev/null and b/tests/snapshots/optimism_flex_simple_swap/00003.png differ diff --git a/tests/snapshots/optimism_nanos_simple_buy/00000.png b/tests/snapshots/optimism_nanos_simple_buy/00000.png new file mode 100644 index 0000000..8d84cc7 Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_buy/00000.png differ diff --git a/tests/snapshots/optimism_nanos_simple_buy/00001.png b/tests/snapshots/optimism_nanos_simple_buy/00001.png new file mode 100644 index 0000000..8b8180d Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_buy/00001.png differ diff --git a/tests/snapshots/optimism_nanos_simple_buy/00002.png b/tests/snapshots/optimism_nanos_simple_buy/00002.png new file mode 100644 index 0000000..8280f3a Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_buy/00002.png differ diff --git a/tests/snapshots/optimism_nanos_simple_buy/00003.png b/tests/snapshots/optimism_nanos_simple_buy/00003.png new file mode 100644 index 0000000..4a08f27 Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_buy/00003.png differ diff --git a/tests/snapshots/optimism_nanos_simple_buy/00004.png b/tests/snapshots/optimism_nanos_simple_buy/00004.png new file mode 100644 index 0000000..ff92145 Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_buy/00004.png differ diff --git a/tests/snapshots/optimism_nanos_simple_buy/00005.png b/tests/snapshots/optimism_nanos_simple_buy/00005.png new file mode 100644 index 0000000..3025781 Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_buy/00005.png differ diff --git a/tests/snapshots/optimism_nanos_simple_buy/00006.png b/tests/snapshots/optimism_nanos_simple_buy/00006.png new file mode 100644 index 0000000..8f22860 Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_buy/00006.png differ diff --git a/tests/snapshots/optimism_nanos_simple_buy/00007.png b/tests/snapshots/optimism_nanos_simple_buy/00007.png new file mode 100644 index 0000000..eeec632 Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_buy/00007.png differ diff --git a/tests/snapshots/optimism_nanos_simple_buy/00008.png b/tests/snapshots/optimism_nanos_simple_buy/00008.png new file mode 100644 index 0000000..1c9156c Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_buy/00008.png differ diff --git a/tests/snapshots/optimism_nanos_simple_buy/00009.png b/tests/snapshots/optimism_nanos_simple_buy/00009.png new file mode 100644 index 0000000..ce795f3 Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_buy/00009.png differ diff --git a/tests/snapshots/optimism_nanos_simple_swap/00000.png b/tests/snapshots/optimism_nanos_simple_swap/00000.png new file mode 100644 index 0000000..8d84cc7 Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_swap/00000.png differ diff --git a/tests/snapshots/optimism_nanos_simple_swap/00001.png b/tests/snapshots/optimism_nanos_simple_swap/00001.png new file mode 100644 index 0000000..bb7f75b Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_swap/00001.png differ diff --git a/tests/snapshots/optimism_nanos_simple_swap/00002.png b/tests/snapshots/optimism_nanos_simple_swap/00002.png new file mode 100644 index 0000000..490759c Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_swap/00002.png differ diff --git a/tests/snapshots/optimism_nanos_simple_swap/00003.png b/tests/snapshots/optimism_nanos_simple_swap/00003.png new file mode 100644 index 0000000..5a449de Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_swap/00003.png differ diff --git a/tests/snapshots/optimism_nanos_simple_swap/00004.png b/tests/snapshots/optimism_nanos_simple_swap/00004.png new file mode 100644 index 0000000..1afa0be Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_swap/00004.png differ diff --git a/tests/snapshots/optimism_nanos_simple_swap/00005.png b/tests/snapshots/optimism_nanos_simple_swap/00005.png new file mode 100644 index 0000000..357e4be Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_swap/00005.png differ diff --git a/tests/snapshots/optimism_nanos_simple_swap/00006.png b/tests/snapshots/optimism_nanos_simple_swap/00006.png new file mode 100644 index 0000000..8f22860 Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_swap/00006.png differ diff --git a/tests/snapshots/optimism_nanos_simple_swap/00007.png b/tests/snapshots/optimism_nanos_simple_swap/00007.png new file mode 100644 index 0000000..eeec632 Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_swap/00007.png differ diff --git a/tests/snapshots/optimism_nanos_simple_swap/00008.png b/tests/snapshots/optimism_nanos_simple_swap/00008.png new file mode 100644 index 0000000..1c9156c Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_swap/00008.png differ diff --git a/tests/snapshots/optimism_nanos_simple_swap/00009.png b/tests/snapshots/optimism_nanos_simple_swap/00009.png new file mode 100644 index 0000000..ce795f3 Binary files /dev/null and b/tests/snapshots/optimism_nanos_simple_swap/00009.png differ diff --git a/tests/snapshots/optimism_nanosp_simple_buy/00000.png b/tests/snapshots/optimism_nanosp_simple_buy/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/optimism_nanosp_simple_buy/00000.png differ diff --git a/tests/snapshots/optimism_nanosp_simple_buy/00001.png b/tests/snapshots/optimism_nanosp_simple_buy/00001.png new file mode 100644 index 0000000..a9fe18a Binary files /dev/null and b/tests/snapshots/optimism_nanosp_simple_buy/00001.png differ diff --git a/tests/snapshots/optimism_nanosp_simple_buy/00002.png b/tests/snapshots/optimism_nanosp_simple_buy/00002.png new file mode 100644 index 0000000..1b9c9ef Binary files /dev/null and b/tests/snapshots/optimism_nanosp_simple_buy/00002.png differ diff --git a/tests/snapshots/optimism_nanosp_simple_buy/00003.png b/tests/snapshots/optimism_nanosp_simple_buy/00003.png new file mode 100644 index 0000000..31b1d96 Binary files /dev/null and b/tests/snapshots/optimism_nanosp_simple_buy/00003.png differ diff --git a/tests/snapshots/optimism_nanosp_simple_buy/00004.png b/tests/snapshots/optimism_nanosp_simple_buy/00004.png new file mode 100644 index 0000000..f49db7f Binary files /dev/null and b/tests/snapshots/optimism_nanosp_simple_buy/00004.png differ diff --git a/tests/snapshots/optimism_nanosp_simple_buy/00005.png b/tests/snapshots/optimism_nanosp_simple_buy/00005.png new file mode 100644 index 0000000..b2401b2 Binary files /dev/null and b/tests/snapshots/optimism_nanosp_simple_buy/00005.png differ diff --git a/tests/snapshots/optimism_nanosp_simple_buy/00006.png b/tests/snapshots/optimism_nanosp_simple_buy/00006.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/optimism_nanosp_simple_buy/00006.png differ diff --git a/tests/snapshots/optimism_nanosp_simple_buy/00007.png b/tests/snapshots/optimism_nanosp_simple_buy/00007.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/optimism_nanosp_simple_buy/00007.png differ diff --git a/tests/snapshots/optimism_nanosp_simple_swap/00000.png b/tests/snapshots/optimism_nanosp_simple_swap/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/optimism_nanosp_simple_swap/00000.png differ diff --git a/tests/snapshots/optimism_nanosp_simple_swap/00001.png b/tests/snapshots/optimism_nanosp_simple_swap/00001.png new file mode 100644 index 0000000..5a2d089 Binary files /dev/null and b/tests/snapshots/optimism_nanosp_simple_swap/00001.png differ diff --git a/tests/snapshots/optimism_nanosp_simple_swap/00002.png b/tests/snapshots/optimism_nanosp_simple_swap/00002.png new file mode 100644 index 0000000..3c7e011 Binary files /dev/null and b/tests/snapshots/optimism_nanosp_simple_swap/00002.png differ diff --git a/tests/snapshots/optimism_nanosp_simple_swap/00003.png b/tests/snapshots/optimism_nanosp_simple_swap/00003.png new file mode 100644 index 0000000..87c6e5e Binary files /dev/null and b/tests/snapshots/optimism_nanosp_simple_swap/00003.png differ diff --git a/tests/snapshots/optimism_nanosp_simple_swap/00004.png b/tests/snapshots/optimism_nanosp_simple_swap/00004.png new file mode 100644 index 0000000..f49db7f Binary files /dev/null and b/tests/snapshots/optimism_nanosp_simple_swap/00004.png differ diff --git a/tests/snapshots/optimism_nanosp_simple_swap/00005.png b/tests/snapshots/optimism_nanosp_simple_swap/00005.png new file mode 100644 index 0000000..b2401b2 Binary files /dev/null and b/tests/snapshots/optimism_nanosp_simple_swap/00005.png differ diff --git a/tests/snapshots/optimism_nanosp_simple_swap/00006.png b/tests/snapshots/optimism_nanosp_simple_swap/00006.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/optimism_nanosp_simple_swap/00006.png differ diff --git a/tests/snapshots/optimism_nanosp_simple_swap/00007.png b/tests/snapshots/optimism_nanosp_simple_swap/00007.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/optimism_nanosp_simple_swap/00007.png differ diff --git a/tests/snapshots/optimism_nanox_simple_buy/00000.png b/tests/snapshots/optimism_nanox_simple_buy/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/optimism_nanox_simple_buy/00000.png differ diff --git a/tests/snapshots/optimism_nanox_simple_buy/00001.png b/tests/snapshots/optimism_nanox_simple_buy/00001.png new file mode 100644 index 0000000..a9fe18a Binary files /dev/null and b/tests/snapshots/optimism_nanox_simple_buy/00001.png differ diff --git a/tests/snapshots/optimism_nanox_simple_buy/00002.png b/tests/snapshots/optimism_nanox_simple_buy/00002.png new file mode 100644 index 0000000..1b9c9ef Binary files /dev/null and b/tests/snapshots/optimism_nanox_simple_buy/00002.png differ diff --git a/tests/snapshots/optimism_nanox_simple_buy/00003.png b/tests/snapshots/optimism_nanox_simple_buy/00003.png new file mode 100644 index 0000000..31b1d96 Binary files /dev/null and b/tests/snapshots/optimism_nanox_simple_buy/00003.png differ diff --git a/tests/snapshots/optimism_nanox_simple_buy/00004.png b/tests/snapshots/optimism_nanox_simple_buy/00004.png new file mode 100644 index 0000000..f49db7f Binary files /dev/null and b/tests/snapshots/optimism_nanox_simple_buy/00004.png differ diff --git a/tests/snapshots/optimism_nanox_simple_buy/00005.png b/tests/snapshots/optimism_nanox_simple_buy/00005.png new file mode 100644 index 0000000..b2401b2 Binary files /dev/null and b/tests/snapshots/optimism_nanox_simple_buy/00005.png differ diff --git a/tests/snapshots/optimism_nanox_simple_buy/00006.png b/tests/snapshots/optimism_nanox_simple_buy/00006.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/optimism_nanox_simple_buy/00006.png differ diff --git a/tests/snapshots/optimism_nanox_simple_buy/00007.png b/tests/snapshots/optimism_nanox_simple_buy/00007.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/optimism_nanox_simple_buy/00007.png differ diff --git a/tests/snapshots/optimism_nanox_simple_swap/00000.png b/tests/snapshots/optimism_nanox_simple_swap/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/optimism_nanox_simple_swap/00000.png differ diff --git a/tests/snapshots/optimism_nanox_simple_swap/00001.png b/tests/snapshots/optimism_nanox_simple_swap/00001.png new file mode 100644 index 0000000..5a2d089 Binary files /dev/null and b/tests/snapshots/optimism_nanox_simple_swap/00001.png differ diff --git a/tests/snapshots/optimism_nanox_simple_swap/00002.png b/tests/snapshots/optimism_nanox_simple_swap/00002.png new file mode 100644 index 0000000..3c7e011 Binary files /dev/null and b/tests/snapshots/optimism_nanox_simple_swap/00002.png differ diff --git a/tests/snapshots/optimism_nanox_simple_swap/00003.png b/tests/snapshots/optimism_nanox_simple_swap/00003.png new file mode 100644 index 0000000..87c6e5e Binary files /dev/null and b/tests/snapshots/optimism_nanox_simple_swap/00003.png differ diff --git a/tests/snapshots/optimism_nanox_simple_swap/00004.png b/tests/snapshots/optimism_nanox_simple_swap/00004.png new file mode 100644 index 0000000..f49db7f Binary files /dev/null and b/tests/snapshots/optimism_nanox_simple_swap/00004.png differ diff --git a/tests/snapshots/optimism_nanox_simple_swap/00005.png b/tests/snapshots/optimism_nanox_simple_swap/00005.png new file mode 100644 index 0000000..b2401b2 Binary files /dev/null and b/tests/snapshots/optimism_nanox_simple_swap/00005.png differ diff --git a/tests/snapshots/optimism_nanox_simple_swap/00006.png b/tests/snapshots/optimism_nanox_simple_swap/00006.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/optimism_nanox_simple_swap/00006.png differ diff --git a/tests/snapshots/optimism_nanox_simple_swap/00007.png b/tests/snapshots/optimism_nanox_simple_swap/00007.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/optimism_nanox_simple_swap/00007.png differ diff --git a/tests/snapshots/optimism_stax_simple_buy/00000.png b/tests/snapshots/optimism_stax_simple_buy/00000.png new file mode 100644 index 0000000..8650abb Binary files /dev/null and b/tests/snapshots/optimism_stax_simple_buy/00000.png differ diff --git a/tests/snapshots/optimism_stax_simple_buy/00001.png b/tests/snapshots/optimism_stax_simple_buy/00001.png new file mode 100644 index 0000000..5d65863 Binary files /dev/null and b/tests/snapshots/optimism_stax_simple_buy/00001.png differ diff --git a/tests/snapshots/optimism_stax_simple_buy/00002.png b/tests/snapshots/optimism_stax_simple_buy/00002.png new file mode 100644 index 0000000..7b24474 Binary files /dev/null and b/tests/snapshots/optimism_stax_simple_buy/00002.png differ diff --git a/tests/snapshots/optimism_stax_simple_buy/00003.png b/tests/snapshots/optimism_stax_simple_buy/00003.png new file mode 100644 index 0000000..339db1b Binary files /dev/null and b/tests/snapshots/optimism_stax_simple_buy/00003.png differ diff --git a/tests/snapshots/optimism_stax_simple_swap/00000.png b/tests/snapshots/optimism_stax_simple_swap/00000.png new file mode 100644 index 0000000..c762844 Binary files /dev/null and b/tests/snapshots/optimism_stax_simple_swap/00000.png differ diff --git a/tests/snapshots/optimism_stax_simple_swap/00001.png b/tests/snapshots/optimism_stax_simple_swap/00001.png new file mode 100644 index 0000000..1069e87 Binary files /dev/null and b/tests/snapshots/optimism_stax_simple_swap/00001.png differ diff --git a/tests/snapshots/optimism_stax_simple_swap/00002.png b/tests/snapshots/optimism_stax_simple_swap/00002.png new file mode 100644 index 0000000..9fa4875 Binary files /dev/null and b/tests/snapshots/optimism_stax_simple_swap/00002.png differ diff --git a/tests/snapshots/optimism_stax_simple_swap/00003.png b/tests/snapshots/optimism_stax_simple_swap/00003.png new file mode 100644 index 0000000..339db1b Binary files /dev/null and b/tests/snapshots/optimism_stax_simple_swap/00003.png differ diff --git a/tests/snapshots/polygon_zk_evm_flex_simple_buy/00000.png b/tests/snapshots/polygon_zk_evm_flex_simple_buy/00000.png new file mode 100644 index 0000000..c029f54 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_flex_simple_buy/00000.png differ diff --git a/tests/snapshots/polygon_zk_evm_flex_simple_buy/00001.png b/tests/snapshots/polygon_zk_evm_flex_simple_buy/00001.png new file mode 100644 index 0000000..5207a1f Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_flex_simple_buy/00001.png differ diff --git a/tests/snapshots/polygon_zk_evm_flex_simple_buy/00002.png b/tests/snapshots/polygon_zk_evm_flex_simple_buy/00002.png new file mode 100644 index 0000000..3fe86f7 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_flex_simple_buy/00002.png differ diff --git a/tests/snapshots/polygon_zk_evm_flex_simple_buy/00003.png b/tests/snapshots/polygon_zk_evm_flex_simple_buy/00003.png new file mode 100644 index 0000000..0739c03 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_flex_simple_buy/00003.png differ diff --git a/tests/snapshots/polygon_zk_evm_flex_simple_buy/00004.png b/tests/snapshots/polygon_zk_evm_flex_simple_buy/00004.png new file mode 100644 index 0000000..dabe7af Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_flex_simple_buy/00004.png differ diff --git a/tests/snapshots/polygon_zk_evm_flex_simple_swap/00000.png b/tests/snapshots/polygon_zk_evm_flex_simple_swap/00000.png new file mode 100644 index 0000000..25cf17a Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_flex_simple_swap/00000.png differ diff --git a/tests/snapshots/polygon_zk_evm_flex_simple_swap/00001.png b/tests/snapshots/polygon_zk_evm_flex_simple_swap/00001.png new file mode 100644 index 0000000..03dead0 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_flex_simple_swap/00001.png differ diff --git a/tests/snapshots/polygon_zk_evm_flex_simple_swap/00002.png b/tests/snapshots/polygon_zk_evm_flex_simple_swap/00002.png new file mode 100644 index 0000000..3fe86f7 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_flex_simple_swap/00002.png differ diff --git a/tests/snapshots/polygon_zk_evm_flex_simple_swap/00003.png b/tests/snapshots/polygon_zk_evm_flex_simple_swap/00003.png new file mode 100644 index 0000000..34671dc Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_flex_simple_swap/00003.png differ diff --git a/tests/snapshots/polygon_zk_evm_flex_simple_swap/00004.png b/tests/snapshots/polygon_zk_evm_flex_simple_swap/00004.png new file mode 100644 index 0000000..dabe7af Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_flex_simple_swap/00004.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00000.png b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00000.png new file mode 100644 index 0000000..8d84cc7 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00000.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00001.png b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00001.png new file mode 100644 index 0000000..8b8180d Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00001.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00002.png b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00002.png new file mode 100644 index 0000000..2804dbc Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00002.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00003.png b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00003.png new file mode 100644 index 0000000..c07bc8d Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00003.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00004.png b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00004.png new file mode 100644 index 0000000..588c113 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00004.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00005.png b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00005.png new file mode 100644 index 0000000..3fbdd96 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00005.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00006.png b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00006.png new file mode 100644 index 0000000..6cd4b71 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00006.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00007.png b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00007.png new file mode 100644 index 0000000..eeec632 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00007.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00008.png b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00008.png new file mode 100644 index 0000000..1c9156c Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00008.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00009.png b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00009.png new file mode 100644 index 0000000..ce795f3 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_buy/00009.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00000.png b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00000.png new file mode 100644 index 0000000..8d84cc7 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00000.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00001.png b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00001.png new file mode 100644 index 0000000..bb7f75b Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00001.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00002.png b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00002.png new file mode 100644 index 0000000..2804dbc Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00002.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00003.png b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00003.png new file mode 100644 index 0000000..0bd021e Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00003.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00004.png b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00004.png new file mode 100644 index 0000000..5a449de Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00004.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00005.png b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00005.png new file mode 100644 index 0000000..c73eab5 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00005.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00006.png b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00006.png new file mode 100644 index 0000000..2be07ac Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00006.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00007.png b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00007.png new file mode 100644 index 0000000..6cd4b71 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00007.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00008.png b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00008.png new file mode 100644 index 0000000..eeec632 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00008.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00009.png b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00009.png new file mode 100644 index 0000000..1c9156c Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00009.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00010.png b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00010.png new file mode 100644 index 0000000..ce795f3 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanos_simple_swap/00010.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00000.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00000.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00001.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00001.png new file mode 100644 index 0000000..a9fe18a Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00001.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00002.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00002.png new file mode 100644 index 0000000..cd6475d Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00002.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00003.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00003.png new file mode 100644 index 0000000..61b56c1 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00003.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00004.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00004.png new file mode 100644 index 0000000..0f20313 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00004.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00005.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00005.png new file mode 100644 index 0000000..fc589c8 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00005.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00006.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00006.png new file mode 100644 index 0000000..b2401b2 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00006.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00007.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00007.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00007.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00008.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00008.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_buy/00008.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00000.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00000.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00001.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00001.png new file mode 100644 index 0000000..5a2d089 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00001.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00002.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00002.png new file mode 100644 index 0000000..cd6475d Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00002.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00003.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00003.png new file mode 100644 index 0000000..55fd894 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00003.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00004.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00004.png new file mode 100644 index 0000000..c2107b5 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00004.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00005.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00005.png new file mode 100644 index 0000000..fc589c8 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00005.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00006.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00006.png new file mode 100644 index 0000000..b2401b2 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00006.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00007.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00007.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00007.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00008.png b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00008.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanosp_simple_swap/00008.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00000.png b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00000.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00001.png b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00001.png new file mode 100644 index 0000000..a9fe18a Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00001.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00002.png b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00002.png new file mode 100644 index 0000000..cd6475d Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00002.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00003.png b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00003.png new file mode 100644 index 0000000..61b56c1 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00003.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00004.png b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00004.png new file mode 100644 index 0000000..0f20313 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00004.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00005.png b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00005.png new file mode 100644 index 0000000..fc589c8 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00005.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00006.png b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00006.png new file mode 100644 index 0000000..b2401b2 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00006.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00007.png b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00007.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00007.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00008.png b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00008.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_buy/00008.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00000.png b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00000.png new file mode 100644 index 0000000..487ea10 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00000.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00001.png b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00001.png new file mode 100644 index 0000000..5a2d089 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00001.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00002.png b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00002.png new file mode 100644 index 0000000..cd6475d Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00002.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00003.png b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00003.png new file mode 100644 index 0000000..55fd894 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00003.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00004.png b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00004.png new file mode 100644 index 0000000..c2107b5 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00004.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00005.png b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00005.png new file mode 100644 index 0000000..fc589c8 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00005.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00006.png b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00006.png new file mode 100644 index 0000000..b2401b2 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00006.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00007.png b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00007.png new file mode 100644 index 0000000..570ce28 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00007.png differ diff --git a/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00008.png b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00008.png new file mode 100644 index 0000000..6578872 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_nanox_simple_swap/00008.png differ diff --git a/tests/snapshots/polygon_zk_evm_stax_simple_buy/00000.png b/tests/snapshots/polygon_zk_evm_stax_simple_buy/00000.png new file mode 100644 index 0000000..8650abb Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_stax_simple_buy/00000.png differ diff --git a/tests/snapshots/polygon_zk_evm_stax_simple_buy/00001.png b/tests/snapshots/polygon_zk_evm_stax_simple_buy/00001.png new file mode 100644 index 0000000..9a8aa9f Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_stax_simple_buy/00001.png differ diff --git a/tests/snapshots/polygon_zk_evm_stax_simple_buy/00002.png b/tests/snapshots/polygon_zk_evm_stax_simple_buy/00002.png new file mode 100644 index 0000000..7b24474 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_stax_simple_buy/00002.png differ diff --git a/tests/snapshots/polygon_zk_evm_stax_simple_buy/00003.png b/tests/snapshots/polygon_zk_evm_stax_simple_buy/00003.png new file mode 100644 index 0000000..339db1b Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_stax_simple_buy/00003.png differ diff --git a/tests/snapshots/polygon_zk_evm_stax_simple_swap/00000.png b/tests/snapshots/polygon_zk_evm_stax_simple_swap/00000.png new file mode 100644 index 0000000..c762844 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_stax_simple_swap/00000.png differ diff --git a/tests/snapshots/polygon_zk_evm_stax_simple_swap/00001.png b/tests/snapshots/polygon_zk_evm_stax_simple_swap/00001.png new file mode 100644 index 0000000..531521c Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_stax_simple_swap/00001.png differ diff --git a/tests/snapshots/polygon_zk_evm_stax_simple_swap/00002.png b/tests/snapshots/polygon_zk_evm_stax_simple_swap/00002.png new file mode 100644 index 0000000..9fa4875 Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_stax_simple_swap/00002.png differ diff --git a/tests/snapshots/polygon_zk_evm_stax_simple_swap/00003.png b/tests/snapshots/polygon_zk_evm_stax_simple_swap/00003.png new file mode 100644 index 0000000..339db1b Binary files /dev/null and b/tests/snapshots/polygon_zk_evm_stax_simple_swap/00003.png differ diff --git a/tests/src/arbitrum/v5/arbitrum_simple_buy.test.ts b/tests/src/arbitrum/v5/arbitrum_simple_buy.test.ts new file mode 100644 index 0000000..e21e42f --- /dev/null +++ b/tests/src/arbitrum/v5/arbitrum_simple_buy.test.ts @@ -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 = "arbitrum"; +const signedPlugin = false; + +const contractAddr = "0xdef171fe48cf0115b1d80b88dc8eab59176fee57"; +const chainID = 42161; // ARBITRUM + +// From : https://arbiscan.io/tx/0xe4dc8afbcab4b40d08b5ff69e6f496122eb5dafb1fbcea0624b99d43d645bef0 +const inputData = "0x2298207a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000008b0e6f19ee57089f7649a455d89d7bc6314d04e8000000000000000000000000000000000000000000000000022512aad6c7cfc20000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000000000021fa2f52fe6c8a200000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000003e00000000000000000000000000000000000000000000000000000000000000480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a3c2a819e3de7aca384c798269b3ce1cd0e43701000000000000000000000000000000000000000000000000000000000313880000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000006744df7e0030d5bad24b4999b73f3533e4f2a86900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab10000000000000000000000001f721e2e82f6676fce4ea07a5958cf098d339e18000000000000000000000000def171fe48cf0115b1d80b88dc8eab59176fee57000000000000000000000000000000000000000000000000000000000000014cd0e30db0f28c0498000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000def171fe48cf0115b1d80b88dc8eab59176fee5700000000000000000000000000000000000000000000000000000000674dc59d0000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000000000022512aad6c7cfc200000000000000000000000000000000000000000000000000000000000000288b0e6f19ee57089f7649a455d89d7bc6314d04e882af49447d8a07e3bd95bd0d56f35241523fbab1000000000000000000000000000000000000000000000000e1829cfe00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000128000000000000000000000000000000000000000000000000000000000000014c0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000022512aad6c7cfc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + +// 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: 6 // <= Define the number of steps for this test case and this device + }, + { + name: "nanox", + label: "Nano X", + steps: 6 // <= 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) +); diff --git a/tests/src/arbitrum/v5/arbitrum_simple_swap.test.ts b/tests/src/arbitrum/v5/arbitrum_simple_swap.test.ts new file mode 100644 index 0000000..0f9bf3d --- /dev/null +++ b/tests/src/arbitrum/v5/arbitrum_simple_swap.test.ts @@ -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 = "arbitrum"; +const signedPlugin = false; + +const contractAddr = "0xdef171fe48cf0115b1d80b88dc8eab59176fee57"; +const chainID = 42161; // ARBITRUM + +// From : https://arbiscan.io/tx/0x32acab70a378e112571fcc4ac2eabb3bb15d5177cdb5a1bc2e15bb878f7ff634 +const inputData = "0x54e3f31b0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb900000000000000000000000059062301fb510f4ea2417b67404cb16d31e604ba0000000000000000000000000000000000000000000000000000000003d73013000000000000000000000000000000000000000000000052868a18ae35de71460000000000000000000000000000000000000000000000535bf056fd8bbf12be00000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000f5aae5276b1ed63544edb779dcd7e449a7d8017b000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000006744e0e73396a2fd8bc946bb9bfe3b4b317da7620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb140000000000000000000000000000000000000000000000000000000000000124c04b8d59000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000def171fe48cf0115b1d80b88dc8eab59176fee5700000000000000000000000000000000000000000000000000000000674dc7070000000000000000000000000000000000000000000000000000000003d730130000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002bfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb90009c459062301fb510f4ea2417b67404cb16d31e604ba00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000124000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + +// 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) +); diff --git a/tests/src/base/v5/base_simple_buy.test.ts b/tests/src/base/v5/base_simple_buy.test.ts new file mode 100644 index 0000000..98b59e2 --- /dev/null +++ b/tests/src/base/v5/base_simple_buy.test.ts @@ -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 = "base"; +const signedPlugin = false; + +const contractAddr = "0x59c7c832e96d2568bea6db468c1aadcbbda08a52"; +const chainID = 8453; // BASE + +// From : https://basescan.org/tx/0x655cde9c98fe3149ad191309b9966835abfd805b194a97e7744af1b9a144dd7e +const inputData = "0x2298207a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00000000000000000000000000000000000000000000000000000000084653f6000000000000000000000000000000000000000000000000008e1bc9bf0400000000000000000000000000000000000000000000000000000000000008315abc00000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a3c2a819e3de7aca384c798269b3ce1cd0e437010000000000000000000000000000000000000000000000000000000003138800000000000000000000000000000000000000000000000000000000000004a000000000000000000000000000000000000000000000000000000000674546a0eab585efff664e6f86df604ee24f74390000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000001b8eea9315be495187d873da7773a874545d9d4800000000000000000000000059c7c832e96d2568bea6db468c1aadcbbda08a520000000000000000000000000000000000000000000000000000000000000148f28c0498000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000059c7c832e96d2568bea6db468c1aadcbbda08a5200000000000000000000000000000000000000000000000000000000674e2cbf000000000000000000000000000000000000000000000000008e1bc9bf04000000000000000000000000000000000000000000000000000000000000084653f6000000000000000000000000000000000000000000000000000000000000002b4200000000000000000000000000000000000006000050833589fcd6edb6e08f4c7c32d4f71b54bda02913000000000000000000000000000000000000000000e1829cfe000000000000000000000000420000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012400000000000000000000000000000000000000000000000000000000000001480000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + +// Create serializedTx and remove the "0x" prefix +const serializedTx = populateTransaction(contractAddr, inputData, chainID, "101.508501444720532639"); + +const devices = [ + { + name: "nanos", + label: "Nano S", + steps: 6 // <= Define the number of steps for this test case and this device + }, + { + name: "nanosp", + label: "Nano S+", + steps: 6 // <= Define the number of steps for this test case and this device + }, + { + name: "nanox", + label: "Nano X", + steps: 6 // <= 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) +); diff --git a/tests/src/base/v5/base_simple_swap.test.ts b/tests/src/base/v5/base_simple_swap.test.ts new file mode 100644 index 0000000..d5552e8 --- /dev/null +++ b/tests/src/base/v5/base_simple_swap.test.ts @@ -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 = "base"; +const signedPlugin = false; + +const contractAddr = "0x59c7c832e96d2568bea6db468c1aadcbbda08a52"; +const chainID = 8453; // BASE + +// From : https://basescan.org/tx/0xd48213ad460e7867ca319b2c515d50e2841cc670cb666537f594dfc2ee919b29 +const inputData = "0x54e3f31b000000000000000000000000000000000000000000000000000000000000002000000000000000000000000023a96680ccde03bd4bdd9a3e9a0cb56a5d27f7c9000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000409f9cbc7c4a04c22000000000000000000000000000000000000000000000000000000008da3e8aa65c823a00000000000000000000000000000000000000000000000008f122ba9886d11e00000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000004c00000000000000000000000000000000000000000000000000000000000000560000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a3c2a819e3de7aca384c798269b3ce1cd0e437010000000000000000000000000000000000000000000000000000000003138800000000000000000000000000000000000000000000000000000000000005e00000000000000000000000000000000000000000000000000000000067454587f231cd8fe8644f85a1ff20900dc4331a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000aee2b8d4a154e36f479daece3fb3e6c3c03d396e000000000000000000000000dcf4ee5b700e2a5fec458e06b763a4a3e300449400000000000000000000000059c7c832e96d2568bea6db468c1aadcbbda08a52000000000000000000000000000000000000000000000000000000000000022cc04b8d59000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000059c7c832e96d2568bea6db468c1aadcbbda08a5200000000000000000000000000000000000000000000000000000000674e2ba6000000000000000000000000000000000000000007c13bc4b2c133c5600000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002b23a96680ccde03bd4bdd9a3e9a0cb56a5d27f7c9002710420000000000000000000000000000000000000600000000000000000000000000000000000000000091a32b6900000000000000000000000023a96680ccde03bd4bdd9a3e9a0cb56a5d27f7c9000000000000000000000000000000000000000038de60f7c988d0fcc00000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000004de49342001c286d21c7507694cd52a9aa73c3d5ce56e1829cfe000000000000000000000000420000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001240000000000000000000000000000000000000000000000000000000000000208000000000000000000000000000000000000000000000000000000000000022c00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + +// Create serializedTx and remove the "0x" prefix +const serializedTx = populateTransaction(contractAddr, inputData, chainID,"30"); + +const devices = [ + { + name: "nanos", + label: "Nano S", + steps: 9 // <= 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) +); diff --git a/tests/src/fantom/v5/fantom_simple_buy.test.ts b/tests/src/fantom/v5/fantom_simple_buy.test.ts new file mode 100644 index 0000000..7ff7573 --- /dev/null +++ b/tests/src/fantom/v5/fantom_simple_buy.test.ts @@ -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) +); diff --git a/tests/src/fantom/v5/fantom_simple_swap.test.ts b/tests/src/fantom/v5/fantom_simple_swap.test.ts new file mode 100644 index 0000000..01d9930 --- /dev/null +++ b/tests/src/fantom/v5/fantom_simple_swap.test.ts @@ -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) +); diff --git a/tests/src/optimism/v5/optimism_simple_buy.test.ts b/tests/src/optimism/v5/optimism_simple_buy.test.ts new file mode 100644 index 0000000..264d618 --- /dev/null +++ b/tests/src/optimism/v5/optimism_simple_buy.test.ts @@ -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 = "optimism"; +const signedPlugin = false; + +const contractAddr = "0xdef171fe48cf0115b1d80b88dc8eab59176fee57"; +const chainID = 10; // OPTIMISM + +// From : https://optimistic.etherscan.io/tx/0x13ddc13ad6a5f7d7a86a5edb318b0610cedc407cc5abed3de1ea843a186eb249 +const inputData = "0x2298207a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da10000000000000000000000000b2c639c533813f4aa9d7837caf62653d097ff8500000000000000000000000000000000000000000000001b1d7acc0392725580000000000000000000000000000000000000000000000000000000001dcd650000000000000000000000000000000000000000000000001b1cc91ce1a7b4151700000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a3c2a819e3de7aca384c798269b3ce1cd0e43701000000000000000000000000000000000000000000000000000000000313880000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000006744eb284b07b55881a24d5ea9dbdb9d18783c4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000049e94895a26e697602c8270e437688514b291a810000000000000000000000000000000000000000000000000000000000000124f28c0498000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000def171fe48cf0115b1d80b88dc8eab59176fee5700000000000000000000000000000000000000000000000000000000674dd148000000000000000000000000000000000000000000000000000000001dcd650000000000000000000000000000000000000000000000001b1d7acc0392725580000000000000000000000000000000000000000000000000000000000000002b0b2c639c533813f4aa9d7837caf62653d097ff85000001da10009cbd5d07dd0cecc66161fc93d7c9000da100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000124000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + +// 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: 6 // <= Define the number of steps for this test case and this device + }, + { + name: "nanox", + label: "Nano X", + steps: 6 // <= 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) +); diff --git a/tests/src/optimism/v5/optimism_simple_swap.test.ts b/tests/src/optimism/v5/optimism_simple_swap.test.ts new file mode 100644 index 0000000..cc4b401 --- /dev/null +++ b/tests/src/optimism/v5/optimism_simple_swap.test.ts @@ -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 = "optimism"; +const signedPlugin = false; + +const contractAddr = "0xdef171fe48cf0115b1d80b88dc8eab59176fee57"; +const chainID = 10; // OPTIMISM + +// From : https://optimistic.etherscan.io/tx/0x0a4082b2898259e082ae3494fecac42bda80ae57c011af2f33aa2e27760322df +const inputData = "0x54e3f31b00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000b2c639c533813f4aa9d7837caf62653d097ff85000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000000000000000000000000000000000000bebc20000000000000000000000000000000000000000000000000000cc06c1db053cc200000000000000000000000000000000000000000000000000cd0d392e73e59500000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a3c2a819e3de7aca384c798269b3ce1cd0e437010000000000000000000000000000000000000000000000000000000003138800000000000000000000000000000000000000000000000000000000000004a0000000000000000000000000000000000000000000000000000000006744e23fb54d54f7d1fe4cd9b9674fa96c4403c500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000049e94895a26e697602c8270e437688514b291a81000000000000000000000000def171fe48cf0115b1d80b88dc8eab59176fee570000000000000000000000000000000000000000000000000000000000000148c04b8d59000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000def171fe48cf0115b1d80b88dc8eab59176fee5700000000000000000000000000000000000000000000000000000000674dc85e000000000000000000000000000000000000000000000000000000000bebc2000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002b0b2c639c533813f4aa9d7837caf62653d097ff850000644200000000000000000000000000000000000006000000000000000000000000000000000000000000e1829cfe000000000000000000000000420000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012400000000000000000000000000000000000000000000000000000000000001480000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + +// Create serializedTx and remove the "0x" prefix +const serializedTx = populateTransaction(contractAddr, inputData, chainID,"30"); + +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: 6 // <= Define the number of steps for this test case and this device + }, + { + name: "nanox", + label: "Nano X", + steps: 6 // <= 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) +); diff --git a/tests/src/polygon_zk_evm/v5/polygon_zk_evm_simple_buy.test.ts b/tests/src/polygon_zk_evm/v5/polygon_zk_evm_simple_buy.test.ts new file mode 100644 index 0000000..af2945c --- /dev/null +++ b/tests/src/polygon_zk_evm/v5/polygon_zk_evm_simple_buy.test.ts @@ -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 = "polygon_zk_evm"; +const signedPlugin = false; + +const contractAddr = "0xb83b554730d29ce4cb55bb42206c3e2c03e4a40a"; +const chainID = 1101; // POLYGON_ZK_EVM + +// From : https://zkevm.polygonscan.com/tx/0x03f3fbd15123ee0341194daf80e808f4c0a85f28e4d1c25b3f211c9e714319f8 +const inputData = "0x2298207a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000068286607a1d43602d880d349187c3c48c0fd05e60000000000000000000000001e4a5963abfd975d8c9021ce480b42188849d41d00000000000000000000000000000000000000000000002b36591d51633b3763000000000000000000000000000000000000000000000000000000000248858d00000000000000000000000000000000000000000000002aff4fc178771da0d300000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000efdb09ed95cbd86a977f4d24f4bf3a2d7b45e1ac0000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000004200000000000000000000000000000000000000000000000000000000067445bc74f2511a038bb48859f2fb8baa8992ea3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f6ad3ccf71abb3e12becf6b3d2a74c963859adcd0000000000000000000000000000000000000000000000000000000000000124f28c0498000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000b83b554730d29ce4cb55bb42206c3e2c03e4a40a00000000000000000000000000000000000000000000000000000000674d41e7000000000000000000000000000000000000000000000000000000000248858d00000000000000000000000000000000000000000000002b36591d51633b3763000000000000000000000000000000000000000000000000000000000000003c1e4a5963abfd975d8c9021ce480b42188849d41d4f9a0e7fd2bf6067db6994cf12e4495df938e6e968286607a1d43602d880d349187c3c48c0fd05e60000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000124000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + +// 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) +); diff --git a/tests/src/polygon_zk_evm/v5/polygon_zk_evm_simple_swap.test.ts b/tests/src/polygon_zk_evm/v5/polygon_zk_evm_simple_swap.test.ts new file mode 100644 index 0000000..cf24d1a --- /dev/null +++ b/tests/src/polygon_zk_evm/v5/polygon_zk_evm_simple_swap.test.ts @@ -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 = "polygon_zk_evm"; +const signedPlugin = false; + +const contractAddr = "0xb83b554730d29ce4cb55bb42206c3e2c03e4a40a"; +const chainID = 1101; // POLYGON_ZK_EVM + +// From : https://zkevm.polygonscan.com/tx/0xb24762e3def1c06300ad40424201331dd9dae07f745f28d295483c096f096389 +const inputData = "0x54e3f31b000000000000000000000000000000000000000000000000000000000000002000000000000000000000000037eaa0ef3549a5bb7d431be78a3d99bd360d19e5000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000001d905c0000000000000000000000000000000000000000000000000001f9aa84f5d8fc7000000000000000000000000000000000000000000000000001fc3506458e2d400000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a3c2a819e3de7aca384c798269b3ce1cd0e437010000000000000000000000000000000000000000000000000000000003138800000000000000000000000000000000000000000000000000000000000004a00000000000000000000000000000000000000000000000000000000067452c9d5ecda9dcd0bc49689925fb9c924e516b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f6ad3ccf71abb3e12becf6b3d2a74c963859adcd000000000000000000000000b83b554730d29ce4cb55bb42206c3e2c03e4a40a0000000000000000000000000000000000000000000000000000000000000148c04b8d59000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000b83b554730d29ce4cb55bb42206c3e2c03e4a40a00000000000000000000000000000000000000000000000000000000674e12bd0000000000000000000000000000000000000000000000000000000001d905c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002837eaa0ef3549a5bb7d431be78a3d99bd360d19e54f9a0e7fd2bf6067db6994cf12e4495df938e6e9000000000000000000000000000000000000000000000000e1829cfe0000000000000000000000004f9a0e7fd2bf6067db6994cf12e4495df938e6e900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012400000000000000000000000000000000000000000000000000000000000001480000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + +// Create serializedTx and remove the "0x" prefix +const serializedTx = populateTransaction(contractAddr, inputData, chainID,"30"); + +const devices = [ + { + name: "nanos", + label: "Nano S", + steps: 9 // <= 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) +); diff --git a/tests/src/test.fixture.ts b/tests/src/test.fixture.ts index 2c7c44d..c9d4e85 100644 --- a/tests/src/test.fixture.ts +++ b/tests/src/test.fixture.ts @@ -26,10 +26,15 @@ const Resolve = require('path').resolve; const APP_PATH_NANOS = Resolve('elfs/ethereum_nanos.elf'); const APP_PATH_NANOX = Resolve('elfs/ethereum_nanox.elf'); const APP_PATH_NANOSP = Resolve('elfs/ethereum_nanosp.elf'); +const APP_PATH_STAX = Resolve('elfs/ethereum_stax.elf'); +const APP_PATH_FLEX = Resolve('elfs/ethereum_flex.elf'); + const PLUGIN_LIB_NANOS = { 'Paraswap': Resolve('elfs/plugin_nanos.elf') }; const PLUGIN_LIB_NANOX = { 'Paraswap': Resolve('elfs/plugin_nanox.elf') }; const PLUGIN_LIB_NANOSP = { 'Paraswap': Resolve('elfs/plugin_nanosp.elf') }; +const PLUGIN_LIB_STAX = { 'Paraswap': Resolve('elfs/plugin_stax.elf') }; +const PLUGIN_LIB_FLEX = { 'Paraswap': Resolve('elfs/plugin_flex.elf') }; const RANDOM_ADDRESS = "0xaaaabbbbccccddddeeeeffffgggghhhhiiiijjjj"; @@ -101,15 +106,23 @@ function zemu(device, func, testNetwork, signed = false) { const models: model[] = [ {dev:{ name : 'nanos', prefix: 'S' , path: APP_PATH_NANOS}, plugin: PLUGIN_LIB_NANOS}, {dev:{ name : 'nanox', prefix: 'X' , path: APP_PATH_NANOX}, plugin: PLUGIN_LIB_NANOX}, - {dev:{ name : 'nanosp', prefix: 'SP' , path: APP_PATH_NANOSP}, plugin: PLUGIN_LIB_NANOSP} + {dev:{ name : 'nanosp', prefix: 'SP' , path: APP_PATH_NANOSP}, plugin: PLUGIN_LIB_NANOSP}, + {dev:{ name : 'stax', prefix: 'ST' , path: APP_PATH_STAX}, plugin: PLUGIN_LIB_STAX}, + {dev:{ name : 'flex', prefix: 'FL' , path: APP_PATH_FLEX}, plugin: PLUGIN_LIB_FLEX} ] if (device === "nanos") { current_model = models[0] } else if (device === "nanox") { current_model = models[1] - }else { + } else if (device === "nanosp") { current_model = models[2] + } else if (device === "stax") { + current_model = models[3] + simOptions.startText = "Ethereum" + } else { + current_model = models[4] + simOptions.startText = "Ethereum" } const sim = new Zemu(current_model.dev.path, current_model.plugin); @@ -172,7 +185,11 @@ async function processTransaction(eth, sim, steps, label, rawTxHex, srlTx = "") transactionUploadDelay ); - await sim.navigateAndCompareSnapshots(".", label, [steps, 0]); + if (sim.startOptions.model === "stax" || sim.startOptions.model === "flex") { + await sim.compareSnapshotsAndApprove(".", label) + } else { + await sim.navigateAndCompareSnapshots(".", label, [steps, 0]); + } await tx; }