Skip to content

GenericSchemeMultiCall : Simplification. + Schemeconstraint #795

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

Merged
merged 18 commits into from
Oct 14, 2020

Conversation

orenyodfat
Copy link
Contributor

No description provided.

@orenyodfat orenyodfat changed the title Schemeconstraint GenericSchemeMultiCall : Simplification. + Schemeconstraint Oct 8, 2020
@orenyodfat orenyodfat marked this pull request as ready for review October 12, 2020 18:11
@orenyodfat orenyodfat requested a review from leviadam as a code owner October 12, 2020 18:11
uint256 public periodSize;
uint256 public periodLimitWei;

mapping(uint256=>uint256) public periodSpendingTokens;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused mapping can be removed

function isAllowedToPropose(
address[] calldata _contractsToCall,
bytes[] calldata _callsData,
uint256[] calldata,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uint256[] calldata > uint256[] calldata _values?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, because the interface defined that function and there is no use for values at this function

return true;
}

function observationIndex() public view returns (uint256) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orenyodfat this could become vulnerable to overflows if the period is set to a super low level, I would propose to add a require in the initialize() to set the period to a min limit as of 7days.

@orenyodfat orenyodfat merged commit 19682c2 into master Oct 14, 2020
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.

3 participants