forge fmt

This commit is contained in:
Luke Parker
2024-09-16 21:34:59 -04:00
parent 4bcea31c2a
commit ae61f3d359
6 changed files with 47 additions and 39 deletions

View File

@@ -38,6 +38,7 @@ contract Deployer {
uint64 block_number;
address created_contract;
}
mapping(bytes32 => Deployment) public deployments;
error Reentrancy();
@@ -51,11 +52,15 @@ contract Deployer {
bool called;
// This contract doesn't have any other use of transient storage, nor is to be inherited, making
// this usage of the zero address safe
assembly { called := tload(0) }
assembly {
called := tload(0)
}
if (called) {
revert Reentrancy();
}
assembly { tstore(0, 1) }
assembly {
tstore(0, 1)
}
// Check this wasn't prior deployed
bytes32 init_code_hash = keccak256(init_code);