19 releases (1 stable)
1.0.0 | Aug 1, 2024 |
---|---|
0.13.0 | Jun 26, 2024 |
0.12.0 | Jun 3, 2024 |
0.8.0 | Mar 18, 2024 |
0.1.1 | Jun 5, 2020 |
#13 in #cancel
31KB
697 lines
Gradually-update module
Overview
Gradually-update module provides a way to adjust numeric parameter such as stability fee or liquidation gradually. The update code should be able to handle different numeric types such as u32
, u128
, Permill
, FixedU128
. All the values are assumed to be little-endian and unsigned.
lib.rs
:
Gradually Update
A module for scheduling gradually updates to storage values.
Overview
This module exposes capabilities for scheduling updates to storage values gradually. This is useful to change parameter values gradually to ensure a smooth transition. It is also possible to cancel an update before it reaches to target value.
NOTE: Only unsigned integer value up to 128 bits are supported. But a
"newtype" pattern struct that wraps an unsigned integer works too such as
Permill
and FixedU128
.
Dependencies
~20–35MB
~579K SLoC