From 549977a36ab50c256952a003c98cf2fa44f5ed56 Mon Sep 17 00:00:00 2001 From: josojo Date: Thu, 11 Jan 2024 12:52:37 +0100 Subject: [PATCH] linting --- contracts/mixin/ForkableStructure.sol | 2 +- test/CreateChildren.t.sol | 11 +++++------ test/ForkableStructure.t.sol | 4 ++-- test/testcontract/CreateChildrenWrapper.sol | 7 +++---- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/contracts/mixin/ForkableStructure.sol b/contracts/mixin/ForkableStructure.sol index 7c063e19..6ae29191 100644 --- a/contracts/mixin/ForkableStructure.sol +++ b/contracts/mixin/ForkableStructure.sol @@ -30,7 +30,7 @@ contract ForkableStructure is IForkableStructure, Initializable { if (children[0] == address(0x0)) { revert OnlyAfterForking(); } - // The following line is not needed, as both children are created + // The following line is not needed, as both children are created // simultaniously // if (children[1] == address(0x0)) { // revert OnlyAfterForking(); diff --git a/test/CreateChildren.t.sol b/test/CreateChildren.t.sol index c9feb0dd..470586c6 100644 --- a/test/CreateChildren.t.sol +++ b/test/CreateChildren.t.sol @@ -15,7 +15,9 @@ contract CreateChildrenTest is Test { address public implementation = address(new CreateChildrenWrapper()); // Deploy the test contract before running tests constructor() { - testContract = CreateChildrenWrapper(address(new TransparentUpgradeableProxy(implementation, admin, ""))); + testContract = CreateChildrenWrapper( + address(new TransparentUpgradeableProxy(implementation, admin, "")) + ); } // Test case to check if the implementation address is correctly set @@ -44,7 +46,7 @@ contract CreateChildrenTest is Test { ), implementation ); - assertEq( + assertEq( CreateChildrenWrapper(child1).getImplementation(), implementation ); @@ -53,10 +55,7 @@ contract CreateChildrenTest is Test { Util.bytesToAddress(vm.load(address(child1), Util._ADMIN_SLOT)), admin ); - assertEq( - CreateChildrenWrapper(child1).getAdmin(), - admin - ); + assertEq(CreateChildrenWrapper(child1).getAdmin(), admin); assertEq( Util.bytesToAddress( diff --git a/test/ForkableStructure.t.sol b/test/ForkableStructure.t.sol index 2bbd6b50..fab01f2c 100644 --- a/test/ForkableStructure.t.sol +++ b/test/ForkableStructure.t.sol @@ -83,7 +83,7 @@ contract ForkStructureTest is Test { ); } - function testModifiers() public{ + function testModifiers() public { forkableStructureImplementation = address( new ForkableStructureWrapper() ); @@ -103,7 +103,7 @@ contract ForkStructureTest is Test { forkStructure.onlyAfterForkingTesting(); forkStructure.createChildren(); - + vm.expectRevert(IForkableStructure.NoChangesAfterForking.selector); forkStructure.onlyBeforeForkingTesting(); forkStructure.onlyAfterForkingTesting(); diff --git a/test/testcontract/CreateChildrenWrapper.sol b/test/testcontract/CreateChildrenWrapper.sol index 1290e7c9..901c8967 100644 --- a/test/testcontract/CreateChildrenWrapper.sol +++ b/test/testcontract/CreateChildrenWrapper.sol @@ -4,10 +4,9 @@ pragma solidity ^0.8.20; // Import the library you want to test import {CreateChildren} from "../../contracts/lib/CreateChildren.sol"; -contract CreateChildrenWrapper { +contract CreateChildrenWrapper { // Constructor to set initial values in storage slots - constructor( - ) {} + constructor() {} // Function to get the current implementation address for testing purposes function getImplementation() external view returns (address) { @@ -26,4 +25,4 @@ contract CreateChildrenWrapper { { return CreateChildren.createChildren(); } -} \ No newline at end of file +}