diff --git a/tests/networks/arbitrum/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json b/tests/networks/arbitrum/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json index a1edfe1..f15631a 100644 --- a/tests/networks/arbitrum/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json +++ b/tests/networks/arbitrum/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json @@ -1,452 +1,1966 @@ [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "_partnerSharePercent", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxFeePercent", - "type": "uint256" - }, - { - "internalType": "contract IFeeClaimer", - "name": "_feeClaimer", - "type": "address" - }, - { - "internalType": "address", - "name": "_augustusRFQ", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes16", - "name": "uuid", - "type": "bytes16" - }, - { - "indexed": false, - "internalType": "address", - "name": "partner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feePercent", - "type": "uint256" - }, - { - "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": "BoughtV3", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes16", - "name": "uuid", - "type": "bytes16" - }, - { - "indexed": false, - "internalType": "address", - "name": "partner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feePercent", - "type": "uint256" - }, - { - "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": "SwappedV3", - "type": "event" - }, - { - "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": [], - "name": "augustusRFQ", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "feeClaimer", - "outputs": [ - { - "internalType": "contract IFeeClaimer", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getKey", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxFeePercent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "partnerSharePercent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "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" - } -] \ No newline at end of file + { + "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 index c4bb21a..759fbf8 100644 --- a/tests/networks/arbitrum/paraswap/b2c.json +++ b/tests/networks/arbitrum/paraswap/b2c.json @@ -5,6 +5,29 @@ "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", @@ -13,6 +36,38 @@ "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", @@ -20,6 +75,22 @@ ], "method": "simpleBuy", "plugin": "Paraswap" + }, + "0x64466805": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv4", + "plugin": "Paraswap" + }, + "0x81033120": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv2", + "plugin": "Paraswap" } } } diff --git a/tests/networks/base/paraswap/abis/0x59c7c832e96d2568bea6db468c1aadcbbda08a52.abi.json b/tests/networks/base/paraswap/abis/0x59c7c832e96d2568bea6db468c1aadcbbda08a52.abi.json index bdfbe95..f15631a 100644 --- a/tests/networks/base/paraswap/abis/0x59c7c832e96d2568bea6db468c1aadcbbda08a52.abi.json +++ b/tests/networks/base/paraswap/abis/0x59c7c832e96d2568bea6db468c1aadcbbda08a52.abi.json @@ -1,488 +1,1966 @@ [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "_partnerSharePercent", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxFeePercent", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_paraswapReferralShare", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_paraswapSlippageShare", - "type": "uint256" - }, - { - "internalType": "contract IFeeClaimer", - "name": "_feeClaimer", - "type": "address" - }, - { - "internalType": "address", - "name": "_augustusRFQ", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes16", - "name": "uuid", - "type": "bytes16" - }, - { - "indexed": false, - "internalType": "address", - "name": "partner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feePercent", - "type": "uint256" - }, - { - "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": "BoughtV3", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes16", - "name": "uuid", - "type": "bytes16" - }, - { - "indexed": false, - "internalType": "address", - "name": "partner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feePercent", - "type": "uint256" - }, - { - "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": "SwappedV3", - "type": "event" - }, - { - "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": [], - "name": "augustusRFQ", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "feeClaimer", - "outputs": [ - { - "internalType": "contract IFeeClaimer", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getKey", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxFeePercent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "paraswapReferralShare", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "paraswapSlippageShare", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "partnerSharePercent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "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" - } -] \ No newline at end of file + { + "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 index 33bfec9..ac849b8 100644 --- a/tests/networks/base/paraswap/b2c.json +++ b/tests/networks/base/paraswap/b2c.json @@ -5,6 +5,29 @@ "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", @@ -13,6 +36,38 @@ "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", @@ -20,6 +75,22 @@ ], "method": "simpleBuy", "plugin": "Paraswap" + }, + "0x64466805": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv4", + "plugin": "Paraswap" + }, + "0x81033120": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv2", + "plugin": "Paraswap" } } } diff --git a/tests/networks/fantom/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json b/tests/networks/fantom/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json index b0e45e7..f15631a 100644 --- a/tests/networks/fantom/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json +++ b/tests/networks/fantom/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json @@ -1,657 +1,1966 @@ [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "_partnerSharePercent", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxFeePercent", - "type": "uint256" - }, - { - "internalType": "contract IFeeClaimer", - "name": "_feeClaimer", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes16", - "name": "uuid", - "type": "bytes16" - }, - { - "indexed": false, - "internalType": "address", - "name": "partner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feePercent", - "type": "uint256" - }, - { - "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": "BoughtV3", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes16", - "name": "uuid", - "type": "bytes16" - }, - { - "indexed": false, - "internalType": "address", - "name": "partner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feePercent", - "type": "uint256" - }, - { - "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": "SwappedV3", - "type": "event" - }, - { - "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": [ - { - "components": [ - { - "internalType": "address", - "name": "adapter", - "type": "address" - }, - { - "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 payable", - "name": "beneficiary", - "type": "address" - }, - { - "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": "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.BuyData", - "name": "data", - "type": "tuple" - } - ], - "name": "buy", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "feeClaimer", - "outputs": [ - { - "internalType": "contract IFeeClaimer", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getKey", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxFeePercent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "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": [], - "name": "partnerSharePercent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file + { + "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 index 016cbcc..022b45e 100644 --- a/tests/networks/fantom/paraswap/b2c.json +++ b/tests/networks/fantom/paraswap/b2c.json @@ -5,28 +5,91 @@ "address": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57", "contractName": "AugustusSwapper", "selectors": { - "0x8f00eccb": { + "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", + "method": "multiSwap", "plugin": "Paraswap" }, - "0xec1d21dd": { + "0x46c67b6d": { "erc20OfInterest": [ "data.fromToken", "data.path.0.path.-1.to" ], - "method": "MegaSwap", + "method": "megaSwap", "plugin": "Paraswap" }, - "0xf95a49eb": { + "0x2298207a": { "erc20OfInterest": [ "data.fromToken", "data.toToken" ], - "method": "Buy", + "method": "simpleBuy", + "plugin": "Paraswap" + }, + "0x64466805": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv4", + "plugin": "Paraswap" + }, + "0x81033120": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv2", "plugin": "Paraswap" } } diff --git a/tests/networks/optimism/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json b/tests/networks/optimism/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json index a1edfe1..f15631a 100644 --- a/tests/networks/optimism/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json +++ b/tests/networks/optimism/paraswap/abis/0xdef171fe48cf0115b1d80b88dc8eab59176fee57.abi.json @@ -1,452 +1,1966 @@ [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "_partnerSharePercent", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxFeePercent", - "type": "uint256" - }, - { - "internalType": "contract IFeeClaimer", - "name": "_feeClaimer", - "type": "address" - }, - { - "internalType": "address", - "name": "_augustusRFQ", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes16", - "name": "uuid", - "type": "bytes16" - }, - { - "indexed": false, - "internalType": "address", - "name": "partner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feePercent", - "type": "uint256" - }, - { - "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": "BoughtV3", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes16", - "name": "uuid", - "type": "bytes16" - }, - { - "indexed": false, - "internalType": "address", - "name": "partner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feePercent", - "type": "uint256" - }, - { - "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": "SwappedV3", - "type": "event" - }, - { - "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": [], - "name": "augustusRFQ", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "feeClaimer", - "outputs": [ - { - "internalType": "contract IFeeClaimer", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getKey", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxFeePercent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "partnerSharePercent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "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" - } -] \ No newline at end of file + { + "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 index 95dd460..48a066d 100644 --- a/tests/networks/optimism/paraswap/b2c.json +++ b/tests/networks/optimism/paraswap/b2c.json @@ -5,6 +5,29 @@ "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", @@ -13,6 +36,38 @@ "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", @@ -20,6 +75,22 @@ ], "method": "simpleBuy", "plugin": "Paraswap" + }, + "0x64466805": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv4", + "plugin": "Paraswap" + }, + "0x81033120": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv2", + "plugin": "Paraswap" } } } diff --git a/tests/networks/polygon_zk_evm/paraswap/abis/0xb83b554730d29ce4cb55bb42206c3e2c03e4a40a.abi.json b/tests/networks/polygon_zk_evm/paraswap/abis/0xb83b554730d29ce4cb55bb42206c3e2c03e4a40a.abi.json index bdfbe95..f15631a 100644 --- a/tests/networks/polygon_zk_evm/paraswap/abis/0xb83b554730d29ce4cb55bb42206c3e2c03e4a40a.abi.json +++ b/tests/networks/polygon_zk_evm/paraswap/abis/0xb83b554730d29ce4cb55bb42206c3e2c03e4a40a.abi.json @@ -1,488 +1,1966 @@ [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "_partnerSharePercent", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxFeePercent", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_paraswapReferralShare", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_paraswapSlippageShare", - "type": "uint256" - }, - { - "internalType": "contract IFeeClaimer", - "name": "_feeClaimer", - "type": "address" - }, - { - "internalType": "address", - "name": "_augustusRFQ", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes16", - "name": "uuid", - "type": "bytes16" - }, - { - "indexed": false, - "internalType": "address", - "name": "partner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feePercent", - "type": "uint256" - }, - { - "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": "BoughtV3", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes16", - "name": "uuid", - "type": "bytes16" - }, - { - "indexed": false, - "internalType": "address", - "name": "partner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feePercent", - "type": "uint256" - }, - { - "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": "SwappedV3", - "type": "event" - }, - { - "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": [], - "name": "augustusRFQ", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "feeClaimer", - "outputs": [ - { - "internalType": "contract IFeeClaimer", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getKey", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxFeePercent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "paraswapReferralShare", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "paraswapSlippageShare", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "partnerSharePercent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "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" - } -] \ No newline at end of file + { + "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 index 66229e2..f335e40 100644 --- a/tests/networks/polygon_zk_evm/paraswap/b2c.json +++ b/tests/networks/polygon_zk_evm/paraswap/b2c.json @@ -5,6 +5,29 @@ "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", @@ -13,6 +36,38 @@ "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", @@ -20,6 +75,22 @@ ], "method": "simpleBuy", "plugin": "Paraswap" + }, + "0x64466805": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv4", + "plugin": "Paraswap" + }, + "0x81033120": { + "erc20OfInterest": [ + "fromToken", + "toToken" + ], + "method": "swapOnZeroXv2", + "plugin": "Paraswap" } } }