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

Added daily limit for reserve spending #2303

Merged
merged 7 commits into from
Dec 27, 2019

Conversation

mrsmkl
Copy link
Contributor

@mrsmkl mrsmkl commented Dec 19, 2019

Description

Just added a literal daily limit. It's calculated with the first spending of the day using the new ratio parameter.

Tested

Added unit tests.

Other changes

Added balanceOf to MockGoldToken

Related issues

Backwards compatibility

Copy link
Contributor

@asaj asaj left a comment

Choose a reason for hiding this comment

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

This looks great

packages/protocol/contracts/stability/Reserve.sol Outdated Show resolved Hide resolved
packages/protocol/contracts/stability/Reserve.sol Outdated Show resolved Hide resolved
packages/protocol/test/stability/reserve.ts Show resolved Hide resolved
packages/protocol/test/stability/reserve.ts Show resolved Hide resolved
packages/protocol/test/stability/reserve.ts Outdated Show resolved Hide resolved
@asaj asaj assigned mrsmkl and unassigned asaj Dec 20, 2019
@codecov
Copy link

codecov bot commented Dec 27, 2019

Codecov Report

Merging #2303 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #2303    +/-   ##
========================================
  Coverage   74.55%   74.55%            
========================================
  Files         278      278            
  Lines        7777     7777            
  Branches      991      707   -284     
========================================
  Hits         5798     5798            
  Misses       1868     1868            
  Partials      111      111
Flag Coverage Δ
#mobile 74.55% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d1a40c...717aea8. Read the comment docs.

Copy link
Contributor

@mcortesi mcortesi left a comment

Choose a reason for hiding this comment

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

Left a comment.. but approved! Thanks

packages/protocol/contracts/stability/Reserve.sol Outdated Show resolved Hide resolved
@mcortesi mcortesi added the automerge Have PR merge automatically when checks pass label Dec 27, 2019
@celo-ci-bot-user celo-ci-bot-user merged commit ce8d150 into celo-org:master Dec 27, 2019
aaronmgdr added a commit that referenced this pull request Jan 2, 2020
* master: (26 commits)
  Added new lint rule (#2349)
  [Slashing] Slash locked gold (#2317)
  [Slashing] Allow voting gold to be slashable (#2302)
  1666 precompiles assembly rewrite (#2324)
  Small fixes to deploy web (#2343)
  Governance, downtime and double signing slasher contracts (#2267)
  Added daily limit for reserve spending (#2303)
  Fixing multisig tests (#2342)
  [Wallet] Implement new send & import flow (#2332)
  Limechain/16xx (#1982)
  Add infinite pagination to Leaderboard (#2339)
  cli: Add rewards:show (#2160)
  Correct broken link formatting
  Celotool command for deploying hotfixes (#2142)
  Governance ContractKit + CLI changes (#2139)
  Complete codependent slashing precompile PRs (#2333)
  Add new and modified precompiles to UsingPrecompiles.sol (#2318)
  Adding error messages to contracts (#1182)
  Upgrade i18next and react-i18next to latest across monorepo (#2311)
  [Wallet] Fix exchange input on iOS and feed item display (#2319)
  ...

# Conflicts:
#	yarn.lock
aaronmgdr added a commit that referenced this pull request Jan 2, 2020
* master: (35 commits)
  Remove rep sentence from brand kit page (#2350)
  Added new lint rule (#2349)
  [Slashing] Slash locked gold (#2317)
  [Slashing] Allow voting gold to be slashable (#2302)
  1666 precompiles assembly rewrite (#2324)
  Small fixes to deploy web (#2343)
  Governance, downtime and double signing slasher contracts (#2267)
  Added daily limit for reserve spending (#2303)
  Fixing multisig tests (#2342)
  [Wallet] Implement new send & import flow (#2332)
  Limechain/16xx (#1982)
  Add infinite pagination to Leaderboard (#2339)
  cli: Add rewards:show (#2160)
  Correct broken link formatting
  Celotool command for deploying hotfixes (#2142)
  Governance ContractKit + CLI changes (#2139)
  Complete codependent slashing precompile PRs (#2333)
  Add new and modified precompiles to UsingPrecompiles.sol (#2318)
  Adding error messages to contracts (#1182)
  Upgrade i18next and react-i18next to latest across monorepo (#2311)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit automerge Have PR merge automatically when checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Limit reserve spender withdrawal amounts
5 participants