Skip to content
This repository was archived by the owner on Mar 2, 2023. It is now read-only.

create3 deployer#196

Open
OxMarco wants to merge 1 commit into
masterfrom
deployer
Open

create3 deployer#196
OxMarco wants to merge 1 commit into
masterfrom
deployer

Conversation

@OxMarco

@OxMarco OxMarco commented Oct 10, 2022

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread contracts/Deployer.sol
contract StakerDeployer is Deployer {
address public staker;

function deploy(address token) external onlyOwner {

Check notice

Code scanning / Slither

Missing zero address validation

StakerDeployer.deploy(address).token (contracts/Deployer.sol#33) lacks a zero-check on : - staker = CREATE3.deploy(salt,abi.encodePacked(type()(Staker).creationCode,abi.encode(token)),0) (contracts/Deployer.sol#34)
Comment thread contracts/Deployer.sol
contract LiquidatorDeployer is Deployer {
address public liquidator;

function deploy(address staker) external onlyOwner {

Check notice

Code scanning / Slither

Missing zero address validation

LiquidatorDeployer.deploy(address).staker (contracts/Deployer.sol#41) lacks a zero-check on : - liquidator = CREATE3.deploy(salt,abi.encodePacked(type()(Liquidator).creationCode,abi.encode(staker)),0) (contracts/Deployer.sol#42)
Comment thread contracts/Deployer.sol
contract VaultDeployer is Deployer {
address public vault;

function deploy(address weth) external onlyOwner {

Check notice

Code scanning / Slither

Missing zero address validation

VaultDeployer.deploy(address).weth (contracts/Deployer.sol#25) lacks a zero-check on : - vault = CREATE3.deploy(salt,abi.encodePacked(type()(Vault).creationCode,abi.encode(weth)),0) (contracts/Deployer.sol#26)
Comment thread contracts/Deployer.sol
@@ -0,0 +1,44 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.8.12;

Check warning

Code scanning / Slither

Incorrect versions of Solidity

Pragma version>=0.8.12 (contracts/Deployer.sol#2) allows old versions
Comment thread contracts/Deployer.sol
/// @notice Used to deploy Ithil smart contracts to deterministic addresses
/// on multiple chains irrespective of contracts' bytecode
contract Deployer is Ownable {
bytes32 internal constant salt = keccak256(bytes("ithil"));

Check warning

Code scanning / Slither

Conformance to Solidity naming conventions

Constant Deployer.salt (contracts/Deployer.sol#15) is not in UPPER_CASE_WITH_UNDERSCORES
Comment thread contracts/Deployer.sol
Comment on lines +33 to +35
function deploy(address token) external onlyOwner {
staker = CREATE3.deploy(salt, abi.encodePacked(type(Staker).creationCode, abi.encode(token)), 0);
}

Check warning

Code scanning / Slither

Too many digits

StakerDeployer.deploy(address) (contracts/Deployer.sol#33-35) uses literals with too many digits: - staker = CREATE3.deploy(salt,abi.encodePacked(type()(Staker).creationCode,abi.encode(token)),0) (contracts/Deployer.sol#34)
Comment thread contracts/Deployer.sol
Comment on lines +41 to +43
function deploy(address staker) external onlyOwner {
liquidator = CREATE3.deploy(salt, abi.encodePacked(type(Liquidator).creationCode, abi.encode(staker)), 0);
}

Check warning

Code scanning / Slither

Too many digits

LiquidatorDeployer.deploy(address) (contracts/Deployer.sol#41-43) uses literals with too many digits: - liquidator = CREATE3.deploy(salt,abi.encodePacked(type()(Liquidator).creationCode,abi.encode(staker)),0) (contracts/Deployer.sol#42)
Comment thread contracts/Deployer.sol
Comment on lines +25 to +27
function deploy(address weth) external onlyOwner {
vault = CREATE3.deploy(salt, abi.encodePacked(type(Vault).creationCode, abi.encode(weth)), 0);
}

Check warning

Code scanning / Slither

Too many digits

VaultDeployer.deploy(address) (contracts/Deployer.sol#25-27) uses literals with too many digits: - vault = CREATE3.deploy(salt,abi.encodePacked(type()(Vault).creationCode,abi.encode(weth)),0) (contracts/Deployer.sol#26)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants