Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/refactor #44

Merged
merged 5 commits into from
Jul 10, 2024
Merged

Feature/refactor #44

merged 5 commits into from
Jul 10, 2024

Conversation

SergeyPoslavskiy
Copy link
Contributor

No description provided.

Comment on lines 38 to 51
function deploy(uint256 id) external returns (address newPoolAddress) {
if (requests.length <= id) revert InvalidId();
Request memory req = requests[id];
if (req.requestStatus != Status.APPROVED) revert InvalidRequestStatus();
if (msg.sender != req.data.deployer) revert InvalidCaller();
newPoolAddress = IBaseFactory(req.data.factory).deploy(
req.data.deployer,
req.data.stakingData
);
stakingPools.push(newPoolAddress);
requests[id].requestStatus = Status.DEPLOYED;
poolById[id] = newPoolAddress;
emit RequestFullfilled(id, newPoolAddress);
}

Check notice

Code scanning / Slither

Reentrancy vulnerabilities Low

Comment on lines +31 to +35
function removeFactory(address factory) onlyOwner external {
if (whitelistFactory[factory] != true) revert UnregisteredFactory();
whitelistFactory[factory] = false;
emit FactoryUnregistered(factory);
}

Check warning

Code scanning / Slither

Boolean equality Warning

Comment on lines +53 to +65
function requestDeployment(RequestPayload calldata data) external {
if (data.deployer == address(0) || data.factory == address(0))
revert InvalidAddress();
if (data.ipfsHash == bytes32(0)) revert InvalidIpfsHash();
if (data.stakingData.length == 0) revert InvalidPayload();
if (whitelistFactory[data.factory] != true)
revert UnregisteredFactory();
requests.push(Request({requestStatus: Status.CREATED, data: data}));
emit RequestSubmitted(
requests.length - 1,
data
);
}

Check warning

Code scanning / Slither

Boolean equality Warning

@@ -15,107 +15,52 @@
/// @author Ayooluwa Akindeko, Soramitsu team
contract ERC721PenaltyFeeStakingFactory is Ownable, IPenaltyFeeFactory {
using SafeERC20 for IERC20;

address public requestManager;

Check warning

Code scanning / Slither

State variables that could be declared immutable Warning

@@ -15,107 +15,52 @@
/// @author Ayooluwa Akindeko, Soramitsu team
contract ERC20PenaltyFeeStakingFactory is Ownable, IPenaltyFeeFactory {
using SafeERC20 for IERC20;

address public requestManager;

Check warning

Code scanning / Slither

State variables that could be declared immutable Warning

@@ -16,112 +16,52 @@
contract ERC721LockUpStakingFactory is Ownable, ILockUpFactory {
using SafeERC20 for IERC20;

address public requestManager;

Check warning

Code scanning / Slither

State variables that could be declared immutable Warning

contract ERC20LockUpStakingFactory is Ownable, ILockUpFactory {
using SafeERC20 for IERC20;

address public requestManager;

Check warning

Code scanning / Slither

State variables that could be declared immutable Warning

@codecov-commenter
Copy link

codecov-commenter commented Jul 10, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 19 lines in your changes missing coverage. Please review.

Project coverage is 86.55%. Comparing base (1e33dc8) to head (ada8318).

Files Patch % Lines
contracts/RequestManager.sol 62.74% 19 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #44      +/-   ##
===========================================
- Coverage    90.59%   86.55%   -4.04%     
===========================================
  Files           10       11       +1     
  Lines          606      543      -63     
  Branches       156      113      -43     
===========================================
- Hits           549      470      -79     
- Misses          56       72      +16     
  Partials         1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SergeyPoslavskiy SergeyPoslavskiy merged commit 3a25f21 into develop Jul 10, 2024
5 checks passed
SergeyPoslavskiy added a commit that referenced this pull request Jul 10, 2024
Merge pull request #44 from soramitsu/feature/refactor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants