Commit Graph

4 Commits

Author SHA1 Message Date
Derrick Lee
cf009647e6
Use different accumulator for earn (#1395)
* Add accumulators

* Move accumulator back to keeper package

* Add earn specific accumulators

* Move store methods to sub-package

* Move earn accumulator

* Rename accumulator files

* Add store doc comment

* Add earn accumulator tests, panic if accumulator not used with earn claim type

* Update earn accumulator tests to use new methods

* Add staking test for earn accumulator

* Add test for accumulator proportional rewards

* Remove old copy of GetProportionalRewardsPerSecond

* Add test for basic accumulator

* Fix AddIncentiveMultiRewardPeriod replacement

* Deduplicate base earn reward accumulator

* Check errors in tests

* Validate RewardPeriods in Params.Validate()

* Use adapter to fetch earn total shares
2022-11-29 14:23:33 -08:00
Derrick Lee
4a3002b09c
Add incentive RewardIndexes types and state methods (#1381)
* Add TypedRewardIndexes type

* Add RewardIndexes to genesis

* Update iteration method names, GetKeyFromSourceID method
2022-11-04 17:08:51 -07:00
Derrick Lee
df1c2ffc34
Add AccrualTime type and state methods (#1379)
* Add methods for reward accrual time

* Add accrual time methods

* Add claim type to IterateAllRewardAccrualTimes callback method

* Use new AccrualTime proto type for state methods, add to genesis

* Add GetAllRewardAccrualTimes doc

* Add accrual times to genesis methods

* Remove DecodeKeyPrefix

* Update acrual time iterate method naming

* Update Iterate claims naming

* Use method for sourceID key conversion
2022-11-04 16:21:05 -07:00
Derrick Lee
90735e29ed
Add incentive claim state methods (#1375)
* Add Claim proto types

* Add new claim keys

* Add claim state method tests

* Add claims to genesis

* Re-add GetType for USDX claim

* Add doc comments to key methods

* Add Claim validate test

* Update claimType to BigEndian binary encoding
2022-11-02 08:34:33 -07:00