Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add storage gap to upgradeable contracts #45

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/child/ChildAxelarBridgeAdaptor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import {IChildERC20BridgeAdaptor} from "../interfaces/child/IChildERC20BridgeAda
import {AdaptorRoles} from "../common/AdaptorRoles.sol";

contract ChildAxelarBridgeAdaptor is
AdaptorRoles,
AxelarExecutable,
IChildERC20BridgeAdaptor,
IChildAxelarBridgeAdaptorErrors,
IChildAxelarBridgeAdaptorEvents,
IChildAxelarBridgeAdaptor,
AdaptorRoles
IChildAxelarBridgeAdaptor
{
/// @notice Address of bridge to relay messages to.
IChildERC20Bridge public childBridge;
Expand Down Expand Up @@ -131,4 +131,7 @@ contract ChildAxelarBridgeAdaptor is
emit AdaptorExecute(sourceChain_, sourceAddress_, payload_);
childBridge.onMessageReceive(sourceChain_, sourceAddress_, payload_);
}

// slither-disable-next-line unused-state,naming-convention
uint256[50] private __gapChildAxelarBridgeAdaptor;
}
5 changes: 4 additions & 1 deletion src/child/ChildERC20Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {BridgeRoles} from "../common/BridgeRoles.sol";
* @dev Because of this pattern, any checks or logic that is agnostic to the messaging protocol should be done in ChildERC20Bridge.
* @dev Any checks or logic that is specific to the underlying messaging protocol should be done in the bridge adaptor.
*/
contract ChildERC20Bridge is IChildERC20BridgeErrors, IChildERC20Bridge, IChildERC20BridgeEvents, BridgeRoles {
contract ChildERC20Bridge is BridgeRoles, IChildERC20BridgeErrors, IChildERC20Bridge, IChildERC20BridgeEvents {
/// @dev leave this as the first param for the integration tests
mapping(address => address) public rootTokenToChildToken;

Expand Down Expand Up @@ -429,4 +429,7 @@ contract ChildERC20Bridge is IChildERC20BridgeErrors, IChildERC20Bridge, IChildE
emit IMXDeposit(rootToken, sender, receiver, amount);
}
}

// slither-disable-next-line unused-state,naming-convention
uint256[50] private __gapChildERC20Bridge;
}
7 changes: 5 additions & 2 deletions src/root/RootAxelarBridgeAdaptor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import {AdaptorRoles} from "../common/AdaptorRoles.sol";
* @notice RootAxelarBridgeAdaptor is a bridge adaptor that allows the RootERC20Bridge to communicate with the Axelar Gateway.
*/
contract RootAxelarBridgeAdaptor is
AdaptorRoles,
AxelarExecutable,
IRootERC20BridgeAdaptor,
IRootAxelarBridgeAdaptorEvents,
IRootAxelarBridgeAdaptorErrors,
IRootAxelarBridgeAdaptor,
AdaptorRoles
IRootAxelarBridgeAdaptor
{
IRootERC20Bridge public rootBridge;
string public childChain;
Expand Down Expand Up @@ -137,4 +137,7 @@ contract RootAxelarBridgeAdaptor is
emit AdaptorExecute(sourceChain_, sourceAddress_, payload_);
rootBridge.onMessageReceive(sourceChain_, sourceAddress_, payload_);
}

// slither-disable-next-line unused-state,naming-convention
uint256[50] private __gapRootAxelarBridgeAdaptor;
}
5 changes: 4 additions & 1 deletion src/root/RootERC20Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {BridgeRoles} from "../common/BridgeRoles.sol";
* @dev Any checks or logic that is specific to the underlying messaging protocol should be done in the bridge adaptor.
* @dev Note that there is undefined behaviour for bridging non-standard ERC20 tokens (e.g. rebasing tokens). Please approach such cases with great care.
*/
contract RootERC20Bridge is IRootERC20Bridge, IRootERC20BridgeEvents, IRootERC20BridgeErrors, BridgeRoles {
contract RootERC20Bridge is BridgeRoles, IRootERC20Bridge, IRootERC20BridgeEvents, IRootERC20BridgeErrors {
using SafeERC20 for IERC20Metadata;

/// @dev leave this as the first param for the integration tests
Expand Down Expand Up @@ -488,4 +488,7 @@ contract RootERC20Bridge is IRootERC20Bridge, IRootERC20BridgeEvents, IRootERC20
}
// slither-disable-next-line reentrancy-events
}

// slither-disable-next-line unused-state,naming-convention
uint256[50] private __gapRootERC20Bridge;
}
2 changes: 1 addition & 1 deletion src/root/flowrate/FlowRateDetection.sol
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,5 @@ abstract contract FlowRateDetection {
}

// slither-disable-next-line unused-state,naming-convention
uint256[50] private __gapFlowRateDetecton;
uint256[50] private __gapFlowRateDetection;
}
2 changes: 1 addition & 1 deletion src/root/flowrate/RootERC20BridgeFlowRate.sol
Original file line number Diff line number Diff line change
Expand Up @@ -255,5 +255,5 @@ contract RootERC20BridgeFlowRate is
}

// slither-disable-next-line unused-state,naming-convention
uint256[50] private __gapRootERC20PredicateFlowRate;
uint256[50] private __gapRootERC20BridgeFlowRate;
}
Loading