Skip to content

Commit

Permalink
Merged from main
Browse files Browse the repository at this point in the history
  • Loading branch information
drinkcoffee committed Oct 24, 2024
2 parents 8319a53 + 249a3be commit 8e56f91
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
1 change: 0 additions & 1 deletion contracts/access/MintingAccessControl.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache 2.0
pragma solidity 0.8.19;

// solhint-disable no-unused-import
import {AccessControlEnumerable} from "@openzeppelin/contracts/access/AccessControlEnumerable.sol";

abstract contract MintingAccessControl is AccessControlEnumerable {
Expand Down
2 changes: 2 additions & 0 deletions contracts/deployer/create2/OwnableCreate2Deployer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ contract OwnableCreate2Deployer is Ownable, Create2, Deployer {
* @param deploySalt A salt which is a hash of the salt provided by the sender and the sender's address.
* @return The address of the deployed contract
*/
// Slither 0.10.4 is mistakenly seeing this as dead code. It is called from Deployer.deploy
// slither-disable-next-line dead-code
function _deploy(bytes memory bytecode, bytes32 deploySalt) internal override onlyOwner returns (address) {
return _create2(bytecode, deploySalt);
}
Expand Down
5 changes: 4 additions & 1 deletion contracts/deployer/create3/OwnableCreate3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ contract OwnableCreate3 is OwnableCreate3Address, IDeploy {
* @param deploySalt A salt to influence the contract address
* @return deployed The address of the deployed contract
*/
function _create3(bytes memory bytecode, bytes32 deploySalt) internal returns (address deployed) {
// Slither 0.10.4 is mistakenly seeing this as dead code. It is called
// from OwnableCreate3Deployer.deploy and could be called from other contracts.
// slither-disable-next-line dead-code
function _create3(bytes memory bytecode, bytes32 deploySalt) internal returns (address deployed) {
deployed = _create3Address(deploySalt);

if (bytecode.length == 0) revert EmptyBytecode();
Expand Down
3 changes: 3 additions & 0 deletions contracts/deployer/create3/OwnableCreate3Address.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ abstract contract OwnableCreate3Address {
bytes32 internal immutable createDeployBytecodeHash;

constructor() {
// Slither is mistakenly seeing the expansion of type(OwnableCreateDeploy).creationCode
// as a very large number.
// slither-disable-next-line too-many-digits
createDeployBytecodeHash = keccak256(type(OwnableCreateDeploy).creationCode);
}

Expand Down
2 changes: 2 additions & 0 deletions contracts/deployer/create3/OwnableCreate3Deployer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ contract OwnableCreate3Deployer is Ownable, OwnableCreate3, Deployer {
* @param deploySalt A salt which is a hash of the salt provided by the sender and the sender's address.
* @return The address of the deployed contract
*/
// Slither 0.10.4 is mistakenly seeing this as dead code. It is called from Deployer.deploy
// slither-disable-next-line dead-code
function _deploy(bytes memory bytecode, bytes32 deploySalt) internal override onlyOwner returns (address) {
return _create3(bytecode, deploySalt);
}
Expand Down

0 comments on commit 8e56f91

Please sign in to comment.