diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index ed6f77f..fb67c8e 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -1,8 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.25; -import {OptimismParameters} from - "./utils/parameters/OptimismParameters.sol"; +import {OptimismParameters} from "./utils/parameters/OptimismParameters.sol"; import {Script} from "lib/forge-std/src/Script.sol"; import {Conversion} from "src/Conversion.sol"; diff --git a/script/utils/parameters/OptimismParameters.sol b/script/utils/parameters/OptimismParameters.sol index c3e93d5..8f7fe25 100644 --- a/script/utils/parameters/OptimismParameters.sol +++ b/script/utils/parameters/OptimismParameters.sol @@ -2,6 +2,7 @@ pragma solidity 0.8.25; contract OptimismParameters { - address constant OPTIMISM_KWENTA = 0x920Cf626a271321C151D027030D5d08aF699456b; + address constant OPTIMISM_KWENTA = + 0x920Cf626a271321C151D027030D5d08aF699456b; address constant OPTIMISM_SNX = 0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4; -} \ No newline at end of file +} diff --git a/test/Conversion.t.sol b/test/Conversion.t.sol index 99955c2..178cdc2 100644 --- a/test/Conversion.t.sol +++ b/test/Conversion.t.sol @@ -376,7 +376,8 @@ contract ConversionTest is Bootstrap { // withdraw - uint256 contractSNXBeforeWithdraw = SNXMock.balanceOf(address(conversion)); + uint256 contractSNXBeforeWithdraw = + SNXMock.balanceOf(address(conversion)); uint256 ownerSNXBeforeWithdraw = SNXMock.balanceOf(SYNTHETIX_TREASURY); assertEq( contractSNXBeforeWithdraw, MINT_AMOUNT - (CONVERTED_SNX_AMOUNT / 2) @@ -397,7 +398,8 @@ contract ConversionTest is Bootstrap { assertEq(contractSNXFinal, 0); assertEq(claimedSNXFinal, CONVERTED_SNX_AMOUNT / 2); - uint256 contractSNXAfterWithdraw = SNXMock.balanceOf(address(conversion)); + uint256 contractSNXAfterWithdraw = + SNXMock.balanceOf(address(conversion)); uint256 ownerSNXAfterWithdraw = SNXMock.balanceOf(SYNTHETIX_TREASURY); assertEq(contractSNXAfterWithdraw, 0); assertEq(ownerSNXAfterWithdraw, MINT_AMOUNT - CONVERTED_SNX_AMOUNT / 2); diff --git a/test/ConversionOptimism.t.sol b/test/ConversionOptimism.t.sol index 6d50e72..7d2e42b 100644 --- a/test/ConversionOptimism.t.sol +++ b/test/ConversionOptimism.t.sol @@ -401,7 +401,10 @@ contract ConversionTestOptimism is Bootstrap { uint256 contractSNXAfterWithdraw = SNX.balanceOf(address(conversion)); uint256 ownerSNXAfterWithdraw = SNX.balanceOf(SYNTHETIX_TREASURY); assertEq(contractSNXAfterWithdraw, 0); - assertEq(ownerSNXAfterWithdraw, ownerSNXBeforeWithdraw + MINT_AMOUNT - CONVERTED_SNX_AMOUNT / 2); + assertEq( + ownerSNXAfterWithdraw, + ownerSNXBeforeWithdraw + MINT_AMOUNT - CONVERTED_SNX_AMOUNT / 2 + ); } function testVestEmit() public { diff --git a/test/utils/Bootstrap.sol b/test/utils/Bootstrap.sol index 587502e..ed76a58 100644 --- a/test/utils/Bootstrap.sol +++ b/test/utils/Bootstrap.sol @@ -11,7 +11,8 @@ import { import {Test} from "lib/forge-std/src/Test.sol"; import {MockToken} from "test/utils/MockToken.sol"; import {Constants} from "./Constants.sol"; -import {IERC20} from "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; +import {IERC20} from + "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; contract Bootstrap is Test, Constants { using console2 for *; @@ -41,7 +42,8 @@ contract Bootstrap is Test, Constants { function initializeOptimism() internal { vm.rollFork(OPTIMISM_BLOCK_NUMBER); bootstrapOptimism = new BootstrapOptimism(); - (address conversionAddress, address kwenta, address snx) = bootstrapOptimism.init(); + (address conversionAddress, address kwenta, address snx) = + bootstrapOptimism.init(); conversion = Conversion(conversionAddress); KWENTA = IERC20(kwenta); @@ -49,7 +51,6 @@ contract Bootstrap is Test, Constants { vm.prank(SYNTHETIX_TREASURY); SNX.transfer(conversionAddress, MINT_AMOUNT); } - } contract BootstrapLocal is Setup { @@ -66,4 +67,4 @@ contract BootstrapOptimism is DeployOptimism { return (conversionAddress, OPTIMISM_KWENTA, OPTIMISM_SNX); } -} \ No newline at end of file +} diff --git a/test/utils/Constants.sol b/test/utils/Constants.sol index fd211b2..e4ee147 100644 --- a/test/utils/Constants.sol +++ b/test/utils/Constants.sol @@ -5,7 +5,8 @@ pragma solidity 0.8.25; contract Constants { address internal constant SYNTHETIX_TREASURY = 0xa5f7a39E55D7878bC5bd754eE5d6BD7a7662355b; //todo: change to actual address - address internal constant KWENTA_TREASURY = 0x82d2242257115351899894eF384f779b5ba8c695; + address internal constant KWENTA_TREASURY = + 0x82d2242257115351899894eF384f779b5ba8c695; address internal constant TEST_USER_1 = address(0x2); address internal constant TEST_USER_2 = address(0x3); uint256 internal constant TEST_AMOUNT = 1000 * 10 ** 18; @@ -16,5 +17,5 @@ contract Constants { uint256 internal constant LINEAR_VESTING_DURATION = 270 days; uint256 internal constant MINT_AMOUNT = 1_000_000 * 10 ** 18; // BLOCK_NUMBER corresponds to Nov-26-2024 04:11:27 PM +UTC - uint256 internal constant OPTIMISM_BLOCK_NUMBER = 128519355; + uint256 internal constant OPTIMISM_BLOCK_NUMBER = 128_519_355; }