#update #parameters #numeric #gradually #module #value #storage

no-std orml-gradually-update

Provides way to adjust numeric parameter gradually over a period of time

14 releases (7 breaking)

new 0.8.0 Mar 18, 2024
0.6.7 Nov 21, 2023
0.4.0 Feb 14, 2021
0.3.2 Oct 22, 2020
0.1.1 Jun 5, 2020

#167 in #parameters

Download history 1/week @ 2023-11-20 6/week @ 2024-01-29 6/week @ 2024-02-19 61/week @ 2024-02-26

67 downloads per month

Apache-2.0

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

~17–36MB
~586K SLoC