@@ -1099,65 +1099,65 @@ impl_runtime_apis! {
10991099 }
11001100 }
11011101
1102- // impl pallet_creator_staking_rpc_runtime_api::CreatorStakingApi<Block, AccountId, Balance>
1103- // for Runtime
1104- // {
1105- // fn estimated_backer_rewards_by_creators(
1106- // backer: AccountId,
1107- // creators: Vec<CreatorId>,
1108- // ) -> Vec<(CreatorId, Balance)> {
1109- // CreatorStaking::estimated_backer_rewards_by_creators(backer, creators)
1110- // }
1111- //
1112- // fn withdrawable_amounts_from_inactive_creators(
1113- // backer: AccountId,
1114- // ) -> Vec<(CreatorId, Balance)> {
1115- // CreatorStaking::withdrawable_amounts_from_inactive_creators(backer)
1116- // }
1117- //
1118- // fn available_claims_by_backer(
1119- // backer: AccountId,
1120- // ) -> Vec<(CreatorId, u32)> {
1121- // CreatorStaking::available_claims_by_backer(backer)
1122- // }
1123- //
1124- // fn estimated_creator_rewards(
1125- // creator: CreatorId,
1126- // ) -> Balance {
1127- // CreatorStaking::estimated_creator_rewards(creator)
1128- // }
1129- //
1130- // fn available_claims_by_creator(
1131- // creator: CreatorId,
1132- // ) -> Vec<EraIndex> {
1133- // CreatorStaking::available_claims_by_creator(creator)
1134- // }
1135- // }
1136- //
1137- // impl pallet_domains_rpc_runtime_api::DomainsApi<Block, Balance> for Runtime {
1138- // fn calculate_price(subdomain: Vec<u8>) -> Option<Balance> {
1139- // Domains::calculate_price(&subdomain)
1140- // }
1141- // }
1142- //
1143- // impl pallet_posts_rpc_runtime_api::PostsApi<Block, AccountId> for Runtime {
1144- // fn can_create_post(
1145- // account: AccountId,
1146- // space_id: SpaceId,
1147- // content_opt: Option<Content>,
1148- // ) -> DispatchResult {
1149- // Posts::can_create_regular_post(account, space_id, content_opt)
1150- // }
1151- //
1152- // fn can_create_comment(
1153- // account: AccountId,
1154- // root_post_id: PostId,
1155- // parent_id_opt: Option<PostId>,
1156- // content_opt: Option<Content>
1157- // ) -> DispatchResult {
1158- // Posts::can_create_comment(account, root_post_id, parent_id_opt, content_opt)
1159- // }
1160- // }
1102+ impl pallet_creator_staking_rpc_runtime_api:: CreatorStakingApi <Block , AccountId , Balance >
1103+ for Runtime
1104+ {
1105+ fn estimated_backer_rewards_by_creators(
1106+ backer: AccountId ,
1107+ creators: Vec <CreatorId >,
1108+ ) -> Vec <( CreatorId , Balance ) > {
1109+ CreatorStaking :: estimated_backer_rewards_by_creators( backer, creators)
1110+ }
1111+
1112+ fn withdrawable_amounts_from_inactive_creators(
1113+ backer: AccountId ,
1114+ ) -> Vec <( CreatorId , Balance ) > {
1115+ CreatorStaking :: withdrawable_amounts_from_inactive_creators( backer)
1116+ }
1117+
1118+ fn available_claims_by_backer(
1119+ backer: AccountId ,
1120+ ) -> Vec <( CreatorId , u32 ) > {
1121+ CreatorStaking :: available_claims_by_backer( backer)
1122+ }
1123+
1124+ fn estimated_creator_rewards(
1125+ creator: CreatorId ,
1126+ ) -> Balance {
1127+ CreatorStaking :: estimated_creator_rewards( creator)
1128+ }
1129+
1130+ fn available_claims_by_creator(
1131+ creator: CreatorId ,
1132+ ) -> Vec <EraIndex > {
1133+ CreatorStaking :: available_claims_by_creator( creator)
1134+ }
1135+ }
1136+
1137+ impl pallet_domains_rpc_runtime_api:: DomainsApi <Block , Balance > for Runtime {
1138+ fn calculate_price( subdomain: Vec <u8 >) -> Option <Balance > {
1139+ Domains :: calculate_price( & subdomain)
1140+ }
1141+ }
1142+
1143+ impl pallet_posts_rpc_runtime_api:: PostsApi <Block , AccountId > for Runtime {
1144+ fn can_create_post(
1145+ account: AccountId ,
1146+ space_id: SpaceId ,
1147+ content_opt: Option <Content >,
1148+ ) -> DispatchResult {
1149+ Posts :: can_create_regular_post( account, space_id, content_opt)
1150+ }
1151+
1152+ fn can_create_comment(
1153+ account: AccountId ,
1154+ root_post_id: PostId ,
1155+ parent_id_opt: Option <PostId >,
1156+ content_opt: Option <Content >
1157+ ) -> DispatchResult {
1158+ Posts :: can_create_comment( account, root_post_id, parent_id_opt, content_opt)
1159+ }
1160+ }
11611161
11621162 #[ cfg( feature = "try-runtime" ) ]
11631163 impl frame_try_runtime:: TryRuntime <Block > for Runtime {
0 commit comments