-
Notifications
You must be signed in to change notification settings - Fork 0
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
New timegraph tokenomics #1161
New timegraph tokenomics #1161
Conversation
Co-authored-by: TaniaSaleem <[email protected]> Co-authored-by: Tania Saleem <[email protected]> Co-authored-by: Florian Franzen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think this is fine. @4meta5 any objections?
pallets/timegraph/src/lib.rs
Outdated
/// Default value from runtime configuration | ||
#[pallet::type_value] | ||
pub fn DefaultTimegraphAccount<T: Config>() -> T::AccountId { | ||
T::InitialTimegraphAccount::get() | ||
} | ||
|
||
/// Default value from runtime configuration | ||
#[pallet::type_value] | ||
pub fn DefaultRewardPoolAccount<T: Config>() -> T::AccountId { | ||
T::InitialRewardPoolAccount::get() | ||
} | ||
|
||
/// Default value from runtime configuration | ||
#[pallet::type_value] | ||
pub fn DefaultThreshold<T: Config>() -> BalanceOf<T> { | ||
T::InitialThreshold::get() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand the need for these additional types. You can just use constants directly as the default value parameter in the storage map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make the tokenomics of timegraph works, we need all these values are set, not empty. For default value, we will set it as different values in different env like testnet/devnet/mainnet.
pallets/timegraph/src/lib.rs
Outdated
#[pallet::storage] | ||
#[pallet::getter(fn timegraph_account)] | ||
pub type TimegraphAccount<T: Config> = | ||
StorageValue<_, T::AccountId, ValueQuery, DefaultTimegraphAccount<T>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StorageValue<_, T::AccountId, ValueQuery, DefaultTimegraphAccount<T>>; | |
StorageValue<_, T::AccountId, ValueQuery, T::InitialTimegraphAccount>; |
like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will try it.
@foreseon any comments. |
Description
The PR implements the new timegraph tokenomics feature. based on the proposal of security. It will fix #1193