sablier-labs/v2-periphery

Use CREATE instead of CREATE2 when deploying the MerkleLockup contract

andreivladbrg opened this issue · 0 comments

After the latest audit, some issues were found if the contract is pre-funded before deployment, e.g.: https://github.com/cantinasec/review-sablier-3/issues/1. Therefore, having deterministic contracts is problematic, and we should switch to using CREATE.

It will require to remove this:

// Hash the parameters to generate a salt.
bytes32 salt = keccak256(
abi.encodePacked(
initialAdmin,
lockupLinear,
asset,
merkleRoot,
expiration,
abi.encode(streamDurations),
cancelable,
transferable
)
);
// Deploy the Merkle streamer with CREATE2.
merkleStreamerLL = new SablierV2MerkleStreamerLL{ salt: salt }(