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

Post audit/issue 4 reuse oz #1

Merged
merged 5 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/.git_commit_template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Applying this commit will #Add your title here

# ## Help ##
#
# Subject line imperative uppercase verbs:
#
# Add = Create a capability e.g. feature, test, dependency.
# Drop = Delete a capability e.g. feature, test, dependency.
# Fix = Fix an issue e.g. bug, typo, accident, misstatement.
# Bump = Increase the version of something e.g. a dependency.
# Make = Change the build process, or tools, or infrastructure.
# Start = Begin doing something; e.g. enable a toggle, feature flag, etc.
# Stop = End doing something; e.g. disable a toggle, feature flag, etc.
# Optimize = A change that MUST be just about performance, e.g. speed up code.
# Document = A change that MUST be only in the documentation, e.g. help files.
# Refactor = A change that MUST be just refactoring.
# Reformat = A change that MUST be just format, e.g. indent line, trim space, etc.
# Rephrase = A change that MUST be just textual, e.g. edit a comment, doc, etc.
#
# For the subject line:
# * Use 50 characters maximum.
# * Do not use a sentence-ending period.
#
# For the body text:
# * Use as many lines as you like.
# * Use 72 characters maximum per line for typical word wrap text.
#
#
# ## Write your list of changes after this line ##
25 changes: 25 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- You can erase any parts of this template not applicable to your Pull Request. -->

## Description of Changes

<!-- Enter description of changes here. -->

[Link to Jira Ticket](https://halodao.atlassian.net/browse/HDF-)

## How To Test

### Developer Checklist:

- [x] I have followed the guidelines in our Contributing document
- [x] This PR has a corresponding JIRA ticket
- [x] My branch conforms with our naming convention i.e. `feature/HDF-XXX-description`
- [x] I have written new tests for your core changes, as applicable
- [x] I have successfully ran tests locally
- [x] I have formatted my code using format document in VSCode

### Reviewers Checklist:

- [ ] Code is readable and understandable; any unclear parts have explanations
- [ ] UI/UX changes match the corresponding figma/other design resources, if applicable
- [ ] I have successfully ran tests locally

2 changes: 1 addition & 1 deletion contracts/incentives/RnbwDistributionManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;

import {SafeMath} from './lib/SafeMath.sol';
import {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';
import {DistributionTypes} from './lib/DistributionTypes.sol';
import {IRnbwDistributionManager} from './interfaces/IRnbwDistributionManager.sol';

Expand Down
10 changes: 3 additions & 7 deletions contracts/incentives/RnbwIncentivesController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;

import {DistributionTypes} from './lib/DistributionTypes.sol';
import {SafeMath} from './lib/SafeMath.sol';

import {IERC20} from './interfaces/IERC20.sol';
import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';
import {IAToken} from './interfaces/IAToken.sol';
import {IRnbwIncentivesController} from './interfaces/IRnbwIncentivesController.sol';
import {IStakedAave} from './interfaces/IStakedAave.sol';
Expand Down Expand Up @@ -70,11 +70,7 @@ contract RnbwIncentivesController is
uint256 totalSupply
) external override {
uint256 accruedRewards = _updateUserAssetInternal(user, msg.sender, userBalance, totalSupply);
/* console.log("user: ", user);
console.log("msg.sender: ", msg.sender);
console.log("userBalance: ", userBalance);
console.log("totalSupply: ", totalSupply);
console.log("accruedRewards: ", accruedRewards); */

if (accruedRewards != 0) {
_usersUnclaimedRewards[user] = _usersUnclaimedRewards[user].add(accruedRewards);
emit RewardsAccrued(user, accruedRewards);
Expand Down
25 changes: 0 additions & 25 deletions contracts/incentives/lib/Context.sol

This file was deleted.

224 changes: 0 additions & 224 deletions contracts/incentives/lib/ERC20.sol

This file was deleted.

26 changes: 0 additions & 26 deletions contracts/incentives/lib/MintableErc20.sol

This file was deleted.

Loading