@@ -21,7 +21,7 @@ use frame_support::{
2121 Parameter ,
2222} ;
2323use frame_system:: ensure_signed;
24- // use serde::{Serialize, Deserialize};
24+ use serde:: { Serialize , Deserialize } ;
2525use sp_io:: hashing:: blake2_128;
2626use sp_runtime:: {
2727 traits:: {
@@ -56,11 +56,11 @@ pub trait Trait:
5656
5757type BalanceOf < T > = <<T as Trait >:: Currency as Currency < <T as frame_system:: Trait >:: AccountId > >:: Balance ;
5858
59- #[ derive( Encode , Decode , Clone , PartialEq , Eq ) ]
60- #[ cfg_attr( feature = "std" , derive( Debug ) ) ]
59+ #[ derive( Encode , Decode , Debug , Clone , PartialEq , Eq ) ]
60+ #[ cfg_attr( feature = "std" , derive( ) ) ]
6161pub struct MiningEligibilityProxy ( pub [ u8 ; 16 ] ) ;
6262
63- #[ derive( Encode , Decode , Default , Clone , PartialEq , Debug ) ]
63+ #[ derive( Encode , Decode , Debug , Default , Clone , PartialEq , Serialize ) ]
6464#[ cfg_attr( feature = "std" , derive( ) ) ]
6565pub struct MiningEligibilityProxyResult < U , V , W , X > {
6666 pub proxy_claim_requestor_account_id : U , /* Supernode (proxy) account id requesting DHX rewards as proxy to
@@ -70,10 +70,13 @@ pub struct MiningEligibilityProxyResult<U, V, W, X> {
7070 pub proxy_claim_block_redeemed : X ,
7171}
7272
73- #[ derive( Encode , Decode , Default , Clone , Eq , PartialEq , Debug ) ]
74- // #[derive(Encode, Decode, Default, Clone, Eq, PartialEq, Debug, Serialize)]
73+ #[ derive( Encode , Decode , Debug , Default , Clone , Eq , PartialEq , Serialize ) ]
7574#[ cfg_attr( feature = "std" , derive( ) ) ]
76- pub struct MiningEligibilityProxyClaimRewardeeData < U , V , W , X > {
75+ pub struct MiningEligibilityProxyClaimRewardeeData < T , U , V , W , X > where
76+ <T as frame_system:: Trait >:: AccountId : Serialize ,
77+ <<T as Trait >:: Currency as Currency < <T as frame_system:: Trait >:: AccountId > >:: Balance : Serialize ,
78+ <T as frame_system:: Trait >:: BlockNumber : Serialize ,
79+ {
7780 pub proxy_claim_rewardee_account_id : U , // Rewardee miner associated with supernode (proxy) account id
7881 pub proxy_claim_reward_amount : V , // Reward in DHX tokens for specific rewardee miner
7982 pub proxy_claim_start_block : W , // Start block associated with mining claim
@@ -409,10 +412,10 @@ impl<T: Trait> Module<T> {
409412 "Latest field proxy_claim_total_reward_amount {:#?}" ,
410413 _mining_eligibility_proxy_result. proxy_claim_total_reward_amount
411414 ) ;
412- // debug::info!(
413- // "Latest field proxy_claim_rewardees_data {:#?}",
414- // serde_json::to_string_pretty(&_mining_eligibility_proxy_result.proxy_claim_rewardees_data)
415- // );
415+ debug:: info!(
416+ "Latest field proxy_claim_rewardees_data {:#?}" ,
417+ serde_json:: to_string_pretty( & _mining_eligibility_proxy_result. proxy_claim_rewardees_data)
418+ ) ;
416419 debug:: info!(
417420 "Latest field proxy_claim_block_redeemed {:#?}" ,
418421 _mining_eligibility_proxy_result. proxy_claim_block_redeemed
@@ -448,10 +451,10 @@ impl<T: Trait> Module<T> {
448451 "Inserted field proxy_claim_total_reward_amount {:#?}" ,
449452 _mining_eligibility_proxy_result. proxy_claim_total_reward_amount
450453 ) ;
451- // debug::info!(
452- // "Inserted field proxy_claim_rewardees_data {:#?}",
453- // serde_json::to_string_pretty(&_mining_eligibility_proxy_result.proxy_claim_rewardees_data)
454- // );
454+ debug:: info!(
455+ "Inserted field proxy_claim_rewardees_data {:#?}" ,
456+ serde_json:: to_string_pretty( & _mining_eligibility_proxy_result. proxy_claim_rewardees_data)
457+ ) ;
455458 debug:: info!(
456459 "Inserted field proxy_claim_block_redeemed {:#?}" ,
457460 _mining_eligibility_proxy_result. proxy_claim_block_redeemed
0 commit comments