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

Commit

Permalink
Remove redundant comments/logs from contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNeshi committed Jul 18, 2023
1 parent e1c087e commit d0a0231
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import {IAccountsDepositWithdrawEndowments} from "../interfaces/IAccountsDeposit
import {Utils} from "../../../lib/utils.sol";
import {IVault} from "../../vault/interfaces/IVault.sol";

import "hardhat/console.sol";

/**
* @title AccountsDepositWithdrawEndowments
* @notice This facet manages the deposits and withdrawals for accounts
Expand Down Expand Up @@ -99,8 +97,6 @@ contract AccountsDepositWithdrawEndowments is
AccountStorage.State storage state = LibAccounts.diamondStorage();
AccountStorage.Endowment storage tempEndowment = state.ENDOWMENTS[details.id];

// is it possible to have tokenAddress == address(0)
require(tokenAddress != address(0), "Invalid ERC20 token");
require(details.lockedPercentage + details.liquidPercentage == 100, "InvalidSplit");

RegistrarStorage.Config memory registrar_config = IRegistrar(state.config.registrarContract)
Expand All @@ -112,7 +108,6 @@ contract AccountsDepositWithdrawEndowments is
);

amount = amount.sub(depositFeeAmount);

require(
IERC20(tokenAddress).transfer(tempEndowment.depositFee.payoutAddress, depositFeeAmount),
"Transfer Failed"
Expand Down Expand Up @@ -292,7 +287,6 @@ contract AccountsDepositWithdrawEndowments is
}

// ensure balance of tokens can cover the requested withdraw amount
// SHOULDN'T IT BE >= ?
require(current_bal > tokens[t].amnt, "InsufficientFunds");

// calculate AP Protocol fee owed on withdrawn token amount
Expand Down
3 changes: 3 additions & 0 deletions contracts/test/DummyWMatic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// author: @misicnenad
pragma solidity ^0.8.0;

/**
* Inspired by the official testnet WMATIC code https://mumbai.polygonscan.com/address/0x9c3c9283d3e44854697cd22d3faa240cfb032889#code
*/
contract DummyWMATIC {
string public name = "Dummy Wrapped Matic";
string public symbol = "DWMATIC";
Expand Down

0 comments on commit d0a0231

Please sign in to comment.