Update declaration of memory safe assembly blocks (#5172)
This commit is contained in:
@ -37,8 +37,7 @@ library Clones {
|
||||
if (address(this).balance < value) {
|
||||
revert Errors.InsufficientBalance(address(this).balance, value);
|
||||
}
|
||||
/// @solidity memory-safe-assembly
|
||||
assembly {
|
||||
assembly ("memory-safe") {
|
||||
// Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
|
||||
// of the `implementation` address with the bytecode before the address.
|
||||
mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
|
||||
@ -77,8 +76,7 @@ library Clones {
|
||||
if (address(this).balance < value) {
|
||||
revert Errors.InsufficientBalance(address(this).balance, value);
|
||||
}
|
||||
/// @solidity memory-safe-assembly
|
||||
assembly {
|
||||
assembly ("memory-safe") {
|
||||
// Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
|
||||
// of the `implementation` address with the bytecode before the address.
|
||||
mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
|
||||
@ -99,8 +97,7 @@ library Clones {
|
||||
bytes32 salt,
|
||||
address deployer
|
||||
) internal pure returns (address predicted) {
|
||||
/// @solidity memory-safe-assembly
|
||||
assembly {
|
||||
assembly ("memory-safe") {
|
||||
let ptr := mload(0x40)
|
||||
mstore(add(ptr, 0x38), deployer)
|
||||
mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)
|
||||
|
||||
Reference in New Issue
Block a user