From b79fd37ea4b156b65c0eb8a1e09917f3fd4f80c4 Mon Sep 17 00:00:00 2001 From: Andrei Vlad Birgaoanu Date: Tue, 4 Feb 2025 19:17:24 +0200 Subject: [PATCH] feat: declare the salt in the BaseScript --- script/Base.s.sol | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/script/Base.s.sol b/script/Base.s.sol index a61ab0e..2f44704 100644 --- a/script/Base.s.sol +++ b/script/Base.s.sol @@ -12,6 +12,9 @@ abstract contract BaseScript is Script { /// @dev The address of the default Sablier admin. address internal constant DEFAULT_SABLIER_ADMIN = 0xb1bEF51ebCA01EB12001a639bDBbFF6eEcA12B9F; + /// @dev The salt used for deterministic deployments. + bytes32 internal immutable SALT; + /// @dev Included to enable compilation of the script without a $MNEMONIC environment variable. string internal constant TEST_MNEMONIC = "test test test test test test test test test test test junk"; @@ -40,6 +43,9 @@ abstract contract BaseScript is Script { (broadcaster,) = deriveRememberKey({ mnemonic: mnemonic, index: 0 }); } + // Construct the salt for deterministic deployments. + SALT = constructCreate2Salt(); + // Populate the admin map. populateAdminMap();