From 2599d3242f4f8b9ce7577f4da6d5bc481b168ef7 Mon Sep 17 00:00:00 2001 From: jossduff Date: Wed, 27 Sep 2023 22:31:57 -0400 Subject: [PATCH] Some comments --- contracts/PermissionedSet.sol | 9 +-------- contracts/PermissionedToken.sol | 2 ++ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/contracts/PermissionedSet.sol b/contracts/PermissionedSet.sol index f4bf542..58db159 100644 --- a/contracts/PermissionedSet.sol +++ b/contracts/PermissionedSet.sol @@ -6,14 +6,7 @@ import {EIP712} from "./lib/EIP712.sol"; error InvalidSignature(); -/** - @custom:benediction DEVS BENEDICAT ET PROTEGAT CONTRACTVS MEAM - @title Permissioned Set - - TODO. - - @custom:date September 27th, 2023. -*/ +// TODO: natspec contract PermissionedSet is EIP712, Ownable { /// A constant hash of the claim operation's signature. // same typehash for wrappping and unwrapping diff --git a/contracts/PermissionedToken.sol b/contracts/PermissionedToken.sol index 0e52595..c8ccc52 100644 --- a/contracts/PermissionedToken.sol +++ b/contracts/PermissionedToken.sol @@ -10,6 +10,7 @@ import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol error NotWhitelisted(); error InvalidInterestRate(); +// TODO: natspec contract PermissionedToken is PermissionedSet, ReentrancyGuard, ERC20 { using SafeERC20 for ERC20; @@ -80,6 +81,7 @@ contract PermissionedToken is PermissionedSet, ReentrancyGuard, ERC20 { // tokenMintAmount = 100 * 0.95 = 95 // TODO: do we lose precision by dividing by 1e18?? What if interest rate is 5.5%? then tokenMintAmount = 100 * 0.945 = 94.5 + // or maybe it's okay because values are stored as wei? uint256 tokenMintAmount = (_usdcAmount * 1e18 * (1e18 - interestRateMantissa)) / 1e18;