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

create3 deployer #196

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

create3 deployer #196

wants to merge 1 commit into from

Conversation

OxMarco
Copy link
Contributor

@OxMarco OxMarco commented Oct 10, 2022

No description provided.

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)
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)
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)
@@ -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
/// @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 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 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 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.

1 participant