diff --git a/config/executor_addresses.json b/config/executor_addresses.json index 3611b22..53b0161 100644 --- a/config/executor_addresses.json +++ b/config/executor_addresses.json @@ -1,9 +1,9 @@ { "ethereum": { - "uniswap_v2": "0x00C1b81e3C8f6347E69e2DDb90454798A6Be975E", - "uniswap_v3": "0xF744EBfaA580cF3fFc25aD046E92BD8B770a0700", - "uniswap_v4": "0x90BE4620436354c9DfA58614B3Bdd5a80FBfAF31", - "vm:balancer_v2": "0xffe5B139b396c9A3d5d9ab89AAE78bF3070CbD64" + "uniswap_v2": "0xf6c5be66FFf9DC69962d73da0A617a827c382329", + "uniswap_v3": "0xdD8559c917393FC8DD2b4dD289c52Ff445fDE1B0", + "uniswap_v4": "0x042C0ebBEAb9d9987c2f64Ee05f2B3aeB86eAf70", + "vm:balancer_v2": "0x00BE8EfAE40219Ff76287b0F9b9e497942f5BC91" }, "tenderly_ethereum": { "uniswap_v2": "0x00C1b81e3C8f6347E69e2DDb90454798A6Be975E", diff --git a/foundry/hardhat.config.js b/foundry/hardhat.config.js index 420692c..9fa5afb 100644 --- a/foundry/hardhat.config.js +++ b/foundry/hardhat.config.js @@ -1,5 +1,6 @@ /** @type import('hardhat/config').HardhatUserConfig */ require("@tenderly/hardhat-tenderly"); +require("@nomicfoundation/hardhat-verify"); require("@nomiclabs/hardhat-ethers"); require("@nomicfoundation/hardhat-foundry"); @@ -40,6 +41,10 @@ module.exports = { tenderly: { project: "project", username: "tvinagre", - privateVerification: true, + privateVerification: false, }, + + etherscan: { + apiKey: process.env.ETHERSCAN_API_KEY, + } }; diff --git a/foundry/interfaces/ICallback.sol b/foundry/interfaces/ICallback.sol index 408a5fe..17f66dd 100644 --- a/foundry/interfaces/ICallback.sol +++ b/foundry/interfaces/ICallback.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; interface ICallback { diff --git a/foundry/interfaces/IExecutor.sol b/foundry/interfaces/IExecutor.sol index 0a60022..b55af1e 100644 --- a/foundry/interfaces/IExecutor.sol +++ b/foundry/interfaces/IExecutor.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/foundry/lib/IWETH.sol b/foundry/lib/IWETH.sol index 8ab98fa..391fcc1 100644 --- a/foundry/lib/IWETH.sol +++ b/foundry/lib/IWETH.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/foundry/lib/LibSwap.sol b/foundry/lib/LibSwap.sol index b0c6717..f73a759 100644 --- a/foundry/lib/LibSwap.sol +++ b/foundry/lib/LibSwap.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; library LibSwap { diff --git a/foundry/lib/Payments.sol b/foundry/lib/Payments.sol deleted file mode 100644 index 8027dbf..0000000 --- a/foundry/lib/Payments.sol +++ /dev/null @@ -1,110 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity ^0.8.26; - -import {Constants} from "./Constants.sol"; -import {ActionConstants} from "@uniswap/v4-periphery/src/libraries/ActionConstants.sol"; -import {BipsLibrary} from "@uniswap/v4-periphery/src/libraries/BipsLibrary.sol"; -import {PaymentsImmutables} from "./PaymentsImmutables.sol"; -import {SafeTransferLib} from "solmate/src/utils/SafeTransferLib.sol"; -import {ERC20} from "solmate/src/tokens/ERC20.sol"; - -/// @title Payments contract -/// @notice Performs various operations around the payment of ETH and tokens -abstract contract Payments is PaymentsImmutables { - using SafeTransferLib for ERC20; - using SafeTransferLib for address; - using BipsLibrary for uint256; - - error InsufficientToken(); - error InsufficientETH(); - - /// @notice Pays an amount of ETH or ERC20 to a recipient - /// @param token The token to pay (can be ETH using Constants.ETH) - /// @param recipient The address that will receive the payment - /// @param value The amount to pay - function pay(address token, address recipient, uint256 value) internal { - if (token == Constants.ETH) { - recipient.safeTransferETH(value); - } else { - if (value == ActionConstants.CONTRACT_BALANCE) { - value = ERC20(token).balanceOf(address(this)); - } - - ERC20(token).safeTransfer(recipient, value); - } - } - - /// @notice Pays a proportion of the contract's ETH or ERC20 to a recipient - /// @param token The token to pay (can be ETH using Constants.ETH) - /// @param recipient The address that will receive payment - /// @param bips Portion in bips of whole balance of the contract - function payPortion( - address token, - address recipient, - uint256 bips - ) internal { - if (token == Constants.ETH) { - uint256 balance = address(this).balance; - uint256 amount = balance.calculatePortion(bips); - recipient.safeTransferETH(amount); - } else { - uint256 balance = ERC20(token).balanceOf(address(this)); - uint256 amount = balance.calculatePortion(bips); - ERC20(token).safeTransfer(recipient, amount); - } - } - - /// @notice Sweeps all of the contract's ERC20 or ETH to an address - /// @param token The token to sweep (can be ETH using Constants.ETH) - /// @param recipient The address that will receive payment - /// @param amountMinimum The minimum desired amount - function sweep( - address token, - address recipient, - uint256 amountMinimum - ) internal { - uint256 balance; - if (token == Constants.ETH) { - balance = address(this).balance; - if (balance < amountMinimum) revert InsufficientETH(); - if (balance > 0) recipient.safeTransferETH(balance); - } else { - balance = ERC20(token).balanceOf(address(this)); - if (balance < amountMinimum) revert InsufficientToken(); - if (balance > 0) ERC20(token).safeTransfer(recipient, balance); - } - } - - /// @notice Wraps an amount of ETH into WETH - /// @param recipient The recipient of the WETH - /// @param amount The amount to wrap (can be CONTRACT_BALANCE) - function wrapETH(address recipient, uint256 amount) internal { - if (amount == ActionConstants.CONTRACT_BALANCE) { - amount = address(this).balance; - } else if (amount > address(this).balance) { - revert InsufficientETH(); - } - if (amount > 0) { - WETH9.deposit{value: amount}(); - if (recipient != address(this)) { - WETH9.transfer(recipient, amount); - } - } - } - - /// @notice Unwraps all of the contract's WETH into ETH - /// @param recipient The recipient of the ETH - /// @param amountMinimum The minimum amount of ETH desired - function unwrapWETH9(address recipient, uint256 amountMinimum) internal { - uint256 value = WETH9.balanceOf(address(this)); - if (value < amountMinimum) { - revert InsufficientETH(); - } - if (value > 0) { - WETH9.withdraw(value); - if (recipient != address(this)) { - recipient.safeTransferETH(value); - } - } - } -} diff --git a/foundry/lib/PaymentsImmutables.sol b/foundry/lib/PaymentsImmutables.sol deleted file mode 100644 index 1894169..0000000 --- a/foundry/lib/PaymentsImmutables.sol +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity ^0.8.26; - -import {IWETH9} from "@uniswap/v4-periphery/src/interfaces/external/IWETH9.sol"; -import {IPermit2} from "permit2/src/interfaces/IPermit2.sol"; - -struct PaymentsParameters { - address permit2; - address weth9; -} - -contract PaymentsImmutables { - /// @notice WETH9 address - IWETH9 internal immutable WETH9; - - /// @notice Permit2 address - IPermit2 internal immutable PERMIT2; - - constructor(PaymentsParameters memory params) { - WETH9 = IWETH9(params.weth9); - PERMIT2 = IPermit2(params.permit2); - } -} diff --git a/foundry/lib/Permit2Payments.sol b/foundry/lib/Permit2Payments.sol deleted file mode 100644 index edb09e2..0000000 --- a/foundry/lib/Permit2Payments.sol +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity ^0.8.26; - -import {IAllowanceTransfer} from "permit2/src/interfaces/IAllowanceTransfer.sol"; -import {SafeCast160} from "permit2/src/libraries/SafeCast160.sol"; -import {Payments} from "./Payments.sol"; - -/// @title Payments through Permit2 -/// @notice Performs interactions with Permit2 to transfer tokens -abstract contract Permit2Payments is Payments { - using SafeCast160 for uint256; - - error FromAddressIsNotOwner(); - - /// @notice Performs a transferFrom on Permit2 - /// @param token The token to transfer - /// @param from The address to transfer from - /// @param to The recipient of the transfer - /// @param amount The amount to transfer - function permit2TransferFrom( - address token, - address from, - address to, - uint160 amount - ) internal { - PERMIT2.transferFrom(from, to, amount, token); - } - - /// @notice Performs a batch transferFrom on Permit2 - /// @param batchDetails An array detailing each of the transfers that should occur - /// @param owner The address that should be the owner of all transfers - function permit2TransferFrom( - IAllowanceTransfer.AllowanceTransferDetails[] calldata batchDetails, - address owner - ) internal { - uint256 batchLength = batchDetails.length; - for (uint256 i = 0; i < batchLength; ++i) { - if (batchDetails[i].from != owner) revert FromAddressIsNotOwner(); - } - PERMIT2.transferFrom(batchDetails); - } - - /// @notice Either performs a regular payment or transferFrom on Permit2, depending on the payer address - /// @param token The token to transfer - /// @param payer The address to pay for the transfer - /// @param recipient The recipient of the transfer - /// @param amount The amount to transfer - function payOrPermit2Transfer( - address token, - address payer, - address recipient, - uint256 amount - ) internal { - if (payer == address(this)) pay(token, recipient, amount); - else permit2TransferFrom(token, payer, recipient, amount.toUint160()); - } -} diff --git a/foundry/lib/bytes/LibPrefixLengthEncodedByteArray.sol b/foundry/lib/bytes/LibPrefixLengthEncodedByteArray.sol index 7368b58..da75d59 100644 --- a/foundry/lib/bytes/LibPrefixLengthEncodedByteArray.sol +++ b/foundry/lib/bytes/LibPrefixLengthEncodedByteArray.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; /** diff --git a/foundry/package-lock.json b/foundry/package-lock.json index b4a9c11..48ac1a8 100644 --- a/foundry/package-lock.json +++ b/foundry/package-lock.json @@ -11,6 +11,7 @@ "prompt-sync": "^4.2.0" }, "devDependencies": { + "@nomicfoundation/hardhat-verify": "^2.0.13", "@nomiclabs/hardhat-ethers": "^2.2.3", "@tenderly/hardhat-tenderly": "^2.5.2", "dotenv": "^16.4.7", @@ -1928,9 +1929,9 @@ } }, "node_modules/@nomicfoundation/hardhat-verify": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.12.tgz", - "integrity": "sha512-Lg3Nu7DCXASQRVI/YysjuAX2z8jwOCbS0w5tz2HalWGSTZThqA0v9N0v0psHbKNqzPJa8bNOeapIVSziyJTnAg==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.13.tgz", + "integrity": "sha512-i57GX1sC0kYGyRVnbQrjjyBTpWTKgrvKC+jH8CMKV6gHp959Upb8lKaZ58WRHIU0espkulTxLnacYeUDirwJ2g==", "dev": true, "dependencies": { "@ethersproject/abi": "^5.1.2", diff --git a/foundry/package.json b/foundry/package.json index 3b23875..8f8f530 100644 --- a/foundry/package.json +++ b/foundry/package.json @@ -1,6 +1,7 @@ { "name": "hardhat-project", "devDependencies": { + "@nomicfoundation/hardhat-verify": "^2.0.13", "@nomiclabs/hardhat-ethers": "^2.2.3", "@tenderly/hardhat-tenderly": "^2.5.2", "dotenv": "^16.4.7", diff --git a/foundry/scripts/README.md b/foundry/scripts/README.md index 3bd07fd..25bc882 100644 --- a/foundry/scripts/README.md +++ b/foundry/scripts/README.md @@ -5,7 +5,7 @@ ## Deploy on a Tenderly fork -1. Make a new [fork](https://dashboard.tenderly.co/) in tenderly dashboard for the +1. Make a new [fork](https://dashboard.tenderly.co/) in tenderly dashboard for the chain that you wish to deploy on. 2. Set the following environment variables: @@ -25,6 +25,7 @@ export PRIVATE_KEY= export RPC_URL= export DEPLOY_WALLET= export PRIVATE_KEY= +export ETHERSCAN_API_KEY= ``` Make sure to run `unset HISTFILE` in your terminal before setting the private key. This will prevent the private key diff --git a/foundry/scripts/deploy-executors.js b/foundry/scripts/deploy-executors.js index 46a5460..e04acef 100644 --- a/foundry/scripts/deploy-executors.js +++ b/foundry/scripts/deploy-executors.js @@ -5,9 +5,9 @@ const hre = require("hardhat"); // Comment out the executors you don't want to deploy const executors_to_deploy = [ {exchange: "UniswapV2Executor", args: []}, - // {exchange: "UniswapV3Executor", args: ["0x1F98431c8aD98523631AE4a59f267346ea31F984"]}, - // {exchange: "UniswapV4Executor", args: ["0x000000000004444c5dc75cB358380D2e3dE08A90"]}, - // {exchange: "BalancerV2Executor", args: []}, + {exchange: "UniswapV3Executor", args: ["0x1F98431c8aD98523631AE4a59f267346ea31F984"]}, + {exchange: "UniswapV4Executor", args: ["0x000000000004444c5dc75cB358380D2e3dE08A90"]}, + {exchange: "BalancerV2Executor", args: []}, ] async function main() { @@ -25,6 +25,7 @@ async function main() { await deployedExecutor.deployed(); console.log(`${exchange} deployed to: ${deployedExecutor.address}`); + // Verify on Tenderly try { await hre.tenderly.verify({ name: exchange, @@ -34,6 +35,19 @@ async function main() { } catch (error) { console.error("Error during contract verification:", error); } + + console.log("Waiting for 1 minute before verifying the contract..."); + await new Promise(resolve => setTimeout(resolve, 60000)); + // Verify on Etherscan + try { + await hre.run("verify:verify", { + address: deployedExecutor.address, + constructorArguments: args, + }); + console.log(`${exchange} verified successfully on Etherscan!`); + } catch (error) { + console.error(`Error during Etherscan verification:`, error); + } } } diff --git a/foundry/scripts/deploy-router.js b/foundry/scripts/deploy-router.js index ea884f1..581c550 100644 --- a/foundry/scripts/deploy-router.js +++ b/foundry/scripts/deploy-router.js @@ -6,11 +6,11 @@ async function main() { const network = hre.network.name; let permit2; let weth; - if (network === "mainnet" || network === "tenderly_mainnet") { + if (network === "ethereum" || network === "tenderly_ethereum") { permit2 = "0x000000000022D473030F116dDEE9F6B43aC78BA3"; weth = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"; } else if (network === "base" || network === "tenderly_base") { - // permit2 address is the same as on mainnet + // permit2 address is the same as on ethereum permit2 = "0x000000000022D473030F116dDEE9F6B43aC78BA3"; weth = "0x4200000000000000000000000000000000000006"; } else { @@ -31,6 +31,7 @@ async function main() { await router.deployed(); console.log(`TychoRouter deployed to: ${router.address}`); + // Verify on Tenderly try { console.log("Verifying contract on Tenderly..."); await hre.tenderly.verify({ @@ -41,6 +42,21 @@ async function main() { } catch (error) { console.error("Error during contract verification:", error); } + + console.log("Waiting for 1 minute before verifying the contract..."); + await new Promise(resolve => setTimeout(resolve, 60000)); + + // Verify on Etherscan + try { + await hre.run("verify:verify", { + address: router.address, + constructorArguments: [permit2, weth], + }); + console.log(`TychoRouter verified successfully on Etherscan!`); + } catch (error) { + console.error(`Error during Etherscan verification:`, error); + } + } main() diff --git a/foundry/src/Dispatcher.sol b/foundry/src/Dispatcher.sol index e3f99b1..828d0b1 100644 --- a/foundry/src/Dispatcher.sol +++ b/foundry/src/Dispatcher.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "@interfaces/IExecutor.sol"; diff --git a/foundry/src/TychoRouter.sol b/foundry/src/TychoRouter.sol index af3d7a0..d250695 100644 --- a/foundry/src/TychoRouter.sol +++ b/foundry/src/TychoRouter.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "../lib/IWETH.sol"; diff --git a/foundry/src/executors/BalancerV2Executor.sol b/foundry/src/executors/BalancerV2Executor.sol index 14340cf..0f69fcd 100644 --- a/foundry/src/executors/BalancerV2Executor.sol +++ b/foundry/src/executors/BalancerV2Executor.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "@interfaces/IExecutor.sol"; diff --git a/foundry/src/executors/UniswapV2Executor.sol b/foundry/src/executors/UniswapV2Executor.sol index cddad3f..2a40897 100644 --- a/foundry/src/executors/UniswapV2Executor.sol +++ b/foundry/src/executors/UniswapV2Executor.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "@interfaces/IExecutor.sol"; diff --git a/foundry/src/executors/UniswapV3Executor.sol b/foundry/src/executors/UniswapV3Executor.sol index 8229825..c03b5d3 100644 --- a/foundry/src/executors/UniswapV3Executor.sol +++ b/foundry/src/executors/UniswapV3Executor.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "@interfaces/IExecutor.sol"; diff --git a/foundry/src/executors/UniswapV4Executor.sol b/foundry/src/executors/UniswapV4Executor.sol index fff7e25..a487ef1 100644 --- a/foundry/src/executors/UniswapV4Executor.sol +++ b/foundry/src/executors/UniswapV4Executor.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "@interfaces/IExecutor.sol"; diff --git a/foundry/test/Constants.sol b/foundry/test/Constants.sol index 2f77465..6f552f8 100644 --- a/foundry/test/Constants.sol +++ b/foundry/test/Constants.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "forge-std/Test.sol"; diff --git a/foundry/test/Dispatcher.t.sol b/foundry/test/Dispatcher.t.sol index ffdc8ac..a7409fe 100644 --- a/foundry/test/Dispatcher.t.sol +++ b/foundry/test/Dispatcher.t.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "@src/Dispatcher.sol"; diff --git a/foundry/test/LibPrefixLengthEncodedByteArray.t.sol b/foundry/test/LibPrefixLengthEncodedByteArray.t.sol index ad13463..c05f84f 100644 --- a/foundry/test/LibPrefixLengthEncodedByteArray.t.sol +++ b/foundry/test/LibPrefixLengthEncodedByteArray.t.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: MIT +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import {Test} from "forge-std/Test.sol"; diff --git a/foundry/test/LibSwap.t.sol b/foundry/test/LibSwap.t.sol index 37c6a2e..75c94f7 100644 --- a/foundry/test/LibSwap.t.sol +++ b/foundry/test/LibSwap.t.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "forge-std/Test.sol"; diff --git a/foundry/test/TychoRouter.t.sol b/foundry/test/TychoRouter.t.sol index 6033feb..5c7caee 100644 --- a/foundry/test/TychoRouter.t.sol +++ b/foundry/test/TychoRouter.t.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "@src/executors/UniswapV4Executor.sol"; diff --git a/foundry/test/TychoRouterTestSetup.sol b/foundry/test/TychoRouterTestSetup.sol index e66d3c2..59264a5 100644 --- a/foundry/test/TychoRouterTestSetup.sol +++ b/foundry/test/TychoRouterTestSetup.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "../src/executors/UniswapV2Executor.sol"; diff --git a/foundry/test/executors/BalancerV2Executor.t.sol b/foundry/test/executors/BalancerV2Executor.t.sol index 7581146..9187187 100644 --- a/foundry/test/executors/BalancerV2Executor.t.sol +++ b/foundry/test/executors/BalancerV2Executor.t.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "@src/executors/BalancerV2Executor.sol"; diff --git a/foundry/test/executors/UniswapV2Executor.t.sol b/foundry/test/executors/UniswapV2Executor.t.sol index 0b4d705..83baadd 100644 --- a/foundry/test/executors/UniswapV2Executor.t.sol +++ b/foundry/test/executors/UniswapV2Executor.t.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "@src/executors/UniswapV2Executor.sol"; diff --git a/foundry/test/executors/UniswapV3Executor.t.sol b/foundry/test/executors/UniswapV3Executor.t.sol index 3e39c7c..42e8e6b 100644 --- a/foundry/test/executors/UniswapV3Executor.t.sol +++ b/foundry/test/executors/UniswapV3Executor.t.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "@src/executors/UniswapV3Executor.sol"; diff --git a/foundry/test/executors/UniswapV4Executor.t.sol b/foundry/test/executors/UniswapV4Executor.t.sol index 97c5546..e3b3cb6 100644 --- a/foundry/test/executors/UniswapV4Executor.t.sol +++ b/foundry/test/executors/UniswapV4Executor.t.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "../../src/executors/UniswapV4Executor.sol"; diff --git a/foundry/test/executors/UniswapV4Utils.sol b/foundry/test/executors/UniswapV4Utils.sol index cf5ad19..b84bb69 100644 --- a/foundry/test/executors/UniswapV4Utils.sol +++ b/foundry/test/executors/UniswapV4Utils.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; import "@src/executors/UniswapV4Executor.sol"; diff --git a/src/encoding/evm/strategy_encoder/strategy_encoders.rs b/src/encoding/evm/strategy_encoder/strategy_encoders.rs index 303b186..704316b 100644 --- a/src/encoding/evm/strategy_encoder/strategy_encoders.rs +++ b/src/encoding/evm/strategy_encoder/strategy_encoders.rs @@ -400,7 +400,7 @@ mod tests { let hex_protocol_data = encode(&protocol_data); assert_eq!( executor_address, - Bytes::from_str("0x00C1b81e3C8f6347E69e2DDb90454798A6Be975E").unwrap() + Bytes::from_str("0xf6c5be66FFf9DC69962d73da0A617a827c382329").unwrap() ); assert_eq!( hex_protocol_data, @@ -525,7 +525,7 @@ mod tests { let hex_protocol_data = encode(&protocol_data); assert_eq!( executor_address, - Bytes::from_str("0x90BE4620436354c9DfA58614B3Bdd5a80FBfAF31").unwrap() + Bytes::from_str("0x042C0ebBEAb9d9987c2f64Ee05f2B3aeB86eAf70").unwrap() ); assert_eq!( hex_protocol_data, @@ -537,7 +537,7 @@ mod tests { // zero for one "00", // executor address - "90be4620436354c9dfa58614b3bdd5a80fbfaf31", + "042c0ebbeab9d9987c2f64ee05f2b3aeb86eaf70", // first pool intermediary token (ETH) "0000000000000000000000000000000000000000", // fee @@ -669,7 +669,7 @@ mod tests { "01", // token out index "000000", // split // Swap data - "00c1b81e3c8f6347e69e2ddb90454798a6be975e", // executor address + "f6c5be66fff9dc69962d73da0a617a827c382329", // executor address "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", // token in "a478c2975ab1ea89e8196811f51a7b7ade33eb11", // component id "3ede3eca2a72b3aecc820e955b36f38437d01395", // receiver @@ -990,12 +990,12 @@ mod tests { "01", // token out index "000000", // split // Swap data header - "90be4620436354c9dfa58614b3bdd5a80fbfaf31", // executor address + "042c0ebbeab9d9987c2f64ee05f2b3aeb86eaf70", // executor address // Protocol data "a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", // group token in "6982508145454ce325ddbe47a25d4ec3d2311933", // group token in "00", // zero2one - "90be4620436354c9dfa58614b3bdd5a80fbfaf31", // executor address + "042c0ebbeab9d9987c2f64ee05f2b3aeb86eaf70", // executor address // First pool params "0000000000000000000000000000000000000000", // intermediary token (ETH) "000bb8", // fee @@ -1076,7 +1076,7 @@ mod tests { "01", // token out index "000000", // split // Swap data - "00c1b81e3c8f6347e69e2ddb90454798a6be975e", // executor address + "f6c5be66fff9dc69962d73da0a617a827c382329", // executor address "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", // token in "a478c2975ab1ea89e8196811f51a7b7ade33eb11", // component id "3ede3eca2a72b3aecc820e955b36f38437d01395", // receiver