Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add slither exclusion
  • Loading branch information
drinkcoffee committed Apr 22, 2024
commit db1a895aa4558fa965ddb540701de30567fe5993
7 changes: 4 additions & 3 deletions contracts/deployer/create/OwnableCreateDeploy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ pragma solidity 0.8.19;
* see: https://github.com/axelarnetwork/axelar-gmp-sdk-solidity/blob/5f15a1036215f8b9c8eeb6438d352172b430dd38/contracts/deploy/CreateDeploy.sol
*/
contract OwnableCreateDeploy {
address private owner;
// Address that is authorised to call the deploy function.
address private immutable owner;

constructor() {
owner = msg.sender;
Expand All @@ -21,11 +22,11 @@ contract OwnableCreateDeploy {
* @param bytecode The bytecode of the contract to be deployed
*/
// slither-disable-next-line locked-ether

function deploy(bytes memory bytecode) external payable {
// solhint-disable-next-line custom-errors
require(msg.sender == owner, "CreateDeploy: caller is not the owner");
assembly {
if iszero(create(0, add(bytecode, 32), mload(bytecode))) { revert(0, 0) }
if iszero(create(callvalue(), add(bytecode, 32), mload(bytecode))) { revert(0, 0) }
}
}
}