Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinonard committed Dec 6, 2023
1 parent 215e2fe commit f20fabc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ pallet-inflation = { path = "./pallets/inflation", default-features = false }
pallet-dynamic-evm-base-fee = { path = "./pallets/dynamic-evm-base-fee", default-features = false }
pallet-unified-accounts = { path = "./pallets/unified-accounts", default-features = false }

dapp-staking-v3-runtime-api = { path = "./pallets/dapp-staking-v3/runtime-api", default-features = false }
dapp-staking-v3-runtime-api = { path = "./pallets/dapp-staking-v3/rpc/runtime-api", default-features = false }

astar-primitives = { path = "./primitives", default-features = false }
astar-test-utils = { path = "./tests/utils", default-features = false }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dapp-staking-v3-runtime-api"
version = "0.0.1-alpha"
description = "Pallet for dApp staking v3 protocol"
description = "dApp Staking v3 runtime API"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ use pallet_dapp_staking_v3::EraNumber;

sp_api::decl_runtime_apis! {

/// DApp Staking Api.
/// dApp Staking Api.
///
/// Used to provide information otherwise not available via RPC.
pub trait DAppStakingApi {
pub trait DappStakingApi {

/// For how many standard era lengths does the voting subperiod last.
fn eras_per_voting_subperiod() -> EraNumber;
/// For how many standard era lengths does the voting subperiod last.
fn eras_per_voting_subperiod() -> EraNumber;

/// How many standard eras are there in the build&earn subperiod.
fn eras_per_build_and_earn_subperiod() -> EraNumber;
/// How many standard eras are there in the build&earn subperiod.
fn eras_per_build_and_earn_subperiod() -> EraNumber;

/// How many blocks are there per standard era.
fn blocks_per_era() -> BlockNumber;
/// How many blocks are there per standard era.
fn blocks_per_era() -> BlockNumber;
}
}
7 changes: 3 additions & 4 deletions runtime/local/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
use frame_support::{
construct_runtime, parameter_types,
traits::{
fungible::Unbalanced as FunUnbalanced, AsEnsureOriginWithArg, ConstU128, ConstU32,
ConstU64, Currency, EitherOfDiverse, EqualPrivilegeOnly, FindAuthor, Get, InstanceFilter,
Nothing, OnFinalize, WithdrawReasons,
AsEnsureOriginWithArg, ConstU128, ConstU32, ConstU64, Currency, EitherOfDiverse,
EqualPrivilegeOnly, FindAuthor, Get, InstanceFilter, Nothing, OnFinalize, WithdrawReasons,
},
weights::{
constants::{ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND},
Expand Down Expand Up @@ -1740,7 +1739,7 @@ impl_runtime_apis! {
}
}

impl dapp_staking_v3_runtime_api::DAppStakingApi<Block> for Runtime {
impl dapp_staking_v3_runtime_api::DappStakingApi<Block> for Runtime {
fn eras_per_voting_subperiod() -> pallet_dapp_staking_v3::EraNumber {
InflationCycleConfig::eras_per_voting_subperiod()
}
Expand Down

0 comments on commit f20fabc

Please sign in to comment.