From df34198d4c230f462673d009646986cf275869fa Mon Sep 17 00:00:00 2001 From: Yorke Rhodes Date: Tue, 28 Nov 2023 11:57:31 -0500 Subject: [PATCH] Make mailbox client upgrade safe (#2984) ### Description Pulls in changes from https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/2904 ### Related issues - Fixes https://github.com/hyperlane-xyz/issues/issues/593 ### Backward compatibility No, existing v3 MailboxClients (Routers) will be storage incompatible ### Testing Unit Tests --------- Co-authored-by: Michalis Kargakis --- .changeset/hip-jobs-smoke.md | 5 +++++ solidity/contracts/client/MailboxClient.sol | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/hip-jobs-smoke.md diff --git a/.changeset/hip-jobs-smoke.md b/.changeset/hip-jobs-smoke.md new file mode 100644 index 0000000000..c424dd8b55 --- /dev/null +++ b/.changeset/hip-jobs-smoke.md @@ -0,0 +1,5 @@ +--- +'@hyperlane-xyz/core': minor +--- + +Includes storage gap in Mailbox Client for forwards compatibility diff --git a/solidity/contracts/client/MailboxClient.sol b/solidity/contracts/client/MailboxClient.sol index ccbcf41189..d4f1d1c78e 100644 --- a/solidity/contracts/client/MailboxClient.sol +++ b/solidity/contracts/client/MailboxClient.sol @@ -22,6 +22,8 @@ abstract contract MailboxClient is OwnableUpgradeable { IInterchainSecurityModule public interchainSecurityModule; + uint256[48] private __GAP; // gap for upgrade safety + // ============ Modifiers ============ modifier onlyContract(address _contract) { require(