diff --git a/contracts/src/DeployScript.sol b/contracts/src/DeployScript.sol index ff25011613..77fb75e460 100644 --- a/contracts/src/DeployScript.sol +++ b/contracts/src/DeployScript.sol @@ -61,11 +61,7 @@ contract DeployScript is Script { AgentExecutor executor = new AgentExecutor(); Gateway gatewayLogic = new Gateway( - address(beefyClient), - address(executor), - bridgeHubParaID, - bridgeHubAgentID, - foreignTokenDecimals + address(beefyClient), address(executor), bridgeHubParaID, bridgeHubAgentID, foreignTokenDecimals ); bool rejectOutboundMessages = vm.envBool("REJECT_OUTBOUND_MESSAGES"); diff --git a/contracts/src/Gateway.sol b/contracts/src/Gateway.sol index df12fd7ecf..55b19564d2 100644 --- a/contracts/src/Gateway.sol +++ b/contracts/src/Gateway.sol @@ -223,7 +223,6 @@ contract Gateway is IGateway, IInitializable { /** * Getters */ - function operatingMode() external view returns (OperatingMode) { return CoreStorage.layout().mode; } @@ -396,7 +395,6 @@ contract Gateway is IGateway, IInitializable { /** * Assets */ - function isTokenRegistered(address token) external view returns (bool) { return Assets.isTokenRegistered(token); } diff --git a/contracts/src/Types.sol b/contracts/src/Types.sol index 3172bf1d09..93d41bc0f5 100644 --- a/contracts/src/Types.sol +++ b/contracts/src/Types.sol @@ -87,7 +87,9 @@ enum Command { SetPricingParameters } -enum AgentExecuteCommand {TransferToken} +enum AgentExecuteCommand { + TransferToken +} /// @dev Application-level costs for a message struct Costs { diff --git a/contracts/src/interfaces/IGateway.sol b/contracts/src/interfaces/IGateway.sol index cd0422cf6d..e0d4d81da2 100644 --- a/contracts/src/interfaces/IGateway.sol +++ b/contracts/src/interfaces/IGateway.sol @@ -41,7 +41,6 @@ interface IGateway { /** * Getters */ - function operatingMode() external view returns (OperatingMode); function channelOperatingModeOf(ChannelID channelID) external view returns (OperatingMode); function channelNoncesOf(ChannelID channelID) external view returns (uint64, uint64); diff --git a/contracts/src/utils/Bitfield.sol b/contracts/src/utils/Bitfield.sol index b3e4b0c334..d07e8f8c98 100644 --- a/contracts/src/utils/Bitfield.sol +++ b/contracts/src/utils/Bitfield.sol @@ -11,7 +11,6 @@ library Bitfield { * @dev Constants used to efficiently calculate the hamming weight of a bitfield. See * https://en.wikipedia.org/wiki/Hamming_weight#Efficient_implementation for an explanation of those constants. */ - uint256 internal constant M1 = 0x5555555555555555555555555555555555555555555555555555555555555555; uint256 internal constant M2 = 0x3333333333333333333333333333333333333333333333333333333333333333; uint256 internal constant M4 = 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f; diff --git a/contracts/src/utils/Math.sol b/contracts/src/utils/Math.sol index 0b5c227bd1..ba0036dab9 100644 --- a/contracts/src/utils/Math.sol +++ b/contracts/src/utils/Math.sol @@ -13,6 +13,7 @@ library Math { Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero + } /** diff --git a/contracts/src/utils/Uint16Array.sol b/contracts/src/utils/Uint16Array.sol index 816b4d6862..9bc80fe833 100644 --- a/contracts/src/utils/Uint16Array.sol +++ b/contracts/src/utils/Uint16Array.sol @@ -29,7 +29,6 @@ pragma solidity 0.8.23; * above table counter XX is at logical index 22. It will convert to a physical index of 1 in the array and * then to bit-index 96 to 111 of uint256[1]. */ - using {get, set} for Uint16Array global; error IndexOutOfBounds(); diff --git a/contracts/test/Gateway.t.sol b/contracts/test/Gateway.t.sol index e272a51ec0..74c5a9ce30 100644 --- a/contracts/test/Gateway.t.sol +++ b/contracts/test/Gateway.t.sol @@ -93,13 +93,8 @@ contract GatewayTest is Test { function setUp() public { AgentExecutor executor = new AgentExecutor(); - gatewayLogic = new GatewayMock( - address(0), - address(executor), - bridgeHubParaID, - bridgeHubAgentID, - foreignTokenDecimals - ); + gatewayLogic = + new GatewayMock(address(0), address(executor), bridgeHubParaID, bridgeHubAgentID, foreignTokenDecimals); Gateway.Config memory config = Gateway.Config({ mode: OperatingMode.Normal, deliveryCost: outboundFee, @@ -110,10 +105,7 @@ contract GatewayTest is Test { assetHubReserveTransferFee: sendTokenFee, exchangeRate: exchangeRate }); - gateway = new GatewayProxy( - address(gatewayLogic), - abi.encode(config) - ); + gateway = new GatewayProxy(address(gatewayLogic), abi.encode(config)); GatewayMock(address(gateway)).setCommitmentsAreVerified(true); SetOperatingModeParams memory params = SetOperatingModeParams({mode: OperatingMode.Normal}); @@ -176,7 +168,6 @@ contract GatewayTest is Test { /** * Message Verification */ - function testSubmitHappyPath() public { deal(assetHubAgent, 50 ether); @@ -344,7 +335,6 @@ contract GatewayTest is Test { /** * Handlers */ - function testAgentExecution() public { token.transfer(address(assetHubAgent), 200); @@ -562,7 +552,6 @@ contract GatewayTest is Test { /** * Assets */ - function testRegisterToken() public { vm.expectEmit(false, false, false, true); emit IGateway.TokenRegistrationSent(address(token)); @@ -679,7 +668,6 @@ contract GatewayTest is Test { /** * Operating Modes */ - function testDisableOutboundMessaging() public { // Let gateway lock up to 1 tokens token.approve(address(gateway), 1); diff --git a/contracts/test/mocks/GatewayUpgradeMock.sol b/contracts/test/mocks/GatewayUpgradeMock.sol index 63ee51ecb7..130ba07841 100644 --- a/contracts/test/mocks/GatewayUpgradeMock.sol +++ b/contracts/test/mocks/GatewayUpgradeMock.sol @@ -12,7 +12,6 @@ contract GatewayUpgradeMock is IGateway, IInitializable { /** * Getters */ - function operatingMode() external pure returns (OperatingMode) { return OperatingMode.Normal; }