diff --git a/generator/generator.go b/generator/generator.go index 0b80d1a..cd6bc8b 100644 --- a/generator/generator.go +++ b/generator/generator.go @@ -214,7 +214,7 @@ func (g *Generator) FuncNameForMessage(msg *protobuf.Message) string { return "To_" + msg.FullTypeName() } func (g *Generator) FuncNameForOneOf(msg *protobuf.Message, field protobuf.Field) string { - return "Set_OneOf_" + msg.FullTypeName() + "_" + field.GetName() + return "To_OneOf_" + msg.FullTypeName() + "_" + field.GetName() } func (g *Generator) FuncNameForOptional(msg *protobuf.Message, field protobuf.Field) string { diff --git a/generator/generator_test.go b/generator/generator_test.go index c88d136..7e72b89 100644 --- a/generator/generator_test.go +++ b/generator/generator_test.go @@ -37,7 +37,7 @@ func Test_Generator(t *testing.T) { require.NoError(t, err) - err = os.WriteFile("../templates/output.proto", content, 0644) + err = os.WriteFile("../templates/gen_types.go", content, 0644) require.NoError(t, err) fmt.Println("All done!") } diff --git a/templates/gen_types.go b/templates/gen_types.go index 70b798f..55d3740 100644 --- a/templates/gen_types.go +++ b/templates/gen_types.go @@ -15,13 +15,13 @@ func To_AllowedSlots(in any) *pbgear.AllowedSlots { _ = v // oneOf field Value - v0 := Set_OneOf_AllowedSlots_value(v.ValueAt(0)) + v0 := To_OneOf_AllowedSlots_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_AllowedSlots_value(in any) any { +func To_OneOf_AllowedSlots_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -91,13 +91,13 @@ func To_BabePallet(in any) *pbgear.BabePallet { _ = v // oneOf field Call - v0 := Set_OneOf_BabePallet_call(v.ValueAt(0)) + v0 := To_OneOf_BabePallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_BabePallet_call(in any) any { +func To_OneOf_BabePallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -136,13 +136,13 @@ func To_Babe_Config(in any) *pbgear.Babe_Config { _ = v // oneOf field Value - v0 := Set_OneOf_Babe_Config_value(v.ValueAt(0)) + v0 := To_OneOf_Babe_Config_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Babe_Config_value(in any) any { +func To_OneOf_Babe_Config_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -175,13 +175,13 @@ func To_Babe_Logs(in any) *pbgear.Babe_Logs { _ = v // oneOf field Value - v0 := Set_OneOf_Babe_Logs_value(v.ValueAt(0)) + v0 := To_OneOf_Babe_Logs_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Babe_Logs_value(in any) any { +func To_OneOf_Babe_Logs_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -234,7 +234,15 @@ func To_Babe_PlanConfigChangeCall(in any) *pbgear.Babe_PlanConfigChangeCall { } func To_Babe_PlanConfigChangeCall_config(in any) *pbgear.Babe_Config { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Babe_Config(w) //simple field } func To_Babe_PreRuntime(in any) *pbgear.Babe_PreRuntime { @@ -264,10 +272,26 @@ func To_Babe_ReportEquivocationCall(in any) *pbgear.Babe_ReportEquivocationCall } func To_Babe_ReportEquivocationCall_equivocation_proof(in any) *pbgear.SpConsensusSlotsEquivocationProof { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpConsensusSlotsEquivocationProof(w) //simple field } func To_Babe_ReportEquivocationCall_key_owner_proof(in any) *pbgear.SpSessionMembershipProof { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpSessionMembershipProof(w) //simple field } func To_Babe_ReportEquivocationUnsignedCall(in any) *pbgear.Babe_ReportEquivocationUnsignedCall { @@ -284,10 +308,26 @@ func To_Babe_ReportEquivocationUnsignedCall(in any) *pbgear.Babe_ReportEquivocat } func To_Babe_ReportEquivocationUnsignedCall_equivocation_proof(in any) *pbgear.SpConsensusSlotsEquivocationProof { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpConsensusSlotsEquivocationProof(w) //simple field } func To_Babe_ReportEquivocationUnsignedCall_key_owner_proof(in any) *pbgear.SpSessionMembershipProof { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpSessionMembershipProof(w) //simple field } func To_Babe_RuntimeEnvironmentUpdated(in any) *pbgear.Babe_RuntimeEnvironmentUpdated { @@ -338,10 +378,26 @@ func To_Babe_V1(in any) *pbgear.Babe_V1 { } func To_Babe_V1_c(in any) *pbgear.Babe_TupleUint64Uint64 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Babe_TupleUint64Uint64(w) //simple field } func To_Babe_V1_allowed_slots(in any) *pbgear.AllowedSlots { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_AllowedSlots(w) //simple field } func To_BagsListPallet(in any) *pbgear.BagsListPallet { @@ -350,13 +406,13 @@ func To_BagsListPallet(in any) *pbgear.BagsListPallet { _ = v // oneOf field Call - v0 := Set_OneOf_BagsListPallet_call(v.ValueAt(0)) + v0 := To_OneOf_BagsListPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_BagsListPallet_call(in any) any { +func To_OneOf_BagsListPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -406,13 +462,13 @@ func To_BagsList_Dislocated(in any) *pbgear.BagsList_Dislocated { _ = v // oneOf field Value - v0 := Set_OneOf_BagsList_Dislocated_value(v.ValueAt(0)) + v0 := To_OneOf_BagsList_Dislocated_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_BagsList_Dislocated_value(in any) any { +func To_OneOf_BagsList_Dislocated_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -448,13 +504,13 @@ func To_BagsList_Heavier(in any) *pbgear.BagsList_Heavier { _ = v // oneOf field Value - v0 := Set_OneOf_BagsList_Heavier_value(v.ValueAt(0)) + v0 := To_OneOf_BagsList_Heavier_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_BagsList_Heavier_value(in any) any { +func To_OneOf_BagsList_Heavier_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -496,7 +552,15 @@ func To_BagsList_Id(in any) *pbgear.BagsList_Id { } func To_BagsList_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_BagsList_Index(in any) *pbgear.BagsList_Index { @@ -511,7 +575,15 @@ func To_BagsList_Index(in any) *pbgear.BagsList_Index { } func To_BagsList_Index_value0(in any) *pbgear.BagsList_TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_BagsList_TupleNull(w) //simple field } func To_BagsList_Lighter(in any) *pbgear.BagsList_Lighter { @@ -520,13 +592,13 @@ func To_BagsList_Lighter(in any) *pbgear.BagsList_Lighter { _ = v // oneOf field Value - v0 := Set_OneOf_BagsList_Lighter_value(v.ValueAt(0)) + v0 := To_OneOf_BagsList_Lighter_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_BagsList_Lighter_value(in any) any { +func To_OneOf_BagsList_Lighter_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -568,7 +640,15 @@ func To_BagsList_PutInFrontOfCall(in any) *pbgear.BagsList_PutInFrontOfCall { } func To_BagsList_PutInFrontOfCall_lighter(in any) *pbgear.BagsList_Lighter { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_BagsList_Lighter(w) //simple field } func To_BagsList_PutInFrontOfOtherCall(in any) *pbgear.BagsList_PutInFrontOfOtherCall { @@ -585,10 +665,26 @@ func To_BagsList_PutInFrontOfOtherCall(in any) *pbgear.BagsList_PutInFrontOfOthe } func To_BagsList_PutInFrontOfOtherCall_heavier(in any) *pbgear.BagsList_Heavier { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_BagsList_Heavier(w) //simple field } func To_BagsList_PutInFrontOfOtherCall_lighter(in any) *pbgear.BagsList_Lighter { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_BagsList_Lighter(w) //simple field } func To_BagsList_Raw(in any) *pbgear.BagsList_Raw { @@ -614,7 +710,15 @@ func To_BagsList_RebagCall(in any) *pbgear.BagsList_RebagCall { } func To_BagsList_RebagCall_dislocated(in any) *pbgear.BagsList_Dislocated { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_BagsList_Dislocated(w) //simple field } func To_BagsList_TupleNull(in any) *pbgear.BagsList_TupleNull { @@ -629,7 +733,15 @@ func To_BagsList_TupleNull(in any) *pbgear.BagsList_TupleNull { } func To_BagsList_TupleNull_value(in any) *pbgear.TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_TupleNull(w) //simple field } func To_BalancesPallet(in any) *pbgear.BalancesPallet { @@ -638,13 +750,13 @@ func To_BalancesPallet(in any) *pbgear.BalancesPallet { _ = v // oneOf field Call - v0 := Set_OneOf_BalancesPallet_call(v.ValueAt(0)) + v0 := To_OneOf_BalancesPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_BalancesPallet_call(in any) any { +func To_OneOf_BalancesPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -710,13 +822,13 @@ func To_Balances_Dest(in any) *pbgear.Balances_Dest { _ = v // oneOf field Value - v0 := Set_OneOf_Balances_Dest_value(v.ValueAt(0)) + v0 := To_OneOf_Balances_Dest_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Balances_Dest_value(in any) any { +func To_OneOf_Balances_Dest_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -760,7 +872,15 @@ func To_Balances_ForceSetBalanceCall(in any) *pbgear.Balances_ForceSetBalanceCal } func To_Balances_ForceSetBalanceCall_who(in any) *pbgear.Balances_Who { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Balances_Who(w) //simple field } func To_Balances_ForceTransferCall(in any) *pbgear.Balances_ForceTransferCall { @@ -779,10 +899,26 @@ func To_Balances_ForceTransferCall(in any) *pbgear.Balances_ForceTransferCall { } func To_Balances_ForceTransferCall_source(in any) *pbgear.Balances_Source { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Balances_Source(w) //simple field } func To_Balances_ForceTransferCall_dest(in any) *pbgear.Balances_Dest { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Balances_Dest(w) //simple field } func To_Balances_ForceUnreserveCall(in any) *pbgear.Balances_ForceUnreserveCall { @@ -799,7 +935,15 @@ func To_Balances_ForceUnreserveCall(in any) *pbgear.Balances_ForceUnreserveCall } func To_Balances_ForceUnreserveCall_who(in any) *pbgear.Balances_Who { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Balances_Who(w) //simple field } func To_Balances_Id(in any) *pbgear.Balances_Id { @@ -814,7 +958,15 @@ func To_Balances_Id(in any) *pbgear.Balances_Id { } func To_Balances_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_Balances_Index(in any) *pbgear.Balances_Index { @@ -829,7 +981,15 @@ func To_Balances_Index(in any) *pbgear.Balances_Index { } func To_Balances_Index_value0(in any) *pbgear.Balances_TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Balances_TupleNull(w) //simple field } func To_Balances_Raw(in any) *pbgear.Balances_Raw { @@ -849,13 +1009,13 @@ func To_Balances_Source(in any) *pbgear.Balances_Source { _ = v // oneOf field Value - v0 := Set_OneOf_Balances_Source_value(v.ValueAt(0)) + v0 := To_OneOf_Balances_Source_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Balances_Source_value(in any) any { +func To_OneOf_Balances_Source_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -899,7 +1059,15 @@ func To_Balances_TransferAllCall(in any) *pbgear.Balances_TransferAllCall { } func To_Balances_TransferAllCall_dest(in any) *pbgear.Balances_Dest { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Balances_Dest(w) //simple field } func To_Balances_TransferAllowDeathCall(in any) *pbgear.Balances_TransferAllowDeathCall { @@ -916,7 +1084,15 @@ func To_Balances_TransferAllowDeathCall(in any) *pbgear.Balances_TransferAllowDe } func To_Balances_TransferAllowDeathCall_dest(in any) *pbgear.Balances_Dest { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Balances_Dest(w) //simple field } func To_Balances_TransferKeepAliveCall(in any) *pbgear.Balances_TransferKeepAliveCall { @@ -933,7 +1109,15 @@ func To_Balances_TransferKeepAliveCall(in any) *pbgear.Balances_TransferKeepAliv } func To_Balances_TransferKeepAliveCall_dest(in any) *pbgear.Balances_Dest { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Balances_Dest(w) //simple field } func To_Balances_TupleNull(in any) *pbgear.Balances_TupleNull { @@ -948,7 +1132,15 @@ func To_Balances_TupleNull(in any) *pbgear.Balances_TupleNull { } func To_Balances_TupleNull_value(in any) *pbgear.TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_TupleNull(w) //simple field } func To_Balances_UpgradeAccountsCall(in any) *pbgear.Balances_UpgradeAccountsCall { @@ -983,13 +1175,13 @@ func To_Balances_Who(in any) *pbgear.Balances_Who { _ = v // oneOf field Value - v0 := Set_OneOf_Balances_Who_value(v.ValueAt(0)) + v0 := To_OneOf_Balances_Who_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Balances_Who_value(in any) any { +func To_OneOf_Balances_Who_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -1036,13 +1228,13 @@ func To_BountiesPallet(in any) *pbgear.BountiesPallet { _ = v // oneOf field Call - v0 := Set_OneOf_BountiesPallet_call(v.ValueAt(0)) + v0 := To_OneOf_BountiesPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_BountiesPallet_call(in any) any { +func To_OneOf_BountiesPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -1146,7 +1338,15 @@ func To_Bounties_AwardBountyCall(in any) *pbgear.Bounties_AwardBountyCall { } func To_Bounties_AwardBountyCall_beneficiary(in any) *pbgear.Bounties_Beneficiary { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Bounties_Beneficiary(w) //simple field } func To_Bounties_Beneficiary(in any) *pbgear.Bounties_Beneficiary { @@ -1155,13 +1355,13 @@ func To_Bounties_Beneficiary(in any) *pbgear.Bounties_Beneficiary { _ = v // oneOf field Value - v0 := Set_OneOf_Bounties_Beneficiary_value(v.ValueAt(0)) + v0 := To_OneOf_Bounties_Beneficiary_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Bounties_Beneficiary_value(in any) any { +func To_OneOf_Bounties_Beneficiary_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -1219,13 +1419,13 @@ func To_Bounties_Curator(in any) *pbgear.Bounties_Curator { _ = v // oneOf field Value - v0 := Set_OneOf_Bounties_Curator_value(v.ValueAt(0)) + v0 := To_OneOf_Bounties_Curator_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Bounties_Curator_value(in any) any { +func To_OneOf_Bounties_Curator_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -1280,7 +1480,15 @@ func To_Bounties_Id(in any) *pbgear.Bounties_Id { } func To_Bounties_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_Bounties_Index(in any) *pbgear.Bounties_Index { @@ -1295,7 +1503,15 @@ func To_Bounties_Index(in any) *pbgear.Bounties_Index { } func To_Bounties_Index_value0(in any) *pbgear.Bounties_TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Bounties_TupleNull(w) //simple field } func To_Bounties_ProposeBountyCall(in any) *pbgear.Bounties_ProposeBountyCall { @@ -1327,7 +1543,15 @@ func To_Bounties_ProposeCuratorCall(in any) *pbgear.Bounties_ProposeCuratorCall } func To_Bounties_ProposeCuratorCall_curator(in any) *pbgear.Bounties_Curator { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Bounties_Curator(w) //simple field } func To_Bounties_Raw(in any) *pbgear.Bounties_Raw { @@ -1353,7 +1577,15 @@ func To_Bounties_TupleNull(in any) *pbgear.Bounties_TupleNull { } func To_Bounties_TupleNull_value(in any) *pbgear.TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_TupleNull(w) //simple field } func To_Bounties_UnassignCuratorCall(in any) *pbgear.Bounties_UnassignCuratorCall { @@ -1373,13 +1605,13 @@ func To_ChildBountiesPallet(in any) *pbgear.ChildBountiesPallet { _ = v // oneOf field Call - v0 := Set_OneOf_ChildBountiesPallet_call(v.ValueAt(0)) + v0 := To_OneOf_ChildBountiesPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_ChildBountiesPallet_call(in any) any { +func To_OneOf_ChildBountiesPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -1483,7 +1715,15 @@ func To_ChildBounties_AwardChildBountyCall(in any) *pbgear.ChildBounties_AwardCh } func To_ChildBounties_AwardChildBountyCall_beneficiary(in any) *pbgear.ChildBounties_Beneficiary { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_ChildBounties_Beneficiary(w) //simple field } func To_ChildBounties_Beneficiary(in any) *pbgear.ChildBounties_Beneficiary { @@ -1492,13 +1732,13 @@ func To_ChildBounties_Beneficiary(in any) *pbgear.ChildBounties_Beneficiary { _ = v // oneOf field Value - v0 := Set_OneOf_ChildBounties_Beneficiary_value(v.ValueAt(0)) + v0 := To_OneOf_ChildBounties_Beneficiary_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_ChildBounties_Beneficiary_value(in any) any { +func To_OneOf_ChildBounties_Beneficiary_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -1560,13 +1800,13 @@ func To_ChildBounties_Curator(in any) *pbgear.ChildBounties_Curator { _ = v // oneOf field Value - v0 := Set_OneOf_ChildBounties_Curator_value(v.ValueAt(0)) + v0 := To_OneOf_ChildBounties_Curator_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_ChildBounties_Curator_value(in any) any { +func To_OneOf_ChildBounties_Curator_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -1608,7 +1848,15 @@ func To_ChildBounties_Id(in any) *pbgear.ChildBounties_Id { } func To_ChildBounties_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_ChildBounties_Index(in any) *pbgear.ChildBounties_Index { @@ -1623,7 +1871,15 @@ func To_ChildBounties_Index(in any) *pbgear.ChildBounties_Index { } func To_ChildBounties_Index_value0(in any) *pbgear.ChildBounties_TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_ChildBounties_TupleNull(w) //simple field } func To_ChildBounties_ProposeCuratorCall(in any) *pbgear.ChildBounties_ProposeCuratorCall { @@ -1644,7 +1900,15 @@ func To_ChildBounties_ProposeCuratorCall(in any) *pbgear.ChildBounties_ProposeCu } func To_ChildBounties_ProposeCuratorCall_curator(in any) *pbgear.ChildBounties_Curator { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_ChildBounties_Curator(w) //simple field } func To_ChildBounties_Raw(in any) *pbgear.ChildBounties_Raw { @@ -1670,7 +1934,15 @@ func To_ChildBounties_TupleNull(in any) *pbgear.ChildBounties_TupleNull { } func To_ChildBounties_TupleNull_value(in any) *pbgear.TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_TupleNull(w) //simple field } func To_ChildBounties_UnassignCuratorCall(in any) *pbgear.ChildBounties_UnassignCuratorCall { @@ -1692,13 +1964,13 @@ func To_ConvictionVotingPallet(in any) *pbgear.ConvictionVotingPallet { _ = v // oneOf field Call - v0 := Set_OneOf_ConvictionVotingPallet_call(v.ValueAt(0)) + v0 := To_OneOf_ConvictionVotingPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_ConvictionVotingPallet_call(in any) any { +func To_OneOf_ConvictionVotingPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -1760,13 +2032,13 @@ func To_ConvictionVoting_Conviction(in any) *pbgear.ConvictionVoting_Conviction _ = v // oneOf field Value - v0 := Set_OneOf_ConvictionVoting_Conviction_value(v.ValueAt(0)) + v0 := To_OneOf_ConvictionVoting_Conviction_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_ConvictionVoting_Conviction_value(in any) any { +func To_OneOf_ConvictionVoting_Conviction_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -1822,10 +2094,26 @@ func To_ConvictionVoting_DelegateCall(in any) *pbgear.ConvictionVoting_DelegateC } func To_ConvictionVoting_DelegateCall_to(in any) *pbgear.ConvictionVoting_To { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_ConvictionVoting_To(w) //simple field } func To_ConvictionVoting_DelegateCall_conviction(in any) *pbgear.ConvictionVoting_Conviction { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_ConvictionVoting_Conviction(w) //simple field } func To_ConvictionVoting_Id(in any) *pbgear.ConvictionVoting_Id { @@ -1840,7 +2128,15 @@ func To_ConvictionVoting_Id(in any) *pbgear.ConvictionVoting_Id { } func To_ConvictionVoting_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_ConvictionVoting_Index(in any) *pbgear.ConvictionVoting_Index { @@ -1855,7 +2151,15 @@ func To_ConvictionVoting_Index(in any) *pbgear.ConvictionVoting_Index { } func To_ConvictionVoting_Index_value0(in any) *pbgear.ConvictionVoting_TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_ConvictionVoting_TupleNull(w) //simple field } func To_ConvictionVoting_Locked1X(in any) *pbgear.ConvictionVoting_Locked1X { @@ -1952,7 +2256,15 @@ func To_ConvictionVoting_RemoveOtherVoteCall(in any) *pbgear.ConvictionVoting_Re } func To_ConvictionVoting_RemoveOtherVoteCall_target(in any) *pbgear.ConvictionVoting_Target { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_ConvictionVoting_Target(w) //simple field } func To_ConvictionVoting_RemoveVoteCall(in any) *pbgear.ConvictionVoting_RemoveVoteCall { @@ -2010,7 +2322,15 @@ func To_ConvictionVoting_Standard(in any) *pbgear.ConvictionVoting_Standard { } func To_ConvictionVoting_Standard_vote(in any) *pbgear.ConvictionVoting_PalletConvictionVotingVoteVote { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_ConvictionVoting_PalletConvictionVotingVoteVote(w) //simple field } func To_ConvictionVoting_Target(in any) *pbgear.ConvictionVoting_Target { @@ -2019,13 +2339,13 @@ func To_ConvictionVoting_Target(in any) *pbgear.ConvictionVoting_Target { _ = v // oneOf field Value - v0 := Set_OneOf_ConvictionVoting_Target_value(v.ValueAt(0)) + v0 := To_OneOf_ConvictionVoting_Target_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_ConvictionVoting_Target_value(in any) any { +func To_OneOf_ConvictionVoting_Target_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -2061,13 +2381,13 @@ func To_ConvictionVoting_To(in any) *pbgear.ConvictionVoting_To { _ = v // oneOf field Value - v0 := Set_OneOf_ConvictionVoting_To_value(v.ValueAt(0)) + v0 := To_OneOf_ConvictionVoting_To_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_ConvictionVoting_To_value(in any) any { +func To_OneOf_ConvictionVoting_To_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -2109,7 +2429,15 @@ func To_ConvictionVoting_TupleNull(in any) *pbgear.ConvictionVoting_TupleNull { } func To_ConvictionVoting_TupleNull_value(in any) *pbgear.TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_TupleNull(w) //simple field } func To_ConvictionVoting_UndelegateCall(in any) *pbgear.ConvictionVoting_UndelegateCall { @@ -2137,7 +2465,15 @@ func To_ConvictionVoting_UnlockCall(in any) *pbgear.ConvictionVoting_UnlockCall } func To_ConvictionVoting_UnlockCall_target(in any) *pbgear.ConvictionVoting_Target { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_ConvictionVoting_Target(w) //simple field } func To_ConvictionVoting_Vote(in any) *pbgear.ConvictionVoting_Vote { @@ -2146,13 +2482,13 @@ func To_ConvictionVoting_Vote(in any) *pbgear.ConvictionVoting_Vote { _ = v // oneOf field Value - v0 := Set_OneOf_ConvictionVoting_Vote_value(v.ValueAt(0)) + v0 := To_OneOf_ConvictionVoting_Vote_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_ConvictionVoting_Vote_value(in any) any { +func To_OneOf_ConvictionVoting_Vote_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -2188,7 +2524,15 @@ func To_ConvictionVoting_VoteCall(in any) *pbgear.ConvictionVoting_VoteCall { } func To_ConvictionVoting_VoteCall_vote(in any) *pbgear.ConvictionVoting_Vote { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_ConvictionVoting_Vote(w) //simple field } func To_ElectionProviderMultiPhasePallet(in any) *pbgear.ElectionProviderMultiPhasePallet { @@ -2197,13 +2541,13 @@ func To_ElectionProviderMultiPhasePallet(in any) *pbgear.ElectionProviderMultiPh _ = v // oneOf field Call - v0 := Set_OneOf_ElectionProviderMultiPhasePallet_call(v.ValueAt(0)) + v0 := To_OneOf_ElectionProviderMultiPhasePallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_ElectionProviderMultiPhasePallet_call(in any) any { +func To_OneOf_ElectionProviderMultiPhasePallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -2262,10 +2606,26 @@ func To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution(i } func To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution_solution(in any) *pbgear.VaraRuntimeNposSolution16 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_VaraRuntimeNposSolution16(w) //simple field } func To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution_score(in any) *pbgear.SpNposElectionsElectionScore { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpNposElectionsElectionScore(w) //simple field } func To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseSolutionOrSnapshotSize(in any) *pbgear.ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseSolutionOrSnapshotSize { @@ -2319,6 +2679,7 @@ func To_ElectionProviderMultiPhase_SetMinimumUntrustedScoreCall(in any) *pbgear. } func To_Optional_ElectionProviderMultiPhase_SetMinimumUntrustedScoreCall_maybe_next_score(in any) *pbgear.SpNposElectionsElectionScore { + panic("Not implemented") return nil //funcForOptionalField } @@ -2334,7 +2695,15 @@ func To_ElectionProviderMultiPhase_SubmitCall(in any) *pbgear.ElectionProviderMu } func To_ElectionProviderMultiPhase_SubmitCall_raw_solution(in any) *pbgear.ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution(w) //simple field } func To_ElectionProviderMultiPhase_SubmitUnsignedCall(in any) *pbgear.ElectionProviderMultiPhase_SubmitUnsignedCall { @@ -2351,10 +2720,26 @@ func To_ElectionProviderMultiPhase_SubmitUnsignedCall(in any) *pbgear.ElectionPr } func To_ElectionProviderMultiPhase_SubmitUnsignedCall_raw_solution(in any) *pbgear.ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution(w) //simple field } func To_ElectionProviderMultiPhase_SubmitUnsignedCall_witness(in any) *pbgear.ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseSolutionOrSnapshotSize { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseSolutionOrSnapshotSize(w) //simple field } func To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport(in any) *pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport { @@ -2371,10 +2756,26 @@ func To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSu } func To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport_value1(in any) *pbgear.SpNposElectionsSupport { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpNposElectionsSupport(w) //simple field } func To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String(in any) *pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String { @@ -2391,7 +2792,15 @@ func To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String(in any) *p } func To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes10Listuint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes10Listuint32 { @@ -2828,7 +3237,15 @@ func To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(in any } func To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16_value1(in any) *pbgear.SpArithmeticPerThingsPerU16 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpArithmeticPerThingsPerU16(w) //simple field } func To_ElectionProviderMultiPhase_TupleUint32TupleUint32SpArithmeticPerThingsPerU16Uint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32TupleUint32SpArithmeticPerThingsPerU16Uint32 { @@ -2847,7 +3264,15 @@ func To_ElectionProviderMultiPhase_TupleUint32TupleUint32SpArithmeticPerThingsPe } func To_ElectionProviderMultiPhase_TupleUint32TupleUint32SpArithmeticPerThingsPerU16Uint32_value1(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(w) //simple field } func To_ElectionProviderMultiPhase_TupleUint32Uint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32Uint32 { @@ -2869,13 +3294,13 @@ func To_FellowshipCollectivePallet(in any) *pbgear.FellowshipCollectivePallet { _ = v // oneOf field Call - v0 := Set_OneOf_FellowshipCollectivePallet_call(v.ValueAt(0)) + v0 := To_OneOf_FellowshipCollectivePallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_FellowshipCollectivePallet_call(in any) any { +func To_OneOf_FellowshipCollectivePallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -2921,7 +3346,15 @@ func To_FellowshipCollective_AddMemberCall(in any) *pbgear.FellowshipCollective_ } func To_FellowshipCollective_AddMemberCall_who(in any) *pbgear.FellowshipCollective_Who { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_FellowshipCollective_Who(w) //simple field } func To_FellowshipCollective_Address20(in any) *pbgear.FellowshipCollective_Address20 { @@ -2971,7 +3404,15 @@ func To_FellowshipCollective_DemoteMemberCall(in any) *pbgear.FellowshipCollecti } func To_FellowshipCollective_DemoteMemberCall_who(in any) *pbgear.FellowshipCollective_Who { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_FellowshipCollective_Who(w) //simple field } func To_FellowshipCollective_Id(in any) *pbgear.FellowshipCollective_Id { @@ -2986,7 +3427,15 @@ func To_FellowshipCollective_Id(in any) *pbgear.FellowshipCollective_Id { } func To_FellowshipCollective_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_FellowshipCollective_Index(in any) *pbgear.FellowshipCollective_Index { @@ -3001,7 +3450,15 @@ func To_FellowshipCollective_Index(in any) *pbgear.FellowshipCollective_Index { } func To_FellowshipCollective_Index_value0(in any) *pbgear.FellowshipCollective_TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_FellowshipCollective_TupleNull(w) //simple field } func To_FellowshipCollective_PromoteMemberCall(in any) *pbgear.FellowshipCollective_PromoteMemberCall { @@ -3016,7 +3473,15 @@ func To_FellowshipCollective_PromoteMemberCall(in any) *pbgear.FellowshipCollect } func To_FellowshipCollective_PromoteMemberCall_who(in any) *pbgear.FellowshipCollective_Who { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_FellowshipCollective_Who(w) //simple field } func To_FellowshipCollective_Raw(in any) *pbgear.FellowshipCollective_Raw { @@ -3044,7 +3509,15 @@ func To_FellowshipCollective_RemoveMemberCall(in any) *pbgear.FellowshipCollecti } func To_FellowshipCollective_RemoveMemberCall_who(in any) *pbgear.FellowshipCollective_Who { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_FellowshipCollective_Who(w) //simple field } func To_FellowshipCollective_TupleNull(in any) *pbgear.FellowshipCollective_TupleNull { @@ -3059,7 +3532,15 @@ func To_FellowshipCollective_TupleNull(in any) *pbgear.FellowshipCollective_Tupl } func To_FellowshipCollective_TupleNull_value(in any) *pbgear.TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_TupleNull(w) //simple field } func To_FellowshipCollective_VoteCall(in any) *pbgear.FellowshipCollective_VoteCall { @@ -3081,13 +3562,13 @@ func To_FellowshipCollective_Who(in any) *pbgear.FellowshipCollective_Who { _ = v // oneOf field Value - v0 := Set_OneOf_FellowshipCollective_Who_value(v.ValueAt(0)) + v0 := To_OneOf_FellowshipCollective_Who_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_FellowshipCollective_Who_value(in any) any { +func To_OneOf_FellowshipCollective_Who_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -3123,13 +3604,13 @@ func To_FellowshipReferendaPallet(in any) *pbgear.FellowshipReferendaPallet { _ = v // oneOf field Call - v0 := Set_OneOf_FellowshipReferendaPallet_call(v.ValueAt(0)) + v0 := To_OneOf_FellowshipReferendaPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_FellowshipReferendaPallet_call(in any) any { +func To_OneOf_FellowshipReferendaPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -3214,13 +3695,13 @@ func To_FellowshipReferenda_EnactmentMoment(in any) *pbgear.FellowshipReferenda_ _ = v // oneOf field Value - v0 := Set_OneOf_FellowshipReferenda_EnactmentMoment_value(v.ValueAt(0)) + v0 := To_OneOf_FellowshipReferenda_EnactmentMoment_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_FellowshipReferenda_EnactmentMoment_value(in any) any { +func To_OneOf_FellowshipReferenda_EnactmentMoment_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -3250,7 +3731,15 @@ func To_FellowshipReferenda_Inline(in any) *pbgear.FellowshipReferenda_Inline { } func To_FellowshipReferenda_Inline_value0(in any) *pbgear.BoundedCollectionsBoundedVecBoundedVec { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_BoundedCollectionsBoundedVecBoundedVec(w) //simple field } func To_FellowshipReferenda_KillCall(in any) *pbgear.FellowshipReferenda_KillCall { @@ -3276,7 +3765,15 @@ func To_FellowshipReferenda_Legacy(in any) *pbgear.FellowshipReferenda_Legacy { } func To_FellowshipReferenda_Legacy_hash(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_FellowshipReferenda_Lookup(in any) *pbgear.FellowshipReferenda_Lookup { @@ -3293,7 +3790,15 @@ func To_FellowshipReferenda_Lookup(in any) *pbgear.FellowshipReferenda_Lookup { } func To_FellowshipReferenda_Lookup_hash(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_FellowshipReferenda_NudgeReferendumCall(in any) *pbgear.FellowshipReferenda_NudgeReferendumCall { @@ -3330,7 +3835,15 @@ func To_FellowshipReferenda_Origins(in any) *pbgear.FellowshipReferenda_Origins } func To_FellowshipReferenda_Origins_value0(in any) *pbgear.Value0 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Value0(w) //simple field } func To_FellowshipReferenda_PlaceDecisionDepositCall(in any) *pbgear.FellowshipReferenda_PlaceDecisionDepositCall { @@ -3350,13 +3863,13 @@ func To_FellowshipReferenda_Proposal(in any) *pbgear.FellowshipReferenda_Proposa _ = v // oneOf field Value - v0 := Set_OneOf_FellowshipReferenda_Proposal_value(v.ValueAt(0)) + v0 := To_OneOf_FellowshipReferenda_Proposal_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_FellowshipReferenda_Proposal_value(in any) any { +func To_OneOf_FellowshipReferenda_Proposal_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -3384,13 +3897,13 @@ func To_FellowshipReferenda_ProposalOrigin(in any) *pbgear.FellowshipReferenda_P _ = v // oneOf field Value - v0 := Set_OneOf_FellowshipReferenda_ProposalOrigin_value(v.ValueAt(0)) + v0 := To_OneOf_FellowshipReferenda_ProposalOrigin_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_FellowshipReferenda_ProposalOrigin_value(in any) any { +func To_OneOf_FellowshipReferenda_ProposalOrigin_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -3448,6 +3961,7 @@ func To_FellowshipReferenda_SetMetadataCall(in any) *pbgear.FellowshipReferenda_ } func To_Optional_FellowshipReferenda_SetMetadataCall_maybe_hash(in any) *pbgear.PrimitiveTypesH256 { + panic("Not implemented") return nil //funcForOptionalField } @@ -3467,13 +3981,37 @@ func To_FellowshipReferenda_SubmitCall(in any) *pbgear.FellowshipReferenda_Submi } func To_FellowshipReferenda_SubmitCall_proposal_origin(in any) *pbgear.FellowshipReferenda_ProposalOrigin { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_FellowshipReferenda_ProposalOrigin(w) //simple field } func To_FellowshipReferenda_SubmitCall_proposal(in any) *pbgear.FellowshipReferenda_Proposal { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_FellowshipReferenda_Proposal(w) //simple field } func To_FellowshipReferenda_SubmitCall_enactment_moment(in any) *pbgear.FellowshipReferenda_EnactmentMoment { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_FellowshipReferenda_EnactmentMoment(w) //simple field } func To_FellowshipReferenda_System(in any) *pbgear.FellowshipReferenda_System { @@ -3488,7 +4026,15 @@ func To_FellowshipReferenda_System(in any) *pbgear.FellowshipReferenda_System { } func To_FellowshipReferenda_System_value0(in any) *pbgear.Value0 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Value0(w) //simple field } func To_FellowshipReferenda_Void(in any) *pbgear.FellowshipReferenda_Void { @@ -3503,7 +4049,15 @@ func To_FellowshipReferenda_Void(in any) *pbgear.FellowshipReferenda_Void { } func To_FellowshipReferenda_Void_value0(in any) *pbgear.Value0 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Value0(w) //simple field } func To_FinalityGrandpaEquivocation(in any) *pbgear.FinalityGrandpaEquivocation { @@ -3524,13 +4078,37 @@ func To_FinalityGrandpaEquivocation(in any) *pbgear.FinalityGrandpaEquivocation } func To_FinalityGrandpaEquivocation_identity(in any) *pbgear.SpConsensusGrandpaAppPublic { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpConsensusGrandpaAppPublic(w) //simple field } func To_FinalityGrandpaEquivocation_first(in any) *pbgear.TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature(w) //simple field } func To_FinalityGrandpaEquivocation_second(in any) *pbgear.TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature(w) //simple field } func To_FinalityGrandpaPrecommit(in any) *pbgear.FinalityGrandpaPrecommit { @@ -3547,7 +4125,15 @@ func To_FinalityGrandpaPrecommit(in any) *pbgear.FinalityGrandpaPrecommit { } func To_FinalityGrandpaPrecommit_target_hash(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_FinalityGrandpaPrevote(in any) *pbgear.FinalityGrandpaPrevote { @@ -3564,7 +4150,15 @@ func To_FinalityGrandpaPrevote(in any) *pbgear.FinalityGrandpaPrevote { } func To_FinalityGrandpaPrevote_target_hash(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_GearBankPallet(in any) *pbgear.GearBankPallet { @@ -3605,13 +4199,13 @@ func To_GearPallet(in any) *pbgear.GearPallet { _ = v // oneOf field Call - v0 := Set_OneOf_GearPallet_call(v.ValueAt(0)) + v0 := To_OneOf_GearPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_GearPallet_call(in any) any { +func To_OneOf_GearPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -3683,13 +4277,13 @@ func To_GearVoucherPallet(in any) *pbgear.GearVoucherPallet { _ = v // oneOf field Call - v0 := Set_OneOf_GearVoucherPallet_call(v.ValueAt(0)) + v0 := To_OneOf_GearVoucherPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_GearVoucherPallet_call(in any) any { +func To_OneOf_GearVoucherPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -3729,13 +4323,13 @@ func To_GearVoucher_AppendPrograms(in any) *pbgear.GearVoucher_AppendPrograms { _ = v // oneOf field Value - v0 := Set_OneOf_GearVoucher_AppendPrograms_value(v.ValueAt(0)) + v0 := To_OneOf_GearVoucher_AppendPrograms_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_GearVoucher_AppendPrograms_value(in any) any { +func To_OneOf_GearVoucher_AppendPrograms_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -3759,13 +4353,13 @@ func To_GearVoucher_Call(in any) *pbgear.GearVoucher_Call { _ = v // oneOf field Value - v0 := Set_OneOf_GearVoucher_Call_value(v.ValueAt(0)) + v0 := To_OneOf_GearVoucher_Call_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_GearVoucher_Call_value(in any) any { +func To_OneOf_GearVoucher_Call_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -3805,10 +4399,26 @@ func To_GearVoucher_CallCall(in any) *pbgear.GearVoucher_CallCall { } func To_GearVoucher_CallCall_voucher_id(in any) *pbgear.GearVoucher_PalletGearVoucherInternalVoucherId { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_GearVoucher_PalletGearVoucherInternalVoucherId(w) //simple field } func To_GearVoucher_CallCall_call(in any) *pbgear.GearVoucher_Call { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_GearVoucher_Call(w) //simple field } func To_GearVoucher_CallDeprecatedCall(in any) *pbgear.GearVoucher_CallDeprecatedCall { @@ -3823,7 +4433,15 @@ func To_GearVoucher_CallDeprecatedCall(in any) *pbgear.GearVoucher_CallDeprecate } func To_GearVoucher_CallDeprecatedCall_call(in any) *pbgear.GearVoucher_Call { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_GearVoucher_Call(w) //simple field } func To_GearVoucher_DeclineCall(in any) *pbgear.GearVoucher_DeclineCall { @@ -3838,7 +4456,15 @@ func To_GearVoucher_DeclineCall(in any) *pbgear.GearVoucher_DeclineCall { } func To_GearVoucher_DeclineCall_voucher_id(in any) *pbgear.GearVoucher_PalletGearVoucherInternalVoucherId { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_GearVoucher_PalletGearVoucherInternalVoucherId(w) //simple field } func To_GearVoucher_DeclineVoucher(in any) *pbgear.GearVoucher_DeclineVoucher { @@ -3869,9 +4495,18 @@ func To_GearVoucher_IssueCall(in any) *pbgear.GearVoucher_IssueCall { } func To_GearVoucher_IssueCall_spender(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_Optional_GearVoucher_IssueCall_programs(in any) *pbgear.BTreeSet { + panic("Not implemented") return nil //funcForOptionalField } @@ -3908,10 +4543,26 @@ func To_GearVoucher_RevokeCall(in any) *pbgear.GearVoucher_RevokeCall { } func To_GearVoucher_RevokeCall_spender(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_GearVoucher_RevokeCall_voucher_id(in any) *pbgear.GearVoucher_PalletGearVoucherInternalVoucherId { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_GearVoucher_PalletGearVoucherInternalVoucherId(w) //simple field } func To_GearVoucher_SendMessage(in any) *pbgear.GearVoucher_SendMessage { @@ -3934,7 +4585,15 @@ func To_GearVoucher_SendMessage(in any) *pbgear.GearVoucher_SendMessage { } func To_GearVoucher_SendMessage_destination(in any) *pbgear.GprimitivesActorId { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_GprimitivesActorId(w) //simple field } func To_GearVoucher_SendReply(in any) *pbgear.GearVoucher_SendReply { @@ -3957,7 +4616,15 @@ func To_GearVoucher_SendReply(in any) *pbgear.GearVoucher_SendReply { } func To_GearVoucher_SendReply_reply_to_id(in any) *pbgear.GprimitivesMessageId { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_GprimitivesMessageId(w) //simple field } func To_GearVoucher_Some(in any) *pbgear.GearVoucher_Some { @@ -3972,7 +4639,15 @@ func To_GearVoucher_Some(in any) *pbgear.GearVoucher_Some { } func To_GearVoucher_Some_value0(in any) *pbgear.BTreeSet { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_BTreeSet(w) //simple field } func To_GearVoucher_UpdateCall(in any) *pbgear.GearVoucher_UpdateCall { @@ -3999,15 +4674,33 @@ func To_GearVoucher_UpdateCall(in any) *pbgear.GearVoucher_UpdateCall { } func To_GearVoucher_UpdateCall_spender(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_GearVoucher_UpdateCall_voucher_id(in any) *pbgear.GearVoucher_PalletGearVoucherInternalVoucherId { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_GearVoucher_PalletGearVoucherInternalVoucherId(w) //simple field } func To_Optional_GearVoucher_UpdateCall_move_ownership(in any) *pbgear.SpCoreCryptoAccountId32 { + panic("Not implemented") return nil //funcForOptionalField } func To_Optional_GearVoucher_UpdateCall_append_programs(in any) *pbgear.GearVoucher_AppendPrograms { + panic("Not implemented") return nil //funcForOptionalField } @@ -4034,7 +4727,15 @@ func To_Gear_ClaimValueCall(in any) *pbgear.Gear_ClaimValueCall { } func To_Gear_ClaimValueCall_message_id(in any) *pbgear.GprimitivesMessageId { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_GprimitivesMessageId(w) //simple field } func To_Gear_CreateProgramCall(in any) *pbgear.Gear_CreateProgramCall { @@ -4059,7 +4760,15 @@ func To_Gear_CreateProgramCall(in any) *pbgear.Gear_CreateProgramCall { } func To_Gear_CreateProgramCall_code_id(in any) *pbgear.GprimitivesCodeId { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_GprimitivesCodeId(w) //simple field } func To_Gear_RunCall(in any) *pbgear.Gear_RunCall { @@ -4093,7 +4802,15 @@ func To_Gear_SendMessageCall(in any) *pbgear.Gear_SendMessageCall { } func To_Gear_SendMessageCall_destination(in any) *pbgear.GprimitivesActorId { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_GprimitivesActorId(w) //simple field } func To_Gear_SendReplyCall(in any) *pbgear.Gear_SendReplyCall { @@ -4116,7 +4833,15 @@ func To_Gear_SendReplyCall(in any) *pbgear.Gear_SendReplyCall { } func To_Gear_SendReplyCall_reply_to_id(in any) *pbgear.GprimitivesMessageId { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_GprimitivesMessageId(w) //simple field } func To_Gear_SetExecuteInherentCall(in any) *pbgear.Gear_SetExecuteInherentCall { @@ -4201,13 +4926,13 @@ func To_GrandpaPallet(in any) *pbgear.GrandpaPallet { _ = v // oneOf field Call - v0 := Set_OneOf_GrandpaPallet_call(v.ValueAt(0)) + v0 := To_OneOf_GrandpaPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_GrandpaPallet_call(in any) any { +func To_OneOf_GrandpaPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -4235,13 +4960,13 @@ func To_Grandpa_Equivocation(in any) *pbgear.Grandpa_Equivocation { _ = v // oneOf field Value - v0 := Set_OneOf_Grandpa_Equivocation_value(v.ValueAt(0)) + v0 := To_OneOf_Grandpa_Equivocation_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Grandpa_Equivocation_value(in any) any { +func To_OneOf_Grandpa_Equivocation_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -4295,7 +5020,15 @@ func To_Grandpa_Precommit(in any) *pbgear.Grandpa_Precommit { } func To_Grandpa_Precommit_value0(in any) *pbgear.FinalityGrandpaEquivocation { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_FinalityGrandpaEquivocation(w) //simple field } func To_Grandpa_Prevote(in any) *pbgear.Grandpa_Prevote { @@ -4310,7 +5043,15 @@ func To_Grandpa_Prevote(in any) *pbgear.Grandpa_Prevote { } func To_Grandpa_Prevote_value0(in any) *pbgear.FinalityGrandpaEquivocation { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_FinalityGrandpaEquivocation(w) //simple field } func To_Grandpa_ReportEquivocationCall(in any) *pbgear.Grandpa_ReportEquivocationCall { @@ -4327,10 +5068,26 @@ func To_Grandpa_ReportEquivocationCall(in any) *pbgear.Grandpa_ReportEquivocatio } func To_Grandpa_ReportEquivocationCall_equivocation_proof(in any) *pbgear.SpConsensusGrandpaEquivocationProof { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpConsensusGrandpaEquivocationProof(w) //simple field } func To_Grandpa_ReportEquivocationCall_key_owner_proof(in any) *pbgear.SpSessionMembershipProof { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpSessionMembershipProof(w) //simple field } func To_Grandpa_ReportEquivocationUnsignedCall(in any) *pbgear.Grandpa_ReportEquivocationUnsignedCall { @@ -4347,10 +5104,26 @@ func To_Grandpa_ReportEquivocationUnsignedCall(in any) *pbgear.Grandpa_ReportEqu } func To_Grandpa_ReportEquivocationUnsignedCall_equivocation_proof(in any) *pbgear.SpConsensusGrandpaEquivocationProof { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpConsensusGrandpaEquivocationProof(w) //simple field } func To_Grandpa_ReportEquivocationUnsignedCall_key_owner_proof(in any) *pbgear.SpSessionMembershipProof { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpSessionMembershipProof(w) //simple field } func To_HistoricalPallet(in any) *pbgear.HistoricalPallet { @@ -4367,13 +5140,13 @@ func To_IdentityPallet(in any) *pbgear.IdentityPallet { _ = v // oneOf field Call - v0 := Set_OneOf_IdentityPallet_call(v.ValueAt(0)) + v0 := To_OneOf_IdentityPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_IdentityPallet_call(in any) any { +func To_OneOf_IdentityPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -4449,13 +5222,13 @@ func To_Identity_Account(in any) *pbgear.Identity_Account { _ = v // oneOf field Value - v0 := Set_OneOf_Identity_Account_value(v.ValueAt(0)) + v0 := To_OneOf_Identity_Account_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Identity_Account_value(in any) any { +func To_OneOf_Identity_Account_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -4497,7 +5270,15 @@ func To_Identity_AddRegistrarCall(in any) *pbgear.Identity_AddRegistrarCall { } func To_Identity_AddRegistrarCall_account(in any) *pbgear.Identity_Account { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Account(w) //simple field } func To_Identity_AddSubCall(in any) *pbgear.Identity_AddSubCall { @@ -4514,10 +5295,26 @@ func To_Identity_AddSubCall(in any) *pbgear.Identity_AddSubCall { } func To_Identity_AddSubCall_sub(in any) *pbgear.Identity_Sub { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Sub(w) //simple field } func To_Identity_AddSubCall_data(in any) *pbgear.Identity_Data { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Data(w) //simple field } func To_Identity_Address20(in any) *pbgear.Identity_Address20 { @@ -4578,13 +5375,13 @@ func To_Identity_Data(in any) *pbgear.Identity_Data { _ = v // oneOf field Value - v0 := Set_OneOf_Identity_Data_value(v.ValueAt(0)) + v0 := To_OneOf_Identity_Data_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Identity_Data_value(in any) any { +func To_OneOf_Identity_Data_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -4752,13 +5549,13 @@ func To_Identity_Display(in any) *pbgear.Identity_Display { _ = v // oneOf field Value - v0 := Set_OneOf_Identity_Display_value(v.ValueAt(0)) + v0 := To_OneOf_Identity_Display_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Identity_Display_value(in any) any { +func To_OneOf_Identity_Display_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -4926,13 +5723,13 @@ func To_Identity_Email(in any) *pbgear.Identity_Email { _ = v // oneOf field Value - v0 := Set_OneOf_Identity_Email_value(v.ValueAt(0)) + v0 := To_OneOf_Identity_Email_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Identity_Email_value(in any) any { +func To_OneOf_Identity_Email_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -5125,7 +5922,15 @@ func To_Identity_Id(in any) *pbgear.Identity_Id { } func To_Identity_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_Identity_Image(in any) *pbgear.Identity_Image { @@ -5134,13 +5939,13 @@ func To_Identity_Image(in any) *pbgear.Identity_Image { _ = v // oneOf field Value - v0 := Set_OneOf_Identity_Image_value(v.ValueAt(0)) + v0 := To_OneOf_Identity_Image_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Identity_Image_value(in any) any { +func To_OneOf_Identity_Image_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -5314,7 +6119,15 @@ func To_Identity_Index(in any) *pbgear.Identity_Index { } func To_Identity_Index_value0(in any) *pbgear.Identity_TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_TupleNull(w) //simple field } func To_Identity_Judgement(in any) *pbgear.Identity_Judgement { @@ -5323,13 +6136,13 @@ func To_Identity_Judgement(in any) *pbgear.Identity_Judgement { _ = v // oneOf field Value - v0 := Set_OneOf_Identity_Judgement_value(v.ValueAt(0)) + v0 := To_OneOf_Identity_Judgement_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Identity_Judgement_value(in any) any { +func To_OneOf_Identity_Judgement_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -5390,7 +6203,15 @@ func To_Identity_KillIdentityCall(in any) *pbgear.Identity_KillIdentityCall { } func To_Identity_KillIdentityCall_target(in any) *pbgear.Identity_Target { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Target(w) //simple field } func To_Identity_KnownGood(in any) *pbgear.Identity_KnownGood { @@ -5407,13 +6228,13 @@ func To_Identity_Legal(in any) *pbgear.Identity_Legal { _ = v // oneOf field Value - v0 := Set_OneOf_Identity_Legal_value(v.ValueAt(0)) + v0 := To_OneOf_Identity_Legal_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Identity_Legal_value(in any) any { +func To_OneOf_Identity_Legal_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -5589,13 +6410,13 @@ func To_Identity_New(in any) *pbgear.Identity_New { _ = v // oneOf field Value - v0 := Set_OneOf_Identity_New_value(v.ValueAt(0)) + v0 := To_OneOf_Identity_New_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Identity_New_value(in any) any { +func To_OneOf_Identity_New_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -5669,28 +6490,92 @@ func To_Identity_PalletIdentitySimpleIdentityInfo(in any) *pbgear.Identity_Palle } func To_Identity_PalletIdentitySimpleIdentityInfo_additional(in any) *pbgear.BoundedCollectionsBoundedVecBoundedVec { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_BoundedCollectionsBoundedVecBoundedVec(w) //simple field } func To_Identity_PalletIdentitySimpleIdentityInfo_display(in any) *pbgear.Identity_Display { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Display(w) //simple field } func To_Identity_PalletIdentitySimpleIdentityInfo_legal(in any) *pbgear.Identity_Legal { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Legal(w) //simple field } func To_Identity_PalletIdentitySimpleIdentityInfo_web(in any) *pbgear.Identity_Web { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Web(w) //simple field } func To_Identity_PalletIdentitySimpleIdentityInfo_riot(in any) *pbgear.Identity_Riot { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Riot(w) //simple field } func To_Identity_PalletIdentitySimpleIdentityInfo_email(in any) *pbgear.Identity_Email { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Email(w) //simple field } func To_Identity_PalletIdentitySimpleIdentityInfo_image(in any) *pbgear.Identity_Image { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Image(w) //simple field } func To_Identity_PalletIdentitySimpleIdentityInfo_twitter(in any) *pbgear.Identity_Twitter { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Twitter(w) //simple field } func To_Identity_PalletIdentityTypesBitFlags(in any) *pbgear.Identity_PalletIdentityTypesBitFlags { @@ -5722,13 +6607,37 @@ func To_Identity_ProvideJudgementCall(in any) *pbgear.Identity_ProvideJudgementC } func To_Identity_ProvideJudgementCall_target(in any) *pbgear.Identity_Target { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Target(w) //simple field } func To_Identity_ProvideJudgementCall_judgement(in any) *pbgear.Identity_Judgement { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Judgement(w) //simple field } func To_Identity_ProvideJudgementCall_identity(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_Identity_QuitSubCall(in any) *pbgear.Identity_QuitSubCall { @@ -6133,7 +7042,15 @@ func To_Identity_RemoveSubCall(in any) *pbgear.Identity_RemoveSubCall { } func To_Identity_RemoveSubCall_sub(in any) *pbgear.Identity_Sub { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Sub(w) //simple field } func To_Identity_RenameSubCall(in any) *pbgear.Identity_RenameSubCall { @@ -6150,10 +7067,26 @@ func To_Identity_RenameSubCall(in any) *pbgear.Identity_RenameSubCall { } func To_Identity_RenameSubCall_sub(in any) *pbgear.Identity_Sub { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Sub(w) //simple field } func To_Identity_RenameSubCall_data(in any) *pbgear.Identity_Data { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Data(w) //simple field } func To_Identity_RequestJudgementCall(in any) *pbgear.Identity_RequestJudgementCall { @@ -6175,13 +7108,13 @@ func To_Identity_Riot(in any) *pbgear.Identity_Riot { _ = v // oneOf field Value - v0 := Set_OneOf_Identity_Riot_value(v.ValueAt(0)) + v0 := To_OneOf_Identity_Riot_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Identity_Riot_value(in any) any { +func To_OneOf_Identity_Riot_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -6357,7 +7290,15 @@ func To_Identity_SetAccountIdCall(in any) *pbgear.Identity_SetAccountIdCall { } func To_Identity_SetAccountIdCall_new(in any) *pbgear.Identity_New { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_New(w) //simple field } func To_Identity_SetFeeCall(in any) *pbgear.Identity_SetFeeCall { @@ -6387,7 +7328,15 @@ func To_Identity_SetFieldsCall(in any) *pbgear.Identity_SetFieldsCall { } func To_Identity_SetFieldsCall_fields(in any) *pbgear.Identity_PalletIdentityTypesBitFlags { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_PalletIdentityTypesBitFlags(w) //simple field } func To_Identity_SetIdentityCall(in any) *pbgear.Identity_SetIdentityCall { @@ -6402,7 +7351,15 @@ func To_Identity_SetIdentityCall(in any) *pbgear.Identity_SetIdentityCall { } func To_Identity_SetIdentityCall_info(in any) *pbgear.Identity_PalletIdentitySimpleIdentityInfo { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_PalletIdentitySimpleIdentityInfo(w) //simple field } func To_Identity_SetSubsCall(in any) *pbgear.Identity_SetSubsCall { @@ -6459,13 +7416,13 @@ func To_Identity_Sub(in any) *pbgear.Identity_Sub { _ = v // oneOf field Value - v0 := Set_OneOf_Identity_Sub_value(v.ValueAt(0)) + v0 := To_OneOf_Identity_Sub_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Identity_Sub_value(in any) any { +func To_OneOf_Identity_Sub_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -6501,13 +7458,13 @@ func To_Identity_Target(in any) *pbgear.Identity_Target { _ = v // oneOf field Value - v0 := Set_OneOf_Identity_Target_value(v.ValueAt(0)) + v0 := To_OneOf_Identity_Target_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Identity_Target_value(in any) any { +func To_OneOf_Identity_Target_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -6549,7 +7506,15 @@ func To_Identity_TupleNull(in any) *pbgear.Identity_TupleNull { } func To_Identity_TupleNull_value(in any) *pbgear.TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_TupleNull(w) //simple field } func To_Identity_TuplePalletIdentityTypesDatapalletIdentityTypesData(in any) *pbgear.Identity_TuplePalletIdentityTypesDatapalletIdentityTypesData { @@ -6566,10 +7531,26 @@ func To_Identity_TuplePalletIdentityTypesDatapalletIdentityTypesData(in any) *pb } func To_Identity_TuplePalletIdentityTypesDatapalletIdentityTypesData_value0(in any) *pbgear.Identity_Value0 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Value0(w) //simple field } func To_Identity_TuplePalletIdentityTypesDatapalletIdentityTypesData_value1(in any) *pbgear.Identity_Value1 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Value1(w) //simple field } func To_Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData(in any) *pbgear.Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData { @@ -6586,10 +7567,26 @@ func To_Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData(in any) *pb } func To_Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData_value1(in any) *pbgear.Identity_Value1 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Identity_Value1(w) //simple field } func To_Identity_Twitter(in any) *pbgear.Identity_Twitter { @@ -6598,13 +7595,13 @@ func To_Identity_Twitter(in any) *pbgear.Identity_Twitter { _ = v // oneOf field Value - v0 := Set_OneOf_Identity_Twitter_value(v.ValueAt(0)) + v0 := To_OneOf_Identity_Twitter_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Identity_Twitter_value(in any) any { +func To_OneOf_Identity_Twitter_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -6780,13 +7777,13 @@ func To_Identity_Value0(in any) *pbgear.Identity_Value0 { _ = v // oneOf field Value - v0 := Set_OneOf_Identity_Value0_value(v.ValueAt(0)) + v0 := To_OneOf_Identity_Value0_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Identity_Value0_value(in any) any { +func To_OneOf_Identity_Value0_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -6954,13 +7951,13 @@ func To_Identity_Value1(in any) *pbgear.Identity_Value1 { _ = v // oneOf field Value - v0 := Set_OneOf_Identity_Value1_value(v.ValueAt(0)) + v0 := To_OneOf_Identity_Value1_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Identity_Value1_value(in any) any { +func To_OneOf_Identity_Value1_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -7128,13 +8125,13 @@ func To_Identity_Web(in any) *pbgear.Identity_Web { _ = v // oneOf field Value - v0 := Set_OneOf_Identity_Web_value(v.ValueAt(0)) + v0 := To_OneOf_Identity_Web_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Identity_Web_value(in any) any { +func To_OneOf_Identity_Web_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -7302,13 +8299,13 @@ func To_ImOnlinePallet(in any) *pbgear.ImOnlinePallet { _ = v // oneOf field Call - v0 := Set_OneOf_ImOnlinePallet_call(v.ValueAt(0)) + v0 := To_OneOf_ImOnlinePallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_ImOnlinePallet_call(in any) any { +func To_OneOf_ImOnlinePallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -7336,10 +8333,26 @@ func To_ImOnline_HeartbeatCall(in any) *pbgear.ImOnline_HeartbeatCall { } func To_ImOnline_HeartbeatCall_heartbeat(in any) *pbgear.ImOnline_PalletImOnlineHeartbeat { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_ImOnline_PalletImOnlineHeartbeat(w) //simple field } func To_ImOnline_HeartbeatCall_signature(in any) *pbgear.ImOnline_PalletImOnlineSr25519AppSr25519Signature { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_ImOnline_PalletImOnlineSr25519AppSr25519Signature(w) //simple field } func To_ImOnline_PalletImOnlineHeartbeat(in any) *pbgear.ImOnline_PalletImOnlineHeartbeat { @@ -7371,7 +8384,15 @@ func To_ImOnline_PalletImOnlineSr25519AppSr25519Public(in any) *pbgear.ImOnline_ } func To_ImOnline_PalletImOnlineSr25519AppSr25519Public_value0(in any) *pbgear.SpCoreSr25519Public { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreSr25519Public(w) //simple field } func To_ImOnline_PalletImOnlineSr25519AppSr25519Signature(in any) *pbgear.ImOnline_PalletImOnlineSr25519AppSr25519Signature { @@ -7386,7 +8407,15 @@ func To_ImOnline_PalletImOnlineSr25519AppSr25519Signature(in any) *pbgear.ImOnli } func To_ImOnline_PalletImOnlineSr25519AppSr25519Signature_value0(in any) *pbgear.SpCoreSr25519Signature { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreSr25519Signature(w) //simple field } func To_MultisigPallet(in any) *pbgear.MultisigPallet { @@ -7395,13 +8424,13 @@ func To_MultisigPallet(in any) *pbgear.MultisigPallet { _ = v // oneOf field Call - v0 := Set_OneOf_MultisigPallet_call(v.ValueAt(0)) + v0 := To_OneOf_MultisigPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_MultisigPallet_call(in any) any { +func To_OneOf_MultisigPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -7461,10 +8490,19 @@ func To_Repeated_Multisig_ApproveAsMultiCall_other_signatories(in any) []*pbgear return nil //funcForRepeatedField } func To_Optional_Multisig_ApproveAsMultiCall_maybe_timepoint(in any) *pbgear.Multisig_PalletMultisigTimepoint { + panic("Not implemented") return nil //funcForOptionalField } func To_Multisig_ApproveAsMultiCall_max_weight(in any) *pbgear.SpWeightsWeightV2Weight { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpWeightsWeightV2Weight(w) //simple field } func To_Multisig_AsMultiCall(in any) *pbgear.Multisig_AsMultiCall { @@ -7479,7 +8517,7 @@ func To_Multisig_AsMultiCall(in any) *pbgear.Multisig_AsMultiCall { // optional field MaybeTimepoint out.MaybeTimepoint = To_Optional_Multisig_AsMultiCall_maybe_timepoint(v.ValueAt(2)) // oneOf field Call - v3 := Set_OneOf_Multisig_AsMultiCall_call(v.ValueAt(3)) + v3 := To_OneOf_Multisig_AsMultiCall_call(v.ValueAt(3)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v3)) // field MaxWeight out.MaxWeight = To_Multisig_AsMultiCall_max_weight(v.ValueAt(4)) @@ -7502,9 +8540,10 @@ func To_Repeated_Multisig_AsMultiCall_other_signatories(in any) []*pbgear.SpCore return nil //funcForRepeatedField } func To_Optional_Multisig_AsMultiCall_maybe_timepoint(in any) *pbgear.Multisig_PalletMultisigTimepoint { + panic("Not implemented") return nil //funcForOptionalField } -func Set_OneOf_Multisig_AsMultiCall_call(in any) any { +func To_OneOf_Multisig_AsMultiCall_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -7630,7 +8669,15 @@ func Set_OneOf_Multisig_AsMultiCall_call(in any) any { } } func To_Multisig_AsMultiCall_max_weight(in any) *pbgear.SpWeightsWeightV2Weight { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpWeightsWeightV2Weight(w) //simple field } func To_Multisig_AsMultiThreshold1Call(in any) *pbgear.Multisig_AsMultiThreshold1Call { @@ -7641,7 +8688,7 @@ func To_Multisig_AsMultiThreshold1Call(in any) *pbgear.Multisig_AsMultiThreshold // repeated field OtherSignatories out.OtherSignatories = To_Repeated_Multisig_AsMultiThreshold1Call_other_signatories(v.ValueAt(0)) // oneOf field Call - v1 := Set_OneOf_Multisig_AsMultiThreshold1Call_call(v.ValueAt(1)) + v1 := To_OneOf_Multisig_AsMultiThreshold1Call_call(v.ValueAt(1)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v1)) return out //from message @@ -7661,7 +8708,7 @@ func To_Repeated_Multisig_AsMultiThreshold1Call_other_signatories(in any) []*pbg } return nil //funcForRepeatedField } -func Set_OneOf_Multisig_AsMultiThreshold1Call_call(in any) any { +func To_OneOf_Multisig_AsMultiThreshold1Call_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -7819,7 +8866,15 @@ func To_Repeated_Multisig_CancelAsMultiCall_other_signatories(in any) []*pbgear. return nil //funcForRepeatedField } func To_Multisig_CancelAsMultiCall_timepoint(in any) *pbgear.Multisig_PalletMultisigTimepoint { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Multisig_PalletMultisigTimepoint(w) //simple field } func To_Multisig_PalletMultisigTimepoint(in any) *pbgear.Multisig_PalletMultisigTimepoint { @@ -7841,13 +8896,13 @@ func To_NominationPoolsPallet(in any) *pbgear.NominationPoolsPallet { _ = v // oneOf field Call - v0 := Set_OneOf_NominationPoolsPallet_call(v.ValueAt(0)) + v0 := To_OneOf_NominationPoolsPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPoolsPallet_call(in any) any { +func To_OneOf_NominationPoolsPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -7998,7 +9053,15 @@ func To_NominationPools_BondExtraCall(in any) *pbgear.NominationPools_BondExtraC } func To_NominationPools_BondExtraCall_extra(in any) *pbgear.NominationPools_Extra { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_Extra(w) //simple field } func To_NominationPools_BondExtraOtherCall(in any) *pbgear.NominationPools_BondExtraOtherCall { @@ -8015,10 +9078,26 @@ func To_NominationPools_BondExtraOtherCall(in any) *pbgear.NominationPools_BondE } func To_NominationPools_BondExtraOtherCall_member(in any) *pbgear.NominationPools_Member { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_Member(w) //simple field } func To_NominationPools_BondExtraOtherCall_extra(in any) *pbgear.NominationPools_Extra { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_Extra(w) //simple field } func To_NominationPools_Bouncer(in any) *pbgear.NominationPools_Bouncer { @@ -8027,13 +9106,13 @@ func To_NominationPools_Bouncer(in any) *pbgear.NominationPools_Bouncer { _ = v // oneOf field Value - v0 := Set_OneOf_NominationPools_Bouncer_value(v.ValueAt(0)) + v0 := To_OneOf_NominationPools_Bouncer_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPools_Bouncer_value(in any) any { +func To_OneOf_NominationPools_Bouncer_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -8105,7 +9184,15 @@ func To_NominationPools_ClaimPayoutOtherCall(in any) *pbgear.NominationPools_Cla } func To_NominationPools_ClaimPayoutOtherCall_other(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_NominationPools_CreateCall(in any) *pbgear.NominationPools_CreateCall { @@ -8126,13 +9213,37 @@ func To_NominationPools_CreateCall(in any) *pbgear.NominationPools_CreateCall { } func To_NominationPools_CreateCall_root(in any) *pbgear.NominationPools_Root { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_Root(w) //simple field } func To_NominationPools_CreateCall_nominator(in any) *pbgear.NominationPools_Nominator { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_Nominator(w) //simple field } func To_NominationPools_CreateCall_bouncer(in any) *pbgear.NominationPools_Bouncer { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_Bouncer(w) //simple field } func To_NominationPools_CreateWithPoolIdCall(in any) *pbgear.NominationPools_CreateWithPoolIdCall { @@ -8155,13 +9266,37 @@ func To_NominationPools_CreateWithPoolIdCall(in any) *pbgear.NominationPools_Cre } func To_NominationPools_CreateWithPoolIdCall_root(in any) *pbgear.NominationPools_Root { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_Root(w) //simple field } func To_NominationPools_CreateWithPoolIdCall_nominator(in any) *pbgear.NominationPools_Nominator { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_Nominator(w) //simple field } func To_NominationPools_CreateWithPoolIdCall_bouncer(in any) *pbgear.NominationPools_Bouncer { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_Bouncer(w) //simple field } func To_NominationPools_Destroying(in any) *pbgear.NominationPools_Destroying { @@ -8178,13 +9313,13 @@ func To_NominationPools_Extra(in any) *pbgear.NominationPools_Extra { _ = v // oneOf field Value - v0 := Set_OneOf_NominationPools_Extra_value(v.ValueAt(0)) + v0 := To_OneOf_NominationPools_Extra_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPools_Extra_value(in any) any { +func To_OneOf_NominationPools_Extra_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -8219,13 +9354,13 @@ func To_NominationPools_GlobalMaxCommission(in any) *pbgear.NominationPools_Glob _ = v // oneOf field Value - v0 := Set_OneOf_NominationPools_GlobalMaxCommission_value(v.ValueAt(0)) + v0 := To_OneOf_NominationPools_GlobalMaxCommission_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPools_GlobalMaxCommission_value(in any) any { +func To_OneOf_NominationPools_GlobalMaxCommission_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -8259,7 +9394,15 @@ func To_NominationPools_Id(in any) *pbgear.NominationPools_Id { } func To_NominationPools_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_NominationPools_Index(in any) *pbgear.NominationPools_Index { @@ -8274,7 +9417,15 @@ func To_NominationPools_Index(in any) *pbgear.NominationPools_Index { } func To_NominationPools_Index_value0(in any) *pbgear.NominationPools_TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_TupleNull(w) //simple field } func To_NominationPools_JoinCall(in any) *pbgear.NominationPools_JoinCall { @@ -8296,13 +9447,13 @@ func To_NominationPools_MaxMembers(in any) *pbgear.NominationPools_MaxMembers { _ = v // oneOf field Value - v0 := Set_OneOf_NominationPools_MaxMembers_value(v.ValueAt(0)) + v0 := To_OneOf_NominationPools_MaxMembers_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPools_MaxMembers_value(in any) any { +func To_OneOf_NominationPools_MaxMembers_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -8330,13 +9481,13 @@ func To_NominationPools_MaxMembersPerPool(in any) *pbgear.NominationPools_MaxMem _ = v // oneOf field Value - v0 := Set_OneOf_NominationPools_MaxMembersPerPool_value(v.ValueAt(0)) + v0 := To_OneOf_NominationPools_MaxMembersPerPool_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPools_MaxMembersPerPool_value(in any) any { +func To_OneOf_NominationPools_MaxMembersPerPool_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -8364,13 +9515,13 @@ func To_NominationPools_MaxPools(in any) *pbgear.NominationPools_MaxPools { _ = v // oneOf field Value - v0 := Set_OneOf_NominationPools_MaxPools_value(v.ValueAt(0)) + v0 := To_OneOf_NominationPools_MaxPools_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPools_MaxPools_value(in any) any { +func To_OneOf_NominationPools_MaxPools_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -8398,13 +9549,13 @@ func To_NominationPools_Member(in any) *pbgear.NominationPools_Member { _ = v // oneOf field Value - v0 := Set_OneOf_NominationPools_Member_value(v.ValueAt(0)) + v0 := To_OneOf_NominationPools_Member_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPools_Member_value(in any) any { +func To_OneOf_NominationPools_Member_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -8440,13 +9591,13 @@ func To_NominationPools_MemberAccount(in any) *pbgear.NominationPools_MemberAcco _ = v // oneOf field Value - v0 := Set_OneOf_NominationPools_MemberAccount_value(v.ValueAt(0)) + v0 := To_OneOf_NominationPools_MemberAccount_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPools_MemberAccount_value(in any) any { +func To_OneOf_NominationPools_MemberAccount_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -8482,13 +9633,13 @@ func To_NominationPools_MinCreateBond(in any) *pbgear.NominationPools_MinCreateB _ = v // oneOf field Value - v0 := Set_OneOf_NominationPools_MinCreateBond_value(v.ValueAt(0)) + v0 := To_OneOf_NominationPools_MinCreateBond_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPools_MinCreateBond_value(in any) any { +func To_OneOf_NominationPools_MinCreateBond_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -8516,13 +9667,13 @@ func To_NominationPools_MinJoinBond(in any) *pbgear.NominationPools_MinJoinBond _ = v // oneOf field Value - v0 := Set_OneOf_NominationPools_MinJoinBond_value(v.ValueAt(0)) + v0 := To_OneOf_NominationPools_MinJoinBond_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPools_MinJoinBond_value(in any) any { +func To_OneOf_NominationPools_MinJoinBond_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -8550,13 +9701,13 @@ func To_NominationPools_NewBouncer(in any) *pbgear.NominationPools_NewBouncer { _ = v // oneOf field Value - v0 := Set_OneOf_NominationPools_NewBouncer_value(v.ValueAt(0)) + v0 := To_OneOf_NominationPools_NewBouncer_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPools_NewBouncer_value(in any) any { +func To_OneOf_NominationPools_NewBouncer_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -8584,13 +9735,13 @@ func To_NominationPools_NewNominator(in any) *pbgear.NominationPools_NewNominato _ = v // oneOf field Value - v0 := Set_OneOf_NominationPools_NewNominator_value(v.ValueAt(0)) + v0 := To_OneOf_NominationPools_NewNominator_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPools_NewNominator_value(in any) any { +func To_OneOf_NominationPools_NewNominator_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -8618,13 +9769,13 @@ func To_NominationPools_NewRoot(in any) *pbgear.NominationPools_NewRoot { _ = v // oneOf field Value - v0 := Set_OneOf_NominationPools_NewRoot_value(v.ValueAt(0)) + v0 := To_OneOf_NominationPools_NewRoot_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPools_NewRoot_value(in any) any { +func To_OneOf_NominationPools_NewRoot_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -8680,13 +9831,13 @@ func To_NominationPools_Nominator(in any) *pbgear.NominationPools_Nominator { _ = v // oneOf field Value - v0 := Set_OneOf_NominationPools_Nominator_value(v.ValueAt(0)) + v0 := To_OneOf_NominationPools_Nominator_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPools_Nominator_value(in any) any { +func To_OneOf_NominationPools_Nominator_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -8746,7 +9897,15 @@ func To_NominationPools_PalletNominationPoolsCommissionChangeRate(in any) *pbgea } func To_NominationPools_PalletNominationPoolsCommissionChangeRate_max_increase(in any) *pbgear.SpArithmeticPerThingsPerbill { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpArithmeticPerThingsPerbill(w) //simple field } func To_NominationPools_Permission(in any) *pbgear.NominationPools_Permission { @@ -8755,13 +9914,13 @@ func To_NominationPools_Permission(in any) *pbgear.NominationPools_Permission { _ = v // oneOf field Value - v0 := Set_OneOf_NominationPools_Permission_value(v.ValueAt(0)) + v0 := To_OneOf_NominationPools_Permission_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPools_Permission_value(in any) any { +func To_OneOf_NominationPools_Permission_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -8865,13 +10024,13 @@ func To_NominationPools_Root(in any) *pbgear.NominationPools_Root { _ = v // oneOf field Value - v0 := Set_OneOf_NominationPools_Root_value(v.ValueAt(0)) + v0 := To_OneOf_NominationPools_Root_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPools_Root_value(in any) any { +func To_OneOf_NominationPools_Root_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -8924,7 +10083,15 @@ func To_NominationPools_SetClaimPermissionCall(in any) *pbgear.NominationPools_S } func To_NominationPools_SetClaimPermissionCall_permission(in any) *pbgear.NominationPools_Permission { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_Permission(w) //simple field } func To_NominationPools_SetCommissionCall(in any) *pbgear.NominationPools_SetCommissionCall { @@ -8941,6 +10108,7 @@ func To_NominationPools_SetCommissionCall(in any) *pbgear.NominationPools_SetCom } func To_Optional_NominationPools_SetCommissionCall_new_commission(in any) *pbgear.NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32 { + panic("Not implemented") return nil //funcForOptionalField } @@ -8958,7 +10126,15 @@ func To_NominationPools_SetCommissionChangeRateCall(in any) *pbgear.NominationPo } func To_NominationPools_SetCommissionChangeRateCall_change_rate(in any) *pbgear.NominationPools_PalletNominationPoolsCommissionChangeRate { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_PalletNominationPoolsCommissionChangeRate(w) //simple field } func To_NominationPools_SetCommissionMaxCall(in any) *pbgear.NominationPools_SetCommissionMaxCall { @@ -8975,7 +10151,15 @@ func To_NominationPools_SetCommissionMaxCall(in any) *pbgear.NominationPools_Set } func To_NominationPools_SetCommissionMaxCall_max_commission(in any) *pbgear.SpArithmeticPerThingsPerbill { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpArithmeticPerThingsPerbill(w) //simple field } func To_NominationPools_SetConfigsCall(in any) *pbgear.NominationPools_SetConfigsCall { @@ -9000,22 +10184,70 @@ func To_NominationPools_SetConfigsCall(in any) *pbgear.NominationPools_SetConfig } func To_NominationPools_SetConfigsCall_min_join_bond(in any) *pbgear.NominationPools_MinJoinBond { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_MinJoinBond(w) //simple field } func To_NominationPools_SetConfigsCall_min_create_bond(in any) *pbgear.NominationPools_MinCreateBond { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_MinCreateBond(w) //simple field } func To_NominationPools_SetConfigsCall_max_pools(in any) *pbgear.NominationPools_MaxPools { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_MaxPools(w) //simple field } func To_NominationPools_SetConfigsCall_max_members(in any) *pbgear.NominationPools_MaxMembers { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_MaxMembers(w) //simple field } func To_NominationPools_SetConfigsCall_max_members_per_pool(in any) *pbgear.NominationPools_MaxMembersPerPool { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_MaxMembersPerPool(w) //simple field } func To_NominationPools_SetConfigsCall_global_max_commission(in any) *pbgear.NominationPools_GlobalMaxCommission { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_GlobalMaxCommission(w) //simple field } func To_NominationPools_SetMetadataCall(in any) *pbgear.NominationPools_SetMetadataCall { @@ -9045,7 +10277,15 @@ func To_NominationPools_SetStateCall(in any) *pbgear.NominationPools_SetStateCal } func To_NominationPools_SetStateCall_state(in any) *pbgear.NominationPools_State { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_State(w) //simple field } func To_NominationPools_State(in any) *pbgear.NominationPools_State { @@ -9054,13 +10294,13 @@ func To_NominationPools_State(in any) *pbgear.NominationPools_State { _ = v // oneOf field Value - v0 := Set_OneOf_NominationPools_State_value(v.ValueAt(0)) + v0 := To_OneOf_NominationPools_State_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_NominationPools_State_value(in any) any { +func To_OneOf_NominationPools_State_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -9094,7 +10334,15 @@ func To_NominationPools_TupleNull(in any) *pbgear.NominationPools_TupleNull { } func To_NominationPools_TupleNull_value(in any) *pbgear.TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_TupleNull(w) //simple field } func To_NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32(in any) *pbgear.NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32 { @@ -9111,10 +10359,26 @@ func To_NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32 } func To_NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32_value0(in any) *pbgear.SpArithmeticPerThingsPerbill { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpArithmeticPerThingsPerbill(w) //simple field } func To_NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32_value1(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_NominationPools_UnbondCall(in any) *pbgear.NominationPools_UnbondCall { @@ -9131,7 +10395,15 @@ func To_NominationPools_UnbondCall(in any) *pbgear.NominationPools_UnbondCall { } func To_NominationPools_UnbondCall_member_account(in any) *pbgear.NominationPools_MemberAccount { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_MemberAccount(w) //simple field } func To_NominationPools_UpdateRolesCall(in any) *pbgear.NominationPools_UpdateRolesCall { @@ -9152,13 +10424,37 @@ func To_NominationPools_UpdateRolesCall(in any) *pbgear.NominationPools_UpdateRo } func To_NominationPools_UpdateRolesCall_new_root(in any) *pbgear.NominationPools_NewRoot { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_NewRoot(w) //simple field } func To_NominationPools_UpdateRolesCall_new_nominator(in any) *pbgear.NominationPools_NewNominator { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_NewNominator(w) //simple field } func To_NominationPools_UpdateRolesCall_new_bouncer(in any) *pbgear.NominationPools_NewBouncer { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_NewBouncer(w) //simple field } func To_NominationPools_WithdrawUnbondedCall(in any) *pbgear.NominationPools_WithdrawUnbondedCall { @@ -9175,7 +10471,15 @@ func To_NominationPools_WithdrawUnbondedCall(in any) *pbgear.NominationPools_Wit } func To_NominationPools_WithdrawUnbondedCall_member_account(in any) *pbgear.NominationPools_MemberAccount { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_NominationPools_MemberAccount(w) //simple field } func To_None(in any) *pbgear.None { @@ -9208,13 +10512,13 @@ func To_PreimagePallet(in any) *pbgear.PreimagePallet { _ = v // oneOf field Call - v0 := Set_OneOf_PreimagePallet_call(v.ValueAt(0)) + v0 := To_OneOf_PreimagePallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_PreimagePallet_call(in any) any { +func To_OneOf_PreimagePallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -9293,7 +10597,15 @@ func To_Preimage_RequestPreimageCall(in any) *pbgear.Preimage_RequestPreimageCal } func To_Preimage_RequestPreimageCall_hash(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_Preimage_UnnotePreimageCall(in any) *pbgear.Preimage_UnnotePreimageCall { @@ -9308,7 +10620,15 @@ func To_Preimage_UnnotePreimageCall(in any) *pbgear.Preimage_UnnotePreimageCall } func To_Preimage_UnnotePreimageCall_hash(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_Preimage_UnrequestPreimageCall(in any) *pbgear.Preimage_UnrequestPreimageCall { @@ -9323,7 +10643,15 @@ func To_Preimage_UnrequestPreimageCall(in any) *pbgear.Preimage_UnrequestPreimag } func To_Preimage_UnrequestPreimageCall_hash(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_PrimaryAndSecondaryPlainSlots(in any) *pbgear.PrimaryAndSecondaryPlainSlots { @@ -9367,13 +10695,13 @@ func To_ProxyPallet(in any) *pbgear.ProxyPallet { _ = v // oneOf field Call - v0 := Set_OneOf_ProxyPallet_call(v.ValueAt(0)) + v0 := To_OneOf_ProxyPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_ProxyPallet_call(in any) any { +func To_OneOf_ProxyPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -9439,10 +10767,26 @@ func To_Proxy_AddProxyCall(in any) *pbgear.Proxy_AddProxyCall { } func To_Proxy_AddProxyCall_delegate(in any) *pbgear.Proxy_Delegate { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Proxy_Delegate(w) //simple field } func To_Proxy_AddProxyCall_proxy_type(in any) *pbgear.Proxy_ProxyType { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Proxy_ProxyType(w) //simple field } func To_Proxy_Address20(in any) *pbgear.Proxy_Address20 { @@ -9481,10 +10825,26 @@ func To_Proxy_AnnounceCall(in any) *pbgear.Proxy_AnnounceCall { } func To_Proxy_AnnounceCall_real(in any) *pbgear.Proxy_Real { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Proxy_Real(w) //simple field } func To_Proxy_AnnounceCall_call_hash(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_Proxy_Any(in any) *pbgear.Proxy_Any { @@ -9519,7 +10879,15 @@ func To_Proxy_CreatePureCall(in any) *pbgear.Proxy_CreatePureCall { } func To_Proxy_CreatePureCall_proxy_type(in any) *pbgear.Proxy_ProxyType { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Proxy_ProxyType(w) //simple field } func To_Proxy_Delegate(in any) *pbgear.Proxy_Delegate { @@ -9528,13 +10896,13 @@ func To_Proxy_Delegate(in any) *pbgear.Proxy_Delegate { _ = v // oneOf field Value - v0 := Set_OneOf_Proxy_Delegate_value(v.ValueAt(0)) + v0 := To_OneOf_Proxy_Delegate_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Proxy_Delegate_value(in any) any { +func To_OneOf_Proxy_Delegate_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -9570,13 +10938,13 @@ func To_Proxy_ForceProxyType(in any) *pbgear.Proxy_ForceProxyType { _ = v // oneOf field Value - v0 := Set_OneOf_Proxy_ForceProxyType_value(v.ValueAt(0)) + v0 := To_OneOf_Proxy_ForceProxyType_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Proxy_ForceProxyType_value(in any) any { +func To_OneOf_Proxy_ForceProxyType_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -9630,7 +10998,15 @@ func To_Proxy_Id(in any) *pbgear.Proxy_Id { } func To_Proxy_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_Proxy_IdentityJudgement(in any) *pbgear.Proxy_IdentityJudgement { @@ -9653,7 +11029,15 @@ func To_Proxy_Index(in any) *pbgear.Proxy_Index { } func To_Proxy_Index_value0(in any) *pbgear.Proxy_TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Proxy_TupleNull(w) //simple field } func To_Proxy_KillPureCall(in any) *pbgear.Proxy_KillPureCall { @@ -9676,10 +11060,26 @@ func To_Proxy_KillPureCall(in any) *pbgear.Proxy_KillPureCall { } func To_Proxy_KillPureCall_spawner(in any) *pbgear.Proxy_Spawner { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Proxy_Spawner(w) //simple field } func To_Proxy_KillPureCall_proxy_type(in any) *pbgear.Proxy_ProxyType { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Proxy_ProxyType(w) //simple field } func To_Proxy_NonTransfer(in any) *pbgear.Proxy_NonTransfer { @@ -9702,22 +11102,39 @@ func To_Proxy_ProxyAnnouncedCall(in any) *pbgear.Proxy_ProxyAnnouncedCall { // optional field ForceProxyType out.ForceProxyType = To_Optional_Proxy_ProxyAnnouncedCall_force_proxy_type(v.ValueAt(2)) // oneOf field Call - v3 := Set_OneOf_Proxy_ProxyAnnouncedCall_call(v.ValueAt(3)) + v3 := To_OneOf_Proxy_ProxyAnnouncedCall_call(v.ValueAt(3)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v3)) return out //from message } func To_Proxy_ProxyAnnouncedCall_delegate(in any) *pbgear.Proxy_Delegate { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Proxy_Delegate(w) //simple field } func To_Proxy_ProxyAnnouncedCall_real(in any) *pbgear.Proxy_Real { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Proxy_Real(w) //simple field } func To_Optional_Proxy_ProxyAnnouncedCall_force_proxy_type(in any) *pbgear.Proxy_ForceProxyType { + panic("Not implemented") return nil //funcForOptionalField } -func Set_OneOf_Proxy_ProxyAnnouncedCall_call(in any) any { +func To_OneOf_Proxy_ProxyAnnouncedCall_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -9853,19 +11270,28 @@ func To_Proxy_ProxyCall(in any) *pbgear.Proxy_ProxyCall { // optional field ForceProxyType out.ForceProxyType = To_Optional_Proxy_ProxyCall_force_proxy_type(v.ValueAt(1)) // oneOf field Call - v2 := Set_OneOf_Proxy_ProxyCall_call(v.ValueAt(2)) + v2 := To_OneOf_Proxy_ProxyCall_call(v.ValueAt(2)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v2)) return out //from message } func To_Proxy_ProxyCall_real(in any) *pbgear.Proxy_Real { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Proxy_Real(w) //simple field } func To_Optional_Proxy_ProxyCall_force_proxy_type(in any) *pbgear.Proxy_ForceProxyType { + panic("Not implemented") return nil //funcForOptionalField } -func Set_OneOf_Proxy_ProxyCall_call(in any) any { +func To_OneOf_Proxy_ProxyCall_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -9997,13 +11423,13 @@ func To_Proxy_ProxyType(in any) *pbgear.Proxy_ProxyType { _ = v // oneOf field Value - v0 := Set_OneOf_Proxy_ProxyType_value(v.ValueAt(0)) + v0 := To_OneOf_Proxy_ProxyType_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Proxy_ProxyType_value(in any) any { +func To_OneOf_Proxy_ProxyType_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -10054,13 +11480,13 @@ func To_Proxy_Real(in any) *pbgear.Proxy_Real { _ = v // oneOf field Value - v0 := Set_OneOf_Proxy_Real_value(v.ValueAt(0)) + v0 := To_OneOf_Proxy_Real_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Proxy_Real_value(in any) any { +func To_OneOf_Proxy_Real_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -10104,10 +11530,26 @@ func To_Proxy_RejectAnnouncementCall(in any) *pbgear.Proxy_RejectAnnouncementCal } func To_Proxy_RejectAnnouncementCall_delegate(in any) *pbgear.Proxy_Delegate { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Proxy_Delegate(w) //simple field } func To_Proxy_RejectAnnouncementCall_call_hash(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_Proxy_RemoveAnnouncementCall(in any) *pbgear.Proxy_RemoveAnnouncementCall { @@ -10124,10 +11566,26 @@ func To_Proxy_RemoveAnnouncementCall(in any) *pbgear.Proxy_RemoveAnnouncementCal } func To_Proxy_RemoveAnnouncementCall_real(in any) *pbgear.Proxy_Real { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Proxy_Real(w) //simple field } func To_Proxy_RemoveAnnouncementCall_call_hash(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_Proxy_RemoveProxiesCall(in any) *pbgear.Proxy_RemoveProxiesCall { @@ -10154,10 +11612,26 @@ func To_Proxy_RemoveProxyCall(in any) *pbgear.Proxy_RemoveProxyCall { } func To_Proxy_RemoveProxyCall_delegate(in any) *pbgear.Proxy_Delegate { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Proxy_Delegate(w) //simple field } func To_Proxy_RemoveProxyCall_proxy_type(in any) *pbgear.Proxy_ProxyType { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Proxy_ProxyType(w) //simple field } func To_Proxy_Spawner(in any) *pbgear.Proxy_Spawner { @@ -10166,13 +11640,13 @@ func To_Proxy_Spawner(in any) *pbgear.Proxy_Spawner { _ = v // oneOf field Value - v0 := Set_OneOf_Proxy_Spawner_value(v.ValueAt(0)) + v0 := To_OneOf_Proxy_Spawner_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Proxy_Spawner_value(in any) any { +func To_OneOf_Proxy_Spawner_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -10221,8 +11695,16 @@ func To_Proxy_TupleNull(in any) *pbgear.Proxy_TupleNull { return out //from message } -func To_Proxy_TupleNull_value(in any) *pbgear.TupleNull { - return nil //simple field +func To_Proxy_TupleNull_value(in any) *pbgear.TupleNull { + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_TupleNull(w) //simple field } func To_ReferendaPallet(in any) *pbgear.ReferendaPallet { @@ -10231,13 +11713,13 @@ func To_ReferendaPallet(in any) *pbgear.ReferendaPallet { _ = v // oneOf field Call - v0 := Set_OneOf_ReferendaPallet_call(v.ValueAt(0)) + v0 := To_OneOf_ReferendaPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_ReferendaPallet_call(in any) any { +func To_OneOf_ReferendaPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -10322,13 +11804,13 @@ func To_Referenda_EnactmentMoment(in any) *pbgear.Referenda_EnactmentMoment { _ = v // oneOf field Value - v0 := Set_OneOf_Referenda_EnactmentMoment_value(v.ValueAt(0)) + v0 := To_OneOf_Referenda_EnactmentMoment_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Referenda_EnactmentMoment_value(in any) any { +func To_OneOf_Referenda_EnactmentMoment_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -10358,7 +11840,15 @@ func To_Referenda_Inline(in any) *pbgear.Referenda_Inline { } func To_Referenda_Inline_value0(in any) *pbgear.BoundedCollectionsBoundedVecBoundedVec { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_BoundedCollectionsBoundedVecBoundedVec(w) //simple field } func To_Referenda_KillCall(in any) *pbgear.Referenda_KillCall { @@ -10384,7 +11874,15 @@ func To_Referenda_Legacy(in any) *pbgear.Referenda_Legacy { } func To_Referenda_Legacy_hash(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_Referenda_Lookup(in any) *pbgear.Referenda_Lookup { @@ -10401,7 +11899,15 @@ func To_Referenda_Lookup(in any) *pbgear.Referenda_Lookup { } func To_Referenda_Lookup_hash(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_Referenda_NudgeReferendumCall(in any) *pbgear.Referenda_NudgeReferendumCall { @@ -10438,7 +11944,15 @@ func To_Referenda_Origins(in any) *pbgear.Referenda_Origins { } func To_Referenda_Origins_value0(in any) *pbgear.Value0 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Value0(w) //simple field } func To_Referenda_PlaceDecisionDepositCall(in any) *pbgear.Referenda_PlaceDecisionDepositCall { @@ -10458,13 +11972,13 @@ func To_Referenda_Proposal(in any) *pbgear.Referenda_Proposal { _ = v // oneOf field Value - v0 := Set_OneOf_Referenda_Proposal_value(v.ValueAt(0)) + v0 := To_OneOf_Referenda_Proposal_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Referenda_Proposal_value(in any) any { +func To_OneOf_Referenda_Proposal_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -10492,13 +12006,13 @@ func To_Referenda_ProposalOrigin(in any) *pbgear.Referenda_ProposalOrigin { _ = v // oneOf field Value - v0 := Set_OneOf_Referenda_ProposalOrigin_value(v.ValueAt(0)) + v0 := To_OneOf_Referenda_ProposalOrigin_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Referenda_ProposalOrigin_value(in any) any { +func To_OneOf_Referenda_ProposalOrigin_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -10556,6 +12070,7 @@ func To_Referenda_SetMetadataCall(in any) *pbgear.Referenda_SetMetadataCall { } func To_Optional_Referenda_SetMetadataCall_maybe_hash(in any) *pbgear.PrimitiveTypesH256 { + panic("Not implemented") return nil //funcForOptionalField } @@ -10575,13 +12090,37 @@ func To_Referenda_SubmitCall(in any) *pbgear.Referenda_SubmitCall { } func To_Referenda_SubmitCall_proposal_origin(in any) *pbgear.Referenda_ProposalOrigin { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Referenda_ProposalOrigin(w) //simple field } func To_Referenda_SubmitCall_proposal(in any) *pbgear.Referenda_Proposal { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Referenda_Proposal(w) //simple field } func To_Referenda_SubmitCall_enactment_moment(in any) *pbgear.Referenda_EnactmentMoment { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Referenda_EnactmentMoment(w) //simple field } func To_Referenda_System(in any) *pbgear.Referenda_System { @@ -10596,7 +12135,15 @@ func To_Referenda_System(in any) *pbgear.Referenda_System { } func To_Referenda_System_value0(in any) *pbgear.Value0 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Value0(w) //simple field } func To_Referenda_Void(in any) *pbgear.Referenda_Void { @@ -10611,7 +12158,15 @@ func To_Referenda_Void(in any) *pbgear.Referenda_Void { } func To_Referenda_Void_value0(in any) *pbgear.Value0 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Value0(w) //simple field } func To_Root(in any) *pbgear.Root { @@ -10628,13 +12183,13 @@ func To_SchedulerPallet(in any) *pbgear.SchedulerPallet { _ = v // oneOf field Call - v0 := Set_OneOf_SchedulerPallet_call(v.ValueAt(0)) + v0 := To_OneOf_SchedulerPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_SchedulerPallet_call(in any) any { +func To_OneOf_SchedulerPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -10704,16 +12259,17 @@ func To_Scheduler_ScheduleAfterCall(in any) *pbgear.Scheduler_ScheduleAfterCall // primitive field Priority out.Priority = To_uint32(v.ValueAt(2)) // oneOf field Call - v3 := Set_OneOf_Scheduler_ScheduleAfterCall_call(v.ValueAt(3)) + v3 := To_OneOf_Scheduler_ScheduleAfterCall_call(v.ValueAt(3)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v3)) return out //from message } func To_Optional_Scheduler_ScheduleAfterCall_maybe_periodic(in any) *pbgear.Scheduler_TupleUint32Uint32 { + panic("Not implemented") return nil //funcForOptionalField } -func Set_OneOf_Scheduler_ScheduleAfterCall_call(in any) any { +func To_OneOf_Scheduler_ScheduleAfterCall_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -10851,16 +12407,17 @@ func To_Scheduler_ScheduleCall(in any) *pbgear.Scheduler_ScheduleCall { // primitive field Priority out.Priority = To_uint32(v.ValueAt(2)) // oneOf field Call - v3 := Set_OneOf_Scheduler_ScheduleCall_call(v.ValueAt(3)) + v3 := To_OneOf_Scheduler_ScheduleCall_call(v.ValueAt(3)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v3)) return out //from message } func To_Optional_Scheduler_ScheduleCall_maybe_periodic(in any) *pbgear.Scheduler_TupleUint32Uint32 { + panic("Not implemented") return nil //funcForOptionalField } -func Set_OneOf_Scheduler_ScheduleCall_call(in any) any { +func To_OneOf_Scheduler_ScheduleCall_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -11000,16 +12557,17 @@ func To_Scheduler_ScheduleNamedAfterCall(in any) *pbgear.Scheduler_ScheduleNamed // primitive field Priority out.Priority = To_uint32(v.ValueAt(3)) // oneOf field Call - v4 := Set_OneOf_Scheduler_ScheduleNamedAfterCall_call(v.ValueAt(4)) + v4 := To_OneOf_Scheduler_ScheduleNamedAfterCall_call(v.ValueAt(4)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v4)) return out //from message } func To_Optional_Scheduler_ScheduleNamedAfterCall_maybe_periodic(in any) *pbgear.Scheduler_TupleUint32Uint32 { + panic("Not implemented") return nil //funcForOptionalField } -func Set_OneOf_Scheduler_ScheduleNamedAfterCall_call(in any) any { +func To_OneOf_Scheduler_ScheduleNamedAfterCall_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -11149,16 +12707,17 @@ func To_Scheduler_ScheduleNamedCall(in any) *pbgear.Scheduler_ScheduleNamedCall // primitive field Priority out.Priority = To_uint32(v.ValueAt(3)) // oneOf field Call - v4 := Set_OneOf_Scheduler_ScheduleNamedCall_call(v.ValueAt(4)) + v4 := To_OneOf_Scheduler_ScheduleNamedCall_call(v.ValueAt(4)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v4)) return out //from message } func To_Optional_Scheduler_ScheduleNamedCall_maybe_periodic(in any) *pbgear.Scheduler_TupleUint32Uint32 { + panic("Not implemented") return nil //funcForOptionalField } -func Set_OneOf_Scheduler_ScheduleNamedCall_call(in any) any { +func To_OneOf_Scheduler_ScheduleNamedCall_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -11303,13 +12862,13 @@ func To_SessionPallet(in any) *pbgear.SessionPallet { _ = v // oneOf field Call - v0 := Set_OneOf_SessionPallet_call(v.ValueAt(0)) + v0 := To_OneOf_SessionPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_SessionPallet_call(in any) any { +func To_OneOf_SessionPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -11349,7 +12908,15 @@ func To_Session_SetKeysCall(in any) *pbgear.Session_SetKeysCall { } func To_Session_SetKeysCall_keys(in any) *pbgear.VaraRuntimeSessionKeys { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_VaraRuntimeSessionKeys(w) //simple field } func To_Signed(in any) *pbgear.Signed { @@ -11364,7 +12931,15 @@ func To_Signed(in any) *pbgear.Signed { } func To_Signed_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_SpArithmeticPerThingsPerU16(in any) *pbgear.SpArithmeticPerThingsPerU16 { @@ -11412,7 +12987,15 @@ func To_SpAuthorityDiscoveryAppPublic(in any) *pbgear.SpAuthorityDiscoveryAppPub } func To_SpAuthorityDiscoveryAppPublic_value0(in any) *pbgear.SpCoreSr25519Public { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreSr25519Public(w) //simple field } func To_SpConsensusBabeAppPublic(in any) *pbgear.SpConsensusBabeAppPublic { @@ -11427,7 +13010,15 @@ func To_SpConsensusBabeAppPublic(in any) *pbgear.SpConsensusBabeAppPublic { } func To_SpConsensusBabeAppPublic_value0(in any) *pbgear.SpCoreSr25519Public { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreSr25519Public(w) //simple field } func To_SpConsensusGrandpaAppPublic(in any) *pbgear.SpConsensusGrandpaAppPublic { @@ -11442,7 +13033,15 @@ func To_SpConsensusGrandpaAppPublic(in any) *pbgear.SpConsensusGrandpaAppPublic } func To_SpConsensusGrandpaAppPublic_value0(in any) *pbgear.SpCoreEd25519Public { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreEd25519Public(w) //simple field } func To_SpConsensusGrandpaAppSignature(in any) *pbgear.SpConsensusGrandpaAppSignature { @@ -11457,7 +13056,15 @@ func To_SpConsensusGrandpaAppSignature(in any) *pbgear.SpConsensusGrandpaAppSign } func To_SpConsensusGrandpaAppSignature_value0(in any) *pbgear.SpCoreEd25519Signature { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreEd25519Signature(w) //simple field } func To_SpConsensusGrandpaEquivocationProof(in any) *pbgear.SpConsensusGrandpaEquivocationProof { @@ -11474,7 +13081,15 @@ func To_SpConsensusGrandpaEquivocationProof(in any) *pbgear.SpConsensusGrandpaEq } func To_SpConsensusGrandpaEquivocationProof_equivocation(in any) *pbgear.Grandpa_Equivocation { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Grandpa_Equivocation(w) //simple field } func To_SpConsensusSlotsEquivocationProof(in any) *pbgear.SpConsensusSlotsEquivocationProof { @@ -11495,16 +13110,48 @@ func To_SpConsensusSlotsEquivocationProof(in any) *pbgear.SpConsensusSlotsEquivo } func To_SpConsensusSlotsEquivocationProof_offender(in any) *pbgear.SpConsensusBabeAppPublic { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpConsensusBabeAppPublic(w) //simple field } func To_SpConsensusSlotsEquivocationProof_slot(in any) *pbgear.SpConsensusSlotsSlot { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpConsensusSlotsSlot(w) //simple field } func To_SpConsensusSlotsEquivocationProof_first_header(in any) *pbgear.SpRuntimeGenericHeaderHeader { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpRuntimeGenericHeaderHeader(w) //simple field } func To_SpConsensusSlotsEquivocationProof_second_header(in any) *pbgear.SpRuntimeGenericHeaderHeader { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpRuntimeGenericHeaderHeader(w) //simple field } func To_SpConsensusSlotsSlot(in any) *pbgear.SpConsensusSlotsSlot { @@ -11654,7 +13301,15 @@ func To_SpRuntimeGenericDigestDigestItem(in any) *pbgear.SpRuntimeGenericDigestD } func To_SpRuntimeGenericDigestDigestItem_logs(in any) *pbgear.Babe_Logs { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Babe_Logs(w) //simple field } func To_SpRuntimeGenericHeaderHeader(in any) *pbgear.SpRuntimeGenericHeaderHeader { @@ -11677,16 +13332,48 @@ func To_SpRuntimeGenericHeaderHeader(in any) *pbgear.SpRuntimeGenericHeaderHeade } func To_SpRuntimeGenericHeaderHeader_parent_hash(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_SpRuntimeGenericHeaderHeader_state_root(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_SpRuntimeGenericHeaderHeader_extrinsics_root(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_SpRuntimeGenericHeaderHeader_digest(in any) *pbgear.SpRuntimeGenericDigestDigest { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpRuntimeGenericDigestDigest(w) //simple field } func To_SpRuntimeMultiaddressMultiAddress(in any) *pbgear.SpRuntimeMultiaddressMultiAddress { @@ -11701,7 +13388,15 @@ func To_SpRuntimeMultiaddressMultiAddress(in any) *pbgear.SpRuntimeMultiaddressM } func To_SpRuntimeMultiaddressMultiAddress_targets(in any) *pbgear.Staking_Targets { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Staking_Targets(w) //simple field } func To_SpSessionMembershipProof(in any) *pbgear.SpSessionMembershipProof { @@ -11753,13 +13448,13 @@ func To_StakingPallet(in any) *pbgear.StakingPallet { _ = v // oneOf field Call - v0 := Set_OneOf_StakingPallet_call(v.ValueAt(0)) + v0 := To_OneOf_StakingPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_StakingPallet_call(in any) any { +func To_OneOf_StakingPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -11879,13 +13574,13 @@ func To_StakingRewardsPallet(in any) *pbgear.StakingRewardsPallet { _ = v // oneOf field Call - v0 := Set_OneOf_StakingRewardsPallet_call(v.ValueAt(0)) + v0 := To_OneOf_StakingRewardsPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_StakingRewardsPallet_call(in any) any { +func To_OneOf_StakingRewardsPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -11958,7 +13653,15 @@ func To_StakingRewards_ForceRefillCall(in any) *pbgear.StakingRewards_ForceRefil } func To_StakingRewards_ForceRefillCall_from(in any) *pbgear.StakingRewards_From { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_StakingRewards_From(w) //simple field } func To_StakingRewards_From(in any) *pbgear.StakingRewards_From { @@ -11967,13 +13670,13 @@ func To_StakingRewards_From(in any) *pbgear.StakingRewards_From { _ = v // oneOf field Value - v0 := Set_OneOf_StakingRewards_From_value(v.ValueAt(0)) + v0 := To_OneOf_StakingRewards_From_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_StakingRewards_From_value(in any) any { +func To_OneOf_StakingRewards_From_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -12015,7 +13718,15 @@ func To_StakingRewards_Id(in any) *pbgear.StakingRewards_Id { } func To_StakingRewards_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_StakingRewards_Index(in any) *pbgear.StakingRewards_Index { @@ -12030,7 +13741,15 @@ func To_StakingRewards_Index(in any) *pbgear.StakingRewards_Index { } func To_StakingRewards_Index_value0(in any) *pbgear.StakingRewards_TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_StakingRewards_TupleNull(w) //simple field } func To_StakingRewards_Raw(in any) *pbgear.StakingRewards_Raw { @@ -12061,13 +13780,13 @@ func To_StakingRewards_To(in any) *pbgear.StakingRewards_To { _ = v // oneOf field Value - v0 := Set_OneOf_StakingRewards_To_value(v.ValueAt(0)) + v0 := To_OneOf_StakingRewards_To_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_StakingRewards_To_value(in any) any { +func To_OneOf_StakingRewards_To_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -12109,7 +13828,15 @@ func To_StakingRewards_TupleNull(in any) *pbgear.StakingRewards_TupleNull { } func To_StakingRewards_TupleNull_value(in any) *pbgear.TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_TupleNull(w) //simple field } func To_StakingRewards_WithdrawCall(in any) *pbgear.StakingRewards_WithdrawCall { @@ -12126,7 +13853,15 @@ func To_StakingRewards_WithdrawCall(in any) *pbgear.StakingRewards_WithdrawCall } func To_StakingRewards_WithdrawCall_to(in any) *pbgear.StakingRewards_To { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_StakingRewards_To(w) //simple field } func To_Staking_Account(in any) *pbgear.Staking_Account { @@ -12141,7 +13876,15 @@ func To_Staking_Account(in any) *pbgear.Staking_Account { } func To_Staking_Account_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_Staking_Address20(in any) *pbgear.Staking_Address20 { @@ -12180,7 +13923,15 @@ func To_Staking_BondCall(in any) *pbgear.Staking_BondCall { } func To_Staking_BondCall_payee(in any) *pbgear.Staking_Payee { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Staking_Payee(w) //simple field } func To_Staking_BondExtraCall(in any) *pbgear.Staking_BondExtraCall { @@ -12227,7 +13978,15 @@ func To_Staking_ChillOtherCall(in any) *pbgear.Staking_ChillOtherCall { } func To_Staking_ChillOtherCall_controller(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_Staking_ChillThreshold(in any) *pbgear.Staking_ChillThreshold { @@ -12236,13 +13995,13 @@ func To_Staking_ChillThreshold(in any) *pbgear.Staking_ChillThreshold { _ = v // oneOf field Value - v0 := Set_OneOf_Staking_ChillThreshold_value(v.ValueAt(0)) + v0 := To_OneOf_Staking_ChillThreshold_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Staking_ChillThreshold_value(in any) any { +func To_OneOf_Staking_ChillThreshold_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -12284,7 +14043,15 @@ func To_Staking_ForceApplyMinCommissionCall(in any) *pbgear.Staking_ForceApplyMi } func To_Staking_ForceApplyMinCommissionCall_validator_stash(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_Staking_ForceNewEraAlwaysCall(in any) *pbgear.Staking_ForceNewEraAlwaysCall { @@ -12325,7 +14092,15 @@ func To_Staking_ForceUnstakeCall(in any) *pbgear.Staking_ForceUnstakeCall { } func To_Staking_ForceUnstakeCall_stash(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_Staking_Id(in any) *pbgear.Staking_Id { @@ -12340,7 +14115,15 @@ func To_Staking_Id(in any) *pbgear.Staking_Id { } func To_Staking_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_Staking_IncreaseValidatorCountCall(in any) *pbgear.Staking_IncreaseValidatorCountCall { @@ -12366,7 +14149,15 @@ func To_Staking_Index(in any) *pbgear.Staking_Index { } func To_Staking_Index_value0(in any) *pbgear.Staking_TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Staking_TupleNull(w) //simple field } func To_Staking_KickCall(in any) *pbgear.Staking_KickCall { @@ -12401,13 +14192,13 @@ func To_Staking_MaxNominatorCount(in any) *pbgear.Staking_MaxNominatorCount { _ = v // oneOf field Value - v0 := Set_OneOf_Staking_MaxNominatorCount_value(v.ValueAt(0)) + v0 := To_OneOf_Staking_MaxNominatorCount_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Staking_MaxNominatorCount_value(in any) any { +func To_OneOf_Staking_MaxNominatorCount_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -12435,13 +14226,13 @@ func To_Staking_MaxValidatorCount(in any) *pbgear.Staking_MaxValidatorCount { _ = v // oneOf field Value - v0 := Set_OneOf_Staking_MaxValidatorCount_value(v.ValueAt(0)) + v0 := To_OneOf_Staking_MaxValidatorCount_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Staking_MaxValidatorCount_value(in any) any { +func To_OneOf_Staking_MaxValidatorCount_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -12469,13 +14260,13 @@ func To_Staking_MinCommission(in any) *pbgear.Staking_MinCommission { _ = v // oneOf field Value - v0 := Set_OneOf_Staking_MinCommission_value(v.ValueAt(0)) + v0 := To_OneOf_Staking_MinCommission_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Staking_MinCommission_value(in any) any { +func To_OneOf_Staking_MinCommission_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -12503,13 +14294,13 @@ func To_Staking_MinNominatorBond(in any) *pbgear.Staking_MinNominatorBond { _ = v // oneOf field Value - v0 := Set_OneOf_Staking_MinNominatorBond_value(v.ValueAt(0)) + v0 := To_OneOf_Staking_MinNominatorBond_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Staking_MinNominatorBond_value(in any) any { +func To_OneOf_Staking_MinNominatorBond_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -12537,13 +14328,13 @@ func To_Staking_MinValidatorBond(in any) *pbgear.Staking_MinValidatorBond { _ = v // oneOf field Value - v0 := Set_OneOf_Staking_MinValidatorBond_value(v.ValueAt(0)) + v0 := To_OneOf_Staking_MinValidatorBond_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Staking_MinValidatorBond_value(in any) any { +func To_OneOf_Staking_MinValidatorBond_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -12621,7 +14412,15 @@ func To_Staking_PalletStakingValidatorPrefs(in any) *pbgear.Staking_PalletStakin } func To_Staking_PalletStakingValidatorPrefs_commission(in any) *pbgear.SpArithmeticPerThingsPerbill { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpArithmeticPerThingsPerbill(w) //simple field } func To_Staking_Payee(in any) *pbgear.Staking_Payee { @@ -12630,13 +14429,13 @@ func To_Staking_Payee(in any) *pbgear.Staking_Payee { _ = v // oneOf field Value - v0 := Set_OneOf_Staking_Payee_value(v.ValueAt(0)) + v0 := To_OneOf_Staking_Payee_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Staking_Payee_value(in any) any { +func To_OneOf_Staking_Payee_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -12680,7 +14479,15 @@ func To_Staking_PayoutStakersCall(in any) *pbgear.Staking_PayoutStakersCall { } func To_Staking_PayoutStakersCall_validator_stash(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_Staking_Raw(in any) *pbgear.Staking_Raw { @@ -12708,7 +14515,15 @@ func To_Staking_ReapStashCall(in any) *pbgear.Staking_ReapStashCall { } func To_Staking_ReapStashCall_stash(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_Staking_RebondCall(in any) *pbgear.Staking_RebondCall { @@ -12742,7 +14557,15 @@ func To_Staking_ScaleValidatorCountCall(in any) *pbgear.Staking_ScaleValidatorCo } func To_Staking_ScaleValidatorCountCall_factor(in any) *pbgear.SpArithmeticPerThingsPercent { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpArithmeticPerThingsPercent(w) //simple field } func To_Staking_Set(in any) *pbgear.Staking_Set { @@ -12802,7 +14625,15 @@ func To_Staking_SetMinCommissionCall(in any) *pbgear.Staking_SetMinCommissionCal } func To_Staking_SetMinCommissionCall_new(in any) *pbgear.SpArithmeticPerThingsPerbill { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpArithmeticPerThingsPerbill(w) //simple field } func To_Staking_SetPayeeCall(in any) *pbgear.Staking_SetPayeeCall { @@ -12817,7 +14648,15 @@ func To_Staking_SetPayeeCall(in any) *pbgear.Staking_SetPayeeCall { } func To_Staking_SetPayeeCall_payee(in any) *pbgear.Staking_Payee { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Staking_Payee(w) //simple field } func To_Staking_SetStakingConfigsCall(in any) *pbgear.Staking_SetStakingConfigsCall { @@ -12842,22 +14681,70 @@ func To_Staking_SetStakingConfigsCall(in any) *pbgear.Staking_SetStakingConfigsC } func To_Staking_SetStakingConfigsCall_min_nominator_bond(in any) *pbgear.Staking_MinNominatorBond { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Staking_MinNominatorBond(w) //simple field } func To_Staking_SetStakingConfigsCall_min_validator_bond(in any) *pbgear.Staking_MinValidatorBond { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Staking_MinValidatorBond(w) //simple field } func To_Staking_SetStakingConfigsCall_max_nominator_count(in any) *pbgear.Staking_MaxNominatorCount { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Staking_MaxNominatorCount(w) //simple field } func To_Staking_SetStakingConfigsCall_max_validator_count(in any) *pbgear.Staking_MaxValidatorCount { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Staking_MaxValidatorCount(w) //simple field } func To_Staking_SetStakingConfigsCall_chill_threshold(in any) *pbgear.Staking_ChillThreshold { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Staking_ChillThreshold(w) //simple field } func To_Staking_SetStakingConfigsCall_min_commission(in any) *pbgear.Staking_MinCommission { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Staking_MinCommission(w) //simple field } func To_Staking_SetValidatorCountCall(in any) *pbgear.Staking_SetValidatorCountCall { @@ -12893,13 +14780,13 @@ func To_Staking_Targets(in any) *pbgear.Staking_Targets { _ = v // oneOf field Value - v0 := Set_OneOf_Staking_Targets_value(v.ValueAt(0)) + v0 := To_OneOf_Staking_Targets_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Staking_Targets_value(in any) any { +func To_OneOf_Staking_Targets_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -12941,7 +14828,15 @@ func To_Staking_TupleNull(in any) *pbgear.Staking_TupleNull { } func To_Staking_TupleNull_value(in any) *pbgear.TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_TupleNull(w) //simple field } func To_Staking_UnbondCall(in any) *pbgear.Staking_UnbondCall { @@ -12967,7 +14862,15 @@ func To_Staking_ValidateCall(in any) *pbgear.Staking_ValidateCall { } func To_Staking_ValidateCall_prefs(in any) *pbgear.Staking_PalletStakingValidatorPrefs { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Staking_PalletStakingValidatorPrefs(w) //simple field } func To_Staking_Who(in any) *pbgear.Staking_Who { @@ -12976,13 +14879,13 @@ func To_Staking_Who(in any) *pbgear.Staking_Who { _ = v // oneOf field Value - v0 := Set_OneOf_Staking_Who_value(v.ValueAt(0)) + v0 := To_OneOf_Staking_Who_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Staking_Who_value(in any) any { +func To_OneOf_Staking_Who_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -13029,13 +14932,13 @@ func To_SystemPallet(in any) *pbgear.SystemPallet { _ = v // oneOf field Call - v0 := Set_OneOf_SystemPallet_call(v.ValueAt(0)) + v0 := To_OneOf_SystemPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_SystemPallet_call(in any) any { +func To_OneOf_SystemPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -13227,13 +15130,13 @@ func To_TimestampPallet(in any) *pbgear.TimestampPallet { _ = v // oneOf field Call - v0 := Set_OneOf_TimestampPallet_call(v.ValueAt(0)) + v0 := To_OneOf_TimestampPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_TimestampPallet_call(in any) any { +func To_OneOf_TimestampPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -13272,13 +15175,13 @@ func To_TreasuryPallet(in any) *pbgear.TreasuryPallet { _ = v // oneOf field Call - v0 := Set_OneOf_TreasuryPallet_call(v.ValueAt(0)) + v0 := To_OneOf_TreasuryPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_TreasuryPallet_call(in any) any { +func To_OneOf_TreasuryPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -13363,13 +15266,13 @@ func To_Treasury_Beneficiary(in any) *pbgear.Treasury_Beneficiary { _ = v // oneOf field Value - v0 := Set_OneOf_Treasury_Beneficiary_value(v.ValueAt(0)) + v0 := To_OneOf_Treasury_Beneficiary_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Treasury_Beneficiary_value(in any) any { +func To_OneOf_Treasury_Beneficiary_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -13422,7 +15325,15 @@ func To_Treasury_Id(in any) *pbgear.Treasury_Id { } func To_Treasury_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_Treasury_Index(in any) *pbgear.Treasury_Index { @@ -13437,7 +15348,15 @@ func To_Treasury_Index(in any) *pbgear.Treasury_Index { } func To_Treasury_Index_value0(in any) *pbgear.Treasury_TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Treasury_TupleNull(w) //simple field } func To_Treasury_PayoutCall(in any) *pbgear.Treasury_PayoutCall { @@ -13465,7 +15384,15 @@ func To_Treasury_ProposeSpendCall(in any) *pbgear.Treasury_ProposeSpendCall { } func To_Treasury_ProposeSpendCall_beneficiary(in any) *pbgear.Treasury_Beneficiary { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Treasury_Beneficiary(w) //simple field } func To_Treasury_Raw(in any) *pbgear.Treasury_Raw { @@ -13519,10 +15446,26 @@ func To_Treasury_SpendCall(in any) *pbgear.Treasury_SpendCall { } func To_Treasury_SpendCall_asset_kind(in any) *pbgear.Treasury_TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Treasury_TupleNull(w) //simple field } func To_Treasury_SpendCall_beneficiary(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_Treasury_SpendLocalCall(in any) *pbgear.Treasury_SpendLocalCall { @@ -13539,7 +15482,15 @@ func To_Treasury_SpendLocalCall(in any) *pbgear.Treasury_SpendLocalCall { } func To_Treasury_SpendLocalCall_beneficiary(in any) *pbgear.Treasury_Beneficiary { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Treasury_Beneficiary(w) //simple field } func To_Treasury_TupleNull(in any) *pbgear.Treasury_TupleNull { @@ -13554,7 +15505,15 @@ func To_Treasury_TupleNull(in any) *pbgear.Treasury_TupleNull { } func To_Treasury_TupleNull_value(in any) *pbgear.TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_TupleNull(w) //simple field } func To_Treasury_VoidSpendCall(in any) *pbgear.Treasury_VoidSpendCall { @@ -13582,10 +15541,26 @@ func To_TupleFinalityGrandpaPrecommitspConsensusGrandpaAppSignature(in any) *pbg } func To_TupleFinalityGrandpaPrecommitspConsensusGrandpaAppSignature_value0(in any) *pbgear.FinalityGrandpaPrecommit { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_FinalityGrandpaPrecommit(w) //simple field } func To_TupleFinalityGrandpaPrecommitspConsensusGrandpaAppSignature_value1(in any) *pbgear.SpConsensusGrandpaAppSignature { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpConsensusGrandpaAppSignature(w) //simple field } func To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature(in any) *pbgear.TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature { @@ -13602,10 +15577,26 @@ func To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature(in any) *pbgea } func To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature_value0(in any) *pbgear.FinalityGrandpaPrevote { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_FinalityGrandpaPrevote(w) //simple field } func To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature_value1(in any) *pbgear.SpConsensusGrandpaAppSignature { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpConsensusGrandpaAppSignature(w) //simple field } func To_TupleNull(in any) *pbgear.TupleNull { @@ -13622,13 +15613,13 @@ func To_UtilityPallet(in any) *pbgear.UtilityPallet { _ = v // oneOf field Call - v0 := Set_OneOf_UtilityPallet_call(v.ValueAt(0)) + v0 := To_OneOf_UtilityPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_UtilityPallet_call(in any) any { +func To_OneOf_UtilityPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -13670,13 +15661,13 @@ func To_Utility_AsDerivativeCall(in any) *pbgear.Utility_AsDerivativeCall { // primitive field Index out.Index = To_uint32(v.ValueAt(0)) // oneOf field Call - v1 := Set_OneOf_Utility_AsDerivativeCall_call(v.ValueAt(1)) + v1 := To_OneOf_Utility_AsDerivativeCall_call(v.ValueAt(1)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v1)) return out //from message } -func Set_OneOf_Utility_AsDerivativeCall_call(in any) any { +func To_OneOf_Utility_AsDerivativeCall_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -13808,13 +15799,13 @@ func To_Utility_AsOrigin(in any) *pbgear.Utility_AsOrigin { _ = v // oneOf field Value - v0 := Set_OneOf_Utility_AsOrigin_value(v.ValueAt(0)) + v0 := To_OneOf_Utility_AsOrigin_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Utility_AsOrigin_value(in any) any { +func To_OneOf_Utility_AsOrigin_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -13896,16 +15887,24 @@ func To_Utility_DispatchAsCall(in any) *pbgear.Utility_DispatchAsCall { // field AsOrigin out.AsOrigin = To_Utility_DispatchAsCall_as_origin(v.ValueAt(0)) // oneOf field Call - v1 := Set_OneOf_Utility_DispatchAsCall_call(v.ValueAt(1)) + v1 := To_OneOf_Utility_DispatchAsCall_call(v.ValueAt(1)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v1)) return out //from message } func To_Utility_DispatchAsCall_as_origin(in any) *pbgear.Utility_AsOrigin { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Utility_AsOrigin(w) //simple field } -func Set_OneOf_Utility_DispatchAsCall_call(in any) any { +func To_OneOf_Utility_DispatchAsCall_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -14069,7 +16068,15 @@ func To_Utility_Origins(in any) *pbgear.Utility_Origins { } func To_Utility_Origins_value0(in any) *pbgear.Value0 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Value0(w) //simple field } func To_Utility_System(in any) *pbgear.Utility_System { @@ -14084,7 +16091,15 @@ func To_Utility_System(in any) *pbgear.Utility_System { } func To_Utility_System_value0(in any) *pbgear.Value0 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Value0(w) //simple field } func To_Utility_Void(in any) *pbgear.Utility_Void { @@ -14099,7 +16114,15 @@ func To_Utility_Void(in any) *pbgear.Utility_Void { } func To_Utility_Void_value0(in any) *pbgear.Value0 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Value0(w) //simple field } func To_Utility_WithWeightCall(in any) *pbgear.Utility_WithWeightCall { @@ -14108,7 +16131,7 @@ func To_Utility_WithWeightCall(in any) *pbgear.Utility_WithWeightCall { _ = v // oneOf field Call - v0 := Set_OneOf_Utility_WithWeightCall_call(v.ValueAt(0)) + v0 := To_OneOf_Utility_WithWeightCall_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) // field Weight out.Weight = To_Utility_WithWeightCall_weight(v.ValueAt(1)) @@ -14116,7 +16139,7 @@ func To_Utility_WithWeightCall(in any) *pbgear.Utility_WithWeightCall { return out //from message } -func Set_OneOf_Utility_WithWeightCall_call(in any) any { +func To_OneOf_Utility_WithWeightCall_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -14242,7 +16265,15 @@ func Set_OneOf_Utility_WithWeightCall_call(in any) any { } } func To_Utility_WithWeightCall_weight(in any) *pbgear.SpWeightsWeightV2Weight { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpWeightsWeightV2Weight(w) //simple field } func To_Value0(in any) *pbgear.Value0 { @@ -14251,13 +16282,13 @@ func To_Value0(in any) *pbgear.Value0 { _ = v // oneOf field Value - v0 := Set_OneOf_Value0_value(v.ValueAt(0)) + v0 := To_OneOf_Value0_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Value0_value(in any) any { +func To_OneOf_Value0_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -14566,13 +16597,13 @@ func To_VaraRuntimeRuntimeCall(in any) *pbgear.VaraRuntimeRuntimeCall { _ = v // oneOf field Calls - v0 := Set_OneOf_VaraRuntimeRuntimeCall_calls(v.ValueAt(0)) + v0 := To_OneOf_VaraRuntimeRuntimeCall_calls(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Calls").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_VaraRuntimeRuntimeCall_calls(in any) any { +func To_OneOf_VaraRuntimeRuntimeCall_calls(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -14716,16 +16747,48 @@ func To_VaraRuntimeSessionKeys(in any) *pbgear.VaraRuntimeSessionKeys { } func To_VaraRuntimeSessionKeys_babe(in any) *pbgear.SpConsensusBabeAppPublic { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpConsensusBabeAppPublic(w) //simple field } func To_VaraRuntimeSessionKeys_grandpa(in any) *pbgear.SpConsensusGrandpaAppPublic { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpConsensusGrandpaAppPublic(w) //simple field } func To_VaraRuntimeSessionKeys_im_online(in any) *pbgear.ImOnline_PalletImOnlineSr25519AppSr25519Public { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_ImOnline_PalletImOnlineSr25519AppSr25519Public(w) //simple field } func To_VaraRuntimeSessionKeys_authority_discovery(in any) *pbgear.SpAuthorityDiscoveryAppPublic { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpAuthorityDiscoveryAppPublic(w) //simple field } func To_VestingPallet(in any) *pbgear.VestingPallet { @@ -14734,13 +16797,13 @@ func To_VestingPallet(in any) *pbgear.VestingPallet { _ = v // oneOf field Call - v0 := Set_OneOf_VestingPallet_call(v.ValueAt(0)) + v0 := To_OneOf_VestingPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_VestingPallet_call(in any) any { +func To_OneOf_VestingPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -14808,13 +16871,37 @@ func To_Vesting_ForceVestedTransferCall(in any) *pbgear.Vesting_ForceVestedTrans } func To_Vesting_ForceVestedTransferCall_source(in any) *pbgear.Vesting_Source { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Vesting_Source(w) //simple field } func To_Vesting_ForceVestedTransferCall_target(in any) *pbgear.Vesting_Target { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Vesting_Target(w) //simple field } func To_Vesting_ForceVestedTransferCall_schedule(in any) *pbgear.Vesting_PalletVestingVestingInfoVestingInfo { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Vesting_PalletVestingVestingInfoVestingInfo(w) //simple field } func To_Vesting_Id(in any) *pbgear.Vesting_Id { @@ -14829,7 +16916,15 @@ func To_Vesting_Id(in any) *pbgear.Vesting_Id { } func To_Vesting_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpCoreCryptoAccountId32(w) //simple field } func To_Vesting_Index(in any) *pbgear.Vesting_Index { @@ -14844,7 +16939,15 @@ func To_Vesting_Index(in any) *pbgear.Vesting_Index { } func To_Vesting_Index_value0(in any) *pbgear.Vesting_TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Vesting_TupleNull(w) //simple field } func To_Vesting_MergeSchedulesCall(in any) *pbgear.Vesting_MergeSchedulesCall { @@ -14892,13 +16995,13 @@ func To_Vesting_Source(in any) *pbgear.Vesting_Source { _ = v // oneOf field Value - v0 := Set_OneOf_Vesting_Source_value(v.ValueAt(0)) + v0 := To_OneOf_Vesting_Source_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Vesting_Source_value(in any) any { +func To_OneOf_Vesting_Source_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -14934,13 +17037,13 @@ func To_Vesting_Target(in any) *pbgear.Vesting_Target { _ = v // oneOf field Value - v0 := Set_OneOf_Vesting_Target_value(v.ValueAt(0)) + v0 := To_OneOf_Vesting_Target_value(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Vesting_Target_value(in any) any { +func To_OneOf_Vesting_Target_value(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -14982,7 +17085,15 @@ func To_Vesting_TupleNull(in any) *pbgear.Vesting_TupleNull { } func To_Vesting_TupleNull_value(in any) *pbgear.TupleNull { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_TupleNull(w) //simple field } func To_Vesting_VestCall(in any) *pbgear.Vesting_VestCall { @@ -15005,7 +17116,15 @@ func To_Vesting_VestOtherCall(in any) *pbgear.Vesting_VestOtherCall { } func To_Vesting_VestOtherCall_target(in any) *pbgear.Vesting_Target { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Vesting_Target(w) //simple field } func To_Vesting_VestedTransferCall(in any) *pbgear.Vesting_VestedTransferCall { @@ -15022,10 +17141,26 @@ func To_Vesting_VestedTransferCall(in any) *pbgear.Vesting_VestedTransferCall { } func To_Vesting_VestedTransferCall_target(in any) *pbgear.Vesting_Target { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Vesting_Target(w) //simple field } func To_Vesting_VestedTransferCall_schedule(in any) *pbgear.Vesting_PalletVestingVestingInfoVestingInfo { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_Vesting_PalletVestingVestingInfoVestingInfo(w) //simple field } func To_WhitelistPallet(in any) *pbgear.WhitelistPallet { @@ -15034,13 +17169,13 @@ func To_WhitelistPallet(in any) *pbgear.WhitelistPallet { _ = v // oneOf field Call - v0 := Set_OneOf_WhitelistPallet_call(v.ValueAt(0)) + v0 := To_OneOf_WhitelistPallet_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_WhitelistPallet_call(in any) any { +func To_OneOf_WhitelistPallet_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -15082,10 +17217,26 @@ func To_Whitelist_DispatchWhitelistedCallCall(in any) *pbgear.Whitelist_Dispatch } func To_Whitelist_DispatchWhitelistedCallCall_call_hash(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_Whitelist_DispatchWhitelistedCallCall_call_weight_witness(in any) *pbgear.SpWeightsWeightV2Weight { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_SpWeightsWeightV2Weight(w) //simple field } func To_Whitelist_DispatchWhitelistedCallWithPreimageCall(in any) *pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall { @@ -15094,13 +17245,13 @@ func To_Whitelist_DispatchWhitelistedCallWithPreimageCall(in any) *pbgear.Whitel _ = v // oneOf field Call - v0 := Set_OneOf_Whitelist_DispatchWhitelistedCallWithPreimageCall_call(v.ValueAt(0)) + v0 := To_OneOf_Whitelist_DispatchWhitelistedCallWithPreimageCall_call(v.ValueAt(0)) reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) return out //from message } -func Set_OneOf_Whitelist_DispatchWhitelistedCallWithPreimageCall_call(in any) any { +func To_OneOf_Whitelist_DispatchWhitelistedCallWithPreimageCall_call(in any) any { variantIn := in.(*registry.VariantWTF) param := variantIn.Value @@ -15238,7 +17389,15 @@ func To_Whitelist_RemoveWhitelistedCallCall(in any) *pbgear.Whitelist_RemoveWhit } func To_Whitelist_RemoveWhitelistedCallCall_call_hash(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } func To_Whitelist_WhitelistCallCall(in any) *pbgear.Whitelist_WhitelistCallCall { @@ -15253,7 +17412,15 @@ func To_Whitelist_WhitelistCallCall(in any) *pbgear.Whitelist_WhitelistCallCall } func To_Whitelist_WhitelistCallCall_call_hash(in any) *pbgear.PrimitiveTypesH256 { - return nil //simple field + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else { + w = v.ValueAt(0) + } + + return To_PrimitiveTypesH256(w) //simple field } type Wrap struct { diff --git a/templates/gen_types.go.gotmpl b/templates/gen_types.go.gotmpl index 47d5ae0..f7e36a6 100644 --- a/templates/gen_types.go.gotmpl +++ b/templates/gen_types.go.gotmpl @@ -166,9 +166,17 @@ func {{ $funcName }}(in any) {{ $msg.ReturnType $meta }} { {{- $seen := $generator.IsSeen $funcName }} {{- $ignore := $generator.Seen $funcName}} {{- if not $seen }} - func {{ $funcName }}(in any) {{ $field.ReturnType $meta }} { - return nil //simple field - } +func {{ $funcName }}(in any) {{ $field.ReturnType $meta }} { + v := in.(registry.Valuable) + var w any + if i, ok := v.(registry.Valuable); ok { + w = &Wrap{Value: i} + } else{ + w = v.ValueAt(0) + } + + return To_{{ $field.FullTypeName }}(w) //simple field +} {{- end }} {{- end }} @@ -218,6 +226,7 @@ func {{ $funcName }}(in any) []*{{ $field.ReturnType $meta }} { {{- $ignore := $generator.Seen $funcName}} {{- if and (not $seen) (not $field.Primitive) }} func {{ $funcName }}(in any) {{ $field.ReturnType $meta }} { + panic("Not implemented") return nil //funcForOptionalField } {{- end }} diff --git a/templates/output.proto b/templates/output.proto index b476b26..a528ed6 100644 --- a/templates/output.proto +++ b/templates/output.proto @@ -1,12836 +1,16501 @@ package gen_types import ( + "fmt" + "reflect" + "github.com/centrifuge/go-substrate-rpc-client/v4/registry" "github.com/centrifuge/go-substrate-rpc-client/v4/types" pbgear "github.com/streamingfast/firehose-gear/pb/sf/gear/metadata/type/v1" ) +func To_AllowedSlots(in any) *pbgear.AllowedSlots { + out := &pbgear.AllowedSlots{} + v := in.(registry.Valuable) + _ = v - func To_AllowedSlots(in registry.DecodedFields) *pbgear.AllowedSlots { + // oneOf field Value + v0 := To_OneOf_AllowedSlots_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.AllowedSlots{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.AllowedSlots_PrimarySlots{ - PrimarySlots: To_PrimarySlots(fields), //Passthrough fields... +func To_OneOf_AllowedSlots_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.AllowedSlots_PrimarySlots{ + PrimarySlots: To_PrimarySlots(param), + } + case 1: + return &pbgear.AllowedSlots_PrimaryAndSecondaryPlainSlots{ + PrimaryAndSecondaryPlainSlots: To_PrimaryAndSecondaryPlainSlots(param), + } + case 2: + return &pbgear.AllowedSlots_PrimaryAndSecondaryVrfSlots{ + PrimaryAndSecondaryVrfSlots: To_PrimaryAndSecondaryVrfSlots(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Arithmetic(in registry.DecodedFields) *pbgear.Arithmetic { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Arithmetic{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out + +func To_AuthorityDiscoveryPallet(in any) *pbgear.AuthorityDiscoveryPallet { + out := &pbgear.AuthorityDiscoveryPallet{} + v := in.(registry.Valuable) + _ = v + + + return out //from message } + + + +func To_AuthorshipPallet(in any) *pbgear.AuthorshipPallet { + out := &pbgear.AuthorshipPallet{} + v := in.(registry.Valuable) + _ = v + - func To_BTreeMap(in registry.DecodedFields) *pbgear.BTreeMap { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BTreeMap{} - out.Value = To_repeated_Gear_TupleGprimitivesMessageIdgearCommonEventDispatchStatus(fields[0].Value.(registry.DecodedFields)) - - return out + + +func To_BTreeSet(in any) *pbgear.BTreeSet { + out := &pbgear.BTreeSet{} + v := in.(registry.Valuable) + _ = v + + // repeated field Value0 + out.Value0 = To_Repeated_BTreeSet_value0(v.ValueAt(0)) + + return out //from message } -func To_repeated_Gear_TupleGprimitivesMessageIdgearCommonEventDispatchStatus(f registry.DecodedFields) []*pbgear.Gear_TupleGprimitivesMessageIdgearCommonEventDispatchStatus { - fields := []*registry.DecodedField(f) - _ = fields + + +func To_Repeated_BTreeSet_value0(in any) []*pbgear.GprimitivesActorId { + items := in.([]interface{}) - out := make([]*pbgear.Gear_TupleGprimitivesMessageIdgearCommonEventDispatchStatus, len(fields)) - for _, f := range fields { - out = append(out, To_Gear_TupleGprimitivesMessageIdgearCommonEventDispatchStatus(f.Value.([]*registry.DecodedField))) + var out []*pbgear.GprimitivesActorId + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_GprimitivesActorId(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } - func To_BTreeSet(in registry.DecodedFields) *pbgear.BTreeSet { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BTreeSet{} - out.Value = To_repeated_GprimitivesActorId(fields[0].Value.(registry.DecodedFields)) - - return out + +func To_BabePallet(in any) *pbgear.BabePallet { + out := &pbgear.BabePallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_BabePallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message } -func To_repeated_GprimitivesActorId(f registry.DecodedFields) []*pbgear.GprimitivesActorId { - fields := []*registry.DecodedField(f) - _ = fields + +func To_OneOf_BabePallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value - out := make([]*pbgear.GprimitivesActorId, len(fields)) - for _, f := range fields { - out = append(out, To_GprimitivesActorId(f.Value.([]*registry.DecodedField))) + switch variantIn.VariantByte { + case 0: + return &pbgear.BabePallet_ReportEquivocationCall{ + ReportEquivocationCall: To_Babe_ReportEquivocationCall(param), + } + case 1: + return &pbgear.BabePallet_ReportEquivocationUnsignedCall{ + ReportEquivocationUnsignedCall: To_Babe_ReportEquivocationUnsignedCall(param), + } + case 2: + return &pbgear.BabePallet_PlanConfigChangeCall{ + PlanConfigChangeCall: To_Babe_PlanConfigChangeCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Babe_BabeTrieNodesList(in registry.DecodedFields) *pbgear.Babe_BabeTrieNodesList { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Babe_BabeTrieNodesList(in any) *pbgear.Babe_BabeTrieNodesList { out := &pbgear.Babe_BabeTrieNodesList{} - out.TrieNodes = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field TrieNodes + out.TrieNodes = To_bytes(v.ValueAt(0)) - func To_Babe_Config(in registry.DecodedFields) *pbgear.Babe_Config { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Babe_Config(in any) *pbgear.Babe_Config { out := &pbgear.Babe_Config{} - - switch { - case matchFields(fields, []int64{79, 80}): - out.Value = &pbgear.Babe_Config_V1{ - V1: To_Babe_V1(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Babe_Config_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Babe_Config_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 1: + return &pbgear.Babe_Config_V1{ + V1: To_Babe_V1(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Babe_Consensus(in registry.DecodedFields) *pbgear.Babe_Consensus { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Babe_Consensus(in any) *pbgear.Babe_Consensus { out := &pbgear.Babe_Consensus{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - out.Value1 = To_bytes(fields[1].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + // primitive field Value1 + out.Value1 = To_bytes(v.ValueAt(1)) - func To_Babe_Logs(in registry.DecodedFields) *pbgear.Babe_Logs { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Babe_Logs(in any) *pbgear.Babe_Logs { out := &pbgear.Babe_Logs{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Babe_Logs_PreRuntime{ - PreRuntime: To_Babe_PreRuntime(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Babe_Logs_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Babe_Logs_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 6: + return &pbgear.Babe_Logs_PreRuntime{ + PreRuntime: To_Babe_PreRuntime(param), + } + case 4: + return &pbgear.Babe_Logs_Consensus{ + Consensus: To_Babe_Consensus(param), + } + case 5: + return &pbgear.Babe_Logs_Seal{ + Seal: To_Babe_Seal(param), } + case 0: + return &pbgear.Babe_Logs_Other{ + Other: To_Babe_Other(param), + } + case 8: + return &pbgear.Babe_Logs_RuntimeEnvironmentUpdated{ + RuntimeEnvironmentUpdated: To_Babe_RuntimeEnvironmentUpdated(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Babe_Other(in registry.DecodedFields) *pbgear.Babe_Other { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Babe_Other(in any) *pbgear.Babe_Other { out := &pbgear.Babe_Other{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_Babe_PlanConfigChangeCall(in registry.DecodedFields) *pbgear.Babe_PlanConfigChangeCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Babe_PlanConfigChangeCall(in any) *pbgear.Babe_PlanConfigChangeCall { out := &pbgear.Babe_PlanConfigChangeCall{} - out.Config = To_Babe_Config(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Babe_PreRuntime(in registry.DecodedFields) *pbgear.Babe_PreRuntime { + // field Config + out.Config = To_Babe_PlanConfigChangeCall_config(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Babe_PreRuntime{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - out.Value1 = To_bytes(fields[1].Value.([]interface{})) - return out +func To_Babe_PlanConfigChangeCall_config(in any) *pbgear.Babe_Config { + v := in.(registry.Valuable) + return To_Babe_Config(v.ValueAt(0) //simple field } - func To_Babe_ReportEquivocationCall(in registry.DecodedFields) *pbgear.Babe_ReportEquivocationCall { + +func To_Babe_PreRuntime(in any) *pbgear.Babe_PreRuntime { + out := &pbgear.Babe_PreRuntime{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + // primitive field Value1 + out.Value1 = To_bytes(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Babe_ReportEquivocationCall(in any) *pbgear.Babe_ReportEquivocationCall { out := &pbgear.Babe_ReportEquivocationCall{} - out.EquivocationProof = To_SpConsensusSlotsEquivocationProof(fields[0].Value.(registry.DecodedFields)) - - out.KeyOwnerProof = To_SpSessionMembershipProof(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field EquivocationProof + out.EquivocationProof = To_Babe_ReportEquivocationCall_equivocation_proof(v.ValueAt(0)) + // field KeyOwnerProof + out.KeyOwnerProof = To_Babe_ReportEquivocationCall_key_owner_proof(v.ValueAt(1)) - func To_Babe_ReportEquivocationUnsignedCall(in registry.DecodedFields) *pbgear.Babe_ReportEquivocationUnsignedCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Babe_ReportEquivocationUnsignedCall{} - out.EquivocationProof = To_SpConsensusSlotsEquivocationProof(fields[0].Value.(registry.DecodedFields)) - - out.KeyOwnerProof = To_SpSessionMembershipProof(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Babe_ReportEquivocationCall_equivocation_proof(in any) *pbgear.SpConsensusSlotsEquivocationProof { + v := in.(registry.Valuable) + return To_SpConsensusSlotsEquivocationProof(v.ValueAt(0) //simple field } +func To_Babe_ReportEquivocationCall_key_owner_proof(in any) *pbgear.SpSessionMembershipProof { + v := in.(registry.Valuable) + return To_SpSessionMembershipProof(v.ValueAt(0) //simple field +} + + +func To_Babe_ReportEquivocationUnsignedCall(in any) *pbgear.Babe_ReportEquivocationUnsignedCall { + out := &pbgear.Babe_ReportEquivocationUnsignedCall{} + v := in.(registry.Valuable) + _ = v - func To_Babe_RuntimeEnvironmentUpdated(in registry.DecodedFields) *pbgear.Babe_RuntimeEnvironmentUpdated { + // field EquivocationProof + out.EquivocationProof = To_Babe_ReportEquivocationUnsignedCall_equivocation_proof(v.ValueAt(0)) + // field KeyOwnerProof + out.KeyOwnerProof = To_Babe_ReportEquivocationUnsignedCall_key_owner_proof(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Babe_RuntimeEnvironmentUpdated{} - return out +func To_Babe_ReportEquivocationUnsignedCall_equivocation_proof(in any) *pbgear.SpConsensusSlotsEquivocationProof { + v := in.(registry.Valuable) + return To_SpConsensusSlotsEquivocationProof(v.ValueAt(0) //simple field +} +func To_Babe_ReportEquivocationUnsignedCall_key_owner_proof(in any) *pbgear.SpSessionMembershipProof { + v := in.(registry.Valuable) + return To_SpSessionMembershipProof(v.ValueAt(0) //simple field } - func To_Babe_Seal(in registry.DecodedFields) *pbgear.Babe_Seal { + +func To_Babe_RuntimeEnvironmentUpdated(in any) *pbgear.Babe_RuntimeEnvironmentUpdated { + out := &pbgear.Babe_RuntimeEnvironmentUpdated{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Babe_Seal(in any) *pbgear.Babe_Seal { out := &pbgear.Babe_Seal{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - out.Value1 = To_bytes(fields[1].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v - func To_Babe_TupleUint64Uint64(in registry.DecodedFields) *pbgear.Babe_TupleUint64Uint64 { + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + // primitive field Value1 + out.Value1 = To_bytes(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Babe_TupleUint64Uint64(in any) *pbgear.Babe_TupleUint64Uint64 { out := &pbgear.Babe_TupleUint64Uint64{} - out.Value0 = To_uint64(fields[0].Value.(registry.DecodedFields)) - - out.Value1 = To_uint64(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint64(v.ValueAt(0)) + // primitive field Value1 + out.Value1 = To_uint64(v.ValueAt(1)) - func To_Babe_V1(in registry.DecodedFields) *pbgear.Babe_V1 { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Babe_V1(in any) *pbgear.Babe_V1 { out := &pbgear.Babe_V1{} - out.C = To_Babe_TupleUint64Uint64(fields[0].Value.(registry.DecodedFields)) - - out.AllowedSlots = To_AllowedSlots(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_BadOrigin(in registry.DecodedFields) *pbgear.BadOrigin { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BadOrigin{} - return out -} + // field C + out.C = To_Babe_V1_c(v.ValueAt(0)) + // field AllowedSlots + out.AllowedSlots = To_Babe_V1_allowed_slots(v.ValueAt(1)) - func To_BagsList_Address20(in registry.DecodedFields) *pbgear.BagsList_Address20 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BagsList_Address20{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out + return out //from message } - - func To_BagsList_Address32(in registry.DecodedFields) *pbgear.BagsList_Address32 { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BagsList_Address32{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out +func To_Babe_V1_c(in any) *pbgear.Babe_TupleUint64Uint64 { + v := in.(registry.Valuable) + return To_Babe_TupleUint64Uint64(v.ValueAt(0) //simple field } - - func To_BagsList_CompactTupleNull(in types.UCompact) *pbgear.BagsList_CompactTupleNull { - - out := &pbgear.BagsList_CompactTupleNull{} - out.Value = To_TupleNull() - return out +func To_Babe_V1_allowed_slots(in any) *pbgear.AllowedSlots { + v := in.(registry.Valuable) + return To_AllowedSlots(v.ValueAt(0) //simple field } - func To_BagsList_Dislocated(in registry.DecodedFields) *pbgear.BagsList_Dislocated { + +func To_BagsListPallet(in any) *pbgear.BagsListPallet { + out := &pbgear.BagsListPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_BagsListPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BagsList_Dislocated{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.BagsList_Dislocated_Id{ - Id: To_BagsList_Id(fields), //Passthrough fields... - } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.BagsList_Dislocated_Index{ - Index: To_BagsList_Index(fields), //Passthrough fields... - } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.BagsList_Dislocated_Raw{ - Raw: To_BagsList_Raw(fields), //Passthrough fields... +func To_OneOf_BagsListPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.BagsListPallet_RebagCall{ + RebagCall: To_BagsList_RebagCall(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.BagsList_Dislocated_Address32{ - Address32: To_BagsList_Address32(fields), //Passthrough fields... + case 1: + return &pbgear.BagsListPallet_PutInFrontOfCall{ + PutInFrontOfCall: To_BagsList_PutInFrontOfCall(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.BagsList_Dislocated_Address20{ - Address20: To_BagsList_Address20(fields), //Passthrough fields... + case 2: + return &pbgear.BagsListPallet_PutInFrontOfOtherCall{ + PutInFrontOfOtherCall: To_BagsList_PutInFrontOfOtherCall(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_BagsList_Heavier(in registry.DecodedFields) *pbgear.BagsList_Heavier { + +func To_BagsList_Address20(in any) *pbgear.BagsList_Address20 { + out := &pbgear.BagsList_Address20{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_BagsList_Address32(in any) *pbgear.BagsList_Address32 { + out := &pbgear.BagsList_Address32{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BagsList_Heavier{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.BagsList_Heavier_Id{ - Id: To_BagsList_Id(fields), //Passthrough fields... + + +func To_BagsList_Dislocated(in any) *pbgear.BagsList_Dislocated { + out := &pbgear.BagsList_Dislocated{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_BagsList_Dislocated_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_BagsList_Dislocated_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.BagsList_Dislocated_Id{ + Id: To_BagsList_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.BagsList_Heavier_Index{ - Index: To_BagsList_Index(fields), //Passthrough fields... + case 1: + return &pbgear.BagsList_Dislocated_Index{ + Index: To_BagsList_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.BagsList_Heavier_Raw{ - Raw: To_BagsList_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.BagsList_Dislocated_Raw{ + Raw: To_BagsList_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.BagsList_Heavier_Address32{ - Address32: To_BagsList_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.BagsList_Dislocated_Address32{ + Address32: To_BagsList_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.BagsList_Heavier_Address20{ - Address20: To_BagsList_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.BagsList_Dislocated_Address20{ + Address20: To_BagsList_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_BagsList_Id(in registry.DecodedFields) *pbgear.BagsList_Id { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BagsList_Id{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_BagsList_Index(in registry.DecodedFields) *pbgear.BagsList_Index { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BagsList_Index{} - out.Value0 = To_BagsList_CompactTupleNull(fields[0].Value.(types.UCompact)) - - return out -} +func To_BagsList_Heavier(in any) *pbgear.BagsList_Heavier { + out := &pbgear.BagsList_Heavier{} + v := in.(registry.Valuable) + _ = v - func To_BagsList_Lighter(in registry.DecodedFields) *pbgear.BagsList_Lighter { + // oneOf field Value + v0 := To_OneOf_BagsList_Heavier_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BagsList_Lighter{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.BagsList_Lighter_Id{ - Id: To_BagsList_Id(fields), //Passthrough fields... +func To_OneOf_BagsList_Heavier_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.BagsList_Heavier_Id{ + Id: To_BagsList_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.BagsList_Lighter_Index{ - Index: To_BagsList_Index(fields), //Passthrough fields... + case 1: + return &pbgear.BagsList_Heavier_Index{ + Index: To_BagsList_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.BagsList_Lighter_Raw{ - Raw: To_BagsList_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.BagsList_Heavier_Raw{ + Raw: To_BagsList_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.BagsList_Lighter_Address32{ - Address32: To_BagsList_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.BagsList_Heavier_Address32{ + Address32: To_BagsList_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.BagsList_Lighter_Address20{ - Address20: To_BagsList_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.BagsList_Heavier_Address20{ + Address20: To_BagsList_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_BagsList_PutInFrontOfCall(in registry.DecodedFields) *pbgear.BagsList_PutInFrontOfCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BagsList_PutInFrontOfCall{} - out.Lighter = To_BagsList_Lighter(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_BagsList_PutInFrontOfOtherCall(in registry.DecodedFields) *pbgear.BagsList_PutInFrontOfOtherCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BagsList_PutInFrontOfOtherCall{} - out.Heavier = To_BagsList_Heavier(fields[0].Value.(registry.DecodedFields)) - - out.Lighter = To_BagsList_Lighter(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_BagsList_Id(in any) *pbgear.BagsList_Id { + out := &pbgear.BagsList_Id{} + v := in.(registry.Valuable) + _ = v - func To_BagsList_Raw(in registry.DecodedFields) *pbgear.BagsList_Raw { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BagsList_Raw{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + // field Value0 + out.Value0 = To_BagsList_Id_value0(v.ValueAt(0)) - func To_BagsList_RebagCall(in registry.DecodedFields) *pbgear.BagsList_RebagCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BagsList_RebagCall{} - out.Dislocated = To_BagsList_Dislocated(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_BagsList_RebaggedEvent(in registry.DecodedFields) *pbgear.BagsList_RebaggedEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BagsList_RebaggedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.From = To_uint64(fields[1].Value.(registry.DecodedFields)) - - out.To = To_uint64(fields[2].Value.(registry.DecodedFields)) - - return out +func To_BagsList_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_BagsList_ScoreUpdatedEvent(in registry.DecodedFields) *pbgear.BagsList_ScoreUpdatedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BagsList_ScoreUpdatedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.NewScore = To_uint64(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_Balances_Address20(in registry.DecodedFields) *pbgear.Balances_Address20 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_Address20{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} +func To_BagsList_Index(in any) *pbgear.BagsList_Index { + out := &pbgear.BagsList_Index{} + v := in.(registry.Valuable) + _ = v - func To_Balances_Address32(in registry.DecodedFields) *pbgear.Balances_Address32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_Address32{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + // field Value0 + out.Value0 = To_BagsList_Index_value0(v.ValueAt(0)) - func To_Balances_BalanceSetEvent(in registry.DecodedFields) *pbgear.Balances_BalanceSetEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_BalanceSetEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Free = To_string(fields[1].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_Balances_BurnedEvent(in registry.DecodedFields) *pbgear.Balances_BurnedEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_BurnedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out +func To_BagsList_Index_value0(in any) *pbgear.BagsList_TupleNull { + v := in.(registry.Valuable) + return To_BagsList_TupleNull(v.ValueAt(0) //simple field } - func To_Balances_CompactTupleNull(in types.UCompact) *pbgear.Balances_CompactTupleNull { - - out := &pbgear.Balances_CompactTupleNull{} - out.Value = To_TupleNull() - return out -} - func To_Balances_DepositEvent(in registry.DecodedFields) *pbgear.Balances_DepositEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_DepositEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_BagsList_Lighter(in any) *pbgear.BagsList_Lighter { + out := &pbgear.BagsList_Lighter{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_BagsList_Lighter_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) - func To_Balances_Dest(in registry.DecodedFields) *pbgear.Balances_Dest { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_Dest{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.Balances_Dest_Id{ - Id: To_Balances_Id(fields), //Passthrough fields... +func To_OneOf_BagsList_Lighter_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.BagsList_Lighter_Id{ + Id: To_BagsList_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.Balances_Dest_Index{ - Index: To_Balances_Index(fields), //Passthrough fields... + case 1: + return &pbgear.BagsList_Lighter_Index{ + Index: To_BagsList_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.Balances_Dest_Raw{ - Raw: To_Balances_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.BagsList_Lighter_Raw{ + Raw: To_BagsList_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.Balances_Dest_Address32{ - Address32: To_Balances_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.BagsList_Lighter_Address32{ + Address32: To_BagsList_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.Balances_Dest_Address20{ - Address20: To_Balances_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.BagsList_Lighter_Address20{ + Address20: To_BagsList_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Balances_DestinationStatus(in registry.DecodedFields) *pbgear.Balances_DestinationStatus { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_DestinationStatus{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Balances_DestinationStatus_Free{ - Free: To_Balances_Free(fields), //Passthrough fields... - } - } - return out -} - func To_Balances_DustLostEvent(in registry.DecodedFields) *pbgear.Balances_DustLostEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_DustLostEvent{} - out.Account = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_BagsList_PutInFrontOfCall(in any) *pbgear.BagsList_PutInFrontOfCall { + out := &pbgear.BagsList_PutInFrontOfCall{} + v := in.(registry.Valuable) + _ = v - func To_Balances_EndowedEvent(in registry.DecodedFields) *pbgear.Balances_EndowedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_EndowedEvent{} - out.Account = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.FreeBalance = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} + // field Lighter + out.Lighter = To_BagsList_PutInFrontOfCall_lighter(v.ValueAt(0)) - func To_Balances_ForceSetBalanceCall(in registry.DecodedFields) *pbgear.Balances_ForceSetBalanceCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_ForceSetBalanceCall{} - out.Who = To_Balances_Who(fields[0].Value.(registry.DecodedFields)) - - out.NewFree = To_CompactString(fields[1].Value.(types.UCompact)) - - return out + return out //from message } - - func To_Balances_ForceTransferCall(in registry.DecodedFields) *pbgear.Balances_ForceTransferCall { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_ForceTransferCall{} - out.Source = To_Balances_Source(fields[0].Value.(registry.DecodedFields)) - - out.Dest = To_Balances_Dest(fields[1].Value.(registry.DecodedFields)) - - out.Value = To_CompactString(fields[2].Value.(types.UCompact)) - - return out +func To_BagsList_PutInFrontOfCall_lighter(in any) *pbgear.BagsList_Lighter { + v := in.(registry.Valuable) + return To_BagsList_Lighter(v.ValueAt(0) //simple field } - func To_Balances_ForceUnreserveCall(in registry.DecodedFields) *pbgear.Balances_ForceUnreserveCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_ForceUnreserveCall{} - out.Who = To_Balances_Who(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_Balances_Free(in registry.DecodedFields) *pbgear.Balances_Free { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_Free{} - return out -} +func To_BagsList_PutInFrontOfOtherCall(in any) *pbgear.BagsList_PutInFrontOfOtherCall { + out := &pbgear.BagsList_PutInFrontOfOtherCall{} + v := in.(registry.Valuable) + _ = v - func To_Balances_FrozenEvent(in registry.DecodedFields) *pbgear.Balances_FrozenEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_FrozenEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} + // field Heavier + out.Heavier = To_BagsList_PutInFrontOfOtherCall_heavier(v.ValueAt(0)) + // field Lighter + out.Lighter = To_BagsList_PutInFrontOfOtherCall_lighter(v.ValueAt(1)) - func To_Balances_Id(in registry.DecodedFields) *pbgear.Balances_Id { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_Id{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_Balances_Index(in registry.DecodedFields) *pbgear.Balances_Index { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_Index{} - out.Value0 = To_Balances_CompactTupleNull(fields[0].Value.(types.UCompact)) - - return out +func To_BagsList_PutInFrontOfOtherCall_heavier(in any) *pbgear.BagsList_Heavier { + v := in.(registry.Valuable) + return To_BagsList_Heavier(v.ValueAt(0) //simple field } - - func To_Balances_IssuedEvent(in registry.DecodedFields) *pbgear.Balances_IssuedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_IssuedEvent{} - out.Amount = To_string(fields[0].Value.(registry.DecodedFields)) - - return out +func To_BagsList_PutInFrontOfOtherCall_lighter(in any) *pbgear.BagsList_Lighter { + v := in.(registry.Valuable) + return To_BagsList_Lighter(v.ValueAt(0) //simple field } - func To_Balances_LockedEvent(in registry.DecodedFields) *pbgear.Balances_LockedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_LockedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_Balances_MintedEvent(in registry.DecodedFields) *pbgear.Balances_MintedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_MintedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_BagsList_Raw(in any) *pbgear.BagsList_Raw { + out := &pbgear.BagsList_Raw{} + v := in.(registry.Valuable) + _ = v - func To_Balances_Raw(in registry.DecodedFields) *pbgear.Balances_Raw { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_Raw{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_Balances_RescindedEvent(in registry.DecodedFields) *pbgear.Balances_RescindedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_RescindedEvent{} - out.Amount = To_string(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_Balances_ReserveRepatriatedEvent(in registry.DecodedFields) *pbgear.Balances_ReserveRepatriatedEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_ReserveRepatriatedEvent{} - out.From = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.To = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[2].Value.(registry.DecodedFields)) - - out.DestinationStatus = To_Balances_DestinationStatus(fields[3].Value.(registry.DecodedFields)) - - return out -} - func To_Balances_Reserved(in registry.DecodedFields) *pbgear.Balances_Reserved { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_Reserved{} - return out -} - func To_Balances_ReservedEvent(in registry.DecodedFields) *pbgear.Balances_ReservedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_ReservedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_BagsList_RebagCall(in any) *pbgear.BagsList_RebagCall { + out := &pbgear.BagsList_RebagCall{} + v := in.(registry.Valuable) + _ = v - func To_Balances_RestoredEvent(in registry.DecodedFields) *pbgear.Balances_RestoredEvent { + // field Dislocated + out.Dislocated = To_BagsList_RebagCall_dislocated(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_RestoredEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out +func To_BagsList_RebagCall_dislocated(in any) *pbgear.BagsList_Dislocated { + v := in.(registry.Valuable) + return To_BagsList_Dislocated(v.ValueAt(0) //simple field } - func To_Balances_SlashedEvent(in registry.DecodedFields) *pbgear.Balances_SlashedEvent { + +func To_BagsList_TupleNull(in any) *pbgear.BagsList_TupleNull { + out := &pbgear.BagsList_TupleNull{} + v := in.(registry.Valuable) + _ = v + + // field Value + out.Value = To_BagsList_TupleNull_value(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_SlashedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out +func To_BagsList_TupleNull_value(in any) *pbgear.TupleNull { + v := in.(registry.Valuable) + return To_TupleNull(v.ValueAt(0) //simple field } - func To_Balances_Source(in registry.DecodedFields) *pbgear.Balances_Source { + +func To_BalancesPallet(in any) *pbgear.BalancesPallet { + out := &pbgear.BalancesPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_BalancesPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_Source{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.Balances_Source_Id{ - Id: To_Balances_Id(fields), //Passthrough fields... +func To_OneOf_BalancesPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.BalancesPallet_TransferAllowDeathCall{ + TransferAllowDeathCall: To_Balances_TransferAllowDeathCall(param), + } + case 1: + return &pbgear.BalancesPallet_ForceTransferCall{ + ForceTransferCall: To_Balances_ForceTransferCall(param), + } + case 2: + return &pbgear.BalancesPallet_TransferKeepAliveCall{ + TransferKeepAliveCall: To_Balances_TransferKeepAliveCall(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.Balances_Source_Index{ - Index: To_Balances_Index(fields), //Passthrough fields... + case 3: + return &pbgear.BalancesPallet_TransferAllCall{ + TransferAllCall: To_Balances_TransferAllCall(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.Balances_Source_Raw{ - Raw: To_Balances_Raw(fields), //Passthrough fields... + case 4: + return &pbgear.BalancesPallet_ForceUnreserveCall{ + ForceUnreserveCall: To_Balances_ForceUnreserveCall(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.Balances_Source_Address32{ - Address32: To_Balances_Address32(fields), //Passthrough fields... + case 5: + return &pbgear.BalancesPallet_UpgradeAccountsCall{ + UpgradeAccountsCall: To_Balances_UpgradeAccountsCall(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.Balances_Source_Address20{ - Address20: To_Balances_Address20(fields), //Passthrough fields... + case 6: + return &pbgear.BalancesPallet_ForceSetBalanceCall{ + ForceSetBalanceCall: To_Balances_ForceSetBalanceCall(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Balances_SuspendedEvent(in registry.DecodedFields) *pbgear.Balances_SuspendedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_SuspendedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_Balances_ThawedEvent(in registry.DecodedFields) *pbgear.Balances_ThawedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_ThawedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_Balances_Address20(in any) *pbgear.Balances_Address20 { + out := &pbgear.Balances_Address20{} + v := in.(registry.Valuable) + _ = v - func To_Balances_TransferAllCall(in registry.DecodedFields) *pbgear.Balances_TransferAllCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_TransferAllCall{} - out.Dest = To_Balances_Dest(fields[0].Value.(registry.DecodedFields)) - - out.KeepAlive = To_bool(fields[1].Value.(registry.DecodedFields)) - - return out -} + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_Balances_TransferAllowDeathCall(in registry.DecodedFields) *pbgear.Balances_TransferAllowDeathCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_TransferAllowDeathCall{} - out.Dest = To_Balances_Dest(fields[0].Value.(registry.DecodedFields)) - - out.Value = To_CompactString(fields[1].Value.(types.UCompact)) - - return out + return out //from message } - - func To_Balances_TransferEvent(in registry.DecodedFields) *pbgear.Balances_TransferEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_TransferEvent{} - out.From = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.To = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[2].Value.(registry.DecodedFields)) - - return out -} - func To_Balances_TransferKeepAliveCall(in registry.DecodedFields) *pbgear.Balances_TransferKeepAliveCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_TransferKeepAliveCall{} - out.Dest = To_Balances_Dest(fields[0].Value.(registry.DecodedFields)) - - out.Value = To_CompactString(fields[1].Value.(types.UCompact)) - - return out -} - func To_Balances_UnlockedEvent(in registry.DecodedFields) *pbgear.Balances_UnlockedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_UnlockedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_Balances_Address32(in any) *pbgear.Balances_Address32 { + out := &pbgear.Balances_Address32{} + v := in.(registry.Valuable) + _ = v - func To_Balances_UnreservedEvent(in registry.DecodedFields) *pbgear.Balances_UnreservedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_UnreservedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_Balances_UpgradeAccountsCall(in registry.DecodedFields) *pbgear.Balances_UpgradeAccountsCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_UpgradeAccountsCall{} - out.Who = To_repeated_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } -func To_repeated_SpCoreCryptoAccountId32(f registry.DecodedFields) []*pbgear.SpCoreCryptoAccountId32 { - fields := []*registry.DecodedField(f) - _ = fields + - out := make([]*pbgear.SpCoreCryptoAccountId32, len(fields)) - for _, f := range fields { - out = append(out, To_SpCoreCryptoAccountId32(f.Value.([]*registry.DecodedField))) - } - return out -} - func To_Balances_UpgradedEvent(in registry.DecodedFields) *pbgear.Balances_UpgradedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_UpgradedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} +func To_Balances_Dest(in any) *pbgear.Balances_Dest { + out := &pbgear.Balances_Dest{} + v := in.(registry.Valuable) + _ = v - func To_Balances_Who(in registry.DecodedFields) *pbgear.Balances_Who { + // oneOf field Value + v0 := To_OneOf_Balances_Dest_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_Who{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.Balances_Who_Id{ - Id: To_Balances_Id(fields), //Passthrough fields... +func To_OneOf_Balances_Dest_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Balances_Dest_Id{ + Id: To_Balances_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.Balances_Who_Index{ - Index: To_Balances_Index(fields), //Passthrough fields... + case 1: + return &pbgear.Balances_Dest_Index{ + Index: To_Balances_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.Balances_Who_Raw{ - Raw: To_Balances_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.Balances_Dest_Raw{ + Raw: To_Balances_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.Balances_Who_Address32{ - Address32: To_Balances_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.Balances_Dest_Address32{ + Address32: To_Balances_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.Balances_Who_Address20{ - Address20: To_Balances_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.Balances_Dest_Address20{ + Address20: To_Balances_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Balances_WithdrawEvent(in registry.DecodedFields) *pbgear.Balances_WithdrawEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Balances_WithdrawEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_BelowMinimum(in registry.DecodedFields) *pbgear.BelowMinimum { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BelowMinimum{} - return out -} +func To_Balances_ForceSetBalanceCall(in any) *pbgear.Balances_ForceSetBalanceCall { + out := &pbgear.Balances_ForceSetBalanceCall{} + v := in.(registry.Valuable) + _ = v - func To_Blocked(in registry.DecodedFields) *pbgear.Blocked { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Blocked{} - return out -} + // field Who + out.Who = To_Balances_ForceSetBalanceCall_who(v.ValueAt(0)) + // primitive field NewFree + out.NewFree = To_string(v.ValueAt(1)) - func To_BoundedCollectionsBoundedVecBoundedVec(in registry.DecodedFields) *pbgear.BoundedCollectionsBoundedVecBoundedVec { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.BoundedCollectionsBoundedVecBoundedVec{} - out.Value = To_bytes(fields[0].Value.([]interface{})) - return out +func To_Balances_ForceSetBalanceCall_who(in any) *pbgear.Balances_Who { + v := in.(registry.Valuable) + return To_Balances_Who(v.ValueAt(0) //simple field } - func To_Bounties_AcceptCuratorCall(in registry.DecodedFields) *pbgear.Bounties_AcceptCuratorCall { + +func To_Balances_ForceTransferCall(in any) *pbgear.Balances_ForceTransferCall { + out := &pbgear.Balances_ForceTransferCall{} + v := in.(registry.Valuable) + _ = v + + // field Source + out.Source = To_Balances_ForceTransferCall_source(v.ValueAt(0)) + // field Dest + out.Dest = To_Balances_ForceTransferCall_dest(v.ValueAt(1)) + // primitive field Value + out.Value = To_string(v.ValueAt(2)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_AcceptCuratorCall{} - out.BountyId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - return out +func To_Balances_ForceTransferCall_source(in any) *pbgear.Balances_Source { + v := in.(registry.Valuable) + return To_Balances_Source(v.ValueAt(0) //simple field +} +func To_Balances_ForceTransferCall_dest(in any) *pbgear.Balances_Dest { + v := in.(registry.Valuable) + return To_Balances_Dest(v.ValueAt(0) //simple field } - func To_Bounties_Address20(in registry.DecodedFields) *pbgear.Bounties_Address20 { + +func To_Balances_ForceUnreserveCall(in any) *pbgear.Balances_ForceUnreserveCall { + out := &pbgear.Balances_ForceUnreserveCall{} + v := in.(registry.Valuable) + _ = v + + // field Who + out.Who = To_Balances_ForceUnreserveCall_who(v.ValueAt(0)) + // primitive field Amount + out.Amount = To_string(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_Address20{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out +func To_Balances_ForceUnreserveCall_who(in any) *pbgear.Balances_Who { + v := in.(registry.Valuable) + return To_Balances_Who(v.ValueAt(0) //simple field } - func To_Bounties_Address32(in registry.DecodedFields) *pbgear.Bounties_Address32 { + +func To_Balances_Id(in any) *pbgear.Balances_Id { + out := &pbgear.Balances_Id{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Balances_Id_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_Address32{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out +func To_Balances_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_Bounties_ApproveBountyCall(in registry.DecodedFields) *pbgear.Bounties_ApproveBountyCall { + +func To_Balances_Index(in any) *pbgear.Balances_Index { + out := &pbgear.Balances_Index{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Balances_Index_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_ApproveBountyCall{} - out.BountyId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - return out +func To_Balances_Index_value0(in any) *pbgear.Balances_TupleNull { + v := in.(registry.Valuable) + return To_Balances_TupleNull(v.ValueAt(0) //simple field } - func To_Bounties_AwardBountyCall(in registry.DecodedFields) *pbgear.Bounties_AwardBountyCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_AwardBountyCall{} - out.BountyId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Beneficiary = To_Bounties_Beneficiary(fields[1].Value.(registry.DecodedFields)) - - return out + +func To_Balances_Raw(in any) *pbgear.Balances_Raw { + out := &pbgear.Balances_Raw{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message } + + + +func To_Balances_Source(in any) *pbgear.Balances_Source { + out := &pbgear.Balances_Source{} + v := in.(registry.Valuable) + _ = v - func To_Bounties_Beneficiary(in registry.DecodedFields) *pbgear.Bounties_Beneficiary { + // oneOf field Value + v0 := To_OneOf_Balances_Source_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_Beneficiary{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.Bounties_Beneficiary_Id{ - Id: To_Bounties_Id(fields), //Passthrough fields... +func To_OneOf_Balances_Source_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Balances_Source_Id{ + Id: To_Balances_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.Bounties_Beneficiary_Index{ - Index: To_Bounties_Index(fields), //Passthrough fields... + case 1: + return &pbgear.Balances_Source_Index{ + Index: To_Balances_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.Bounties_Beneficiary_Raw{ - Raw: To_Bounties_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.Balances_Source_Raw{ + Raw: To_Balances_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.Bounties_Beneficiary_Address32{ - Address32: To_Bounties_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.Balances_Source_Address32{ + Address32: To_Balances_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.Bounties_Beneficiary_Address20{ - Address20: To_Bounties_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.Balances_Source_Address20{ + Address20: To_Balances_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Bounties_BountyApprovedEvent(in registry.DecodedFields) *pbgear.Bounties_BountyApprovedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_BountyApprovedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Bounties_BountyAwardedEvent(in registry.DecodedFields) *pbgear.Bounties_BountyAwardedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_BountyAwardedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Beneficiary = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_Balances_TransferAllCall(in any) *pbgear.Balances_TransferAllCall { + out := &pbgear.Balances_TransferAllCall{} + v := in.(registry.Valuable) + _ = v - func To_Bounties_BountyBecameActiveEvent(in registry.DecodedFields) *pbgear.Bounties_BountyBecameActiveEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_BountyBecameActiveEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + // field Dest + out.Dest = To_Balances_TransferAllCall_dest(v.ValueAt(0)) + // primitive field KeepAlive + out.KeepAlive = To_bool(v.ValueAt(1)) - func To_Bounties_BountyCanceledEvent(in registry.DecodedFields) *pbgear.Bounties_BountyCanceledEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_BountyCanceledEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_Bounties_BountyClaimedEvent(in registry.DecodedFields) *pbgear.Bounties_BountyClaimedEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_BountyClaimedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Payout = To_string(fields[1].Value.(registry.DecodedFields)) - - out.Beneficiary = To_SpCoreCryptoAccountId32(fields[2].Value.(registry.DecodedFields)) - - return out +func To_Balances_TransferAllCall_dest(in any) *pbgear.Balances_Dest { + v := in.(registry.Valuable) + return To_Balances_Dest(v.ValueAt(0) //simple field } - func To_Bounties_BountyExtendedEvent(in registry.DecodedFields) *pbgear.Bounties_BountyExtendedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_BountyExtendedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Bounties_BountyProposedEvent(in registry.DecodedFields) *pbgear.Bounties_BountyProposedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_BountyProposedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} +func To_Balances_TransferAllowDeathCall(in any) *pbgear.Balances_TransferAllowDeathCall { + out := &pbgear.Balances_TransferAllowDeathCall{} + v := in.(registry.Valuable) + _ = v - func To_Bounties_BountyRejectedEvent(in registry.DecodedFields) *pbgear.Bounties_BountyRejectedEvent { + // field Dest + out.Dest = To_Balances_TransferAllowDeathCall_dest(v.ValueAt(0)) + // primitive field Value + out.Value = To_string(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_BountyRejectedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Bond = To_string(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Balances_TransferAllowDeathCall_dest(in any) *pbgear.Balances_Dest { + v := in.(registry.Valuable) + return To_Balances_Dest(v.ValueAt(0) //simple field } - func To_Bounties_ClaimBountyCall(in registry.DecodedFields) *pbgear.Bounties_ClaimBountyCall { + +func To_Balances_TransferKeepAliveCall(in any) *pbgear.Balances_TransferKeepAliveCall { + out := &pbgear.Balances_TransferKeepAliveCall{} + v := in.(registry.Valuable) + _ = v + + // field Dest + out.Dest = To_Balances_TransferKeepAliveCall_dest(v.ValueAt(0)) + // primitive field Value + out.Value = To_string(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_ClaimBountyCall{} - out.BountyId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - return out +func To_Balances_TransferKeepAliveCall_dest(in any) *pbgear.Balances_Dest { + v := in.(registry.Valuable) + return To_Balances_Dest(v.ValueAt(0) //simple field } - func To_Bounties_CloseBountyCall(in registry.DecodedFields) *pbgear.Bounties_CloseBountyCall { + +func To_Balances_TupleNull(in any) *pbgear.Balances_TupleNull { + out := &pbgear.Balances_TupleNull{} + v := in.(registry.Valuable) + _ = v + + // field Value + out.Value = To_Balances_TupleNull_value(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_CloseBountyCall{} - out.BountyId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - return out +func To_Balances_TupleNull_value(in any) *pbgear.TupleNull { + v := in.(registry.Valuable) + return To_TupleNull(v.ValueAt(0) //simple field } - func To_Bounties_CompactTupleNull(in types.UCompact) *pbgear.Bounties_CompactTupleNull { + +func To_Balances_UpgradeAccountsCall(in any) *pbgear.Balances_UpgradeAccountsCall { + out := &pbgear.Balances_UpgradeAccountsCall{} + v := in.(registry.Valuable) + _ = v + + // repeated field Who + out.Who = To_Repeated_Balances_UpgradeAccountsCall_who(v.ValueAt(0)) + + return out //from message +} - out := &pbgear.Bounties_CompactTupleNull{} - out.Value = To_TupleNull() - return out + +func To_Repeated_Balances_UpgradeAccountsCall_who(in any) []*pbgear.SpCoreCryptoAccountId32 { + items := in.([]interface{}) + + var out []*pbgear.SpCoreCryptoAccountId32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_SpCoreCryptoAccountId32(w) + out = append(out, o) + } + return nil //funcForRepeatedField } - func To_Bounties_Curator(in registry.DecodedFields) *pbgear.Bounties_Curator { + +func To_Balances_Who(in any) *pbgear.Balances_Who { + out := &pbgear.Balances_Who{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Balances_Who_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_Curator{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.Bounties_Curator_Id{ - Id: To_Bounties_Id(fields), //Passthrough fields... +func To_OneOf_Balances_Who_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Balances_Who_Id{ + Id: To_Balances_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.Bounties_Curator_Index{ - Index: To_Bounties_Index(fields), //Passthrough fields... + case 1: + return &pbgear.Balances_Who_Index{ + Index: To_Balances_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.Bounties_Curator_Raw{ - Raw: To_Bounties_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.Balances_Who_Raw{ + Raw: To_Balances_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.Bounties_Curator_Address32{ - Address32: To_Bounties_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.Balances_Who_Address32{ + Address32: To_Balances_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.Bounties_Curator_Address20{ - Address20: To_Bounties_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.Balances_Who_Address20{ + Address20: To_Balances_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Bounties_CuratorAcceptedEvent(in registry.DecodedFields) *pbgear.Bounties_CuratorAcceptedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_CuratorAcceptedEvent{} - out.BountyId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Curator = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_Bounties_CuratorProposedEvent(in registry.DecodedFields) *pbgear.Bounties_CuratorProposedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_CuratorProposedEvent{} - out.BountyId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Curator = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_BoundedCollectionsBoundedVecBoundedVec(in any) *pbgear.BoundedCollectionsBoundedVecBoundedVec { + out := &pbgear.BoundedCollectionsBoundedVecBoundedVec{} + v := in.(registry.Valuable) + _ = v - func To_Bounties_CuratorUnassignedEvent(in registry.DecodedFields) *pbgear.Bounties_CuratorUnassignedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_CuratorUnassignedEvent{} - out.BountyId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_Bounties_ExtendBountyExpiryCall(in registry.DecodedFields) *pbgear.Bounties_ExtendBountyExpiryCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_ExtendBountyExpiryCall{} - out.BountyId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Remark = To_bytes(fields[1].Value.([]interface{})) - return out + return out //from message } - - func To_Bounties_Id(in registry.DecodedFields) *pbgear.Bounties_Id { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_Id{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Bounties_Index(in registry.DecodedFields) *pbgear.Bounties_Index { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_Index{} - out.Value0 = To_Bounties_CompactTupleNull(fields[0].Value.(types.UCompact)) - - return out -} - func To_Bounties_ProposeBountyCall(in registry.DecodedFields) *pbgear.Bounties_ProposeBountyCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_ProposeBountyCall{} - out.Value = To_CompactString(fields[0].Value.(types.UCompact)) - - out.Description = To_bytes(fields[1].Value.([]interface{})) - return out -} +func To_BountiesPallet(in any) *pbgear.BountiesPallet { + out := &pbgear.BountiesPallet{} + v := in.(registry.Valuable) + _ = v - func To_Bounties_ProposeCuratorCall(in registry.DecodedFields) *pbgear.Bounties_ProposeCuratorCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_ProposeCuratorCall{} - out.BountyId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Curator = To_Bounties_Curator(fields[1].Value.(registry.DecodedFields)) - - out.Fee = To_CompactString(fields[2].Value.(types.UCompact)) - - return out -} + // oneOf field Call + v0 := To_OneOf_BountiesPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) - func To_Bounties_Raw(in registry.DecodedFields) *pbgear.Bounties_Raw { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_Raw{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out + return out //from message } - - func To_Bounties_UnassignCuratorCall(in registry.DecodedFields) *pbgear.Bounties_UnassignCuratorCall { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bounties_UnassignCuratorCall{} - out.BountyId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - return out -} +func To_OneOf_BountiesPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value - func To_Bytes(in registry.DecodedFields) *pbgear.Bytes { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Bytes{} - out.Remark = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out + switch variantIn.VariantByte { + case 0: + return &pbgear.BountiesPallet_ProposeBountyCall{ + ProposeBountyCall: To_Bounties_ProposeBountyCall(param), + } + case 1: + return &pbgear.BountiesPallet_ApproveBountyCall{ + ApproveBountyCall: To_Bounties_ApproveBountyCall(param), + } + case 2: + return &pbgear.BountiesPallet_ProposeCuratorCall{ + ProposeCuratorCall: To_Bounties_ProposeCuratorCall(param), + } + case 3: + return &pbgear.BountiesPallet_UnassignCuratorCall{ + UnassignCuratorCall: To_Bounties_UnassignCuratorCall(param), + } + case 4: + return &pbgear.BountiesPallet_AcceptCuratorCall{ + AcceptCuratorCall: To_Bounties_AcceptCuratorCall(param), + } + case 5: + return &pbgear.BountiesPallet_AwardBountyCall{ + AwardBountyCall: To_Bounties_AwardBountyCall(param), + } + case 6: + return &pbgear.BountiesPallet_ClaimBountyCall{ + ClaimBountyCall: To_Bounties_ClaimBountyCall(param), + } + case 7: + return &pbgear.BountiesPallet_CloseBountyCall{ + CloseBountyCall: To_Bounties_CloseBountyCall(param), + } + case 8: + return &pbgear.BountiesPallet_ExtendBountyExpiryCall{ + ExtendBountyExpiryCall: To_Bounties_ExtendBountyExpiryCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } } - func To_CannotCreate(in registry.DecodedFields) *pbgear.CannotCreate { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.CannotCreate{} - return out -} - func To_CannotCreateHold(in registry.DecodedFields) *pbgear.CannotCreateHold { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.CannotCreateHold{} - return out -} +func To_Bounties_AcceptCuratorCall(in any) *pbgear.Bounties_AcceptCuratorCall { + out := &pbgear.Bounties_AcceptCuratorCall{} + v := in.(registry.Valuable) + _ = v - func To_CannotLookup(in registry.DecodedFields) *pbgear.CannotLookup { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.CannotLookup{} - return out -} + // primitive field BountyId + out.BountyId = To_uint32(v.ValueAt(0)) - func To_ChildBounties_AcceptCuratorCall(in registry.DecodedFields) *pbgear.ChildBounties_AcceptCuratorCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_AcceptCuratorCall{} - out.ParentBountyId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.ChildBountyId = To_CompactUint32(fields[1].Value.(types.UCompact)) - - return out + return out //from message } - - func To_ChildBounties_AddChildBountyCall(in registry.DecodedFields) *pbgear.ChildBounties_AddChildBountyCall { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_AddChildBountyCall{} - out.ParentBountyId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value = To_CompactString(fields[1].Value.(types.UCompact)) - - out.Description = To_bytes(fields[2].Value.([]interface{})) - return out -} - func To_ChildBounties_AddedEvent(in registry.DecodedFields) *pbgear.ChildBounties_AddedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_AddedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.ChildIndex = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_ChildBounties_Address20(in registry.DecodedFields) *pbgear.ChildBounties_Address20 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_Address20{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} +func To_Bounties_Address20(in any) *pbgear.Bounties_Address20 { + out := &pbgear.Bounties_Address20{} + v := in.(registry.Valuable) + _ = v - func To_ChildBounties_Address32(in registry.DecodedFields) *pbgear.ChildBounties_Address32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_Address32{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message } + + + +func To_Bounties_Address32(in any) *pbgear.Bounties_Address32 { + out := &pbgear.Bounties_Address32{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_ChildBounties_AwardChildBountyCall(in registry.DecodedFields) *pbgear.ChildBounties_AwardChildBountyCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_AwardChildBountyCall{} - out.ParentBountyId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.ChildBountyId = To_CompactUint32(fields[1].Value.(types.UCompact)) - - out.Beneficiary = To_ChildBounties_Beneficiary(fields[2].Value.(registry.DecodedFields)) - - return out + + +func To_Bounties_ApproveBountyCall(in any) *pbgear.Bounties_ApproveBountyCall { + out := &pbgear.Bounties_ApproveBountyCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field BountyId + out.BountyId = To_uint32(v.ValueAt(0)) + + return out //from message } + + + +func To_Bounties_AwardBountyCall(in any) *pbgear.Bounties_AwardBountyCall { + out := &pbgear.Bounties_AwardBountyCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field BountyId + out.BountyId = To_uint32(v.ValueAt(0)) + // field Beneficiary + out.Beneficiary = To_Bounties_AwardBountyCall_beneficiary(v.ValueAt(1)) - func To_ChildBounties_AwardedEvent(in registry.DecodedFields) *pbgear.ChildBounties_AwardedEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_AwardedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.ChildIndex = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.Beneficiary = To_SpCoreCryptoAccountId32(fields[2].Value.(registry.DecodedFields)) - - return out +func To_Bounties_AwardBountyCall_beneficiary(in any) *pbgear.Bounties_Beneficiary { + v := in.(registry.Valuable) + return To_Bounties_Beneficiary(v.ValueAt(0) //simple field } - func To_ChildBounties_Beneficiary(in registry.DecodedFields) *pbgear.ChildBounties_Beneficiary { + +func To_Bounties_Beneficiary(in any) *pbgear.Bounties_Beneficiary { + out := &pbgear.Bounties_Beneficiary{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Bounties_Beneficiary_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_Beneficiary{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.ChildBounties_Beneficiary_Id{ - Id: To_ChildBounties_Id(fields), //Passthrough fields... +func To_OneOf_Bounties_Beneficiary_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Bounties_Beneficiary_Id{ + Id: To_Bounties_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.ChildBounties_Beneficiary_Index{ - Index: To_ChildBounties_Index(fields), //Passthrough fields... + case 1: + return &pbgear.Bounties_Beneficiary_Index{ + Index: To_Bounties_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.ChildBounties_Beneficiary_Raw{ - Raw: To_ChildBounties_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.Bounties_Beneficiary_Raw{ + Raw: To_Bounties_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.ChildBounties_Beneficiary_Address32{ - Address32: To_ChildBounties_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.Bounties_Beneficiary_Address32{ + Address32: To_Bounties_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.ChildBounties_Beneficiary_Address20{ - Address20: To_ChildBounties_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.Bounties_Beneficiary_Address20{ + Address20: To_Bounties_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_ChildBounties_CanceledEvent(in registry.DecodedFields) *pbgear.ChildBounties_CanceledEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_CanceledEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.ChildIndex = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_ChildBounties_ClaimChildBountyCall(in registry.DecodedFields) *pbgear.ChildBounties_ClaimChildBountyCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_ClaimChildBountyCall{} - out.ParentBountyId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.ChildBountyId = To_CompactUint32(fields[1].Value.(types.UCompact)) - - return out -} +func To_Bounties_ClaimBountyCall(in any) *pbgear.Bounties_ClaimBountyCall { + out := &pbgear.Bounties_ClaimBountyCall{} + v := in.(registry.Valuable) + _ = v - func To_ChildBounties_ClaimedEvent(in registry.DecodedFields) *pbgear.ChildBounties_ClaimedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_ClaimedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.ChildIndex = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.Payout = To_string(fields[2].Value.(registry.DecodedFields)) - - out.Beneficiary = To_SpCoreCryptoAccountId32(fields[3].Value.(registry.DecodedFields)) - - return out -} + // primitive field BountyId + out.BountyId = To_uint32(v.ValueAt(0)) - func To_ChildBounties_CloseChildBountyCall(in registry.DecodedFields) *pbgear.ChildBounties_CloseChildBountyCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_CloseChildBountyCall{} - out.ParentBountyId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.ChildBountyId = To_CompactUint32(fields[1].Value.(types.UCompact)) - - return out + return out //from message } - - func To_ChildBounties_CompactTupleNull(in types.UCompact) *pbgear.ChildBounties_CompactTupleNull { - out := &pbgear.ChildBounties_CompactTupleNull{} - out.Value = To_TupleNull() - return out + + +func To_Bounties_CloseBountyCall(in any) *pbgear.Bounties_CloseBountyCall { + out := &pbgear.Bounties_CloseBountyCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field BountyId + out.BountyId = To_uint32(v.ValueAt(0)) + + return out //from message } + + - func To_ChildBounties_Curator(in registry.DecodedFields) *pbgear.ChildBounties_Curator { +func To_Bounties_Curator(in any) *pbgear.Bounties_Curator { + out := &pbgear.Bounties_Curator{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Bounties_Curator_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_Curator{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.ChildBounties_Curator_Id{ - Id: To_ChildBounties_Id(fields), //Passthrough fields... +func To_OneOf_Bounties_Curator_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Bounties_Curator_Id{ + Id: To_Bounties_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.ChildBounties_Curator_Index{ - Index: To_ChildBounties_Index(fields), //Passthrough fields... + case 1: + return &pbgear.Bounties_Curator_Index{ + Index: To_Bounties_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.ChildBounties_Curator_Raw{ - Raw: To_ChildBounties_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.Bounties_Curator_Raw{ + Raw: To_Bounties_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.ChildBounties_Curator_Address32{ - Address32: To_ChildBounties_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.Bounties_Curator_Address32{ + Address32: To_Bounties_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.ChildBounties_Curator_Address20{ - Address20: To_ChildBounties_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.Bounties_Curator_Address20{ + Address20: To_Bounties_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_ChildBounties_Id(in registry.DecodedFields) *pbgear.ChildBounties_Id { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_Id{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_ChildBounties_Index(in registry.DecodedFields) *pbgear.ChildBounties_Index { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_Index{} - out.Value0 = To_ChildBounties_CompactTupleNull(fields[0].Value.(types.UCompact)) - - return out -} +func To_Bounties_ExtendBountyExpiryCall(in any) *pbgear.Bounties_ExtendBountyExpiryCall { + out := &pbgear.Bounties_ExtendBountyExpiryCall{} + v := in.(registry.Valuable) + _ = v - func To_ChildBounties_ProposeCuratorCall(in registry.DecodedFields) *pbgear.ChildBounties_ProposeCuratorCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_ProposeCuratorCall{} - out.ParentBountyId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.ChildBountyId = To_CompactUint32(fields[1].Value.(types.UCompact)) - - out.Curator = To_ChildBounties_Curator(fields[2].Value.(registry.DecodedFields)) - - out.Fee = To_CompactString(fields[3].Value.(types.UCompact)) - - return out -} + // primitive field BountyId + out.BountyId = To_uint32(v.ValueAt(0)) + // primitive field Remark + out.Remark = To_bytes(v.ValueAt(1)) - func To_ChildBounties_Raw(in registry.DecodedFields) *pbgear.ChildBounties_Raw { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_Raw{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out + return out //from message } - - func To_ChildBounties_UnassignCuratorCall(in registry.DecodedFields) *pbgear.ChildBounties_UnassignCuratorCall { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ChildBounties_UnassignCuratorCall{} - out.ParentBountyId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.ChildBountyId = To_CompactUint32(fields[1].Value.(types.UCompact)) - - return out -} - func To_CompactSpArithmeticPerThingsPerU16(in types.UCompact) *pbgear.CompactSpArithmeticPerThingsPerU16 { - - out := &pbgear.CompactSpArithmeticPerThingsPerU16{} - out.Value = To_SpArithmeticPerThingsPerU16(in) - return out -} - func To_CompactSpArithmeticPerThingsPerbill(in types.UCompact) *pbgear.CompactSpArithmeticPerThingsPerbill { - - out := &pbgear.CompactSpArithmeticPerThingsPerbill{} - out.Value = To_SpArithmeticPerThingsPerbill(in) - return out -} +func To_Bounties_Id(in any) *pbgear.Bounties_Id { + out := &pbgear.Bounties_Id{} + v := in.(registry.Valuable) + _ = v - func To_CompactString(in types.UCompact) *pbgear.CompactString { - - //&pbgear.CompactString - return nil -} + // field Value0 + out.Value0 = To_Bounties_Id_value0(v.ValueAt(0)) - func To_CompactUint32(in types.UCompact) *pbgear.CompactUint32 { - - //&pbgear.CompactUint32 - return nil + return out //from message } - - func To_CompactUint64(in types.UCompact) *pbgear.CompactUint64 { - //&pbgear.CompactUint64 - return nil +func To_Bounties_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_ConsumerRemaining(in registry.DecodedFields) *pbgear.ConsumerRemaining { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConsumerRemaining{} - return out -} - func To_ConvictionVoting_Address20(in registry.DecodedFields) *pbgear.ConvictionVoting_Address20 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_Address20{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} +func To_Bounties_Index(in any) *pbgear.Bounties_Index { + out := &pbgear.Bounties_Index{} + v := in.(registry.Valuable) + _ = v - func To_ConvictionVoting_Address32(in registry.DecodedFields) *pbgear.ConvictionVoting_Address32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_Address32{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + // field Value0 + out.Value0 = To_Bounties_Index_value0(v.ValueAt(0)) - func To_ConvictionVoting_CompactTupleNull(in types.UCompact) *pbgear.ConvictionVoting_CompactTupleNull { + return out //from message +} - out := &pbgear.ConvictionVoting_CompactTupleNull{} - out.Value = To_TupleNull() - return out +func To_Bounties_Index_value0(in any) *pbgear.Bounties_TupleNull { + v := in.(registry.Valuable) + return To_Bounties_TupleNull(v.ValueAt(0) //simple field } - func To_ConvictionVoting_Conviction(in registry.DecodedFields) *pbgear.ConvictionVoting_Conviction { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_Conviction{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.ConvictionVoting_Conviction_None{ - None: To_ConvictionVoting_None(fields), //Passthrough fields... - } - } - return out -} - func To_ConvictionVoting_DelegateCall(in registry.DecodedFields) *pbgear.ConvictionVoting_DelegateCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_DelegateCall{} - out.Class = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.To = To_ConvictionVoting_To(fields[1].Value.(registry.DecodedFields)) - - out.Conviction = To_ConvictionVoting_Conviction(fields[2].Value.(registry.DecodedFields)) - - out.Balance = To_string(fields[3].Value.(registry.DecodedFields)) - - return out -} +func To_Bounties_ProposeBountyCall(in any) *pbgear.Bounties_ProposeBountyCall { + out := &pbgear.Bounties_ProposeBountyCall{} + v := in.(registry.Valuable) + _ = v - func To_ConvictionVoting_DelegatedEvent(in registry.DecodedFields) *pbgear.ConvictionVoting_DelegatedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_DelegatedEvent{} - out. = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out. = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - return out -} + // primitive field Value + out.Value = To_string(v.ValueAt(0)) + // primitive field Description + out.Description = To_bytes(v.ValueAt(1)) - func To_ConvictionVoting_Id(in registry.DecodedFields) *pbgear.ConvictionVoting_Id { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_Id{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_ConvictionVoting_Index(in registry.DecodedFields) *pbgear.ConvictionVoting_Index { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_Index{} - out.Value0 = To_ConvictionVoting_CompactTupleNull(fields[0].Value.(types.UCompact)) - - return out -} - func To_ConvictionVoting_Locked1X(in registry.DecodedFields) *pbgear.ConvictionVoting_Locked1X { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_Locked1X{} - return out -} - func To_ConvictionVoting_Locked2X(in registry.DecodedFields) *pbgear.ConvictionVoting_Locked2X { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_Locked2X{} - return out -} +func To_Bounties_ProposeCuratorCall(in any) *pbgear.Bounties_ProposeCuratorCall { + out := &pbgear.Bounties_ProposeCuratorCall{} + v := in.(registry.Valuable) + _ = v - func To_ConvictionVoting_Locked3X(in registry.DecodedFields) *pbgear.ConvictionVoting_Locked3X { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_Locked3X{} - return out -} + // primitive field BountyId + out.BountyId = To_uint32(v.ValueAt(0)) + // field Curator + out.Curator = To_Bounties_ProposeCuratorCall_curator(v.ValueAt(1)) + // primitive field Fee + out.Fee = To_string(v.ValueAt(2)) - func To_ConvictionVoting_Locked4X(in registry.DecodedFields) *pbgear.ConvictionVoting_Locked4X { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_Locked4X{} - return out + return out //from message } - - func To_ConvictionVoting_Locked5X(in registry.DecodedFields) *pbgear.ConvictionVoting_Locked5X { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_Locked5X{} - return out +func To_Bounties_ProposeCuratorCall_curator(in any) *pbgear.Bounties_Curator { + v := in.(registry.Valuable) + return To_Bounties_Curator(v.ValueAt(0) //simple field } - func To_ConvictionVoting_Locked6X(in registry.DecodedFields) *pbgear.ConvictionVoting_Locked6X { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_Locked6X{} - return out -} - func To_ConvictionVoting_None(in registry.DecodedFields) *pbgear.ConvictionVoting_None { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_None{} - return out -} +func To_Bounties_Raw(in any) *pbgear.Bounties_Raw { + out := &pbgear.Bounties_Raw{} + v := in.(registry.Valuable) + _ = v - func To_ConvictionVoting_PalletConvictionVotingTypesTally(in registry.DecodedFields) *pbgear.ConvictionVoting_PalletConvictionVotingTypesTally { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_PalletConvictionVotingTypesTally{} - out.Ayes = To_string(fields[0].Value.(registry.DecodedFields)) - - out.Nays = To_string(fields[1].Value.(registry.DecodedFields)) - - out.Support = To_string(fields[2].Value.(registry.DecodedFields)) - - return out -} + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_ConvictionVoting_PalletConvictionVotingVoteVote(in registry.DecodedFields) *pbgear.ConvictionVoting_PalletConvictionVotingVoteVote { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_PalletConvictionVotingVoteVote{} - out.Value = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_ConvictionVoting_Raw(in registry.DecodedFields) *pbgear.ConvictionVoting_Raw { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_Raw{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_ConvictionVoting_RemoveOtherVoteCall(in registry.DecodedFields) *pbgear.ConvictionVoting_RemoveOtherVoteCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_RemoveOtherVoteCall{} - out.Target = To_ConvictionVoting_Target(fields[0].Value.(registry.DecodedFields)) - - out.Class = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.Index = To_uint32(fields[2].Value.(registry.DecodedFields)) - - return out -} - func To_ConvictionVoting_RemoveVoteCall(in registry.DecodedFields) *pbgear.ConvictionVoting_RemoveVoteCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_RemoveVoteCall{} - out.Class = To_optional_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Index = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_Bounties_TupleNull(in any) *pbgear.Bounties_TupleNull { + out := &pbgear.Bounties_TupleNull{} + v := in.(registry.Valuable) + _ = v - func To_ConvictionVoting_Split(in registry.DecodedFields) *pbgear.ConvictionVoting_Split { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_Split{} - out.Aye = To_string(fields[0].Value.(registry.DecodedFields)) - - out.Nay = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} + // field Value + out.Value = To_Bounties_TupleNull_value(v.ValueAt(0)) - func To_ConvictionVoting_SplitAbstain(in registry.DecodedFields) *pbgear.ConvictionVoting_SplitAbstain { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_SplitAbstain{} - out.Aye = To_string(fields[0].Value.(registry.DecodedFields)) - - out.Nay = To_string(fields[1].Value.(registry.DecodedFields)) - - out.Abstain = To_string(fields[2].Value.(registry.DecodedFields)) - - return out +func To_Bounties_TupleNull_value(in any) *pbgear.TupleNull { + v := in.(registry.Valuable) + return To_TupleNull(v.ValueAt(0) //simple field } - func To_ConvictionVoting_Standard(in registry.DecodedFields) *pbgear.ConvictionVoting_Standard { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_Standard{} - out.Vote = To_ConvictionVoting_PalletConvictionVotingVoteVote(fields[0].Value.(registry.DecodedFields)) - - out.Balance = To_string(fields[1].Value.(registry.DecodedFields)) - - return out + +func To_Bounties_UnassignCuratorCall(in any) *pbgear.Bounties_UnassignCuratorCall { + out := &pbgear.Bounties_UnassignCuratorCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field BountyId + out.BountyId = To_uint32(v.ValueAt(0)) + + return out //from message } + + + +func To_ChildBountiesPallet(in any) *pbgear.ChildBountiesPallet { + out := &pbgear.ChildBountiesPallet{} + v := in.(registry.Valuable) + _ = v - func To_ConvictionVoting_Target(in registry.DecodedFields) *pbgear.ConvictionVoting_Target { + // oneOf field Call + v0 := To_OneOf_ChildBountiesPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_Target{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.ConvictionVoting_Target_Id{ - Id: To_ConvictionVoting_Id(fields), //Passthrough fields... - } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.ConvictionVoting_Target_Index{ - Index: To_ConvictionVoting_Index(fields), //Passthrough fields... - } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.ConvictionVoting_Target_Raw{ - Raw: To_ConvictionVoting_Raw(fields), //Passthrough fields... - } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.ConvictionVoting_Target_Address32{ - Address32: To_ConvictionVoting_Address32(fields), //Passthrough fields... +func To_OneOf_ChildBountiesPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.ChildBountiesPallet_AddChildBountyCall{ + AddChildBountyCall: To_ChildBounties_AddChildBountyCall(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.ConvictionVoting_Target_Address20{ - Address20: To_ConvictionVoting_Address20(fields), //Passthrough fields... + case 1: + return &pbgear.ChildBountiesPallet_ProposeCuratorCall{ + ProposeCuratorCall: To_ChildBounties_ProposeCuratorCall(param), } - } - return out -} - - func To_ConvictionVoting_To(in registry.DecodedFields) *pbgear.ConvictionVoting_To { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_To{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.ConvictionVoting_To_Id{ - Id: To_ConvictionVoting_Id(fields), //Passthrough fields... + case 2: + return &pbgear.ChildBountiesPallet_AcceptCuratorCall{ + AcceptCuratorCall: To_ChildBounties_AcceptCuratorCall(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.ConvictionVoting_To_Index{ - Index: To_ConvictionVoting_Index(fields), //Passthrough fields... + case 3: + return &pbgear.ChildBountiesPallet_UnassignCuratorCall{ + UnassignCuratorCall: To_ChildBounties_UnassignCuratorCall(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.ConvictionVoting_To_Raw{ - Raw: To_ConvictionVoting_Raw(fields), //Passthrough fields... + case 4: + return &pbgear.ChildBountiesPallet_AwardChildBountyCall{ + AwardChildBountyCall: To_ChildBounties_AwardChildBountyCall(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.ConvictionVoting_To_Address32{ - Address32: To_ConvictionVoting_Address32(fields), //Passthrough fields... + case 5: + return &pbgear.ChildBountiesPallet_ClaimChildBountyCall{ + ClaimChildBountyCall: To_ChildBounties_ClaimChildBountyCall(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.ConvictionVoting_To_Address20{ - Address20: To_ConvictionVoting_Address20(fields), //Passthrough fields... + case 6: + return &pbgear.ChildBountiesPallet_CloseChildBountyCall{ + CloseChildBountyCall: To_ChildBounties_CloseChildBountyCall(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_ConvictionVoting_UndelegateCall(in registry.DecodedFields) *pbgear.ConvictionVoting_UndelegateCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_UndelegateCall{} - out.Class = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_ConvictionVoting_UndelegatedEvent(in registry.DecodedFields) *pbgear.ConvictionVoting_UndelegatedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_UndelegatedEvent{} - out. = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} +func To_ChildBounties_AcceptCuratorCall(in any) *pbgear.ChildBounties_AcceptCuratorCall { + out := &pbgear.ChildBounties_AcceptCuratorCall{} + v := in.(registry.Valuable) + _ = v - func To_ConvictionVoting_UnlockCall(in registry.DecodedFields) *pbgear.ConvictionVoting_UnlockCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_UnlockCall{} - out.Class = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Target = To_ConvictionVoting_Target(fields[1].Value.(registry.DecodedFields)) - - return out -} + // primitive field ParentBountyId + out.ParentBountyId = To_uint32(v.ValueAt(0)) + // primitive field ChildBountyId + out.ChildBountyId = To_uint32(v.ValueAt(1)) - func To_ConvictionVoting_Vote(in registry.DecodedFields) *pbgear.ConvictionVoting_Vote { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_Vote{} - - switch { - case matchFields(fields, []int64{126, 6}): - out.Value = &pbgear.ConvictionVoting_Vote_Standard{ - Standard: To_ConvictionVoting_Standard(fields), //Passthrough fields... - } - case matchFields(fields, []int64{6, 6}): - out.Value = &pbgear.ConvictionVoting_Vote_Split{ - Split: To_ConvictionVoting_Split(fields), //Passthrough fields... - } - case matchFields(fields, []int64{6, 6, 6}): - out.Value = &pbgear.ConvictionVoting_Vote_SplitAbstain{ - SplitAbstain: To_ConvictionVoting_SplitAbstain(fields), //Passthrough fields... - } - } - return out + return out //from message } - - func To_ConvictionVoting_VoteCall(in registry.DecodedFields) *pbgear.ConvictionVoting_VoteCall { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ConvictionVoting_VoteCall{} - out.PollIndex = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Vote = To_ConvictionVoting_Vote(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_Corruption(in registry.DecodedFields) *pbgear.Corruption { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Corruption{} - return out -} - func To_ElectionProviderMultiPhase_Compute(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_Compute { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_Compute{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.ElectionProviderMultiPhase_Compute_OnChain{ - OnChain: To_ElectionProviderMultiPhase_OnChain(fields), //Passthrough fields... - } - } - return out -} +func To_ChildBounties_AddChildBountyCall(in any) *pbgear.ChildBounties_AddChildBountyCall { + out := &pbgear.ChildBounties_AddChildBountyCall{} + v := in.(registry.Valuable) + _ = v - func To_ElectionProviderMultiPhase_ElectionFailedEvent(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_ElectionFailedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_ElectionFailedEvent{} - return out -} + // primitive field ParentBountyId + out.ParentBountyId = To_uint32(v.ValueAt(0)) + // primitive field Value + out.Value = To_string(v.ValueAt(1)) + // primitive field Description + out.Description = To_bytes(v.ValueAt(2)) - func To_ElectionProviderMultiPhase_ElectionFinalizedEvent(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_ElectionFinalizedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_ElectionFinalizedEvent{} - out.Compute = To_ElectionProviderMultiPhase_Compute(fields[0].Value.(registry.DecodedFields)) - - out.Score = To_SpNposElectionsElectionScore(fields[1].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_ElectionProviderMultiPhase_Emergency(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_Emergency { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_Emergency{} - return out -} - func To_ElectionProviderMultiPhase_Fallback(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_Fallback { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_Fallback{} - return out -} - func To_ElectionProviderMultiPhase_From(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_From { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_From{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.ElectionProviderMultiPhase_From_Off{ - Off: To_ElectionProviderMultiPhase_Off(fields), //Passthrough fields... - } - } - return out -} +func To_ChildBounties_Address20(in any) *pbgear.ChildBounties_Address20 { + out := &pbgear.ChildBounties_Address20{} + v := in.(registry.Valuable) + _ = v - func To_ElectionProviderMultiPhase_GovernanceFallbackCall(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_GovernanceFallbackCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_GovernanceFallbackCall{} - out.MaybeMaxVoters = To_optional_uint32(fields[0].Value.(registry.DecodedFields)) - - out.MaybeMaxTargets = To_optional_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_ElectionProviderMultiPhase_Off(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_Off { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_Off{} - return out + return out //from message } - - func To_ElectionProviderMultiPhase_OnChain(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_OnChain { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_OnChain{} - return out -} - func To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution{} - out.Solution = To_VaraRuntimeNposSolution16(fields[0].Value.(registry.DecodedFields)) - - out.Score = To_SpNposElectionsElectionScore(fields[1].Value.(registry.DecodedFields)) - - out.Round = To_uint32(fields[2].Value.(registry.DecodedFields)) - - return out -} - func To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseSolutionOrSnapshotSize(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseSolutionOrSnapshotSize { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseSolutionOrSnapshotSize{} - out.Voters = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Targets = To_CompactUint32(fields[1].Value.(types.UCompact)) - - return out -} +func To_ChildBounties_Address32(in any) *pbgear.ChildBounties_Address32 { + out := &pbgear.ChildBounties_Address32{} + v := in.(registry.Valuable) + _ = v - func To_ElectionProviderMultiPhase_PhaseTransitionedEvent(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_PhaseTransitionedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_PhaseTransitionedEvent{} - out.From = To_ElectionProviderMultiPhase_From(fields[0].Value.(registry.DecodedFields)) - - out.To = To_ElectionProviderMultiPhase_To(fields[1].Value.(registry.DecodedFields)) - - out.Round = To_uint32(fields[2].Value.(registry.DecodedFields)) - - return out -} + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_ElectionProviderMultiPhase_RewardedEvent(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_RewardedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_RewardedEvent{} - out.Account = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Value = To_string(fields[1].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_ElectionProviderMultiPhase_SetEmergencyElectionResultCall(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_SetEmergencyElectionResultCall { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_SetEmergencyElectionResultCall{} - out.Supports = To_repeated_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport(fields[0].Value.(registry.DecodedFields)) - - return out -} -func To_repeated_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport { - fields := []*registry.DecodedField(f) - _ = fields - out := make([]*pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport(f.Value.([]*registry.DecodedField))) - } - return out -} - func To_ElectionProviderMultiPhase_SetMinimumUntrustedScoreCall(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_SetMinimumUntrustedScoreCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_SetMinimumUntrustedScoreCall{} - out.MaybeNextScore = To_optional_SpNposElectionsElectionScore(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_optional_SpNposElectionsElectionScore(f registry.DecodedFields) *pbgear.SpNposElectionsElectionScore { - fields := []*registry.DecodedField(f) - _ = fields +func To_ChildBounties_AwardChildBountyCall(in any) *pbgear.ChildBounties_AwardChildBountyCall { + out := &pbgear.ChildBounties_AwardChildBountyCall{} + v := in.(registry.Valuable) + _ = v - var out = To_SpNposElectionsElectionScore(fields) - return out - } + // primitive field ParentBountyId + out.ParentBountyId = To_uint32(v.ValueAt(0)) + // primitive field ChildBountyId + out.ChildBountyId = To_uint32(v.ValueAt(1)) + // field Beneficiary + out.Beneficiary = To_ChildBounties_AwardChildBountyCall_beneficiary(v.ValueAt(2)) - func To_ElectionProviderMultiPhase_Signed(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_Signed { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_Signed{} - return out + return out //from message } - - func To_ElectionProviderMultiPhase_SlashedEvent(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_SlashedEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_SlashedEvent{} - out.Account = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Value = To_string(fields[1].Value.(registry.DecodedFields)) - - return out +func To_ChildBounties_AwardChildBountyCall_beneficiary(in any) *pbgear.ChildBounties_Beneficiary { + v := in.(registry.Valuable) + return To_ChildBounties_Beneficiary(v.ValueAt(0) //simple field } - func To_ElectionProviderMultiPhase_SolutionStoredEvent(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_SolutionStoredEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_SolutionStoredEvent{} - out.Compute = To_ElectionProviderMultiPhase_Compute(fields[0].Value.(registry.DecodedFields)) - - out.Origin = To_optional_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.PrevEjected = To_bool(fields[2].Value.(registry.DecodedFields)) - - return out -} - func To_optional_SpCoreCryptoAccountId32(f registry.DecodedFields) *pbgear.SpCoreCryptoAccountId32 { - fields := []*registry.DecodedField(f) - _ = fields - var out = To_SpCoreCryptoAccountId32(fields) - return out - } +func To_ChildBounties_Beneficiary(in any) *pbgear.ChildBounties_Beneficiary { + out := &pbgear.ChildBounties_Beneficiary{} + v := in.(registry.Valuable) + _ = v - func To_ElectionProviderMultiPhase_SubmitCall(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_SubmitCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_SubmitCall{} - out.RawSolution = To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution(fields[0].Value.(registry.DecodedFields)) - - return out -} + // oneOf field Value + v0 := To_OneOf_ChildBounties_Beneficiary_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) - func To_ElectionProviderMultiPhase_SubmitUnsignedCall(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_SubmitUnsignedCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_SubmitUnsignedCall{} - out.RawSolution = To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution(fields[0].Value.(registry.DecodedFields)) - - out.Witness = To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseSolutionOrSnapshotSize(fields[1].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_ElectionProviderMultiPhase_To(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_To { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_To{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.ElectionProviderMultiPhase_To_Off{ - Off: To_ElectionProviderMultiPhase_Off(fields), //Passthrough fields... +func To_OneOf_ChildBounties_Beneficiary_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.ChildBounties_Beneficiary_Id{ + Id: To_ChildBounties_Id(param), } + case 1: + return &pbgear.ChildBounties_Beneficiary_Index{ + Index: To_ChildBounties_Index(param), + } + case 2: + return &pbgear.ChildBounties_Beneficiary_Raw{ + Raw: To_ChildBounties_Raw(param), + } + case 3: + return &pbgear.ChildBounties_Beneficiary_Address32{ + Address32: To_ChildBounties_Address32(param), + } + case 4: + return &pbgear.ChildBounties_Beneficiary_Address20{ + Address20: To_ChildBounties_Address20(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out -} - - func To_ElectionProviderMultiPhase_TupleBooluint32(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleBooluint32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleBooluint32{} - out.Value0 = To_bool(fields[0].Value.(registry.DecodedFields)) - - out.Value1 = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} - - func To_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16{} - out.Value0 = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value1 = To_CompactSpArithmeticPerThingsPerU16(fields[1].Value.(types.UCompact)) - - return out -} - - func To_ElectionProviderMultiPhase_TupleCompactUint32CompactUint32(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleCompactUint32CompactUint32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleCompactUint32CompactUint32{} - out.Value0 = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value1 = To_CompactUint32(fields[1].Value.(types.UCompact)) - - return out -} - - func To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes10ListCompactUint32(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes10ListCompactUint32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes10ListCompactUint32{} - out.Value0 = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value1 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(fields[1].Value.(registry.DecodedFields)) - - out.Value2 = To_CompactUint32(fields[2].Value.(types.UCompact)) - - return out -} -func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16 { - fields := []*registry.DecodedField(f) - _ = fields - - out := make([]*pbgear.ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(f.Value.([]*registry.DecodedField))) - } - return out -} - - func To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes11ListCompactUint32(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes11ListCompactUint32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes11ListCompactUint32{} - out.Value0 = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value1 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(fields[1].Value.(registry.DecodedFields)) - - out.Value2 = To_CompactUint32(fields[2].Value.(types.UCompact)) - - return out -} - - func To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes12ListCompactUint32(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes12ListCompactUint32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes12ListCompactUint32{} - out.Value0 = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value1 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(fields[1].Value.(registry.DecodedFields)) - - out.Value2 = To_CompactUint32(fields[2].Value.(types.UCompact)) - - return out -} - - func To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes13ListCompactUint32(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes13ListCompactUint32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes13ListCompactUint32{} - out.Value0 = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value1 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(fields[1].Value.(registry.DecodedFields)) - - out.Value2 = To_CompactUint32(fields[2].Value.(types.UCompact)) - - return out -} - - func To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes14ListCompactUint32(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes14ListCompactUint32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes14ListCompactUint32{} - out.Value0 = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value1 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(fields[1].Value.(registry.DecodedFields)) - - out.Value2 = To_CompactUint32(fields[2].Value.(types.UCompact)) - - return out -} - - func To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes15ListCompactUint32(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes15ListCompactUint32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes15ListCompactUint32{} - out.Value0 = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value1 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(fields[1].Value.(registry.DecodedFields)) - - out.Value2 = To_CompactUint32(fields[2].Value.(types.UCompact)) - - return out -} - - func To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes16ListCompactUint32(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes16ListCompactUint32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes16ListCompactUint32{} - out.Value0 = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value1 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(fields[1].Value.(registry.DecodedFields)) - - out.Value2 = To_CompactUint32(fields[2].Value.(types.UCompact)) - - return out -} - - func To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes3ListCompactUint32(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes3ListCompactUint32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes3ListCompactUint32{} - out.Value0 = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value1 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(fields[1].Value.(registry.DecodedFields)) - - out.Value2 = To_CompactUint32(fields[2].Value.(types.UCompact)) - - return out -} - - func To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes4ListCompactUint32(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes4ListCompactUint32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes4ListCompactUint32{} - out.Value0 = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value1 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(fields[1].Value.(registry.DecodedFields)) - - out.Value2 = To_CompactUint32(fields[2].Value.(types.UCompact)) - - return out -} - - func To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes5ListCompactUint32(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes5ListCompactUint32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes5ListCompactUint32{} - out.Value0 = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value1 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(fields[1].Value.(registry.DecodedFields)) - - out.Value2 = To_CompactUint32(fields[2].Value.(types.UCompact)) - - return out -} - - func To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes6ListCompactUint32(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes6ListCompactUint32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes6ListCompactUint32{} - out.Value0 = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value1 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(fields[1].Value.(registry.DecodedFields)) - - out.Value2 = To_CompactUint32(fields[2].Value.(types.UCompact)) - - return out -} - - func To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes7ListCompactUint32(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes7ListCompactUint32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes7ListCompactUint32{} - out.Value0 = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value1 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(fields[1].Value.(registry.DecodedFields)) - - out.Value2 = To_CompactUint32(fields[2].Value.(types.UCompact)) - - return out -} - - func To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes8ListCompactUint32(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes8ListCompactUint32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes8ListCompactUint32{} - out.Value0 = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value1 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(fields[1].Value.(registry.DecodedFields)) - - out.Value2 = To_CompactUint32(fields[2].Value.(types.UCompact)) - - return out -} - - func To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes9ListCompactUint32(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes9ListCompactUint32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes9ListCompactUint32{} - out.Value0 = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value1 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(fields[1].Value.(registry.DecodedFields)) - - out.Value2 = To_CompactUint32(fields[2].Value.(types.UCompact)) - - return out -} - - func To_ElectionProviderMultiPhase_TupleCompactUint32TupleCompactUint32CompactSpArithmeticPerThingsPerU16CompactUint32(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleCompactUint32TupleCompactUint32CompactSpArithmeticPerThingsPerU16CompactUint32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleCompactUint32TupleCompactUint32CompactSpArithmeticPerThingsPerU16CompactUint32{} - out.Value0 = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Value1 = To_ElectionProviderMultiPhase_TupleCompactUint32CompactSpArithmeticPerThingsPerU16(fields[1].Value.(registry.DecodedFields)) - - out.Value2 = To_CompactUint32(fields[2].Value.(types.UCompact)) - - return out -} - - func To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Value1 = To_SpNposElectionsSupport(fields[1].Value.(registry.DecodedFields)) - - return out } - func To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Value1 = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_ElectionProviderMultiPhase_Unsigned(in registry.DecodedFields) *pbgear.ElectionProviderMultiPhase_Unsigned { +func To_ChildBounties_ClaimChildBountyCall(in any) *pbgear.ChildBounties_ClaimChildBountyCall { + out := &pbgear.ChildBounties_ClaimChildBountyCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field ParentBountyId + out.ParentBountyId = To_uint32(v.ValueAt(0)) + // primitive field ChildBountyId + out.ChildBountyId = To_uint32(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ElectionProviderMultiPhase_Unsigned{} - return out + + +func To_ChildBounties_CloseChildBountyCall(in any) *pbgear.ChildBounties_CloseChildBountyCall { + out := &pbgear.ChildBounties_CloseChildBountyCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field ParentBountyId + out.ParentBountyId = To_uint32(v.ValueAt(0)) + // primitive field ChildBountyId + out.ChildBountyId = To_uint32(v.ValueAt(1)) + + return out //from message } + + - func To_Error(in registry.DecodedFields) *pbgear.Error { +func To_ChildBounties_Curator(in any) *pbgear.ChildBounties_Curator { + out := &pbgear.ChildBounties_Curator{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_ChildBounties_Curator_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Error{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Error_Other{ - Other: To_Other(fields), //Passthrough fields... +func To_OneOf_ChildBounties_Curator_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.ChildBounties_Curator_Id{ + Id: To_ChildBounties_Id(param), + } + case 1: + return &pbgear.ChildBounties_Curator_Index{ + Index: To_ChildBounties_Index(param), + } + case 2: + return &pbgear.ChildBounties_Curator_Raw{ + Raw: To_ChildBounties_Raw(param), + } + case 3: + return &pbgear.ChildBounties_Curator_Address32{ + Address32: To_ChildBounties_Address32(param), } + case 4: + return &pbgear.ChildBounties_Curator_Address20{ + Address20: To_ChildBounties_Address20(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Exhausted(in registry.DecodedFields) *pbgear.Exhausted { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Exhausted{} - return out -} - func To_FellowshipCollective_AddMemberCall(in registry.DecodedFields) *pbgear.FellowshipCollective_AddMemberCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_AddMemberCall{} - out.Who = To_FellowshipCollective_Who(fields[0].Value.(registry.DecodedFields)) - - return out -} +func To_ChildBounties_Id(in any) *pbgear.ChildBounties_Id { + out := &pbgear.ChildBounties_Id{} + v := in.(registry.Valuable) + _ = v - func To_FellowshipCollective_Address20(in registry.DecodedFields) *pbgear.FellowshipCollective_Address20 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_Address20{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + // field Value0 + out.Value0 = To_ChildBounties_Id_value0(v.ValueAt(0)) - func To_FellowshipCollective_Address32(in registry.DecodedFields) *pbgear.FellowshipCollective_Address32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_Address32{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out + return out //from message } - - func To_FellowshipCollective_Aye(in registry.DecodedFields) *pbgear.FellowshipCollective_Aye { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_Aye{} - out.Value0 = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out +func To_ChildBounties_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_FellowshipCollective_CleanupPollCall(in registry.DecodedFields) *pbgear.FellowshipCollective_CleanupPollCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_CleanupPollCall{} - out.PollIndex = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Max = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_FellowshipCollective_CompactTupleNull(in types.UCompact) *pbgear.FellowshipCollective_CompactTupleNull { - - out := &pbgear.FellowshipCollective_CompactTupleNull{} - out.Value = To_TupleNull() - return out -} +func To_ChildBounties_Index(in any) *pbgear.ChildBounties_Index { + out := &pbgear.ChildBounties_Index{} + v := in.(registry.Valuable) + _ = v - func To_FellowshipCollective_DemoteMemberCall(in registry.DecodedFields) *pbgear.FellowshipCollective_DemoteMemberCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_DemoteMemberCall{} - out.Who = To_FellowshipCollective_Who(fields[0].Value.(registry.DecodedFields)) - - return out -} + // field Value0 + out.Value0 = To_ChildBounties_Index_value0(v.ValueAt(0)) - func To_FellowshipCollective_Id(in registry.DecodedFields) *pbgear.FellowshipCollective_Id { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_Id{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_FellowshipCollective_Index(in registry.DecodedFields) *pbgear.FellowshipCollective_Index { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_Index{} - out.Value0 = To_FellowshipCollective_CompactTupleNull(fields[0].Value.(types.UCompact)) - - return out +func To_ChildBounties_Index_value0(in any) *pbgear.ChildBounties_TupleNull { + v := in.(registry.Valuable) + return To_ChildBounties_TupleNull(v.ValueAt(0) //simple field } - func To_FellowshipCollective_MemberAddedEvent(in registry.DecodedFields) *pbgear.FellowshipCollective_MemberAddedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_MemberAddedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_FellowshipCollective_MemberRemovedEvent(in registry.DecodedFields) *pbgear.FellowshipCollective_MemberRemovedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_MemberRemovedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Rank = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_ChildBounties_ProposeCuratorCall(in any) *pbgear.ChildBounties_ProposeCuratorCall { + out := &pbgear.ChildBounties_ProposeCuratorCall{} + v := in.(registry.Valuable) + _ = v - func To_FellowshipCollective_Nay(in registry.DecodedFields) *pbgear.FellowshipCollective_Nay { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_Nay{} - out.Value0 = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + // primitive field ParentBountyId + out.ParentBountyId = To_uint32(v.ValueAt(0)) + // primitive field ChildBountyId + out.ChildBountyId = To_uint32(v.ValueAt(1)) + // field Curator + out.Curator = To_ChildBounties_ProposeCuratorCall_curator(v.ValueAt(2)) + // primitive field Fee + out.Fee = To_string(v.ValueAt(3)) - func To_FellowshipCollective_PromoteMemberCall(in registry.DecodedFields) *pbgear.FellowshipCollective_PromoteMemberCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_PromoteMemberCall{} - out.Who = To_FellowshipCollective_Who(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_FellowshipCollective_RankChangedEvent(in registry.DecodedFields) *pbgear.FellowshipCollective_RankChangedEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_RankChangedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Rank = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out +func To_ChildBounties_ProposeCuratorCall_curator(in any) *pbgear.ChildBounties_Curator { + v := in.(registry.Valuable) + return To_ChildBounties_Curator(v.ValueAt(0) //simple field } - func To_FellowshipCollective_Raw(in registry.DecodedFields) *pbgear.FellowshipCollective_Raw { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_Raw{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_FellowshipCollective_RemoveMemberCall(in registry.DecodedFields) *pbgear.FellowshipCollective_RemoveMemberCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_RemoveMemberCall{} - out.Who = To_FellowshipCollective_Who(fields[0].Value.(registry.DecodedFields)) - - out.MinRank = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_ChildBounties_Raw(in any) *pbgear.ChildBounties_Raw { + out := &pbgear.ChildBounties_Raw{} + v := in.(registry.Valuable) + _ = v - func To_FellowshipCollective_Vote(in registry.DecodedFields) *pbgear.FellowshipCollective_Vote { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_Vote{} - - switch { - case matchFields(fields, []int64{4}): - out.Value = &pbgear.FellowshipCollective_Vote_Aye{ - Aye: To_FellowshipCollective_Aye(fields), //Passthrough fields... - } - case matchFields(fields, []int64{4}): - out.Value = &pbgear.FellowshipCollective_Vote_Nay{ - Nay: To_FellowshipCollective_Nay(fields), //Passthrough fields... - } - } - return out + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message } + + + +func To_ChildBounties_TupleNull(in any) *pbgear.ChildBounties_TupleNull { + out := &pbgear.ChildBounties_TupleNull{} + v := in.(registry.Valuable) + _ = v + + // field Value + out.Value = To_ChildBounties_TupleNull_value(v.ValueAt(0)) - func To_FellowshipCollective_VoteCall(in registry.DecodedFields) *pbgear.FellowshipCollective_VoteCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_VoteCall{} - out.Poll = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Aye = To_bool(fields[1].Value.(registry.DecodedFields)) - - return out +func To_ChildBounties_TupleNull_value(in any) *pbgear.TupleNull { + v := in.(registry.Valuable) + return To_TupleNull(v.ValueAt(0) //simple field } - func To_FellowshipCollective_VotedEvent(in registry.DecodedFields) *pbgear.FellowshipCollective_VotedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_VotedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Poll = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.Vote = To_FellowshipCollective_Vote(fields[2].Value.(registry.DecodedFields)) - - out.Tally = To_RankedCollective_PalletRankedCollectiveTally(fields[3].Value.(registry.DecodedFields)) - - return out + +func To_ChildBounties_UnassignCuratorCall(in any) *pbgear.ChildBounties_UnassignCuratorCall { + out := &pbgear.ChildBounties_UnassignCuratorCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field ParentBountyId + out.ParentBountyId = To_uint32(v.ValueAt(0)) + // primitive field ChildBountyId + out.ChildBountyId = To_uint32(v.ValueAt(1)) + + return out //from message } + - func To_FellowshipCollective_Who(in registry.DecodedFields) *pbgear.FellowshipCollective_Who { + +func To_ConvictionVotingPallet(in any) *pbgear.ConvictionVotingPallet { + out := &pbgear.ConvictionVotingPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_ConvictionVotingPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipCollective_Who{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.FellowshipCollective_Who_Id{ - Id: To_FellowshipCollective_Id(fields), //Passthrough fields... +func To_OneOf_ConvictionVotingPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.ConvictionVotingPallet_VoteCall{ + VoteCall: To_ConvictionVoting_VoteCall(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.FellowshipCollective_Who_Index{ - Index: To_FellowshipCollective_Index(fields), //Passthrough fields... + case 1: + return &pbgear.ConvictionVotingPallet_DelegateCall{ + DelegateCall: To_ConvictionVoting_DelegateCall(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.FellowshipCollective_Who_Raw{ - Raw: To_FellowshipCollective_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.ConvictionVotingPallet_UndelegateCall{ + UndelegateCall: To_ConvictionVoting_UndelegateCall(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.FellowshipCollective_Who_Address32{ - Address32: To_FellowshipCollective_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.ConvictionVotingPallet_UnlockCall{ + UnlockCall: To_ConvictionVoting_UnlockCall(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.FellowshipCollective_Who_Address20{ - Address20: To_FellowshipCollective_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.ConvictionVotingPallet_RemoveVoteCall{ + RemoveVoteCall: To_ConvictionVoting_RemoveVoteCall(param), } + case 5: + return &pbgear.ConvictionVotingPallet_RemoveOtherVoteCall{ + RemoveOtherVoteCall: To_ConvictionVoting_RemoveOtherVoteCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_FellowshipReferenda_After(in registry.DecodedFields) *pbgear.FellowshipReferenda_After { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_After{} - out.Value0 = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_FellowshipReferenda_ApprovedEvent(in registry.DecodedFields) *pbgear.FellowshipReferenda_ApprovedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_ApprovedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} +func To_ConvictionVoting_Address20(in any) *pbgear.ConvictionVoting_Address20 { + out := &pbgear.ConvictionVoting_Address20{} + v := in.(registry.Valuable) + _ = v - func To_FellowshipReferenda_At(in registry.DecodedFields) *pbgear.FellowshipReferenda_At { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_At{} - out.Value0 = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_FellowshipReferenda_CancelCall(in registry.DecodedFields) *pbgear.FellowshipReferenda_CancelCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_CancelCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_FellowshipReferenda_CancelledEvent(in registry.DecodedFields) *pbgear.FellowshipReferenda_CancelledEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_CancelledEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Tally = To_RankedCollective_PalletRankedCollectiveTally(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_FellowshipReferenda_ConfirmAbortedEvent(in registry.DecodedFields) *pbgear.FellowshipReferenda_ConfirmAbortedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_ConfirmAbortedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} +func To_ConvictionVoting_Address32(in any) *pbgear.ConvictionVoting_Address32 { + out := &pbgear.ConvictionVoting_Address32{} + v := in.(registry.Valuable) + _ = v - func To_FellowshipReferenda_ConfirmStartedEvent(in registry.DecodedFields) *pbgear.FellowshipReferenda_ConfirmStartedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_ConfirmStartedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_FellowshipReferenda_ConfirmedEvent(in registry.DecodedFields) *pbgear.FellowshipReferenda_ConfirmedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_ConfirmedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Tally = To_RankedCollective_PalletRankedCollectiveTally(fields[1].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_FellowshipReferenda_DecisionDepositPlacedEvent(in registry.DecodedFields) *pbgear.FellowshipReferenda_DecisionDepositPlacedEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_DecisionDepositPlacedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Who = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[2].Value.(registry.DecodedFields)) - - return out -} - func To_FellowshipReferenda_DecisionDepositRefundedEvent(in registry.DecodedFields) *pbgear.FellowshipReferenda_DecisionDepositRefundedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_DecisionDepositRefundedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Who = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[2].Value.(registry.DecodedFields)) - - return out -} - func To_FellowshipReferenda_DecisionStartedEvent(in registry.DecodedFields) *pbgear.FellowshipReferenda_DecisionStartedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_DecisionStartedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Track = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.Proposal = To_FellowshipReferenda_Proposal(fields[2].Value.(registry.DecodedFields)) - - out.Tally = To_RankedCollective_PalletRankedCollectiveTally(fields[3].Value.(registry.DecodedFields)) - - return out -} +func To_ConvictionVoting_Conviction(in any) *pbgear.ConvictionVoting_Conviction { + out := &pbgear.ConvictionVoting_Conviction{} + v := in.(registry.Valuable) + _ = v - func To_FellowshipReferenda_DepositSlashedEvent(in registry.DecodedFields) *pbgear.FellowshipReferenda_DepositSlashedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_DepositSlashedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} + // oneOf field Value + v0 := To_OneOf_ConvictionVoting_Conviction_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) - func To_FellowshipReferenda_EnactmentMoment(in registry.DecodedFields) *pbgear.FellowshipReferenda_EnactmentMoment { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_EnactmentMoment{} - - switch { - case matchFields(fields, []int64{4}): - out.Value = &pbgear.FellowshipReferenda_EnactmentMoment_At{ - At: To_FellowshipReferenda_At(fields), //Passthrough fields... +func To_OneOf_ConvictionVoting_Conviction_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.ConvictionVoting_Conviction_None{ + None: To_ConvictionVoting_None(param), + } + case 1: + return &pbgear.ConvictionVoting_Conviction_Locked1X{ + Locked1X: To_ConvictionVoting_Locked1X(param), + } + case 2: + return &pbgear.ConvictionVoting_Conviction_Locked2X{ + Locked2X: To_ConvictionVoting_Locked2X(param), } - case matchFields(fields, []int64{4}): - out.Value = &pbgear.FellowshipReferenda_EnactmentMoment_After{ - After: To_FellowshipReferenda_After(fields), //Passthrough fields... + case 3: + return &pbgear.ConvictionVoting_Conviction_Locked3X{ + Locked3X: To_ConvictionVoting_Locked3X(param), } + case 4: + return &pbgear.ConvictionVoting_Conviction_Locked4X{ + Locked4X: To_ConvictionVoting_Locked4X(param), + } + case 5: + return &pbgear.ConvictionVoting_Conviction_Locked5X{ + Locked5X: To_ConvictionVoting_Locked5X(param), + } + case 6: + return &pbgear.ConvictionVoting_Conviction_Locked6X{ + Locked6X: To_ConvictionVoting_Locked6X(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_FellowshipReferenda_Inline(in registry.DecodedFields) *pbgear.FellowshipReferenda_Inline { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_Inline{} - out.Value0 = To_BoundedCollectionsBoundedVecBoundedVec(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_FellowshipReferenda_KillCall(in registry.DecodedFields) *pbgear.FellowshipReferenda_KillCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_KillCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} +func To_ConvictionVoting_DelegateCall(in any) *pbgear.ConvictionVoting_DelegateCall { + out := &pbgear.ConvictionVoting_DelegateCall{} + v := in.(registry.Valuable) + _ = v - func To_FellowshipReferenda_KilledEvent(in registry.DecodedFields) *pbgear.FellowshipReferenda_KilledEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_KilledEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Tally = To_RankedCollective_PalletRankedCollectiveTally(fields[1].Value.(registry.DecodedFields)) - - return out -} + // primitive field Class + out.Class = To_uint32(v.ValueAt(0)) + // field To + out.To = To_ConvictionVoting_DelegateCall_to(v.ValueAt(1)) + // field Conviction + out.Conviction = To_ConvictionVoting_DelegateCall_conviction(v.ValueAt(2)) + // primitive field Balance + out.Balance = To_string(v.ValueAt(3)) - func To_FellowshipReferenda_Legacy(in registry.DecodedFields) *pbgear.FellowshipReferenda_Legacy { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_Legacy{} - out.Hash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_FellowshipReferenda_Lookup(in registry.DecodedFields) *pbgear.FellowshipReferenda_Lookup { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_Lookup{} - out.Hash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - out.Len = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out +func To_ConvictionVoting_DelegateCall_to(in any) *pbgear.ConvictionVoting_To { + v := in.(registry.Valuable) + return To_ConvictionVoting_To(v.ValueAt(0) //simple field } - - func To_FellowshipReferenda_MetadataClearedEvent(in registry.DecodedFields) *pbgear.FellowshipReferenda_MetadataClearedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_MetadataClearedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Hash = To_PrimitiveTypesH256(fields[1].Value.(registry.DecodedFields)) - - return out +func To_ConvictionVoting_DelegateCall_conviction(in any) *pbgear.ConvictionVoting_Conviction { + v := in.(registry.Valuable) + return To_ConvictionVoting_Conviction(v.ValueAt(0) //simple field } - func To_FellowshipReferenda_MetadataSetEvent(in registry.DecodedFields) *pbgear.FellowshipReferenda_MetadataSetEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_MetadataSetEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Hash = To_PrimitiveTypesH256(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_FellowshipReferenda_NudgeReferendumCall(in registry.DecodedFields) *pbgear.FellowshipReferenda_NudgeReferendumCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_NudgeReferendumCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} +func To_ConvictionVoting_Id(in any) *pbgear.ConvictionVoting_Id { + out := &pbgear.ConvictionVoting_Id{} + v := in.(registry.Valuable) + _ = v - func To_FellowshipReferenda_OneFewerDecidingCall(in registry.DecodedFields) *pbgear.FellowshipReferenda_OneFewerDecidingCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_OneFewerDecidingCall{} - out.Track = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + // field Value0 + out.Value0 = To_ConvictionVoting_Id_value0(v.ValueAt(0)) - func To_FellowshipReferenda_Origins(in registry.DecodedFields) *pbgear.FellowshipReferenda_Origins { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_Origins{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_FellowshipReferenda_PlaceDecisionDepositCall(in registry.DecodedFields) *pbgear.FellowshipReferenda_PlaceDecisionDepositCall { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_PlaceDecisionDepositCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out +func To_ConvictionVoting_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_FellowshipReferenda_Proposal(in registry.DecodedFields) *pbgear.FellowshipReferenda_Proposal { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_Proposal{} - - switch { - case matchFields(fields, []int64{12}): - out.Value = &pbgear.FellowshipReferenda_Proposal_Legacy{ - Legacy: To_FellowshipReferenda_Legacy(fields), //Passthrough fields... - } - case matchFields(fields, []int64{279}): - out.Value = &pbgear.FellowshipReferenda_Proposal_Inline{ - Inline: To_FellowshipReferenda_Inline(fields), //Passthrough fields... - } - case matchFields(fields, []int64{12, 4}): - out.Value = &pbgear.FellowshipReferenda_Proposal_Lookup{ - Lookup: To_FellowshipReferenda_Lookup(fields), //Passthrough fields... - } - } - return out -} - func To_FellowshipReferenda_ProposalOrigin(in registry.DecodedFields) *pbgear.FellowshipReferenda_ProposalOrigin { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_ProposalOrigin{} - - switch { - case matchFields(fields, []int64{121}): - out.Value = &pbgear.FellowshipReferenda_ProposalOrigin_System{ - System: To_FellowshipReferenda_System(fields), //Passthrough fields... - } - case matchFields(fields, []int64{122}): - out.Value = &pbgear.FellowshipReferenda_ProposalOrigin_Origins{ - Origins: To_FellowshipReferenda_Origins(fields), //Passthrough fields... - } - case matchFields(fields, []int64{123}): - out.Value = &pbgear.FellowshipReferenda_ProposalOrigin_Void{ - Void: To_FellowshipReferenda_Void(fields), //Passthrough fields... - } - } - return out -} +func To_ConvictionVoting_Index(in any) *pbgear.ConvictionVoting_Index { + out := &pbgear.ConvictionVoting_Index{} + v := in.(registry.Valuable) + _ = v - func To_FellowshipReferenda_RefundDecisionDepositCall(in registry.DecodedFields) *pbgear.FellowshipReferenda_RefundDecisionDepositCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_RefundDecisionDepositCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + // field Value0 + out.Value0 = To_ConvictionVoting_Index_value0(v.ValueAt(0)) - func To_FellowshipReferenda_RefundSubmissionDepositCall(in registry.DecodedFields) *pbgear.FellowshipReferenda_RefundSubmissionDepositCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_RefundSubmissionDepositCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_FellowshipReferenda_RejectedEvent(in registry.DecodedFields) *pbgear.FellowshipReferenda_RejectedEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_RejectedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Tally = To_RankedCollective_PalletRankedCollectiveTally(fields[1].Value.(registry.DecodedFields)) - - return out +func To_ConvictionVoting_Index_value0(in any) *pbgear.ConvictionVoting_TupleNull { + v := in.(registry.Valuable) + return To_ConvictionVoting_TupleNull(v.ValueAt(0) //simple field } - func To_FellowshipReferenda_SetMetadataCall(in registry.DecodedFields) *pbgear.FellowshipReferenda_SetMetadataCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_SetMetadataCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.MaybeHash = To_optional_PrimitiveTypesH256(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_optional_PrimitiveTypesH256(f registry.DecodedFields) *pbgear.PrimitiveTypesH256 { - fields := []*registry.DecodedField(f) - _ = fields - var out = To_PrimitiveTypesH256(fields) - return out - } +func To_ConvictionVoting_Locked1X(in any) *pbgear.ConvictionVoting_Locked1X { + out := &pbgear.ConvictionVoting_Locked1X{} + v := in.(registry.Valuable) + _ = v - func To_FellowshipReferenda_SubmissionDepositRefundedEvent(in registry.DecodedFields) *pbgear.FellowshipReferenda_SubmissionDepositRefundedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_SubmissionDepositRefundedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Who = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[2].Value.(registry.DecodedFields)) - - return out -} - func To_FellowshipReferenda_SubmitCall(in registry.DecodedFields) *pbgear.FellowshipReferenda_SubmitCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_SubmitCall{} - out.ProposalOrigin = To_FellowshipReferenda_ProposalOrigin(fields[0].Value.(registry.DecodedFields)) - - out.Proposal = To_FellowshipReferenda_Proposal(fields[1].Value.(registry.DecodedFields)) - - out.EnactmentMoment = To_FellowshipReferenda_EnactmentMoment(fields[2].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_FellowshipReferenda_SubmittedEvent(in registry.DecodedFields) *pbgear.FellowshipReferenda_SubmittedEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_SubmittedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Track = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.Proposal = To_FellowshipReferenda_Proposal(fields[2].Value.(registry.DecodedFields)) - - return out -} - func To_FellowshipReferenda_System(in registry.DecodedFields) *pbgear.FellowshipReferenda_System { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_System{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_FellowshipReferenda_TimedOutEvent(in registry.DecodedFields) *pbgear.FellowshipReferenda_TimedOutEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_TimedOutEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Tally = To_RankedCollective_PalletRankedCollectiveTally(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_ConvictionVoting_Locked2X(in any) *pbgear.ConvictionVoting_Locked2X { + out := &pbgear.ConvictionVoting_Locked2X{} + v := in.(registry.Valuable) + _ = v - func To_FellowshipReferenda_Void(in registry.DecodedFields) *pbgear.FellowshipReferenda_Void { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FellowshipReferenda_Void{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_FinalityGrandpaEquivocation(in registry.DecodedFields) *pbgear.FinalityGrandpaEquivocation { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FinalityGrandpaEquivocation{} - out.RoundNumber = To_uint64(fields[0].Value.(registry.DecodedFields)) - - out.Identity = To_SpConsensusGrandpaAppPublic(fields[1].Value.(registry.DecodedFields)) - - out.First = To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature(fields[2].Value.(registry.DecodedFields)) - - out.Second = To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature(fields[3].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_FinalityGrandpaPrecommit(in registry.DecodedFields) *pbgear.FinalityGrandpaPrecommit { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FinalityGrandpaPrecommit{} - out.TargetHash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - out.TargetNumber = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_FinalityGrandpaPrevote(in registry.DecodedFields) *pbgear.FinalityGrandpaPrevote { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FinalityGrandpaPrevote{} - out.TargetHash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - out.TargetNumber = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_FrameSupportDispatchDispatchInfo(in registry.DecodedFields) *pbgear.FrameSupportDispatchDispatchInfo { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FrameSupportDispatchDispatchInfo{} - out.Weight = To_SpWeightsWeightV2Weight(fields[0].Value.(registry.DecodedFields)) - - out.Class = To_System_Class(fields[1].Value.(registry.DecodedFields)) - - out.PaysFee = To_System_PaysFee(fields[2].Value.(registry.DecodedFields)) - - return out -} +func To_ConvictionVoting_Locked3X(in any) *pbgear.ConvictionVoting_Locked3X { + out := &pbgear.ConvictionVoting_Locked3X{} + v := in.(registry.Valuable) + _ = v - func To_FrameSupportDispatchPostDispatchInfo(in registry.DecodedFields) *pbgear.FrameSupportDispatchPostDispatchInfo { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FrameSupportDispatchPostDispatchInfo{} - out.ActualWeight = To_optional_SpWeightsWeightV2Weight(fields[0].Value.(registry.DecodedFields)) - - out.PaysFee = To_PaysFee(fields[1].Value.(registry.DecodedFields)) - - return out + + return out //from message } - func To_optional_SpWeightsWeightV2Weight(f registry.DecodedFields) *pbgear.SpWeightsWeightV2Weight { - fields := []*registry.DecodedField(f) - _ = fields + - var out = To_SpWeightsWeightV2Weight(fields) - return out - } - func To_Frozen(in registry.DecodedFields) *pbgear.Frozen { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Frozen{} - return out -} +func To_ConvictionVoting_Locked4X(in any) *pbgear.ConvictionVoting_Locked4X { + out := &pbgear.ConvictionVoting_Locked4X{} + v := in.(registry.Valuable) + _ = v - func To_FundsUnavailable(in registry.DecodedFields) *pbgear.FundsUnavailable { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.FundsUnavailable{} - return out -} - func To_GearCoreBufferLimitedVec(in registry.DecodedFields) *pbgear.GearCoreBufferLimitedVec { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearCoreBufferLimitedVec{} - out.Value = To_bytes(fields[0].Value.([]interface{})) - return out + return out //from message } - - func To_GearCoreMessageCommonReplyDetails(in registry.DecodedFields) *pbgear.GearCoreMessageCommonReplyDetails { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearCoreMessageCommonReplyDetails{} - out.To = To_GprimitivesMessageId(fields[0].Value.(registry.DecodedFields)) - - out.Code = To_Gear_Code(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_GearCoreMessageUserUserMessage(in registry.DecodedFields) *pbgear.GearCoreMessageUserUserMessage { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearCoreMessageUserUserMessage{} - out.Id = To_GprimitivesMessageId(fields[0].Value.(registry.DecodedFields)) - - out.Source = To_GprimitivesActorId(fields[1].Value.(registry.DecodedFields)) - - out.Destination = To_GprimitivesActorId(fields[2].Value.(registry.DecodedFields)) - - out.Payload = To_GearCoreBufferLimitedVec(fields[3].Value.(registry.DecodedFields)) - - out.Value = To_CompactString(fields[4].Value.(types.UCompact)) - - out.Details = To_optional_GearCoreMessageCommonReplyDetails(fields[5].Value.(registry.DecodedFields)) - - return out -} - func To_optional_GearCoreMessageCommonReplyDetails(f registry.DecodedFields) *pbgear.GearCoreMessageCommonReplyDetails { - fields := []*registry.DecodedField(f) - _ = fields - var out = To_GearCoreMessageCommonReplyDetails(fields) - return out - } +func To_ConvictionVoting_Locked5X(in any) *pbgear.ConvictionVoting_Locked5X { + out := &pbgear.ConvictionVoting_Locked5X{} + v := in.(registry.Valuable) + _ = v - func To_GearVoucher_AppendPrograms(in registry.DecodedFields) *pbgear.GearVoucher_AppendPrograms { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_AppendPrograms{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.GearVoucher_AppendPrograms_None{ - None: To_GearVoucher_None(fields), //Passthrough fields... - } - } - return out -} - func To_GearVoucher_Call(in registry.DecodedFields) *pbgear.GearVoucher_Call { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_Call{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.GearVoucher_Call_SendMessage{ - SendMessage: To_GearVoucher_SendMessage(fields), //Passthrough fields... - } - } - return out + return out //from message } - - func To_GearVoucher_CallCall(in registry.DecodedFields) *pbgear.GearVoucher_CallCall { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_CallCall{} - out.VoucherId = To_GearVoucher_PalletGearVoucherInternalVoucherId(fields[0].Value.(registry.DecodedFields)) - - out.Call = To_GearVoucher_Call(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_GearVoucher_CallDeprecatedCall(in registry.DecodedFields) *pbgear.GearVoucher_CallDeprecatedCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_CallDeprecatedCall{} - out.Call = To_GearVoucher_Call(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_GearVoucher_DeclineCall(in registry.DecodedFields) *pbgear.GearVoucher_DeclineCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_DeclineCall{} - out.VoucherId = To_GearVoucher_PalletGearVoucherInternalVoucherId(fields[0].Value.(registry.DecodedFields)) - - return out -} +func To_ConvictionVoting_Locked6X(in any) *pbgear.ConvictionVoting_Locked6X { + out := &pbgear.ConvictionVoting_Locked6X{} + v := in.(registry.Valuable) + _ = v - func To_GearVoucher_DeclineVoucher(in registry.DecodedFields) *pbgear.GearVoucher_DeclineVoucher { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_DeclineVoucher{} - return out -} - func To_GearVoucher_IssueCall(in registry.DecodedFields) *pbgear.GearVoucher_IssueCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_IssueCall{} - out.Spender = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Balance = To_string(fields[1].Value.(registry.DecodedFields)) - - out.Programs = To_optional_BTreeSet(fields[2].Value.(registry.DecodedFields)) - - out.CodeUploading = To_bool(fields[3].Value.(registry.DecodedFields)) - - out.Duration = To_uint32(fields[4].Value.(registry.DecodedFields)) - - return out -} - func To_optional_BTreeSet(f registry.DecodedFields) *pbgear.BTreeSet { - fields := []*registry.DecodedField(f) - _ = fields - - var out = To_BTreeSet(fields) - return out - } - - func To_GearVoucher_None(in registry.DecodedFields) *pbgear.GearVoucher_None { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_None{} - return out + return out //from message } - - func To_GearVoucher_PalletGearVoucherInternalVoucherId(in registry.DecodedFields) *pbgear.GearVoucher_PalletGearVoucherInternalVoucherId { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_PalletGearVoucherInternalVoucherId{} - out.Value = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_GearVoucher_RevokeCall(in registry.DecodedFields) *pbgear.GearVoucher_RevokeCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_RevokeCall{} - out.Spender = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.VoucherId = To_GearVoucher_PalletGearVoucherInternalVoucherId(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_GearVoucher_SendMessage(in registry.DecodedFields) *pbgear.GearVoucher_SendMessage { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_SendMessage{} - out.Destination = To_GprimitivesActorId(fields[0].Value.(registry.DecodedFields)) - - out.Payload = To_bytes(fields[1].Value.([]interface{})) - out.GasLimit = To_uint64(fields[2].Value.(registry.DecodedFields)) - - out.Value = To_string(fields[3].Value.(registry.DecodedFields)) - - out.KeepAlive = To_bool(fields[4].Value.(registry.DecodedFields)) - - return out -} - - func To_GearVoucher_SendReply(in registry.DecodedFields) *pbgear.GearVoucher_SendReply { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_SendReply{} - out.ReplyToId = To_GprimitivesMessageId(fields[0].Value.(registry.DecodedFields)) - - out.Payload = To_bytes(fields[1].Value.([]interface{})) - out.GasLimit = To_uint64(fields[2].Value.(registry.DecodedFields)) - - out.Value = To_string(fields[3].Value.(registry.DecodedFields)) - - out.KeepAlive = To_bool(fields[4].Value.(registry.DecodedFields)) - - return out -} - - func To_GearVoucher_Some(in registry.DecodedFields) *pbgear.GearVoucher_Some { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_Some{} - out.Value0 = To_BTreeSet(fields[0].Value.(registry.DecodedFields)) - - return out -} +func To_ConvictionVoting_None(in any) *pbgear.ConvictionVoting_None { + out := &pbgear.ConvictionVoting_None{} + v := in.(registry.Valuable) + _ = v - func To_GearVoucher_UpdateCall(in registry.DecodedFields) *pbgear.GearVoucher_UpdateCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_UpdateCall{} - out.Spender = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.VoucherId = To_GearVoucher_PalletGearVoucherInternalVoucherId(fields[1].Value.(registry.DecodedFields)) - - out.MoveOwnership = To_optional_SpCoreCryptoAccountId32(fields[2].Value.(registry.DecodedFields)) - - out.BalanceTopUp = To_optional_string(fields[3].Value.(registry.DecodedFields)) - - out.AppendPrograms = To_optional_GearVoucher_AppendPrograms(fields[4].Value.(registry.DecodedFields)) - - out.CodeUploading = To_optional_bool(fields[5].Value.(registry.DecodedFields)) - - out.ProlongDuration = To_optional_uint32(fields[6].Value.(registry.DecodedFields)) - - return out -} - func To_optional_GearVoucher_AppendPrograms(f registry.DecodedFields) *pbgear.GearVoucher_AppendPrograms { - fields := []*registry.DecodedField(f) - _ = fields - - var out = To_GearVoucher_AppendPrograms(fields) - return out - } - - func To_GearVoucher_UploadCode(in registry.DecodedFields) *pbgear.GearVoucher_UploadCode { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_UploadCode{} - out.Code = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_GearVoucher_VoucherDeclinedEvent(in registry.DecodedFields) *pbgear.GearVoucher_VoucherDeclinedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_VoucherDeclinedEvent{} - out.Spender = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.VoucherId = To_GearVoucher_PalletGearVoucherInternalVoucherId(fields[1].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_GearVoucher_VoucherIssuedEvent(in registry.DecodedFields) *pbgear.GearVoucher_VoucherIssuedEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_VoucherIssuedEvent{} - out.Owner = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Spender = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.VoucherId = To_GearVoucher_PalletGearVoucherInternalVoucherId(fields[2].Value.(registry.DecodedFields)) - - return out -} - func To_GearVoucher_VoucherRevokedEvent(in registry.DecodedFields) *pbgear.GearVoucher_VoucherRevokedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_VoucherRevokedEvent{} - out.Spender = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.VoucherId = To_GearVoucher_PalletGearVoucherInternalVoucherId(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_GearVoucher_VoucherUpdatedEvent(in registry.DecodedFields) *pbgear.GearVoucher_VoucherUpdatedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GearVoucher_VoucherUpdatedEvent{} - out.Spender = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.VoucherId = To_GearVoucher_PalletGearVoucherInternalVoucherId(fields[1].Value.(registry.DecodedFields)) - - out.NewOwner = To_optional_SpCoreCryptoAccountId32(fields[2].Value.(registry.DecodedFields)) - - return out -} +func To_ConvictionVoting_PalletConvictionVotingVoteVote(in any) *pbgear.ConvictionVoting_PalletConvictionVotingVoteVote { + out := &pbgear.ConvictionVoting_PalletConvictionVotingVoteVote{} + v := in.(registry.Valuable) + _ = v - func To_Gear_Active(in registry.DecodedFields) *pbgear.Gear_Active { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Active{} - out.Expiration = To_optional_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) - func To_Gear_Change(in registry.DecodedFields) *pbgear.Gear_Change { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Change{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Gear_Change_Active{ - Active: To_Gear_Active(fields), //Passthrough fields... - } - } - return out + return out //from message } - - func To_Gear_ClaimValueCall(in registry.DecodedFields) *pbgear.Gear_ClaimValueCall { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_ClaimValueCall{} - out.MessageId = To_GprimitivesMessageId(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Gear_Code(in registry.DecodedFields) *pbgear.Gear_Code { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Code{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Gear_Code_Success{ - Success: To_Gear_Success(fields), //Passthrough fields... - } - } - return out -} - func To_Gear_CodeChangedEvent(in registry.DecodedFields) *pbgear.Gear_CodeChangedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_CodeChangedEvent{} - out.Id = To_GprimitivesCodeId(fields[0].Value.(registry.DecodedFields)) - - out.Change = To_Gear_Change(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_ConvictionVoting_Raw(in any) *pbgear.ConvictionVoting_Raw { + out := &pbgear.ConvictionVoting_Raw{} + v := in.(registry.Valuable) + _ = v - func To_Gear_CreateProgramCall(in registry.DecodedFields) *pbgear.Gear_CreateProgramCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_CreateProgramCall{} - out.CodeId = To_GprimitivesCodeId(fields[0].Value.(registry.DecodedFields)) - - out.Salt = To_bytes(fields[1].Value.([]interface{})) - out.InitPayload = To_bytes(fields[2].Value.([]interface{})) - out.GasLimit = To_uint64(fields[3].Value.(registry.DecodedFields)) - - out.Value = To_string(fields[4].Value.(registry.DecodedFields)) - - out.KeepAlive = To_bool(fields[5].Value.(registry.DecodedFields)) - - return out -} + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_Gear_Entry(in registry.DecodedFields) *pbgear.Gear_Entry { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Entry{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Gear_Entry_Init{ - Init: To_Gear_Init(fields), //Passthrough fields... - } - } - return out + return out //from message } - - func To_Gear_Error(in registry.DecodedFields) *pbgear.Gear_Error { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Error{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Gear_Failed(in registry.DecodedFields) *pbgear.Gear_Failed { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Failed{} - return out -} - func To_Gear_Handle(in registry.DecodedFields) *pbgear.Gear_Handle { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Handle{} - return out -} +func To_ConvictionVoting_RemoveOtherVoteCall(in any) *pbgear.ConvictionVoting_RemoveOtherVoteCall { + out := &pbgear.ConvictionVoting_RemoveOtherVoteCall{} + v := in.(registry.Valuable) + _ = v - func To_Gear_Inactive(in registry.DecodedFields) *pbgear.Gear_Inactive { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Inactive{} - return out -} + // field Target + out.Target = To_ConvictionVoting_RemoveOtherVoteCall_target(v.ValueAt(0)) + // primitive field Class + out.Class = To_uint32(v.ValueAt(1)) + // primitive field Index + out.Index = To_uint32(v.ValueAt(2)) - func To_Gear_Init(in registry.DecodedFields) *pbgear.Gear_Init { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Init{} - return out + return out //from message } - - func To_Gear_MessageQueuedEvent(in registry.DecodedFields) *pbgear.Gear_MessageQueuedEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_MessageQueuedEvent{} - out.Id = To_GprimitivesMessageId(fields[0].Value.(registry.DecodedFields)) - - out.Source = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.Destination = To_GprimitivesActorId(fields[2].Value.(registry.DecodedFields)) - - out.Entry = To_Gear_Entry(fields[3].Value.(registry.DecodedFields)) - - return out +func To_ConvictionVoting_RemoveOtherVoteCall_target(in any) *pbgear.ConvictionVoting_Target { + v := in.(registry.Valuable) + return To_ConvictionVoting_Target(v.ValueAt(0) //simple field } - func To_Gear_MessageWaitedEvent(in registry.DecodedFields) *pbgear.Gear_MessageWaitedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_MessageWaitedEvent{} - out.Id = To_GprimitivesMessageId(fields[0].Value.(registry.DecodedFields)) - - out.Origin = To_optional_Gear_Origin(fields[1].Value.(registry.DecodedFields)) - - out.Reason = To_Gear_Reason(fields[2].Value.(registry.DecodedFields)) - - out.Expiration = To_uint32(fields[3].Value.(registry.DecodedFields)) - - return out -} - func To_optional_Gear_Origin(f registry.DecodedFields) *pbgear.Gear_Origin { - fields := []*registry.DecodedField(f) - _ = fields - var out = To_Gear_Origin(fields) - return out - } +func To_ConvictionVoting_RemoveVoteCall(in any) *pbgear.ConvictionVoting_RemoveVoteCall { + out := &pbgear.ConvictionVoting_RemoveVoteCall{} + v := in.(registry.Valuable) + _ = v - func To_Gear_MessageWokenEvent(in registry.DecodedFields) *pbgear.Gear_MessageWokenEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_MessageWokenEvent{} - out.Id = To_GprimitivesMessageId(fields[0].Value.(registry.DecodedFields)) - - out.Reason = To_Gear_Reason(fields[1].Value.(registry.DecodedFields)) - - return out -} + // primitive field Class + out.Class = To_Optional_uint32(v.ValueAt(0)) + // primitive field Index + out.Index = To_uint32(v.ValueAt(1)) - func To_Gear_MessagesDispatchedEvent(in registry.DecodedFields) *pbgear.Gear_MessagesDispatchedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_MessagesDispatchedEvent{} - out.Total = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Statuses = To_BTreeMap(fields[1].Value.(registry.DecodedFields)) - - out.StateChanges = To_BTreeSet(fields[2].Value.(registry.DecodedFields)) - - return out + return out //from message } + + + +func To_ConvictionVoting_Split(in any) *pbgear.ConvictionVoting_Split { + out := &pbgear.ConvictionVoting_Split{} + v := in.(registry.Valuable) + _ = v + + // primitive field Aye + out.Aye = To_string(v.ValueAt(0)) + // primitive field Nay + out.Nay = To_string(v.ValueAt(1)) - func To_Gear_Node(in registry.DecodedFields) *pbgear.Gear_Node { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Node{} - out.Value0 = To_GprimitivesMessageId(fields[0].Value.(registry.DecodedFields)) - - return out + + +func To_ConvictionVoting_SplitAbstain(in any) *pbgear.ConvictionVoting_SplitAbstain { + out := &pbgear.ConvictionVoting_SplitAbstain{} + v := in.(registry.Valuable) + _ = v + + // primitive field Aye + out.Aye = To_string(v.ValueAt(0)) + // primitive field Nay + out.Nay = To_string(v.ValueAt(1)) + // primitive field Abstain + out.Abstain = To_string(v.ValueAt(2)) + + return out //from message } + + - func To_Gear_NotExecuted(in registry.DecodedFields) *pbgear.Gear_NotExecuted { +func To_ConvictionVoting_Standard(in any) *pbgear.ConvictionVoting_Standard { + out := &pbgear.ConvictionVoting_Standard{} + v := in.(registry.Valuable) + _ = v + + // field Vote + out.Vote = To_ConvictionVoting_Standard_vote(v.ValueAt(0)) + // primitive field Balance + out.Balance = To_string(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_NotExecuted{} - return out +func To_ConvictionVoting_Standard_vote(in any) *pbgear.ConvictionVoting_PalletConvictionVotingVoteVote { + v := in.(registry.Valuable) + return To_ConvictionVoting_PalletConvictionVotingVoteVote(v.ValueAt(0) //simple field } - func To_Gear_Origin(in registry.DecodedFields) *pbgear.Gear_Origin { + +func To_ConvictionVoting_Target(in any) *pbgear.ConvictionVoting_Target { + out := &pbgear.ConvictionVoting_Target{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_ConvictionVoting_Target_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Origin{} - - switch { - case matchFields(fields, []int64{265}): - out.Value = &pbgear.Gear_Origin_Node{ - Node: To_Gear_Node(fields), //Passthrough fields... +func To_OneOf_ConvictionVoting_Target_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.ConvictionVoting_Target_Id{ + Id: To_ConvictionVoting_Id(param), + } + case 1: + return &pbgear.ConvictionVoting_Target_Index{ + Index: To_ConvictionVoting_Index(param), + } + case 2: + return &pbgear.ConvictionVoting_Target_Raw{ + Raw: To_ConvictionVoting_Raw(param), } - case matchFields(fields, []int64{325}): - out.Value = &pbgear.Gear_Origin_Reservation{ - Reservation: To_Gear_Reservation(fields), //Passthrough fields... + case 3: + return &pbgear.ConvictionVoting_Target_Address32{ + Address32: To_ConvictionVoting_Address32(param), } + case 4: + return &pbgear.ConvictionVoting_Target_Address20{ + Address20: To_ConvictionVoting_Address20(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Gear_ProgramChangedEvent(in registry.DecodedFields) *pbgear.Gear_ProgramChangedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_ProgramChangedEvent{} - out.Id = To_GprimitivesActorId(fields[0].Value.(registry.DecodedFields)) - - out.Change = To_Gear_Change(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_Gear_QueueNotProcessedEvent(in registry.DecodedFields) *pbgear.Gear_QueueNotProcessedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_QueueNotProcessedEvent{} - return out -} +func To_ConvictionVoting_To(in any) *pbgear.ConvictionVoting_To { + out := &pbgear.ConvictionVoting_To{} + v := in.(registry.Valuable) + _ = v - func To_Gear_Reason(in registry.DecodedFields) *pbgear.Gear_Reason { + // oneOf field Value + v0 := To_OneOf_ConvictionVoting_To_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Reason{} - - switch { - case matchFields(fields, []int64{317}): - out.Value = &pbgear.Gear_Reason_Runtime{ - Runtime: To_Gear_Runtime(fields), //Passthrough fields... +func To_OneOf_ConvictionVoting_To_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.ConvictionVoting_To_Id{ + Id: To_ConvictionVoting_Id(param), + } + case 1: + return &pbgear.ConvictionVoting_To_Index{ + Index: To_ConvictionVoting_Index(param), + } + case 2: + return &pbgear.ConvictionVoting_To_Raw{ + Raw: To_ConvictionVoting_Raw(param), + } + case 3: + return &pbgear.ConvictionVoting_To_Address32{ + Address32: To_ConvictionVoting_Address32(param), } - case matchFields(fields, []int64{318}): - out.Value = &pbgear.Gear_Reason_System{ - System: To_Gear_System(fields), //Passthrough fields... + case 4: + return &pbgear.ConvictionVoting_To_Address20{ + Address20: To_ConvictionVoting_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Gear_Reinstrumented(in registry.DecodedFields) *pbgear.Gear_Reinstrumented { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Reinstrumented{} - return out -} - func To_Gear_Reply(in registry.DecodedFields) *pbgear.Gear_Reply { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Reply{} - out.Value0 = To_GprimitivesMessageId(fields[0].Value.(registry.DecodedFields)) - - return out -} +func To_ConvictionVoting_TupleNull(in any) *pbgear.ConvictionVoting_TupleNull { + out := &pbgear.ConvictionVoting_TupleNull{} + v := in.(registry.Valuable) + _ = v - func To_Gear_Reservation(in registry.DecodedFields) *pbgear.Gear_Reservation { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Reservation{} - out.Value0 = To_GprimitivesReservationId(fields[0].Value.(registry.DecodedFields)) - - return out -} + // field Value + out.Value = To_ConvictionVoting_TupleNull_value(v.ValueAt(0)) - func To_Gear_RunCall(in registry.DecodedFields) *pbgear.Gear_RunCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_RunCall{} - out.MaxGas = To_optional_uint64(fields[0].Value.(registry.DecodedFields)) - - return out +func To_ConvictionVoting_TupleNull_value(in any) *pbgear.TupleNull { + v := in.(registry.Valuable) + return To_TupleNull(v.ValueAt(0) //simple field } - func To_Gear_Runtime(in registry.DecodedFields) *pbgear.Gear_Runtime { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Runtime{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out -} - - func To_Gear_SendMessageCall(in registry.DecodedFields) *pbgear.Gear_SendMessageCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_SendMessageCall{} - out.Destination = To_GprimitivesActorId(fields[0].Value.(registry.DecodedFields)) - - out.Payload = To_bytes(fields[1].Value.([]interface{})) - out.GasLimit = To_uint64(fields[2].Value.(registry.DecodedFields)) - - out.Value = To_string(fields[3].Value.(registry.DecodedFields)) - - out.KeepAlive = To_bool(fields[4].Value.(registry.DecodedFields)) - - return out -} - - func To_Gear_SendReplyCall(in registry.DecodedFields) *pbgear.Gear_SendReplyCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_SendReplyCall{} - out.ReplyToId = To_GprimitivesMessageId(fields[0].Value.(registry.DecodedFields)) - - out.Payload = To_bytes(fields[1].Value.([]interface{})) - out.GasLimit = To_uint64(fields[2].Value.(registry.DecodedFields)) - - out.Value = To_string(fields[3].Value.(registry.DecodedFields)) - - out.KeepAlive = To_bool(fields[4].Value.(registry.DecodedFields)) - - return out -} - - func To_Gear_SetExecuteInherentCall(in registry.DecodedFields) *pbgear.Gear_SetExecuteInherentCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_SetExecuteInherentCall{} - out.Value = To_bool(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Gear_Signal(in registry.DecodedFields) *pbgear.Gear_Signal { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Signal{} - return out -} +func To_ConvictionVoting_UndelegateCall(in any) *pbgear.ConvictionVoting_UndelegateCall { + out := &pbgear.ConvictionVoting_UndelegateCall{} + v := in.(registry.Valuable) + _ = v - func To_Gear_Success(in registry.DecodedFields) *pbgear.Gear_Success { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Success{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out -} + // primitive field Class + out.Class = To_uint32(v.ValueAt(0)) - func To_Gear_System(in registry.DecodedFields) *pbgear.Gear_System { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_System{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_Gear_TupleGprimitivesMessageIdgearCommonEventDispatchStatus(in registry.DecodedFields) *pbgear.Gear_TupleGprimitivesMessageIdgearCommonEventDispatchStatus { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_TupleGprimitivesMessageIdgearCommonEventDispatchStatus{} - out.Value0 = To_GprimitivesMessageId(fields[0].Value.(registry.DecodedFields)) - - out.Value1 = To_Gear_Value1(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_Gear_Unsupported(in registry.DecodedFields) *pbgear.Gear_Unsupported { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Unsupported{} - return out -} - func To_Gear_UploadCodeCall(in registry.DecodedFields) *pbgear.Gear_UploadCodeCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_UploadCodeCall{} - out.Code = To_bytes(fields[0].Value.([]interface{})) - return out -} +func To_ConvictionVoting_UnlockCall(in any) *pbgear.ConvictionVoting_UnlockCall { + out := &pbgear.ConvictionVoting_UnlockCall{} + v := in.(registry.Valuable) + _ = v - func To_Gear_UploadProgramCall(in registry.DecodedFields) *pbgear.Gear_UploadProgramCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_UploadProgramCall{} - out.Code = To_bytes(fields[0].Value.([]interface{})) - out.Salt = To_bytes(fields[1].Value.([]interface{})) - out.InitPayload = To_bytes(fields[2].Value.([]interface{})) - out.GasLimit = To_uint64(fields[3].Value.(registry.DecodedFields)) - - out.Value = To_string(fields[4].Value.(registry.DecodedFields)) - - out.KeepAlive = To_bool(fields[5].Value.(registry.DecodedFields)) - - return out -} + // primitive field Class + out.Class = To_uint32(v.ValueAt(0)) + // field Target + out.Target = To_ConvictionVoting_UnlockCall_target(v.ValueAt(1)) - func To_Gear_UserMessageReadEvent(in registry.DecodedFields) *pbgear.Gear_UserMessageReadEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_UserMessageReadEvent{} - out.Id = To_GprimitivesMessageId(fields[0].Value.(registry.DecodedFields)) - - out.Reason = To_Gear_Reason(fields[1].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_Gear_UserMessageSentEvent(in registry.DecodedFields) *pbgear.Gear_UserMessageSentEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_UserMessageSentEvent{} - out.Message = To_GearCoreMessageUserUserMessage(fields[0].Value.(registry.DecodedFields)) - - out.Expiration = To_optional_uint32(fields[1].Value.(registry.DecodedFields)) - - return out +func To_ConvictionVoting_UnlockCall_target(in any) *pbgear.ConvictionVoting_Target { + v := in.(registry.Valuable) + return To_ConvictionVoting_Target(v.ValueAt(0) //simple field } - func To_Gear_Value1(in registry.DecodedFields) *pbgear.Gear_Value1 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Gear_Value1{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Gear_Value1_Success{ - Success: To_Gear_Success(fields), //Passthrough fields... - } - } - return out -} - func To_GprimitivesActorId(in registry.DecodedFields) *pbgear.GprimitivesActorId { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GprimitivesActorId{} - out.Value = To_bytes(fields[0].Value.([]interface{})) - return out -} +func To_ConvictionVoting_Vote(in any) *pbgear.ConvictionVoting_Vote { + out := &pbgear.ConvictionVoting_Vote{} + v := in.(registry.Valuable) + _ = v - func To_GprimitivesCodeId(in registry.DecodedFields) *pbgear.GprimitivesCodeId { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GprimitivesCodeId{} - out.Value = To_bytes(fields[0].Value.([]interface{})) - return out -} + // oneOf field Value + v0 := To_OneOf_ConvictionVoting_Vote_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) - func To_GprimitivesMessageId(in registry.DecodedFields) *pbgear.GprimitivesMessageId { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GprimitivesMessageId{} - out.Value = To_bytes(fields[0].Value.([]interface{})) - return out + return out //from message } - - func To_GprimitivesReservationId(in registry.DecodedFields) *pbgear.GprimitivesReservationId { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.GprimitivesReservationId{} - out.Value = To_bytes(fields[0].Value.([]interface{})) - return out -} +func To_OneOf_ConvictionVoting_Vote_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value - func To_Grandpa_Equivocation(in registry.DecodedFields) *pbgear.Grandpa_Equivocation { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Grandpa_Equivocation{} - - switch { - case matchFields(fields, []int64{84}): - out.Value = &pbgear.Grandpa_Equivocation_Prevote{ - Prevote: To_Grandpa_Prevote(fields), //Passthrough fields... + switch variantIn.VariantByte { + case 0: + return &pbgear.ConvictionVoting_Vote_Standard{ + Standard: To_ConvictionVoting_Standard(param), } - case matchFields(fields, []int64{90}): - out.Value = &pbgear.Grandpa_Equivocation_Precommit{ - Precommit: To_Grandpa_Precommit(fields), //Passthrough fields... + case 1: + return &pbgear.ConvictionVoting_Vote_Split{ + Split: To_ConvictionVoting_Split(param), } + case 2: + return &pbgear.ConvictionVoting_Vote_SplitAbstain{ + SplitAbstain: To_ConvictionVoting_SplitAbstain(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out -} - - func To_Grandpa_GrandpaTrieNodesList(in registry.DecodedFields) *pbgear.Grandpa_GrandpaTrieNodesList { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Grandpa_GrandpaTrieNodesList{} - out.TrieNodes = To_bytes(fields[0].Value.([]interface{})) - return out } - func To_Grandpa_NewAuthoritiesEvent(in registry.DecodedFields) *pbgear.Grandpa_NewAuthoritiesEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Grandpa_NewAuthoritiesEvent{} - out.AuthoritySet = To_repeated_Grandpa_TupleSpConsensusGrandpaAppPublicuint64(fields[0].Value.(registry.DecodedFields)) - - return out -} -func To_repeated_Grandpa_TupleSpConsensusGrandpaAppPublicuint64(f registry.DecodedFields) []*pbgear.Grandpa_TupleSpConsensusGrandpaAppPublicuint64 { - fields := []*registry.DecodedField(f) - _ = fields - out := make([]*pbgear.Grandpa_TupleSpConsensusGrandpaAppPublicuint64, len(fields)) - for _, f := range fields { - out = append(out, To_Grandpa_TupleSpConsensusGrandpaAppPublicuint64(f.Value.([]*registry.DecodedField))) - } - return out -} +func To_ConvictionVoting_VoteCall(in any) *pbgear.ConvictionVoting_VoteCall { + out := &pbgear.ConvictionVoting_VoteCall{} + v := in.(registry.Valuable) + _ = v - func To_Grandpa_NoteStalledCall(in registry.DecodedFields) *pbgear.Grandpa_NoteStalledCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Grandpa_NoteStalledCall{} - out.Delay = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.BestFinalizedBlockNumber = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} + // primitive field PollIndex + out.PollIndex = To_uint32(v.ValueAt(0)) + // field Vote + out.Vote = To_ConvictionVoting_VoteCall_vote(v.ValueAt(1)) - func To_Grandpa_PausedEvent(in registry.DecodedFields) *pbgear.Grandpa_PausedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Grandpa_PausedEvent{} - return out + return out //from message } - - func To_Grandpa_Precommit(in registry.DecodedFields) *pbgear.Grandpa_Precommit { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Grandpa_Precommit{} - out.Value0 = To_FinalityGrandpaEquivocation(fields[0].Value.(registry.DecodedFields)) - - return out +func To_ConvictionVoting_VoteCall_vote(in any) *pbgear.ConvictionVoting_Vote { + v := in.(registry.Valuable) + return To_ConvictionVoting_Vote(v.ValueAt(0) //simple field } - func To_Grandpa_Prevote(in registry.DecodedFields) *pbgear.Grandpa_Prevote { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Grandpa_Prevote{} - out.Value0 = To_FinalityGrandpaEquivocation(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Grandpa_ReportEquivocationCall(in registry.DecodedFields) *pbgear.Grandpa_ReportEquivocationCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Grandpa_ReportEquivocationCall{} - out.EquivocationProof = To_SpConsensusGrandpaEquivocationProof(fields[0].Value.(registry.DecodedFields)) - - out.KeyOwnerProof = To_SpSessionMembershipProof(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_ElectionProviderMultiPhasePallet(in any) *pbgear.ElectionProviderMultiPhasePallet { + out := &pbgear.ElectionProviderMultiPhasePallet{} + v := in.(registry.Valuable) + _ = v - func To_Grandpa_ReportEquivocationUnsignedCall(in registry.DecodedFields) *pbgear.Grandpa_ReportEquivocationUnsignedCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Grandpa_ReportEquivocationUnsignedCall{} - out.EquivocationProof = To_SpConsensusGrandpaEquivocationProof(fields[0].Value.(registry.DecodedFields)) - - out.KeyOwnerProof = To_SpSessionMembershipProof(fields[1].Value.(registry.DecodedFields)) - - return out -} + // oneOf field Call + v0 := To_OneOf_ElectionProviderMultiPhasePallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) - func To_Grandpa_ResumedEvent(in registry.DecodedFields) *pbgear.Grandpa_ResumedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Grandpa_ResumedEvent{} - return out + return out //from message } - - func To_Grandpa_TupleSpConsensusGrandpaAppPublicuint64(in registry.DecodedFields) *pbgear.Grandpa_TupleSpConsensusGrandpaAppPublicuint64 { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Grandpa_TupleSpConsensusGrandpaAppPublicuint64{} - out.Value0 = To_SpConsensusGrandpaAppPublic(fields[0].Value.(registry.DecodedFields)) - - out.Value1 = To_uint64(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_OneOf_ElectionProviderMultiPhasePallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value - func To_Identity_Account(in registry.DecodedFields) *pbgear.Identity_Account { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Account{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.Identity_Account_Id{ - Id: To_Identity_Id(fields), //Passthrough fields... + switch variantIn.VariantByte { + case 0: + return &pbgear.ElectionProviderMultiPhasePallet_SubmitUnsignedCall{ + SubmitUnsignedCall: To_ElectionProviderMultiPhase_SubmitUnsignedCall(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.Identity_Account_Index{ - Index: To_Identity_Index(fields), //Passthrough fields... + case 1: + return &pbgear.ElectionProviderMultiPhasePallet_SetMinimumUntrustedScoreCall{ + SetMinimumUntrustedScoreCall: To_ElectionProviderMultiPhase_SetMinimumUntrustedScoreCall(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.Identity_Account_Raw{ - Raw: To_Identity_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.ElectionProviderMultiPhasePallet_SetEmergencyElectionResultCall{ + SetEmergencyElectionResultCall: To_ElectionProviderMultiPhase_SetEmergencyElectionResultCall(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.Identity_Account_Address32{ - Address32: To_Identity_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.ElectionProviderMultiPhasePallet_SubmitCall{ + SubmitCall: To_ElectionProviderMultiPhase_SubmitCall(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.Identity_Account_Address20{ - Address20: To_Identity_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.ElectionProviderMultiPhasePallet_GovernanceFallbackCall{ + GovernanceFallbackCall: To_ElectionProviderMultiPhase_GovernanceFallbackCall(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Identity_AddRegistrarCall(in registry.DecodedFields) *pbgear.Identity_AddRegistrarCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_AddRegistrarCall{} - out.Account = To_Identity_Account(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Identity_AddSubCall(in registry.DecodedFields) *pbgear.Identity_AddSubCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_AddSubCall{} - out.Sub = To_Identity_Sub(fields[0].Value.(registry.DecodedFields)) - - out.Data = To_Identity_Data(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_ElectionProviderMultiPhase_GovernanceFallbackCall(in any) *pbgear.ElectionProviderMultiPhase_GovernanceFallbackCall { + out := &pbgear.ElectionProviderMultiPhase_GovernanceFallbackCall{} + v := in.(registry.Valuable) + _ = v - func To_Identity_Address20(in registry.DecodedFields) *pbgear.Identity_Address20 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Address20{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + // primitive field MaybeMaxVoters + out.MaybeMaxVoters = To_Optional_uint32(v.ValueAt(0)) + // primitive field MaybeMaxTargets + out.MaybeMaxTargets = To_Optional_uint32(v.ValueAt(1)) - func To_Identity_Address32(in registry.DecodedFields) *pbgear.Identity_Address32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Address32{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out + return out //from message } - - func To_Identity_BlakeTwo256(in registry.DecodedFields) *pbgear.Identity_BlakeTwo256 { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_BlakeTwo256{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_Identity_CancelRequestCall(in registry.DecodedFields) *pbgear.Identity_CancelRequestCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_CancelRequestCall{} - out.RegIndex = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Identity_ClearIdentityCall(in registry.DecodedFields) *pbgear.Identity_ClearIdentityCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_ClearIdentityCall{} - return out -} +func To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution(in any) *pbgear.ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution { + out := &pbgear.ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution{} + v := in.(registry.Valuable) + _ = v - func To_Identity_CompactTupleNull(in types.UCompact) *pbgear.Identity_CompactTupleNull { - - out := &pbgear.Identity_CompactTupleNull{} - out.Value = To_TupleNull() - return out -} + // field Solution + out.Solution = To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution_solution(v.ValueAt(0)) + // field Score + out.Score = To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution_score(v.ValueAt(1)) + // primitive field Round + out.Round = To_uint32(v.ValueAt(2)) - func To_Identity_Data(in registry.DecodedFields) *pbgear.Identity_Data { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Data{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Identity_Data_None{ - None: To_Identity_None(fields), //Passthrough fields... - } - } - return out + return out //from message } - - func To_Identity_Display(in registry.DecodedFields) *pbgear.Identity_Display { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Display{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Identity_Display_None{ - None: To_Identity_None(fields), //Passthrough fields... - } - } - return out +func To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution_solution(in any) *pbgear.VaraRuntimeNposSolution16 { + v := in.(registry.Valuable) + return To_VaraRuntimeNposSolution16(v.ValueAt(0) //simple field } - - func To_Identity_Email(in registry.DecodedFields) *pbgear.Identity_Email { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Email{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Identity_Email_None{ - None: To_Identity_None(fields), //Passthrough fields... - } - } - return out +func To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution_score(in any) *pbgear.SpNposElectionsElectionScore { + v := in.(registry.Valuable) + return To_SpNposElectionsElectionScore(v.ValueAt(0) //simple field } - func To_Identity_Erroneous(in registry.DecodedFields) *pbgear.Identity_Erroneous { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Erroneous{} - return out -} - func To_Identity_FeePaid(in registry.DecodedFields) *pbgear.Identity_FeePaid { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_FeePaid{} - out.Value0 = To_string(fields[0].Value.(registry.DecodedFields)) - - return out -} +func To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseSolutionOrSnapshotSize(in any) *pbgear.ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseSolutionOrSnapshotSize { + out := &pbgear.ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseSolutionOrSnapshotSize{} + v := in.(registry.Valuable) + _ = v - func To_Identity_Id(in registry.DecodedFields) *pbgear.Identity_Id { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Id{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} + // primitive field Voters + out.Voters = To_uint32(v.ValueAt(0)) + // primitive field Targets + out.Targets = To_uint32(v.ValueAt(1)) - func To_Identity_IdentityClearedEvent(in registry.DecodedFields) *pbgear.Identity_IdentityClearedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_IdentityClearedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Deposit = To_string(fields[1].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_Identity_IdentityKilledEvent(in registry.DecodedFields) *pbgear.Identity_IdentityKilledEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_IdentityKilledEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Deposit = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_Identity_IdentitySetEvent(in registry.DecodedFields) *pbgear.Identity_IdentitySetEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_IdentitySetEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Identity_Image(in registry.DecodedFields) *pbgear.Identity_Image { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Image{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Identity_Image_None{ - None: To_Identity_None(fields), //Passthrough fields... - } - } - return out -} +func To_ElectionProviderMultiPhase_SetEmergencyElectionResultCall(in any) *pbgear.ElectionProviderMultiPhase_SetEmergencyElectionResultCall { + out := &pbgear.ElectionProviderMultiPhase_SetEmergencyElectionResultCall{} + v := in.(registry.Valuable) + _ = v - func To_Identity_Index(in registry.DecodedFields) *pbgear.Identity_Index { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Index{} - out.Value0 = To_Identity_CompactTupleNull(fields[0].Value.(types.UCompact)) - - return out -} + // repeated field Supports + out.Supports = To_Repeated_ElectionProviderMultiPhase_SetEmergencyElectionResultCall_supports(v.ValueAt(0)) - func To_Identity_Judgement(in registry.DecodedFields) *pbgear.Identity_Judgement { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Judgement{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Identity_Judgement_Unknown{ - Unknown: To_Identity_Unknown(fields), //Passthrough fields... - } + +func To_Repeated_ElectionProviderMultiPhase_SetEmergencyElectionResultCall_supports(in any) []*pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } - func To_Identity_JudgementGivenEvent(in registry.DecodedFields) *pbgear.Identity_JudgementGivenEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_JudgementGivenEvent{} - out.Target = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.RegistrarIndex = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_Identity_JudgementRequestedEvent(in registry.DecodedFields) *pbgear.Identity_JudgementRequestedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_JudgementRequestedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.RegistrarIndex = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_ElectionProviderMultiPhase_SetMinimumUntrustedScoreCall(in any) *pbgear.ElectionProviderMultiPhase_SetMinimumUntrustedScoreCall { + out := &pbgear.ElectionProviderMultiPhase_SetMinimumUntrustedScoreCall{} + v := in.(registry.Valuable) + _ = v - func To_Identity_JudgementUnrequestedEvent(in registry.DecodedFields) *pbgear.Identity_JudgementUnrequestedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_JudgementUnrequestedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.RegistrarIndex = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} + // optional field MaybeNextScore + out.MaybeNextScore = To_Optional_ElectionProviderMultiPhase_SetMinimumUntrustedScoreCall_maybe_next_score(v.ValueAt(0)) - func To_Identity_Keccak256(in registry.DecodedFields) *pbgear.Identity_Keccak256 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Keccak256{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out + return out //from message } - - func To_Identity_KillIdentityCall(in registry.DecodedFields) *pbgear.Identity_KillIdentityCall { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_KillIdentityCall{} - out.Target = To_Identity_Target(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Optional_ElectionProviderMultiPhase_SetMinimumUntrustedScoreCall_maybe_next_score(in any) *pbgear.SpNposElectionsElectionScore { + return nil //funcForOptionalField } - func To_Identity_KnownGood(in registry.DecodedFields) *pbgear.Identity_KnownGood { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_KnownGood{} - return out -} - func To_Identity_Legal(in registry.DecodedFields) *pbgear.Identity_Legal { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Legal{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Identity_Legal_None{ - None: To_Identity_None(fields), //Passthrough fields... - } - } - return out -} +func To_ElectionProviderMultiPhase_SubmitCall(in any) *pbgear.ElectionProviderMultiPhase_SubmitCall { + out := &pbgear.ElectionProviderMultiPhase_SubmitCall{} + v := in.(registry.Valuable) + _ = v - func To_Identity_LowQuality(in registry.DecodedFields) *pbgear.Identity_LowQuality { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_LowQuality{} - return out -} + // field RawSolution + out.RawSolution = To_ElectionProviderMultiPhase_SubmitCall_raw_solution(v.ValueAt(0)) - func To_Identity_New(in registry.DecodedFields) *pbgear.Identity_New { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_New{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.Identity_New_Id{ - Id: To_Identity_Id(fields), //Passthrough fields... - } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.Identity_New_Index{ - Index: To_Identity_Index(fields), //Passthrough fields... - } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.Identity_New_Raw{ - Raw: To_Identity_Raw(fields), //Passthrough fields... - } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.Identity_New_Address32{ - Address32: To_Identity_Address32(fields), //Passthrough fields... - } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.Identity_New_Address20{ - Address20: To_Identity_Address20(fields), //Passthrough fields... - } - } - return out + return out //from message } - - func To_Identity_None(in registry.DecodedFields) *pbgear.Identity_None { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_None{} - return out +func To_ElectionProviderMultiPhase_SubmitCall_raw_solution(in any) *pbgear.ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution { + v := in.(registry.Valuable) + return To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution(v.ValueAt(0) //simple field } - func To_Identity_OutOfDate(in registry.DecodedFields) *pbgear.Identity_OutOfDate { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_OutOfDate{} - return out -} - func To_Identity_PalletIdentitySimpleIdentityInfo(in registry.DecodedFields) *pbgear.Identity_PalletIdentitySimpleIdentityInfo { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_PalletIdentitySimpleIdentityInfo{} - out.Additional = To_BoundedCollectionsBoundedVecBoundedVec(fields[0].Value.(registry.DecodedFields)) - - out.Display = To_Identity_Display(fields[1].Value.(registry.DecodedFields)) - - out.Legal = To_Identity_Legal(fields[2].Value.(registry.DecodedFields)) - - out.Web = To_Identity_Web(fields[3].Value.(registry.DecodedFields)) - - out.Riot = To_Identity_Riot(fields[4].Value.(registry.DecodedFields)) - - out.Email = To_Identity_Email(fields[5].Value.(registry.DecodedFields)) - - out.PgpFingerprint = To_bytes(fields[6].Value.([]interface{})) - out.Image = To_Identity_Image(fields[7].Value.(registry.DecodedFields)) - - out.Twitter = To_Identity_Twitter(fields[8].Value.(registry.DecodedFields)) - - return out -} - - func To_Identity_PalletIdentityTypesBitFlags(in registry.DecodedFields) *pbgear.Identity_PalletIdentityTypesBitFlags { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_PalletIdentityTypesBitFlags{} - out.Value = To_uint64(fields[0].Value.(registry.DecodedFields)) - - return out -} +func To_ElectionProviderMultiPhase_SubmitUnsignedCall(in any) *pbgear.ElectionProviderMultiPhase_SubmitUnsignedCall { + out := &pbgear.ElectionProviderMultiPhase_SubmitUnsignedCall{} + v := in.(registry.Valuable) + _ = v - func To_Identity_ProvideJudgementCall(in registry.DecodedFields) *pbgear.Identity_ProvideJudgementCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_ProvideJudgementCall{} - out.RegIndex = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Target = To_Identity_Target(fields[1].Value.(registry.DecodedFields)) - - out.Judgement = To_Identity_Judgement(fields[2].Value.(registry.DecodedFields)) - - out.Identity = To_PrimitiveTypesH256(fields[3].Value.(registry.DecodedFields)) - - return out -} + // field RawSolution + out.RawSolution = To_ElectionProviderMultiPhase_SubmitUnsignedCall_raw_solution(v.ValueAt(0)) + // field Witness + out.Witness = To_ElectionProviderMultiPhase_SubmitUnsignedCall_witness(v.ValueAt(1)) - func To_Identity_QuitSubCall(in registry.DecodedFields) *pbgear.Identity_QuitSubCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_QuitSubCall{} - return out + return out //from message } - - func To_Identity_Raw(in registry.DecodedFields) *pbgear.Identity_Raw { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out +func To_ElectionProviderMultiPhase_SubmitUnsignedCall_raw_solution(in any) *pbgear.ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution { + v := in.(registry.Valuable) + return To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution(v.ValueAt(0) //simple field } - - func To_Identity_Raw0(in registry.DecodedFields) *pbgear.Identity_Raw0 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw0{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out +func To_ElectionProviderMultiPhase_SubmitUnsignedCall_witness(in any) *pbgear.ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseSolutionOrSnapshotSize { + v := in.(registry.Valuable) + return To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseSolutionOrSnapshotSize(v.ValueAt(0) //simple field } - func To_Identity_Raw1(in registry.DecodedFields) *pbgear.Identity_Raw1 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw1{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_Identity_Raw10(in registry.DecodedFields) *pbgear.Identity_Raw10 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw10{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} +func To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport(in any) *pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport { + out := &pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport{} + v := in.(registry.Valuable) + _ = v - func To_Identity_Raw11(in registry.DecodedFields) *pbgear.Identity_Raw11 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw11{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + // field Value0 + out.Value0 = To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport_value0(v.ValueAt(0)) + // field Value1 + out.Value1 = To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport_value1(v.ValueAt(1)) - func To_Identity_Raw12(in registry.DecodedFields) *pbgear.Identity_Raw12 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw12{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out + return out //from message } - - func To_Identity_Raw13(in registry.DecodedFields) *pbgear.Identity_Raw13 { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw13{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out +func To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - - func To_Identity_Raw14(in registry.DecodedFields) *pbgear.Identity_Raw14 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw14{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out +func To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport_value1(in any) *pbgear.SpNposElectionsSupport { + v := in.(registry.Valuable) + return To_SpNposElectionsSupport(v.ValueAt(0) //simple field } - func To_Identity_Raw15(in registry.DecodedFields) *pbgear.Identity_Raw15 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw15{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_Identity_Raw16(in registry.DecodedFields) *pbgear.Identity_Raw16 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw16{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} +func To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String(in any) *pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String { + out := &pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String{} + v := in.(registry.Valuable) + _ = v - func To_Identity_Raw17(in registry.DecodedFields) *pbgear.Identity_Raw17 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw17{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + // field Value0 + out.Value0 = To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String_value0(v.ValueAt(0)) + // primitive field Value1 + out.Value1 = To_string(v.ValueAt(1)) - func To_Identity_Raw18(in registry.DecodedFields) *pbgear.Identity_Raw18 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw18{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out + return out //from message } - - func To_Identity_Raw19(in registry.DecodedFields) *pbgear.Identity_Raw19 { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw19{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out +func To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_Identity_Raw2(in registry.DecodedFields) *pbgear.Identity_Raw2 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw2{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_Identity_Raw20(in registry.DecodedFields) *pbgear.Identity_Raw20 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw20{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} +func To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes10Listuint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes10Listuint32 { + out := &pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes10Listuint32{} + v := in.(registry.Valuable) + _ = v - func To_Identity_Raw21(in registry.DecodedFields) *pbgear.Identity_Raw21 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw21{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // repeated field Value1 + out.Value1 = To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes10Listuint32_value1(v.ValueAt(1)) + // primitive field Value2 + out.Value2 = To_uint32(v.ValueAt(2)) - func To_Identity_Raw22(in registry.DecodedFields) *pbgear.Identity_Raw22 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw22{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out + return out //from message } - - func To_Identity_Raw23(in registry.DecodedFields) *pbgear.Identity_Raw23 { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw23{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_Identity_Raw24(in registry.DecodedFields) *pbgear.Identity_Raw24 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw24{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} +func To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes10Listuint32_value1(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 { + items := in.([]interface{}) - func To_Identity_Raw25(in registry.DecodedFields) *pbgear.Identity_Raw25 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw25{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(w) + out = append(out, o) + } + return nil //funcForRepeatedField } - func To_Identity_Raw26(in registry.DecodedFields) *pbgear.Identity_Raw26 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw26{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_Identity_Raw27(in registry.DecodedFields) *pbgear.Identity_Raw27 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw27{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} +func To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes11Listuint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes11Listuint32 { + out := &pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes11Listuint32{} + v := in.(registry.Valuable) + _ = v - func To_Identity_Raw28(in registry.DecodedFields) *pbgear.Identity_Raw28 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw28{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // repeated field Value1 + out.Value1 = To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes11Listuint32_value1(v.ValueAt(1)) + // primitive field Value2 + out.Value2 = To_uint32(v.ValueAt(2)) - func To_Identity_Raw29(in registry.DecodedFields) *pbgear.Identity_Raw29 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw29{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out + return out //from message } - - func To_Identity_Raw3(in registry.DecodedFields) *pbgear.Identity_Raw3 { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw3{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_Identity_Raw30(in registry.DecodedFields) *pbgear.Identity_Raw30 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw30{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} +func To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes11Listuint32_value1(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 { + items := in.([]interface{}) - func To_Identity_Raw31(in registry.DecodedFields) *pbgear.Identity_Raw31 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw31{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(w) + out = append(out, o) + } + return nil //funcForRepeatedField } - func To_Identity_Raw32(in registry.DecodedFields) *pbgear.Identity_Raw32 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw32{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_Identity_Raw4(in registry.DecodedFields) *pbgear.Identity_Raw4 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw4{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} +func To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes12Listuint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes12Listuint32 { + out := &pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes12Listuint32{} + v := in.(registry.Valuable) + _ = v - func To_Identity_Raw5(in registry.DecodedFields) *pbgear.Identity_Raw5 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw5{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // repeated field Value1 + out.Value1 = To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes12Listuint32_value1(v.ValueAt(1)) + // primitive field Value2 + out.Value2 = To_uint32(v.ValueAt(2)) - func To_Identity_Raw6(in registry.DecodedFields) *pbgear.Identity_Raw6 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw6{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out + return out //from message } - - func To_Identity_Raw7(in registry.DecodedFields) *pbgear.Identity_Raw7 { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw7{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_Identity_Raw8(in registry.DecodedFields) *pbgear.Identity_Raw8 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw8{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} +func To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes12Listuint32_value1(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 { + items := in.([]interface{}) - func To_Identity_Raw9(in registry.DecodedFields) *pbgear.Identity_Raw9 { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Raw9{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(w) + out = append(out, o) + } + return nil //funcForRepeatedField } - func To_Identity_Reasonable(in registry.DecodedFields) *pbgear.Identity_Reasonable { + +func To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes13Listuint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes13Listuint32 { + out := &pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes13Listuint32{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // repeated field Value1 + out.Value1 = To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes13Listuint32_value1(v.ValueAt(1)) + // primitive field Value2 + out.Value2 = To_uint32(v.ValueAt(2)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Reasonable{} - return out + +func To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes13Listuint32_value1(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(w) + out = append(out, o) + } + return nil //funcForRepeatedField } - func To_Identity_RegistrarAddedEvent(in registry.DecodedFields) *pbgear.Identity_RegistrarAddedEvent { + +func To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes14Listuint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes14Listuint32 { + out := &pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes14Listuint32{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // repeated field Value1 + out.Value1 = To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes14Listuint32_value1(v.ValueAt(1)) + // primitive field Value2 + out.Value2 = To_uint32(v.ValueAt(2)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_RegistrarAddedEvent{} - out.RegistrarIndex = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out + +func To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes14Listuint32_value1(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(w) + out = append(out, o) + } + return nil //funcForRepeatedField } - func To_Identity_RemoveSubCall(in registry.DecodedFields) *pbgear.Identity_RemoveSubCall { + +func To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes15Listuint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes15Listuint32 { + out := &pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes15Listuint32{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // repeated field Value1 + out.Value1 = To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes15Listuint32_value1(v.ValueAt(1)) + // primitive field Value2 + out.Value2 = To_uint32(v.ValueAt(2)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_RemoveSubCall{} - out.Sub = To_Identity_Sub(fields[0].Value.(registry.DecodedFields)) - - return out + +func To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes15Listuint32_value1(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(w) + out = append(out, o) + } + return nil //funcForRepeatedField } - func To_Identity_RenameSubCall(in registry.DecodedFields) *pbgear.Identity_RenameSubCall { + +func To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes16Listuint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes16Listuint32 { + out := &pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes16Listuint32{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // repeated field Value1 + out.Value1 = To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes16Listuint32_value1(v.ValueAt(1)) + // primitive field Value2 + out.Value2 = To_uint32(v.ValueAt(2)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_RenameSubCall{} - out.Sub = To_Identity_Sub(fields[0].Value.(registry.DecodedFields)) - - out.Data = To_Identity_Data(fields[1].Value.(registry.DecodedFields)) - - return out + +func To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes16Listuint32_value1(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(w) + out = append(out, o) + } + return nil //funcForRepeatedField } - func To_Identity_RequestJudgementCall(in registry.DecodedFields) *pbgear.Identity_RequestJudgementCall { + +func To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes3Listuint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes3Listuint32 { + out := &pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes3Listuint32{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // repeated field Value1 + out.Value1 = To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes3Listuint32_value1(v.ValueAt(1)) + // primitive field Value2 + out.Value2 = To_uint32(v.ValueAt(2)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_RequestJudgementCall{} - out.RegIndex = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.MaxFee = To_CompactString(fields[1].Value.(types.UCompact)) - - return out + +func To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes3Listuint32_value1(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(w) + out = append(out, o) + } + return nil //funcForRepeatedField } - func To_Identity_Riot(in registry.DecodedFields) *pbgear.Identity_Riot { + +func To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes4Listuint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes4Listuint32 { + out := &pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes4Listuint32{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // repeated field Value1 + out.Value1 = To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes4Listuint32_value1(v.ValueAt(1)) + // primitive field Value2 + out.Value2 = To_uint32(v.ValueAt(2)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Riot{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Identity_Riot_None{ - None: To_Identity_None(fields), //Passthrough fields... - } + +func To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes4Listuint32_value1(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } - func To_Identity_SetAccountIdCall(in registry.DecodedFields) *pbgear.Identity_SetAccountIdCall { + +func To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes5Listuint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes5Listuint32 { + out := &pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes5Listuint32{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // repeated field Value1 + out.Value1 = To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes5Listuint32_value1(v.ValueAt(1)) + // primitive field Value2 + out.Value2 = To_uint32(v.ValueAt(2)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_SetAccountIdCall{} - out.Index = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.New = To_Identity_New(fields[1].Value.(registry.DecodedFields)) - - return out + +func To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes5Listuint32_value1(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(w) + out = append(out, o) + } + return nil //funcForRepeatedField } - func To_Identity_SetFeeCall(in registry.DecodedFields) *pbgear.Identity_SetFeeCall { + +func To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes6Listuint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes6Listuint32 { + out := &pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes6Listuint32{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // repeated field Value1 + out.Value1 = To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes6Listuint32_value1(v.ValueAt(1)) + // primitive field Value2 + out.Value2 = To_uint32(v.ValueAt(2)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_SetFeeCall{} - out.Index = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Fee = To_CompactString(fields[1].Value.(types.UCompact)) - - return out + +func To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes6Listuint32_value1(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(w) + out = append(out, o) + } + return nil //funcForRepeatedField } - func To_Identity_SetFieldsCall(in registry.DecodedFields) *pbgear.Identity_SetFieldsCall { + +func To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes7Listuint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes7Listuint32 { + out := &pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes7Listuint32{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // repeated field Value1 + out.Value1 = To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes7Listuint32_value1(v.ValueAt(1)) + // primitive field Value2 + out.Value2 = To_uint32(v.ValueAt(2)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_SetFieldsCall{} - out.Index = To_CompactUint32(fields[0].Value.(types.UCompact)) - - out.Fields = To_Identity_PalletIdentityTypesBitFlags(fields[1].Value.(registry.DecodedFields)) - - return out + +func To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes7Listuint32_value1(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(w) + out = append(out, o) + } + return nil //funcForRepeatedField } - func To_Identity_SetIdentityCall(in registry.DecodedFields) *pbgear.Identity_SetIdentityCall { + +func To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes8Listuint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes8Listuint32 { + out := &pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes8Listuint32{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // repeated field Value1 + out.Value1 = To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes8Listuint32_value1(v.ValueAt(1)) + // primitive field Value2 + out.Value2 = To_uint32(v.ValueAt(2)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_SetIdentityCall{} - out.Info = To_Identity_PalletIdentitySimpleIdentityInfo(fields[0].Value.(registry.DecodedFields)) - - return out + +func To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes8Listuint32_value1(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(w) + out = append(out, o) + } + return nil //funcForRepeatedField } - func To_Identity_SetSubsCall(in registry.DecodedFields) *pbgear.Identity_SetSubsCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_SetSubsCall{} - out.Subs = To_repeated_Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData(fields[0].Value.(registry.DecodedFields)) - - return out + +func To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes9Listuint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes9Listuint32 { + out := &pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes9Listuint32{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // repeated field Value1 + out.Value1 = To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes9Listuint32_value1(v.ValueAt(1)) + // primitive field Value2 + out.Value2 = To_uint32(v.ValueAt(2)) + + return out //from message } -func To_repeated_Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData(f registry.DecodedFields) []*pbgear.Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData { - fields := []*registry.DecodedField(f) - _ = fields + + +func To_Repeated_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes9Listuint32_value1(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 { + items := in.([]interface{}) - out := make([]*pbgear.Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData, len(fields)) - for _, f := range fields { - out = append(out, To_Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData(f.Value.([]*registry.DecodedField))) + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } - func To_Identity_Sha256(in registry.DecodedFields) *pbgear.Identity_Sha256 { + +func To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 { + out := &pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // field Value1 + out.Value1 = To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16_value1(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Sha256{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out +func To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16_value1(in any) *pbgear.SpArithmeticPerThingsPerU16 { + v := in.(registry.Valuable) + return To_SpArithmeticPerThingsPerU16(v.ValueAt(0) //simple field } - func To_Identity_ShaThree256(in registry.DecodedFields) *pbgear.Identity_ShaThree256 { + +func To_ElectionProviderMultiPhase_TupleUint32TupleUint32SpArithmeticPerThingsPerU16Uint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32TupleUint32SpArithmeticPerThingsPerU16Uint32 { + out := &pbgear.ElectionProviderMultiPhase_TupleUint32TupleUint32SpArithmeticPerThingsPerU16Uint32{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // field Value1 + out.Value1 = To_ElectionProviderMultiPhase_TupleUint32TupleUint32SpArithmeticPerThingsPerU16Uint32_value1(v.ValueAt(1)) + // primitive field Value2 + out.Value2 = To_uint32(v.ValueAt(2)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_ShaThree256{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out +func To_ElectionProviderMultiPhase_TupleUint32TupleUint32SpArithmeticPerThingsPerU16Uint32_value1(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16 { + v := in.(registry.Valuable) + return To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16(v.ValueAt(0) //simple field } - func To_Identity_Sub(in registry.DecodedFields) *pbgear.Identity_Sub { + +func To_ElectionProviderMultiPhase_TupleUint32Uint32(in any) *pbgear.ElectionProviderMultiPhase_TupleUint32Uint32 { + out := &pbgear.ElectionProviderMultiPhase_TupleUint32Uint32{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // primitive field Value1 + out.Value1 = To_uint32(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Sub{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.Identity_Sub_Id{ - Id: To_Identity_Id(fields), //Passthrough fields... + + +func To_FellowshipCollectivePallet(in any) *pbgear.FellowshipCollectivePallet { + out := &pbgear.FellowshipCollectivePallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_FellowshipCollectivePallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_FellowshipCollectivePallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.FellowshipCollectivePallet_AddMemberCall{ + AddMemberCall: To_FellowshipCollective_AddMemberCall(param), + } + case 1: + return &pbgear.FellowshipCollectivePallet_PromoteMemberCall{ + PromoteMemberCall: To_FellowshipCollective_PromoteMemberCall(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.Identity_Sub_Index{ - Index: To_Identity_Index(fields), //Passthrough fields... + case 2: + return &pbgear.FellowshipCollectivePallet_DemoteMemberCall{ + DemoteMemberCall: To_FellowshipCollective_DemoteMemberCall(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.Identity_Sub_Raw{ - Raw: To_Identity_Raw(fields), //Passthrough fields... + case 3: + return &pbgear.FellowshipCollectivePallet_RemoveMemberCall{ + RemoveMemberCall: To_FellowshipCollective_RemoveMemberCall(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.Identity_Sub_Address32{ - Address32: To_Identity_Address32(fields), //Passthrough fields... + case 4: + return &pbgear.FellowshipCollectivePallet_VoteCall{ + VoteCall: To_FellowshipCollective_VoteCall(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.Identity_Sub_Address20{ - Address20: To_Identity_Address20(fields), //Passthrough fields... + case 5: + return &pbgear.FellowshipCollectivePallet_CleanupPollCall{ + CleanupPollCall: To_FellowshipCollective_CleanupPollCall(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Identity_SubIdentityAddedEvent(in registry.DecodedFields) *pbgear.Identity_SubIdentityAddedEvent { + +func To_FellowshipCollective_AddMemberCall(in any) *pbgear.FellowshipCollective_AddMemberCall { + out := &pbgear.FellowshipCollective_AddMemberCall{} + v := in.(registry.Valuable) + _ = v + + // field Who + out.Who = To_FellowshipCollective_AddMemberCall_who(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_SubIdentityAddedEvent{} - out.Sub = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Main = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.Deposit = To_string(fields[2].Value.(registry.DecodedFields)) - - return out +func To_FellowshipCollective_AddMemberCall_who(in any) *pbgear.FellowshipCollective_Who { + v := in.(registry.Valuable) + return To_FellowshipCollective_Who(v.ValueAt(0) //simple field } - func To_Identity_SubIdentityRemovedEvent(in registry.DecodedFields) *pbgear.Identity_SubIdentityRemovedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_SubIdentityRemovedEvent{} - out.Sub = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Main = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.Deposit = To_string(fields[2].Value.(registry.DecodedFields)) - - return out + +func To_FellowshipCollective_Address20(in any) *pbgear.FellowshipCollective_Address20 { + out := &pbgear.FellowshipCollective_Address20{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message } + + + +func To_FellowshipCollective_Address32(in any) *pbgear.FellowshipCollective_Address32 { + out := &pbgear.FellowshipCollective_Address32{} + v := in.(registry.Valuable) + _ = v - func To_Identity_SubIdentityRevokedEvent(in registry.DecodedFields) *pbgear.Identity_SubIdentityRevokedEvent { + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_SubIdentityRevokedEvent{} - out.Sub = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Main = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.Deposit = To_string(fields[2].Value.(registry.DecodedFields)) - - return out + + +func To_FellowshipCollective_CleanupPollCall(in any) *pbgear.FellowshipCollective_CleanupPollCall { + out := &pbgear.FellowshipCollective_CleanupPollCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field PollIndex + out.PollIndex = To_uint32(v.ValueAt(0)) + // primitive field Max + out.Max = To_uint32(v.ValueAt(1)) + + return out //from message } + + + +func To_FellowshipCollective_DemoteMemberCall(in any) *pbgear.FellowshipCollective_DemoteMemberCall { + out := &pbgear.FellowshipCollective_DemoteMemberCall{} + v := in.(registry.Valuable) + _ = v + + // field Who + out.Who = To_FellowshipCollective_DemoteMemberCall_who(v.ValueAt(0)) - func To_Identity_Target(in registry.DecodedFields) *pbgear.Identity_Target { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Target{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.Identity_Target_Id{ - Id: To_Identity_Id(fields), //Passthrough fields... - } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.Identity_Target_Index{ - Index: To_Identity_Index(fields), //Passthrough fields... - } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.Identity_Target_Raw{ - Raw: To_Identity_Raw(fields), //Passthrough fields... - } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.Identity_Target_Address32{ - Address32: To_Identity_Address32(fields), //Passthrough fields... - } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.Identity_Target_Address20{ - Address20: To_Identity_Address20(fields), //Passthrough fields... - } - } - return out +func To_FellowshipCollective_DemoteMemberCall_who(in any) *pbgear.FellowshipCollective_Who { + v := in.(registry.Valuable) + return To_FellowshipCollective_Who(v.ValueAt(0) //simple field } - func To_Identity_TuplePalletIdentityTypesDatapalletIdentityTypesData(in registry.DecodedFields) *pbgear.Identity_TuplePalletIdentityTypesDatapalletIdentityTypesData { + +func To_FellowshipCollective_Id(in any) *pbgear.FellowshipCollective_Id { + out := &pbgear.FellowshipCollective_Id{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_FellowshipCollective_Id_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_TuplePalletIdentityTypesDatapalletIdentityTypesData{} - out.Value0 = To_Identity_Value0(fields[0].Value.(registry.DecodedFields)) - - out.Value1 = To_Identity_Value1(fields[1].Value.(registry.DecodedFields)) - - return out +func To_FellowshipCollective_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData(in registry.DecodedFields) *pbgear.Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData { + +func To_FellowshipCollective_Index(in any) *pbgear.FellowshipCollective_Index { + out := &pbgear.FellowshipCollective_Index{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_FellowshipCollective_Index_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Value1 = To_Identity_Value1(fields[1].Value.(registry.DecodedFields)) - - return out +func To_FellowshipCollective_Index_value0(in any) *pbgear.FellowshipCollective_TupleNull { + v := in.(registry.Valuable) + return To_FellowshipCollective_TupleNull(v.ValueAt(0) //simple field } - func To_Identity_Twitter(in registry.DecodedFields) *pbgear.Identity_Twitter { + +func To_FellowshipCollective_PromoteMemberCall(in any) *pbgear.FellowshipCollective_PromoteMemberCall { + out := &pbgear.FellowshipCollective_PromoteMemberCall{} + v := in.(registry.Valuable) + _ = v + + // field Who + out.Who = To_FellowshipCollective_PromoteMemberCall_who(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Twitter{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Identity_Twitter_None{ - None: To_Identity_None(fields), //Passthrough fields... - } - } - return out +func To_FellowshipCollective_PromoteMemberCall_who(in any) *pbgear.FellowshipCollective_Who { + v := in.(registry.Valuable) + return To_FellowshipCollective_Who(v.ValueAt(0) //simple field +} + + +func To_FellowshipCollective_Raw(in any) *pbgear.FellowshipCollective_Raw { + out := &pbgear.FellowshipCollective_Raw{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message } + + - func To_Identity_Unknown(in registry.DecodedFields) *pbgear.Identity_Unknown { +func To_FellowshipCollective_RemoveMemberCall(in any) *pbgear.FellowshipCollective_RemoveMemberCall { + out := &pbgear.FellowshipCollective_RemoveMemberCall{} + v := in.(registry.Valuable) + _ = v + + // field Who + out.Who = To_FellowshipCollective_RemoveMemberCall_who(v.ValueAt(0)) + // primitive field MinRank + out.MinRank = To_uint32(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Unknown{} - return out +func To_FellowshipCollective_RemoveMemberCall_who(in any) *pbgear.FellowshipCollective_Who { + v := in.(registry.Valuable) + return To_FellowshipCollective_Who(v.ValueAt(0) //simple field } - func To_Identity_Value0(in registry.DecodedFields) *pbgear.Identity_Value0 { + +func To_FellowshipCollective_TupleNull(in any) *pbgear.FellowshipCollective_TupleNull { + out := &pbgear.FellowshipCollective_TupleNull{} + v := in.(registry.Valuable) + _ = v + + // field Value + out.Value = To_FellowshipCollective_TupleNull_value(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Value0{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Identity_Value0_None{ - None: To_Identity_None(fields), //Passthrough fields... - } - } - return out +func To_FellowshipCollective_TupleNull_value(in any) *pbgear.TupleNull { + v := in.(registry.Valuable) + return To_TupleNull(v.ValueAt(0) //simple field } - func To_Identity_Value1(in registry.DecodedFields) *pbgear.Identity_Value1 { + +func To_FellowshipCollective_VoteCall(in any) *pbgear.FellowshipCollective_VoteCall { + out := &pbgear.FellowshipCollective_VoteCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Poll + out.Poll = To_uint32(v.ValueAt(0)) + // primitive field Aye + out.Aye = To_bool(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Value1{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Identity_Value1_None{ - None: To_Identity_None(fields), //Passthrough fields... + + +func To_FellowshipCollective_Who(in any) *pbgear.FellowshipCollective_Who { + out := &pbgear.FellowshipCollective_Who{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_FellowshipCollective_Who_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_FellowshipCollective_Who_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.FellowshipCollective_Who_Id{ + Id: To_FellowshipCollective_Id(param), + } + case 1: + return &pbgear.FellowshipCollective_Who_Index{ + Index: To_FellowshipCollective_Index(param), + } + case 2: + return &pbgear.FellowshipCollective_Who_Raw{ + Raw: To_FellowshipCollective_Raw(param), } + case 3: + return &pbgear.FellowshipCollective_Who_Address32{ + Address32: To_FellowshipCollective_Address32(param), + } + case 4: + return &pbgear.FellowshipCollective_Who_Address20{ + Address20: To_FellowshipCollective_Address20(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Identity_Web(in registry.DecodedFields) *pbgear.Identity_Web { + +func To_FellowshipReferendaPallet(in any) *pbgear.FellowshipReferendaPallet { + out := &pbgear.FellowshipReferendaPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_FellowshipReferendaPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Identity_Web{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Identity_Web_None{ - None: To_Identity_None(fields), //Passthrough fields... +func To_OneOf_FellowshipReferendaPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.FellowshipReferendaPallet_SubmitCall{ + SubmitCall: To_FellowshipReferenda_SubmitCall(param), + } + case 1: + return &pbgear.FellowshipReferendaPallet_PlaceDecisionDepositCall{ + PlaceDecisionDepositCall: To_FellowshipReferenda_PlaceDecisionDepositCall(param), + } + case 2: + return &pbgear.FellowshipReferendaPallet_RefundDecisionDepositCall{ + RefundDecisionDepositCall: To_FellowshipReferenda_RefundDecisionDepositCall(param), + } + case 3: + return &pbgear.FellowshipReferendaPallet_CancelCall{ + CancelCall: To_FellowshipReferenda_CancelCall(param), + } + case 4: + return &pbgear.FellowshipReferendaPallet_KillCall{ + KillCall: To_FellowshipReferenda_KillCall(param), + } + case 5: + return &pbgear.FellowshipReferendaPallet_NudgeReferendumCall{ + NudgeReferendumCall: To_FellowshipReferenda_NudgeReferendumCall(param), + } + case 6: + return &pbgear.FellowshipReferendaPallet_OneFewerDecidingCall{ + OneFewerDecidingCall: To_FellowshipReferenda_OneFewerDecidingCall(param), + } + case 7: + return &pbgear.FellowshipReferendaPallet_RefundSubmissionDepositCall{ + RefundSubmissionDepositCall: To_FellowshipReferenda_RefundSubmissionDepositCall(param), + } + case 8: + return &pbgear.FellowshipReferendaPallet_SetMetadataCall{ + SetMetadataCall: To_FellowshipReferenda_SetMetadataCall(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_ImOnline_AllGoodEvent(in registry.DecodedFields) *pbgear.ImOnline_AllGoodEvent { + +func To_FellowshipReferenda_After(in any) *pbgear.FellowshipReferenda_After { + out := &pbgear.FellowshipReferenda_After{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + + return out //from message +} + + + +func To_FellowshipReferenda_At(in any) *pbgear.FellowshipReferenda_At { + out := &pbgear.FellowshipReferenda_At{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + + return out //from message +} + + + +func To_FellowshipReferenda_CancelCall(in any) *pbgear.FellowshipReferenda_CancelCall { + out := &pbgear.FellowshipReferenda_CancelCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) + + return out //from message +} + + + +func To_FellowshipReferenda_EnactmentMoment(in any) *pbgear.FellowshipReferenda_EnactmentMoment { + out := &pbgear.FellowshipReferenda_EnactmentMoment{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_FellowshipReferenda_EnactmentMoment_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_FellowshipReferenda_EnactmentMoment_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.FellowshipReferenda_EnactmentMoment_At{ + At: To_FellowshipReferenda_At(param), + } + case 1: + return &pbgear.FellowshipReferenda_EnactmentMoment_After{ + After: To_FellowshipReferenda_After(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_FellowshipReferenda_Inline(in any) *pbgear.FellowshipReferenda_Inline { + out := &pbgear.FellowshipReferenda_Inline{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_FellowshipReferenda_Inline_value0(v.ValueAt(0)) + + return out //from message +} + +func To_FellowshipReferenda_Inline_value0(in any) *pbgear.BoundedCollectionsBoundedVecBoundedVec { + v := in.(registry.Valuable) + return To_BoundedCollectionsBoundedVecBoundedVec(v.ValueAt(0) //simple field +} + + +func To_FellowshipReferenda_KillCall(in any) *pbgear.FellowshipReferenda_KillCall { + out := &pbgear.FellowshipReferenda_KillCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) + + return out //from message +} + + + +func To_FellowshipReferenda_Legacy(in any) *pbgear.FellowshipReferenda_Legacy { + out := &pbgear.FellowshipReferenda_Legacy{} + v := in.(registry.Valuable) + _ = v + + // field Hash + out.Hash = To_FellowshipReferenda_Legacy_hash(v.ValueAt(0)) + + return out //from message +} + +func To_FellowshipReferenda_Legacy_hash(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field +} + + +func To_FellowshipReferenda_Lookup(in any) *pbgear.FellowshipReferenda_Lookup { + out := &pbgear.FellowshipReferenda_Lookup{} + v := in.(registry.Valuable) + _ = v + + // field Hash + out.Hash = To_FellowshipReferenda_Lookup_hash(v.ValueAt(0)) + // primitive field Len + out.Len = To_uint32(v.ValueAt(1)) + + return out //from message +} + +func To_FellowshipReferenda_Lookup_hash(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field +} + + +func To_FellowshipReferenda_NudgeReferendumCall(in any) *pbgear.FellowshipReferenda_NudgeReferendumCall { + out := &pbgear.FellowshipReferenda_NudgeReferendumCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) + + return out //from message +} + + + +func To_FellowshipReferenda_OneFewerDecidingCall(in any) *pbgear.FellowshipReferenda_OneFewerDecidingCall { + out := &pbgear.FellowshipReferenda_OneFewerDecidingCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Track + out.Track = To_uint32(v.ValueAt(0)) + + return out //from message +} + + + +func To_FellowshipReferenda_Origins(in any) *pbgear.FellowshipReferenda_Origins { + out := &pbgear.FellowshipReferenda_Origins{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_FellowshipReferenda_Origins_value0(v.ValueAt(0)) + + return out //from message +} + +func To_FellowshipReferenda_Origins_value0(in any) *pbgear.Value0 { + v := in.(registry.Valuable) + return To_Value0(v.ValueAt(0) //simple field +} + + +func To_FellowshipReferenda_PlaceDecisionDepositCall(in any) *pbgear.FellowshipReferenda_PlaceDecisionDepositCall { + out := &pbgear.FellowshipReferenda_PlaceDecisionDepositCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) + + return out //from message +} + + + +func To_FellowshipReferenda_Proposal(in any) *pbgear.FellowshipReferenda_Proposal { + out := &pbgear.FellowshipReferenda_Proposal{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_FellowshipReferenda_Proposal_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_FellowshipReferenda_Proposal_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.FellowshipReferenda_Proposal_Legacy{ + Legacy: To_FellowshipReferenda_Legacy(param), + } + case 1: + return &pbgear.FellowshipReferenda_Proposal_Inline{ + Inline: To_FellowshipReferenda_Inline(param), + } + case 2: + return &pbgear.FellowshipReferenda_Proposal_Lookup{ + Lookup: To_FellowshipReferenda_Lookup(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_FellowshipReferenda_ProposalOrigin(in any) *pbgear.FellowshipReferenda_ProposalOrigin { + out := &pbgear.FellowshipReferenda_ProposalOrigin{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_FellowshipReferenda_ProposalOrigin_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_FellowshipReferenda_ProposalOrigin_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.FellowshipReferenda_ProposalOrigin_System{ + System: To_FellowshipReferenda_System(param), + } + case 20: + return &pbgear.FellowshipReferenda_ProposalOrigin_Origins{ + Origins: To_FellowshipReferenda_Origins(param), + } + case 2: + return &pbgear.FellowshipReferenda_ProposalOrigin_Void{ + Void: To_FellowshipReferenda_Void(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_FellowshipReferenda_RefundDecisionDepositCall(in any) *pbgear.FellowshipReferenda_RefundDecisionDepositCall { + out := &pbgear.FellowshipReferenda_RefundDecisionDepositCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) + + return out //from message +} + + + +func To_FellowshipReferenda_RefundSubmissionDepositCall(in any) *pbgear.FellowshipReferenda_RefundSubmissionDepositCall { + out := &pbgear.FellowshipReferenda_RefundSubmissionDepositCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) + + return out //from message +} + + + +func To_FellowshipReferenda_SetMetadataCall(in any) *pbgear.FellowshipReferenda_SetMetadataCall { + out := &pbgear.FellowshipReferenda_SetMetadataCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) + // optional field MaybeHash + out.MaybeHash = To_Optional_FellowshipReferenda_SetMetadataCall_maybe_hash(v.ValueAt(1)) + + return out //from message +} + +func To_Optional_FellowshipReferenda_SetMetadataCall_maybe_hash(in any) *pbgear.PrimitiveTypesH256 { + return nil //funcForOptionalField +} + + +func To_FellowshipReferenda_SubmitCall(in any) *pbgear.FellowshipReferenda_SubmitCall { + out := &pbgear.FellowshipReferenda_SubmitCall{} + v := in.(registry.Valuable) + _ = v + + // field ProposalOrigin + out.ProposalOrigin = To_FellowshipReferenda_SubmitCall_proposal_origin(v.ValueAt(0)) + // field Proposal + out.Proposal = To_FellowshipReferenda_SubmitCall_proposal(v.ValueAt(1)) + // field EnactmentMoment + out.EnactmentMoment = To_FellowshipReferenda_SubmitCall_enactment_moment(v.ValueAt(2)) + + return out //from message +} + +func To_FellowshipReferenda_SubmitCall_proposal_origin(in any) *pbgear.FellowshipReferenda_ProposalOrigin { + v := in.(registry.Valuable) + return To_FellowshipReferenda_ProposalOrigin(v.ValueAt(0) //simple field +} +func To_FellowshipReferenda_SubmitCall_proposal(in any) *pbgear.FellowshipReferenda_Proposal { + v := in.(registry.Valuable) + return To_FellowshipReferenda_Proposal(v.ValueAt(0) //simple field +} +func To_FellowshipReferenda_SubmitCall_enactment_moment(in any) *pbgear.FellowshipReferenda_EnactmentMoment { + v := in.(registry.Valuable) + return To_FellowshipReferenda_EnactmentMoment(v.ValueAt(0) //simple field +} + + +func To_FellowshipReferenda_System(in any) *pbgear.FellowshipReferenda_System { + out := &pbgear.FellowshipReferenda_System{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_FellowshipReferenda_System_value0(v.ValueAt(0)) + + return out //from message +} + +func To_FellowshipReferenda_System_value0(in any) *pbgear.Value0 { + v := in.(registry.Valuable) + return To_Value0(v.ValueAt(0) //simple field +} + + +func To_FellowshipReferenda_Void(in any) *pbgear.FellowshipReferenda_Void { + out := &pbgear.FellowshipReferenda_Void{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_FellowshipReferenda_Void_value0(v.ValueAt(0)) + + return out //from message +} + +func To_FellowshipReferenda_Void_value0(in any) *pbgear.Value0 { + v := in.(registry.Valuable) + return To_Value0(v.ValueAt(0) //simple field +} + + +func To_FinalityGrandpaEquivocation(in any) *pbgear.FinalityGrandpaEquivocation { + out := &pbgear.FinalityGrandpaEquivocation{} + v := in.(registry.Valuable) + _ = v + + // primitive field RoundNumber + out.RoundNumber = To_uint64(v.ValueAt(0)) + // field Identity + out.Identity = To_FinalityGrandpaEquivocation_identity(v.ValueAt(1)) + // field First + out.First = To_FinalityGrandpaEquivocation_first(v.ValueAt(2)) + // field Second + out.Second = To_FinalityGrandpaEquivocation_second(v.ValueAt(3)) + + return out //from message +} + +func To_FinalityGrandpaEquivocation_identity(in any) *pbgear.SpConsensusGrandpaAppPublic { + v := in.(registry.Valuable) + return To_SpConsensusGrandpaAppPublic(v.ValueAt(0) //simple field +} +func To_FinalityGrandpaEquivocation_first(in any) *pbgear.TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature { + v := in.(registry.Valuable) + return To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature(v.ValueAt(0) //simple field +} +func To_FinalityGrandpaEquivocation_second(in any) *pbgear.TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature { + v := in.(registry.Valuable) + return To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature(v.ValueAt(0) //simple field +} + + +func To_FinalityGrandpaPrecommit(in any) *pbgear.FinalityGrandpaPrecommit { + out := &pbgear.FinalityGrandpaPrecommit{} + v := in.(registry.Valuable) + _ = v + + // field TargetHash + out.TargetHash = To_FinalityGrandpaPrecommit_target_hash(v.ValueAt(0)) + // primitive field TargetNumber + out.TargetNumber = To_uint32(v.ValueAt(1)) + + return out //from message +} + +func To_FinalityGrandpaPrecommit_target_hash(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field +} + + +func To_FinalityGrandpaPrevote(in any) *pbgear.FinalityGrandpaPrevote { + out := &pbgear.FinalityGrandpaPrevote{} + v := in.(registry.Valuable) + _ = v + + // field TargetHash + out.TargetHash = To_FinalityGrandpaPrevote_target_hash(v.ValueAt(0)) + // primitive field TargetNumber + out.TargetNumber = To_uint32(v.ValueAt(1)) + + return out //from message +} + +func To_FinalityGrandpaPrevote_target_hash(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field +} + + +func To_GearBankPallet(in any) *pbgear.GearBankPallet { + out := &pbgear.GearBankPallet{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_GearBuiltinPallet(in any) *pbgear.GearBuiltinPallet { + out := &pbgear.GearBuiltinPallet{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_GearGasPallet(in any) *pbgear.GearGasPallet { + out := &pbgear.GearGasPallet{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_GearMessengerPallet(in any) *pbgear.GearMessengerPallet { + out := &pbgear.GearMessengerPallet{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_GearPallet(in any) *pbgear.GearPallet { + out := &pbgear.GearPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_GearPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_GearPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.GearPallet_UploadCodeCall{ + UploadCodeCall: To_Gear_UploadCodeCall(param), + } + case 1: + return &pbgear.GearPallet_UploadProgramCall{ + UploadProgramCall: To_Gear_UploadProgramCall(param), + } + case 2: + return &pbgear.GearPallet_CreateProgramCall{ + CreateProgramCall: To_Gear_CreateProgramCall(param), + } + case 3: + return &pbgear.GearPallet_SendMessageCall{ + SendMessageCall: To_Gear_SendMessageCall(param), + } + case 4: + return &pbgear.GearPallet_SendReplyCall{ + SendReplyCall: To_Gear_SendReplyCall(param), + } + case 5: + return &pbgear.GearPallet_ClaimValueCall{ + ClaimValueCall: To_Gear_ClaimValueCall(param), + } + case 6: + return &pbgear.GearPallet_RunCall{ + RunCall: To_Gear_RunCall(param), + } + case 7: + return &pbgear.GearPallet_SetExecuteInherentCall{ + SetExecuteInherentCall: To_Gear_SetExecuteInherentCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_GearPaymentPallet(in any) *pbgear.GearPaymentPallet { + out := &pbgear.GearPaymentPallet{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_GearProgramPallet(in any) *pbgear.GearProgramPallet { + out := &pbgear.GearProgramPallet{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_GearSchedulerPallet(in any) *pbgear.GearSchedulerPallet { + out := &pbgear.GearSchedulerPallet{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_GearVoucherPallet(in any) *pbgear.GearVoucherPallet { + out := &pbgear.GearVoucherPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_GearVoucherPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_GearVoucherPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.GearVoucherPallet_IssueCall{ + IssueCall: To_GearVoucher_IssueCall(param), + } + case 1: + return &pbgear.GearVoucherPallet_CallCall{ + CallCall: To_GearVoucher_CallCall(param), + } + case 2: + return &pbgear.GearVoucherPallet_RevokeCall{ + RevokeCall: To_GearVoucher_RevokeCall(param), + } + case 3: + return &pbgear.GearVoucherPallet_UpdateCall{ + UpdateCall: To_GearVoucher_UpdateCall(param), + } + case 4: + return &pbgear.GearVoucherPallet_CallDeprecatedCall{ + CallDeprecatedCall: To_GearVoucher_CallDeprecatedCall(param), + } + case 5: + return &pbgear.GearVoucherPallet_DeclineCall{ + DeclineCall: To_GearVoucher_DeclineCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_GearVoucher_AppendPrograms(in any) *pbgear.GearVoucher_AppendPrograms { + out := &pbgear.GearVoucher_AppendPrograms{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_GearVoucher_AppendPrograms_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_GearVoucher_AppendPrograms_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.GearVoucher_AppendPrograms_None{ + None: To_GearVoucher_None(param), + } + case 1: + return &pbgear.GearVoucher_AppendPrograms_Some{ + Some: To_GearVoucher_Some(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_GearVoucher_Call(in any) *pbgear.GearVoucher_Call { + out := &pbgear.GearVoucher_Call{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_GearVoucher_Call_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_GearVoucher_Call_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.GearVoucher_Call_SendMessage{ + SendMessage: To_GearVoucher_SendMessage(param), + } + case 1: + return &pbgear.GearVoucher_Call_SendReply{ + SendReply: To_GearVoucher_SendReply(param), + } + case 2: + return &pbgear.GearVoucher_Call_UploadCode{ + UploadCode: To_GearVoucher_UploadCode(param), + } + case 3: + return &pbgear.GearVoucher_Call_DeclineVoucher{ + DeclineVoucher: To_GearVoucher_DeclineVoucher(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_GearVoucher_CallCall(in any) *pbgear.GearVoucher_CallCall { + out := &pbgear.GearVoucher_CallCall{} + v := in.(registry.Valuable) + _ = v + + // field VoucherId + out.VoucherId = To_GearVoucher_CallCall_voucher_id(v.ValueAt(0)) + // field Call + out.Call = To_GearVoucher_CallCall_call(v.ValueAt(1)) + + return out //from message +} + +func To_GearVoucher_CallCall_voucher_id(in any) *pbgear.GearVoucher_PalletGearVoucherInternalVoucherId { + v := in.(registry.Valuable) + return To_GearVoucher_PalletGearVoucherInternalVoucherId(v.ValueAt(0) //simple field +} +func To_GearVoucher_CallCall_call(in any) *pbgear.GearVoucher_Call { + v := in.(registry.Valuable) + return To_GearVoucher_Call(v.ValueAt(0) //simple field +} + + +func To_GearVoucher_CallDeprecatedCall(in any) *pbgear.GearVoucher_CallDeprecatedCall { + out := &pbgear.GearVoucher_CallDeprecatedCall{} + v := in.(registry.Valuable) + _ = v + + // field Call + out.Call = To_GearVoucher_CallDeprecatedCall_call(v.ValueAt(0)) + + return out //from message +} + +func To_GearVoucher_CallDeprecatedCall_call(in any) *pbgear.GearVoucher_Call { + v := in.(registry.Valuable) + return To_GearVoucher_Call(v.ValueAt(0) //simple field +} + + +func To_GearVoucher_DeclineCall(in any) *pbgear.GearVoucher_DeclineCall { + out := &pbgear.GearVoucher_DeclineCall{} + v := in.(registry.Valuable) + _ = v + + // field VoucherId + out.VoucherId = To_GearVoucher_DeclineCall_voucher_id(v.ValueAt(0)) + + return out //from message +} + +func To_GearVoucher_DeclineCall_voucher_id(in any) *pbgear.GearVoucher_PalletGearVoucherInternalVoucherId { + v := in.(registry.Valuable) + return To_GearVoucher_PalletGearVoucherInternalVoucherId(v.ValueAt(0) //simple field +} + + +func To_GearVoucher_DeclineVoucher(in any) *pbgear.GearVoucher_DeclineVoucher { + out := &pbgear.GearVoucher_DeclineVoucher{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_GearVoucher_IssueCall(in any) *pbgear.GearVoucher_IssueCall { + out := &pbgear.GearVoucher_IssueCall{} + v := in.(registry.Valuable) + _ = v + + // field Spender + out.Spender = To_GearVoucher_IssueCall_spender(v.ValueAt(0)) + // primitive field Balance + out.Balance = To_string(v.ValueAt(1)) + // optional field Programs + out.Programs = To_Optional_GearVoucher_IssueCall_programs(v.ValueAt(2)) + // primitive field CodeUploading + out.CodeUploading = To_bool(v.ValueAt(3)) + // primitive field Duration + out.Duration = To_uint32(v.ValueAt(4)) + + return out //from message +} + +func To_GearVoucher_IssueCall_spender(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field +} +func To_Optional_GearVoucher_IssueCall_programs(in any) *pbgear.BTreeSet { + return nil //funcForOptionalField +} + + +func To_GearVoucher_None(in any) *pbgear.GearVoucher_None { + out := &pbgear.GearVoucher_None{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_GearVoucher_PalletGearVoucherInternalVoucherId(in any) *pbgear.GearVoucher_PalletGearVoucherInternalVoucherId { + out := &pbgear.GearVoucher_PalletGearVoucherInternalVoucherId{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_GearVoucher_RevokeCall(in any) *pbgear.GearVoucher_RevokeCall { + out := &pbgear.GearVoucher_RevokeCall{} + v := in.(registry.Valuable) + _ = v + + // field Spender + out.Spender = To_GearVoucher_RevokeCall_spender(v.ValueAt(0)) + // field VoucherId + out.VoucherId = To_GearVoucher_RevokeCall_voucher_id(v.ValueAt(1)) + + return out //from message +} + +func To_GearVoucher_RevokeCall_spender(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field +} +func To_GearVoucher_RevokeCall_voucher_id(in any) *pbgear.GearVoucher_PalletGearVoucherInternalVoucherId { + v := in.(registry.Valuable) + return To_GearVoucher_PalletGearVoucherInternalVoucherId(v.ValueAt(0) //simple field +} + + +func To_GearVoucher_SendMessage(in any) *pbgear.GearVoucher_SendMessage { + out := &pbgear.GearVoucher_SendMessage{} + v := in.(registry.Valuable) + _ = v + + // field Destination + out.Destination = To_GearVoucher_SendMessage_destination(v.ValueAt(0)) + // primitive field Payload + out.Payload = To_bytes(v.ValueAt(1)) + // primitive field GasLimit + out.GasLimit = To_uint64(v.ValueAt(2)) + // primitive field Value + out.Value = To_string(v.ValueAt(3)) + // primitive field KeepAlive + out.KeepAlive = To_bool(v.ValueAt(4)) + + return out //from message +} + +func To_GearVoucher_SendMessage_destination(in any) *pbgear.GprimitivesActorId { + v := in.(registry.Valuable) + return To_GprimitivesActorId(v.ValueAt(0) //simple field +} + + +func To_GearVoucher_SendReply(in any) *pbgear.GearVoucher_SendReply { + out := &pbgear.GearVoucher_SendReply{} + v := in.(registry.Valuable) + _ = v + + // field ReplyToId + out.ReplyToId = To_GearVoucher_SendReply_reply_to_id(v.ValueAt(0)) + // primitive field Payload + out.Payload = To_bytes(v.ValueAt(1)) + // primitive field GasLimit + out.GasLimit = To_uint64(v.ValueAt(2)) + // primitive field Value + out.Value = To_string(v.ValueAt(3)) + // primitive field KeepAlive + out.KeepAlive = To_bool(v.ValueAt(4)) + + return out //from message +} + +func To_GearVoucher_SendReply_reply_to_id(in any) *pbgear.GprimitivesMessageId { + v := in.(registry.Valuable) + return To_GprimitivesMessageId(v.ValueAt(0) //simple field +} + + +func To_GearVoucher_Some(in any) *pbgear.GearVoucher_Some { + out := &pbgear.GearVoucher_Some{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_GearVoucher_Some_value0(v.ValueAt(0)) + + return out //from message +} + +func To_GearVoucher_Some_value0(in any) *pbgear.BTreeSet { + v := in.(registry.Valuable) + return To_BTreeSet(v.ValueAt(0) //simple field +} + + +func To_GearVoucher_UpdateCall(in any) *pbgear.GearVoucher_UpdateCall { + out := &pbgear.GearVoucher_UpdateCall{} + v := in.(registry.Valuable) + _ = v + + // field Spender + out.Spender = To_GearVoucher_UpdateCall_spender(v.ValueAt(0)) + // field VoucherId + out.VoucherId = To_GearVoucher_UpdateCall_voucher_id(v.ValueAt(1)) + // optional field MoveOwnership + out.MoveOwnership = To_Optional_GearVoucher_UpdateCall_move_ownership(v.ValueAt(2)) + // primitive field BalanceTopUp + out.BalanceTopUp = To_Optional_string(v.ValueAt(3)) + // optional field AppendPrograms + out.AppendPrograms = To_Optional_GearVoucher_UpdateCall_append_programs(v.ValueAt(4)) + // primitive field CodeUploading + out.CodeUploading = To_Optional_bool(v.ValueAt(5)) + // primitive field ProlongDuration + out.ProlongDuration = To_Optional_uint32(v.ValueAt(6)) + + return out //from message +} + +func To_GearVoucher_UpdateCall_spender(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field +} +func To_GearVoucher_UpdateCall_voucher_id(in any) *pbgear.GearVoucher_PalletGearVoucherInternalVoucherId { + v := in.(registry.Valuable) + return To_GearVoucher_PalletGearVoucherInternalVoucherId(v.ValueAt(0) //simple field +} +func To_Optional_GearVoucher_UpdateCall_move_ownership(in any) *pbgear.SpCoreCryptoAccountId32 { + return nil //funcForOptionalField +} +func To_Optional_GearVoucher_UpdateCall_append_programs(in any) *pbgear.GearVoucher_AppendPrograms { + return nil //funcForOptionalField +} + + +func To_GearVoucher_UploadCode(in any) *pbgear.GearVoucher_UploadCode { + out := &pbgear.GearVoucher_UploadCode{} + v := in.(registry.Valuable) + _ = v + + // primitive field Code + out.Code = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Gear_ClaimValueCall(in any) *pbgear.Gear_ClaimValueCall { + out := &pbgear.Gear_ClaimValueCall{} + v := in.(registry.Valuable) + _ = v + + // field MessageId + out.MessageId = To_Gear_ClaimValueCall_message_id(v.ValueAt(0)) + + return out //from message +} + +func To_Gear_ClaimValueCall_message_id(in any) *pbgear.GprimitivesMessageId { + v := in.(registry.Valuable) + return To_GprimitivesMessageId(v.ValueAt(0) //simple field +} + + +func To_Gear_CreateProgramCall(in any) *pbgear.Gear_CreateProgramCall { + out := &pbgear.Gear_CreateProgramCall{} + v := in.(registry.Valuable) + _ = v + + // field CodeId + out.CodeId = To_Gear_CreateProgramCall_code_id(v.ValueAt(0)) + // primitive field Salt + out.Salt = To_bytes(v.ValueAt(1)) + // primitive field InitPayload + out.InitPayload = To_bytes(v.ValueAt(2)) + // primitive field GasLimit + out.GasLimit = To_uint64(v.ValueAt(3)) + // primitive field Value + out.Value = To_string(v.ValueAt(4)) + // primitive field KeepAlive + out.KeepAlive = To_bool(v.ValueAt(5)) + + return out //from message +} + +func To_Gear_CreateProgramCall_code_id(in any) *pbgear.GprimitivesCodeId { + v := in.(registry.Valuable) + return To_GprimitivesCodeId(v.ValueAt(0) //simple field +} + + +func To_Gear_RunCall(in any) *pbgear.Gear_RunCall { + out := &pbgear.Gear_RunCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field MaxGas + out.MaxGas = To_Optional_uint64(v.ValueAt(0)) + + return out //from message +} + + + +func To_Gear_SendMessageCall(in any) *pbgear.Gear_SendMessageCall { + out := &pbgear.Gear_SendMessageCall{} + v := in.(registry.Valuable) + _ = v + + // field Destination + out.Destination = To_Gear_SendMessageCall_destination(v.ValueAt(0)) + // primitive field Payload + out.Payload = To_bytes(v.ValueAt(1)) + // primitive field GasLimit + out.GasLimit = To_uint64(v.ValueAt(2)) + // primitive field Value + out.Value = To_string(v.ValueAt(3)) + // primitive field KeepAlive + out.KeepAlive = To_bool(v.ValueAt(4)) + + return out //from message +} + +func To_Gear_SendMessageCall_destination(in any) *pbgear.GprimitivesActorId { + v := in.(registry.Valuable) + return To_GprimitivesActorId(v.ValueAt(0) //simple field +} + + +func To_Gear_SendReplyCall(in any) *pbgear.Gear_SendReplyCall { + out := &pbgear.Gear_SendReplyCall{} + v := in.(registry.Valuable) + _ = v + + // field ReplyToId + out.ReplyToId = To_Gear_SendReplyCall_reply_to_id(v.ValueAt(0)) + // primitive field Payload + out.Payload = To_bytes(v.ValueAt(1)) + // primitive field GasLimit + out.GasLimit = To_uint64(v.ValueAt(2)) + // primitive field Value + out.Value = To_string(v.ValueAt(3)) + // primitive field KeepAlive + out.KeepAlive = To_bool(v.ValueAt(4)) + + return out //from message +} + +func To_Gear_SendReplyCall_reply_to_id(in any) *pbgear.GprimitivesMessageId { + v := in.(registry.Valuable) + return To_GprimitivesMessageId(v.ValueAt(0) //simple field +} + + +func To_Gear_SetExecuteInherentCall(in any) *pbgear.Gear_SetExecuteInherentCall { + out := &pbgear.Gear_SetExecuteInherentCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value + out.Value = To_bool(v.ValueAt(0)) + + return out //from message +} + + + +func To_Gear_UploadCodeCall(in any) *pbgear.Gear_UploadCodeCall { + out := &pbgear.Gear_UploadCodeCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Code + out.Code = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Gear_UploadProgramCall(in any) *pbgear.Gear_UploadProgramCall { + out := &pbgear.Gear_UploadProgramCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Code + out.Code = To_bytes(v.ValueAt(0)) + // primitive field Salt + out.Salt = To_bytes(v.ValueAt(1)) + // primitive field InitPayload + out.InitPayload = To_bytes(v.ValueAt(2)) + // primitive field GasLimit + out.GasLimit = To_uint64(v.ValueAt(3)) + // primitive field Value + out.Value = To_string(v.ValueAt(4)) + // primitive field KeepAlive + out.KeepAlive = To_bool(v.ValueAt(5)) + + return out //from message +} + + + +func To_GprimitivesActorId(in any) *pbgear.GprimitivesActorId { + out := &pbgear.GprimitivesActorId{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_GprimitivesCodeId(in any) *pbgear.GprimitivesCodeId { + out := &pbgear.GprimitivesCodeId{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_GprimitivesMessageId(in any) *pbgear.GprimitivesMessageId { + out := &pbgear.GprimitivesMessageId{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_GrandpaPallet(in any) *pbgear.GrandpaPallet { + out := &pbgear.GrandpaPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_GrandpaPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_GrandpaPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.GrandpaPallet_ReportEquivocationCall{ + ReportEquivocationCall: To_Grandpa_ReportEquivocationCall(param), + } + case 1: + return &pbgear.GrandpaPallet_ReportEquivocationUnsignedCall{ + ReportEquivocationUnsignedCall: To_Grandpa_ReportEquivocationUnsignedCall(param), + } + case 2: + return &pbgear.GrandpaPallet_NoteStalledCall{ + NoteStalledCall: To_Grandpa_NoteStalledCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Grandpa_Equivocation(in any) *pbgear.Grandpa_Equivocation { + out := &pbgear.Grandpa_Equivocation{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Grandpa_Equivocation_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Grandpa_Equivocation_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Grandpa_Equivocation_Prevote{ + Prevote: To_Grandpa_Prevote(param), + } + case 1: + return &pbgear.Grandpa_Equivocation_Precommit{ + Precommit: To_Grandpa_Precommit(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Grandpa_GrandpaTrieNodesList(in any) *pbgear.Grandpa_GrandpaTrieNodesList { + out := &pbgear.Grandpa_GrandpaTrieNodesList{} + v := in.(registry.Valuable) + _ = v + + // primitive field TrieNodes + out.TrieNodes = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Grandpa_NoteStalledCall(in any) *pbgear.Grandpa_NoteStalledCall { + out := &pbgear.Grandpa_NoteStalledCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Delay + out.Delay = To_uint32(v.ValueAt(0)) + // primitive field BestFinalizedBlockNumber + out.BestFinalizedBlockNumber = To_uint32(v.ValueAt(1)) + + return out //from message +} + + + +func To_Grandpa_Precommit(in any) *pbgear.Grandpa_Precommit { + out := &pbgear.Grandpa_Precommit{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Grandpa_Precommit_value0(v.ValueAt(0)) + + return out //from message +} + +func To_Grandpa_Precommit_value0(in any) *pbgear.FinalityGrandpaEquivocation { + v := in.(registry.Valuable) + return To_FinalityGrandpaEquivocation(v.ValueAt(0) //simple field +} + + +func To_Grandpa_Prevote(in any) *pbgear.Grandpa_Prevote { + out := &pbgear.Grandpa_Prevote{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Grandpa_Prevote_value0(v.ValueAt(0)) + + return out //from message +} + +func To_Grandpa_Prevote_value0(in any) *pbgear.FinalityGrandpaEquivocation { + v := in.(registry.Valuable) + return To_FinalityGrandpaEquivocation(v.ValueAt(0) //simple field +} + + +func To_Grandpa_ReportEquivocationCall(in any) *pbgear.Grandpa_ReportEquivocationCall { + out := &pbgear.Grandpa_ReportEquivocationCall{} + v := in.(registry.Valuable) + _ = v + + // field EquivocationProof + out.EquivocationProof = To_Grandpa_ReportEquivocationCall_equivocation_proof(v.ValueAt(0)) + // field KeyOwnerProof + out.KeyOwnerProof = To_Grandpa_ReportEquivocationCall_key_owner_proof(v.ValueAt(1)) + + return out //from message +} + +func To_Grandpa_ReportEquivocationCall_equivocation_proof(in any) *pbgear.SpConsensusGrandpaEquivocationProof { + v := in.(registry.Valuable) + return To_SpConsensusGrandpaEquivocationProof(v.ValueAt(0) //simple field +} +func To_Grandpa_ReportEquivocationCall_key_owner_proof(in any) *pbgear.SpSessionMembershipProof { + v := in.(registry.Valuable) + return To_SpSessionMembershipProof(v.ValueAt(0) //simple field +} + + +func To_Grandpa_ReportEquivocationUnsignedCall(in any) *pbgear.Grandpa_ReportEquivocationUnsignedCall { + out := &pbgear.Grandpa_ReportEquivocationUnsignedCall{} + v := in.(registry.Valuable) + _ = v + + // field EquivocationProof + out.EquivocationProof = To_Grandpa_ReportEquivocationUnsignedCall_equivocation_proof(v.ValueAt(0)) + // field KeyOwnerProof + out.KeyOwnerProof = To_Grandpa_ReportEquivocationUnsignedCall_key_owner_proof(v.ValueAt(1)) + + return out //from message +} + +func To_Grandpa_ReportEquivocationUnsignedCall_equivocation_proof(in any) *pbgear.SpConsensusGrandpaEquivocationProof { + v := in.(registry.Valuable) + return To_SpConsensusGrandpaEquivocationProof(v.ValueAt(0) //simple field +} +func To_Grandpa_ReportEquivocationUnsignedCall_key_owner_proof(in any) *pbgear.SpSessionMembershipProof { + v := in.(registry.Valuable) + return To_SpSessionMembershipProof(v.ValueAt(0) //simple field +} + + +func To_HistoricalPallet(in any) *pbgear.HistoricalPallet { + out := &pbgear.HistoricalPallet{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_IdentityPallet(in any) *pbgear.IdentityPallet { + out := &pbgear.IdentityPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_IdentityPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_IdentityPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.IdentityPallet_AddRegistrarCall{ + AddRegistrarCall: To_Identity_AddRegistrarCall(param), + } + case 1: + return &pbgear.IdentityPallet_SetIdentityCall{ + SetIdentityCall: To_Identity_SetIdentityCall(param), + } + case 2: + return &pbgear.IdentityPallet_SetSubsCall{ + SetSubsCall: To_Identity_SetSubsCall(param), + } + case 3: + return &pbgear.IdentityPallet_ClearIdentityCall{ + ClearIdentityCall: To_Identity_ClearIdentityCall(param), + } + case 4: + return &pbgear.IdentityPallet_RequestJudgementCall{ + RequestJudgementCall: To_Identity_RequestJudgementCall(param), + } + case 5: + return &pbgear.IdentityPallet_CancelRequestCall{ + CancelRequestCall: To_Identity_CancelRequestCall(param), + } + case 6: + return &pbgear.IdentityPallet_SetFeeCall{ + SetFeeCall: To_Identity_SetFeeCall(param), + } + case 7: + return &pbgear.IdentityPallet_SetAccountIdCall{ + SetAccountIdCall: To_Identity_SetAccountIdCall(param), + } + case 8: + return &pbgear.IdentityPallet_SetFieldsCall{ + SetFieldsCall: To_Identity_SetFieldsCall(param), + } + case 9: + return &pbgear.IdentityPallet_ProvideJudgementCall{ + ProvideJudgementCall: To_Identity_ProvideJudgementCall(param), + } + case 10: + return &pbgear.IdentityPallet_KillIdentityCall{ + KillIdentityCall: To_Identity_KillIdentityCall(param), + } + case 11: + return &pbgear.IdentityPallet_AddSubCall{ + AddSubCall: To_Identity_AddSubCall(param), + } + case 12: + return &pbgear.IdentityPallet_RenameSubCall{ + RenameSubCall: To_Identity_RenameSubCall(param), + } + case 13: + return &pbgear.IdentityPallet_RemoveSubCall{ + RemoveSubCall: To_Identity_RemoveSubCall(param), + } + case 14: + return &pbgear.IdentityPallet_QuitSubCall{ + QuitSubCall: To_Identity_QuitSubCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Identity_Account(in any) *pbgear.Identity_Account { + out := &pbgear.Identity_Account{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Identity_Account_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Identity_Account_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Identity_Account_Id{ + Id: To_Identity_Id(param), + } + case 1: + return &pbgear.Identity_Account_Index{ + Index: To_Identity_Index(param), + } + case 2: + return &pbgear.Identity_Account_Raw{ + Raw: To_Identity_Raw(param), + } + case 3: + return &pbgear.Identity_Account_Address32{ + Address32: To_Identity_Address32(param), + } + case 4: + return &pbgear.Identity_Account_Address20{ + Address20: To_Identity_Address20(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Identity_AddRegistrarCall(in any) *pbgear.Identity_AddRegistrarCall { + out := &pbgear.Identity_AddRegistrarCall{} + v := in.(registry.Valuable) + _ = v + + // field Account + out.Account = To_Identity_AddRegistrarCall_account(v.ValueAt(0)) + + return out //from message +} + +func To_Identity_AddRegistrarCall_account(in any) *pbgear.Identity_Account { + v := in.(registry.Valuable) + return To_Identity_Account(v.ValueAt(0) //simple field +} + + +func To_Identity_AddSubCall(in any) *pbgear.Identity_AddSubCall { + out := &pbgear.Identity_AddSubCall{} + v := in.(registry.Valuable) + _ = v + + // field Sub + out.Sub = To_Identity_AddSubCall_sub(v.ValueAt(0)) + // field Data + out.Data = To_Identity_AddSubCall_data(v.ValueAt(1)) + + return out //from message +} + +func To_Identity_AddSubCall_sub(in any) *pbgear.Identity_Sub { + v := in.(registry.Valuable) + return To_Identity_Sub(v.ValueAt(0) //simple field +} +func To_Identity_AddSubCall_data(in any) *pbgear.Identity_Data { + v := in.(registry.Valuable) + return To_Identity_Data(v.ValueAt(0) //simple field +} + + +func To_Identity_Address20(in any) *pbgear.Identity_Address20 { + out := &pbgear.Identity_Address20{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Address32(in any) *pbgear.Identity_Address32 { + out := &pbgear.Identity_Address32{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_BlakeTwo256(in any) *pbgear.Identity_BlakeTwo256 { + out := &pbgear.Identity_BlakeTwo256{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_CancelRequestCall(in any) *pbgear.Identity_CancelRequestCall { + out := &pbgear.Identity_CancelRequestCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field RegIndex + out.RegIndex = To_uint32(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_ClearIdentityCall(in any) *pbgear.Identity_ClearIdentityCall { + out := &pbgear.Identity_ClearIdentityCall{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_Identity_Data(in any) *pbgear.Identity_Data { + out := &pbgear.Identity_Data{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Identity_Data_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Identity_Data_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Identity_Data_None{ + None: To_Identity_None(param), + } + case 1: + return &pbgear.Identity_Data_Raw0{ + Raw0: To_Identity_Raw0(param), + } + case 2: + return &pbgear.Identity_Data_Raw1{ + Raw1: To_Identity_Raw1(param), + } + case 3: + return &pbgear.Identity_Data_Raw2{ + Raw2: To_Identity_Raw2(param), + } + case 4: + return &pbgear.Identity_Data_Raw3{ + Raw3: To_Identity_Raw3(param), + } + case 5: + return &pbgear.Identity_Data_Raw4{ + Raw4: To_Identity_Raw4(param), + } + case 6: + return &pbgear.Identity_Data_Raw5{ + Raw5: To_Identity_Raw5(param), + } + case 7: + return &pbgear.Identity_Data_Raw6{ + Raw6: To_Identity_Raw6(param), + } + case 8: + return &pbgear.Identity_Data_Raw7{ + Raw7: To_Identity_Raw7(param), + } + case 9: + return &pbgear.Identity_Data_Raw8{ + Raw8: To_Identity_Raw8(param), + } + case 10: + return &pbgear.Identity_Data_Raw9{ + Raw9: To_Identity_Raw9(param), + } + case 11: + return &pbgear.Identity_Data_Raw10{ + Raw10: To_Identity_Raw10(param), + } + case 12: + return &pbgear.Identity_Data_Raw11{ + Raw11: To_Identity_Raw11(param), + } + case 13: + return &pbgear.Identity_Data_Raw12{ + Raw12: To_Identity_Raw12(param), + } + case 14: + return &pbgear.Identity_Data_Raw13{ + Raw13: To_Identity_Raw13(param), + } + case 15: + return &pbgear.Identity_Data_Raw14{ + Raw14: To_Identity_Raw14(param), + } + case 16: + return &pbgear.Identity_Data_Raw15{ + Raw15: To_Identity_Raw15(param), + } + case 17: + return &pbgear.Identity_Data_Raw16{ + Raw16: To_Identity_Raw16(param), + } + case 18: + return &pbgear.Identity_Data_Raw17{ + Raw17: To_Identity_Raw17(param), + } + case 19: + return &pbgear.Identity_Data_Raw18{ + Raw18: To_Identity_Raw18(param), + } + case 20: + return &pbgear.Identity_Data_Raw19{ + Raw19: To_Identity_Raw19(param), + } + case 21: + return &pbgear.Identity_Data_Raw20{ + Raw20: To_Identity_Raw20(param), + } + case 22: + return &pbgear.Identity_Data_Raw21{ + Raw21: To_Identity_Raw21(param), + } + case 23: + return &pbgear.Identity_Data_Raw22{ + Raw22: To_Identity_Raw22(param), + } + case 24: + return &pbgear.Identity_Data_Raw23{ + Raw23: To_Identity_Raw23(param), + } + case 25: + return &pbgear.Identity_Data_Raw24{ + Raw24: To_Identity_Raw24(param), + } + case 26: + return &pbgear.Identity_Data_Raw25{ + Raw25: To_Identity_Raw25(param), + } + case 27: + return &pbgear.Identity_Data_Raw26{ + Raw26: To_Identity_Raw26(param), + } + case 28: + return &pbgear.Identity_Data_Raw27{ + Raw27: To_Identity_Raw27(param), + } + case 29: + return &pbgear.Identity_Data_Raw28{ + Raw28: To_Identity_Raw28(param), + } + case 30: + return &pbgear.Identity_Data_Raw29{ + Raw29: To_Identity_Raw29(param), + } + case 31: + return &pbgear.Identity_Data_Raw30{ + Raw30: To_Identity_Raw30(param), + } + case 32: + return &pbgear.Identity_Data_Raw31{ + Raw31: To_Identity_Raw31(param), + } + case 33: + return &pbgear.Identity_Data_Raw32{ + Raw32: To_Identity_Raw32(param), + } + case 34: + return &pbgear.Identity_Data_BlakeTwo256{ + BlakeTwo256: To_Identity_BlakeTwo256(param), + } + case 35: + return &pbgear.Identity_Data_Sha256{ + Sha256: To_Identity_Sha256(param), + } + case 36: + return &pbgear.Identity_Data_Keccak256{ + Keccak256: To_Identity_Keccak256(param), + } + case 37: + return &pbgear.Identity_Data_ShaThree256{ + ShaThree256: To_Identity_ShaThree256(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Identity_Display(in any) *pbgear.Identity_Display { + out := &pbgear.Identity_Display{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Identity_Display_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Identity_Display_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Identity_Display_None{ + None: To_Identity_None(param), + } + case 1: + return &pbgear.Identity_Display_Raw0{ + Raw0: To_Identity_Raw0(param), + } + case 2: + return &pbgear.Identity_Display_Raw1{ + Raw1: To_Identity_Raw1(param), + } + case 3: + return &pbgear.Identity_Display_Raw2{ + Raw2: To_Identity_Raw2(param), + } + case 4: + return &pbgear.Identity_Display_Raw3{ + Raw3: To_Identity_Raw3(param), + } + case 5: + return &pbgear.Identity_Display_Raw4{ + Raw4: To_Identity_Raw4(param), + } + case 6: + return &pbgear.Identity_Display_Raw5{ + Raw5: To_Identity_Raw5(param), + } + case 7: + return &pbgear.Identity_Display_Raw6{ + Raw6: To_Identity_Raw6(param), + } + case 8: + return &pbgear.Identity_Display_Raw7{ + Raw7: To_Identity_Raw7(param), + } + case 9: + return &pbgear.Identity_Display_Raw8{ + Raw8: To_Identity_Raw8(param), + } + case 10: + return &pbgear.Identity_Display_Raw9{ + Raw9: To_Identity_Raw9(param), + } + case 11: + return &pbgear.Identity_Display_Raw10{ + Raw10: To_Identity_Raw10(param), + } + case 12: + return &pbgear.Identity_Display_Raw11{ + Raw11: To_Identity_Raw11(param), + } + case 13: + return &pbgear.Identity_Display_Raw12{ + Raw12: To_Identity_Raw12(param), + } + case 14: + return &pbgear.Identity_Display_Raw13{ + Raw13: To_Identity_Raw13(param), + } + case 15: + return &pbgear.Identity_Display_Raw14{ + Raw14: To_Identity_Raw14(param), + } + case 16: + return &pbgear.Identity_Display_Raw15{ + Raw15: To_Identity_Raw15(param), + } + case 17: + return &pbgear.Identity_Display_Raw16{ + Raw16: To_Identity_Raw16(param), + } + case 18: + return &pbgear.Identity_Display_Raw17{ + Raw17: To_Identity_Raw17(param), + } + case 19: + return &pbgear.Identity_Display_Raw18{ + Raw18: To_Identity_Raw18(param), + } + case 20: + return &pbgear.Identity_Display_Raw19{ + Raw19: To_Identity_Raw19(param), + } + case 21: + return &pbgear.Identity_Display_Raw20{ + Raw20: To_Identity_Raw20(param), + } + case 22: + return &pbgear.Identity_Display_Raw21{ + Raw21: To_Identity_Raw21(param), + } + case 23: + return &pbgear.Identity_Display_Raw22{ + Raw22: To_Identity_Raw22(param), + } + case 24: + return &pbgear.Identity_Display_Raw23{ + Raw23: To_Identity_Raw23(param), + } + case 25: + return &pbgear.Identity_Display_Raw24{ + Raw24: To_Identity_Raw24(param), + } + case 26: + return &pbgear.Identity_Display_Raw25{ + Raw25: To_Identity_Raw25(param), + } + case 27: + return &pbgear.Identity_Display_Raw26{ + Raw26: To_Identity_Raw26(param), + } + case 28: + return &pbgear.Identity_Display_Raw27{ + Raw27: To_Identity_Raw27(param), + } + case 29: + return &pbgear.Identity_Display_Raw28{ + Raw28: To_Identity_Raw28(param), + } + case 30: + return &pbgear.Identity_Display_Raw29{ + Raw29: To_Identity_Raw29(param), + } + case 31: + return &pbgear.Identity_Display_Raw30{ + Raw30: To_Identity_Raw30(param), + } + case 32: + return &pbgear.Identity_Display_Raw31{ + Raw31: To_Identity_Raw31(param), + } + case 33: + return &pbgear.Identity_Display_Raw32{ + Raw32: To_Identity_Raw32(param), + } + case 34: + return &pbgear.Identity_Display_BlakeTwo256{ + BlakeTwo256: To_Identity_BlakeTwo256(param), + } + case 35: + return &pbgear.Identity_Display_Sha256{ + Sha256: To_Identity_Sha256(param), + } + case 36: + return &pbgear.Identity_Display_Keccak256{ + Keccak256: To_Identity_Keccak256(param), + } + case 37: + return &pbgear.Identity_Display_ShaThree256{ + ShaThree256: To_Identity_ShaThree256(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Identity_Email(in any) *pbgear.Identity_Email { + out := &pbgear.Identity_Email{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Identity_Email_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Identity_Email_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Identity_Email_None{ + None: To_Identity_None(param), + } + case 1: + return &pbgear.Identity_Email_Raw0{ + Raw0: To_Identity_Raw0(param), + } + case 2: + return &pbgear.Identity_Email_Raw1{ + Raw1: To_Identity_Raw1(param), + } + case 3: + return &pbgear.Identity_Email_Raw2{ + Raw2: To_Identity_Raw2(param), + } + case 4: + return &pbgear.Identity_Email_Raw3{ + Raw3: To_Identity_Raw3(param), + } + case 5: + return &pbgear.Identity_Email_Raw4{ + Raw4: To_Identity_Raw4(param), + } + case 6: + return &pbgear.Identity_Email_Raw5{ + Raw5: To_Identity_Raw5(param), + } + case 7: + return &pbgear.Identity_Email_Raw6{ + Raw6: To_Identity_Raw6(param), + } + case 8: + return &pbgear.Identity_Email_Raw7{ + Raw7: To_Identity_Raw7(param), + } + case 9: + return &pbgear.Identity_Email_Raw8{ + Raw8: To_Identity_Raw8(param), + } + case 10: + return &pbgear.Identity_Email_Raw9{ + Raw9: To_Identity_Raw9(param), + } + case 11: + return &pbgear.Identity_Email_Raw10{ + Raw10: To_Identity_Raw10(param), + } + case 12: + return &pbgear.Identity_Email_Raw11{ + Raw11: To_Identity_Raw11(param), + } + case 13: + return &pbgear.Identity_Email_Raw12{ + Raw12: To_Identity_Raw12(param), + } + case 14: + return &pbgear.Identity_Email_Raw13{ + Raw13: To_Identity_Raw13(param), + } + case 15: + return &pbgear.Identity_Email_Raw14{ + Raw14: To_Identity_Raw14(param), + } + case 16: + return &pbgear.Identity_Email_Raw15{ + Raw15: To_Identity_Raw15(param), + } + case 17: + return &pbgear.Identity_Email_Raw16{ + Raw16: To_Identity_Raw16(param), + } + case 18: + return &pbgear.Identity_Email_Raw17{ + Raw17: To_Identity_Raw17(param), + } + case 19: + return &pbgear.Identity_Email_Raw18{ + Raw18: To_Identity_Raw18(param), + } + case 20: + return &pbgear.Identity_Email_Raw19{ + Raw19: To_Identity_Raw19(param), + } + case 21: + return &pbgear.Identity_Email_Raw20{ + Raw20: To_Identity_Raw20(param), + } + case 22: + return &pbgear.Identity_Email_Raw21{ + Raw21: To_Identity_Raw21(param), + } + case 23: + return &pbgear.Identity_Email_Raw22{ + Raw22: To_Identity_Raw22(param), + } + case 24: + return &pbgear.Identity_Email_Raw23{ + Raw23: To_Identity_Raw23(param), + } + case 25: + return &pbgear.Identity_Email_Raw24{ + Raw24: To_Identity_Raw24(param), + } + case 26: + return &pbgear.Identity_Email_Raw25{ + Raw25: To_Identity_Raw25(param), + } + case 27: + return &pbgear.Identity_Email_Raw26{ + Raw26: To_Identity_Raw26(param), + } + case 28: + return &pbgear.Identity_Email_Raw27{ + Raw27: To_Identity_Raw27(param), + } + case 29: + return &pbgear.Identity_Email_Raw28{ + Raw28: To_Identity_Raw28(param), + } + case 30: + return &pbgear.Identity_Email_Raw29{ + Raw29: To_Identity_Raw29(param), + } + case 31: + return &pbgear.Identity_Email_Raw30{ + Raw30: To_Identity_Raw30(param), + } + case 32: + return &pbgear.Identity_Email_Raw31{ + Raw31: To_Identity_Raw31(param), + } + case 33: + return &pbgear.Identity_Email_Raw32{ + Raw32: To_Identity_Raw32(param), + } + case 34: + return &pbgear.Identity_Email_BlakeTwo256{ + BlakeTwo256: To_Identity_BlakeTwo256(param), + } + case 35: + return &pbgear.Identity_Email_Sha256{ + Sha256: To_Identity_Sha256(param), + } + case 36: + return &pbgear.Identity_Email_Keccak256{ + Keccak256: To_Identity_Keccak256(param), + } + case 37: + return &pbgear.Identity_Email_ShaThree256{ + ShaThree256: To_Identity_ShaThree256(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Identity_Erroneous(in any) *pbgear.Identity_Erroneous { + out := &pbgear.Identity_Erroneous{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_Identity_FeePaid(in any) *pbgear.Identity_FeePaid { + out := &pbgear.Identity_FeePaid{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_string(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Id(in any) *pbgear.Identity_Id { + out := &pbgear.Identity_Id{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Identity_Id_value0(v.ValueAt(0)) + + return out //from message +} + +func To_Identity_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field +} + + +func To_Identity_Image(in any) *pbgear.Identity_Image { + out := &pbgear.Identity_Image{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Identity_Image_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Identity_Image_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Identity_Image_None{ + None: To_Identity_None(param), + } + case 1: + return &pbgear.Identity_Image_Raw0{ + Raw0: To_Identity_Raw0(param), + } + case 2: + return &pbgear.Identity_Image_Raw1{ + Raw1: To_Identity_Raw1(param), + } + case 3: + return &pbgear.Identity_Image_Raw2{ + Raw2: To_Identity_Raw2(param), + } + case 4: + return &pbgear.Identity_Image_Raw3{ + Raw3: To_Identity_Raw3(param), + } + case 5: + return &pbgear.Identity_Image_Raw4{ + Raw4: To_Identity_Raw4(param), + } + case 6: + return &pbgear.Identity_Image_Raw5{ + Raw5: To_Identity_Raw5(param), + } + case 7: + return &pbgear.Identity_Image_Raw6{ + Raw6: To_Identity_Raw6(param), + } + case 8: + return &pbgear.Identity_Image_Raw7{ + Raw7: To_Identity_Raw7(param), + } + case 9: + return &pbgear.Identity_Image_Raw8{ + Raw8: To_Identity_Raw8(param), + } + case 10: + return &pbgear.Identity_Image_Raw9{ + Raw9: To_Identity_Raw9(param), + } + case 11: + return &pbgear.Identity_Image_Raw10{ + Raw10: To_Identity_Raw10(param), + } + case 12: + return &pbgear.Identity_Image_Raw11{ + Raw11: To_Identity_Raw11(param), + } + case 13: + return &pbgear.Identity_Image_Raw12{ + Raw12: To_Identity_Raw12(param), + } + case 14: + return &pbgear.Identity_Image_Raw13{ + Raw13: To_Identity_Raw13(param), + } + case 15: + return &pbgear.Identity_Image_Raw14{ + Raw14: To_Identity_Raw14(param), + } + case 16: + return &pbgear.Identity_Image_Raw15{ + Raw15: To_Identity_Raw15(param), + } + case 17: + return &pbgear.Identity_Image_Raw16{ + Raw16: To_Identity_Raw16(param), + } + case 18: + return &pbgear.Identity_Image_Raw17{ + Raw17: To_Identity_Raw17(param), + } + case 19: + return &pbgear.Identity_Image_Raw18{ + Raw18: To_Identity_Raw18(param), + } + case 20: + return &pbgear.Identity_Image_Raw19{ + Raw19: To_Identity_Raw19(param), + } + case 21: + return &pbgear.Identity_Image_Raw20{ + Raw20: To_Identity_Raw20(param), + } + case 22: + return &pbgear.Identity_Image_Raw21{ + Raw21: To_Identity_Raw21(param), + } + case 23: + return &pbgear.Identity_Image_Raw22{ + Raw22: To_Identity_Raw22(param), + } + case 24: + return &pbgear.Identity_Image_Raw23{ + Raw23: To_Identity_Raw23(param), + } + case 25: + return &pbgear.Identity_Image_Raw24{ + Raw24: To_Identity_Raw24(param), + } + case 26: + return &pbgear.Identity_Image_Raw25{ + Raw25: To_Identity_Raw25(param), + } + case 27: + return &pbgear.Identity_Image_Raw26{ + Raw26: To_Identity_Raw26(param), + } + case 28: + return &pbgear.Identity_Image_Raw27{ + Raw27: To_Identity_Raw27(param), + } + case 29: + return &pbgear.Identity_Image_Raw28{ + Raw28: To_Identity_Raw28(param), + } + case 30: + return &pbgear.Identity_Image_Raw29{ + Raw29: To_Identity_Raw29(param), + } + case 31: + return &pbgear.Identity_Image_Raw30{ + Raw30: To_Identity_Raw30(param), + } + case 32: + return &pbgear.Identity_Image_Raw31{ + Raw31: To_Identity_Raw31(param), + } + case 33: + return &pbgear.Identity_Image_Raw32{ + Raw32: To_Identity_Raw32(param), + } + case 34: + return &pbgear.Identity_Image_BlakeTwo256{ + BlakeTwo256: To_Identity_BlakeTwo256(param), + } + case 35: + return &pbgear.Identity_Image_Sha256{ + Sha256: To_Identity_Sha256(param), + } + case 36: + return &pbgear.Identity_Image_Keccak256{ + Keccak256: To_Identity_Keccak256(param), + } + case 37: + return &pbgear.Identity_Image_ShaThree256{ + ShaThree256: To_Identity_ShaThree256(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Identity_Index(in any) *pbgear.Identity_Index { + out := &pbgear.Identity_Index{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Identity_Index_value0(v.ValueAt(0)) + + return out //from message +} + +func To_Identity_Index_value0(in any) *pbgear.Identity_TupleNull { + v := in.(registry.Valuable) + return To_Identity_TupleNull(v.ValueAt(0) //simple field +} + + +func To_Identity_Judgement(in any) *pbgear.Identity_Judgement { + out := &pbgear.Identity_Judgement{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Identity_Judgement_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Identity_Judgement_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Identity_Judgement_Unknown{ + Unknown: To_Identity_Unknown(param), + } + case 1: + return &pbgear.Identity_Judgement_FeePaid{ + FeePaid: To_Identity_FeePaid(param), + } + case 2: + return &pbgear.Identity_Judgement_Reasonable{ + Reasonable: To_Identity_Reasonable(param), + } + case 3: + return &pbgear.Identity_Judgement_KnownGood{ + KnownGood: To_Identity_KnownGood(param), + } + case 4: + return &pbgear.Identity_Judgement_OutOfDate{ + OutOfDate: To_Identity_OutOfDate(param), + } + case 5: + return &pbgear.Identity_Judgement_LowQuality{ + LowQuality: To_Identity_LowQuality(param), + } + case 6: + return &pbgear.Identity_Judgement_Erroneous{ + Erroneous: To_Identity_Erroneous(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Identity_Keccak256(in any) *pbgear.Identity_Keccak256 { + out := &pbgear.Identity_Keccak256{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_KillIdentityCall(in any) *pbgear.Identity_KillIdentityCall { + out := &pbgear.Identity_KillIdentityCall{} + v := in.(registry.Valuable) + _ = v + + // field Target + out.Target = To_Identity_KillIdentityCall_target(v.ValueAt(0)) + + return out //from message +} + +func To_Identity_KillIdentityCall_target(in any) *pbgear.Identity_Target { + v := in.(registry.Valuable) + return To_Identity_Target(v.ValueAt(0) //simple field +} + + +func To_Identity_KnownGood(in any) *pbgear.Identity_KnownGood { + out := &pbgear.Identity_KnownGood{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_Identity_Legal(in any) *pbgear.Identity_Legal { + out := &pbgear.Identity_Legal{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Identity_Legal_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Identity_Legal_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Identity_Legal_None{ + None: To_Identity_None(param), + } + case 1: + return &pbgear.Identity_Legal_Raw0{ + Raw0: To_Identity_Raw0(param), + } + case 2: + return &pbgear.Identity_Legal_Raw1{ + Raw1: To_Identity_Raw1(param), + } + case 3: + return &pbgear.Identity_Legal_Raw2{ + Raw2: To_Identity_Raw2(param), + } + case 4: + return &pbgear.Identity_Legal_Raw3{ + Raw3: To_Identity_Raw3(param), + } + case 5: + return &pbgear.Identity_Legal_Raw4{ + Raw4: To_Identity_Raw4(param), + } + case 6: + return &pbgear.Identity_Legal_Raw5{ + Raw5: To_Identity_Raw5(param), + } + case 7: + return &pbgear.Identity_Legal_Raw6{ + Raw6: To_Identity_Raw6(param), + } + case 8: + return &pbgear.Identity_Legal_Raw7{ + Raw7: To_Identity_Raw7(param), + } + case 9: + return &pbgear.Identity_Legal_Raw8{ + Raw8: To_Identity_Raw8(param), + } + case 10: + return &pbgear.Identity_Legal_Raw9{ + Raw9: To_Identity_Raw9(param), + } + case 11: + return &pbgear.Identity_Legal_Raw10{ + Raw10: To_Identity_Raw10(param), + } + case 12: + return &pbgear.Identity_Legal_Raw11{ + Raw11: To_Identity_Raw11(param), + } + case 13: + return &pbgear.Identity_Legal_Raw12{ + Raw12: To_Identity_Raw12(param), + } + case 14: + return &pbgear.Identity_Legal_Raw13{ + Raw13: To_Identity_Raw13(param), + } + case 15: + return &pbgear.Identity_Legal_Raw14{ + Raw14: To_Identity_Raw14(param), + } + case 16: + return &pbgear.Identity_Legal_Raw15{ + Raw15: To_Identity_Raw15(param), + } + case 17: + return &pbgear.Identity_Legal_Raw16{ + Raw16: To_Identity_Raw16(param), + } + case 18: + return &pbgear.Identity_Legal_Raw17{ + Raw17: To_Identity_Raw17(param), + } + case 19: + return &pbgear.Identity_Legal_Raw18{ + Raw18: To_Identity_Raw18(param), + } + case 20: + return &pbgear.Identity_Legal_Raw19{ + Raw19: To_Identity_Raw19(param), + } + case 21: + return &pbgear.Identity_Legal_Raw20{ + Raw20: To_Identity_Raw20(param), + } + case 22: + return &pbgear.Identity_Legal_Raw21{ + Raw21: To_Identity_Raw21(param), + } + case 23: + return &pbgear.Identity_Legal_Raw22{ + Raw22: To_Identity_Raw22(param), + } + case 24: + return &pbgear.Identity_Legal_Raw23{ + Raw23: To_Identity_Raw23(param), + } + case 25: + return &pbgear.Identity_Legal_Raw24{ + Raw24: To_Identity_Raw24(param), + } + case 26: + return &pbgear.Identity_Legal_Raw25{ + Raw25: To_Identity_Raw25(param), + } + case 27: + return &pbgear.Identity_Legal_Raw26{ + Raw26: To_Identity_Raw26(param), + } + case 28: + return &pbgear.Identity_Legal_Raw27{ + Raw27: To_Identity_Raw27(param), + } + case 29: + return &pbgear.Identity_Legal_Raw28{ + Raw28: To_Identity_Raw28(param), + } + case 30: + return &pbgear.Identity_Legal_Raw29{ + Raw29: To_Identity_Raw29(param), + } + case 31: + return &pbgear.Identity_Legal_Raw30{ + Raw30: To_Identity_Raw30(param), + } + case 32: + return &pbgear.Identity_Legal_Raw31{ + Raw31: To_Identity_Raw31(param), + } + case 33: + return &pbgear.Identity_Legal_Raw32{ + Raw32: To_Identity_Raw32(param), + } + case 34: + return &pbgear.Identity_Legal_BlakeTwo256{ + BlakeTwo256: To_Identity_BlakeTwo256(param), + } + case 35: + return &pbgear.Identity_Legal_Sha256{ + Sha256: To_Identity_Sha256(param), + } + case 36: + return &pbgear.Identity_Legal_Keccak256{ + Keccak256: To_Identity_Keccak256(param), + } + case 37: + return &pbgear.Identity_Legal_ShaThree256{ + ShaThree256: To_Identity_ShaThree256(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Identity_LowQuality(in any) *pbgear.Identity_LowQuality { + out := &pbgear.Identity_LowQuality{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_Identity_New(in any) *pbgear.Identity_New { + out := &pbgear.Identity_New{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Identity_New_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Identity_New_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Identity_New_Id{ + Id: To_Identity_Id(param), + } + case 1: + return &pbgear.Identity_New_Index{ + Index: To_Identity_Index(param), + } + case 2: + return &pbgear.Identity_New_Raw{ + Raw: To_Identity_Raw(param), + } + case 3: + return &pbgear.Identity_New_Address32{ + Address32: To_Identity_Address32(param), + } + case 4: + return &pbgear.Identity_New_Address20{ + Address20: To_Identity_Address20(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Identity_None(in any) *pbgear.Identity_None { + out := &pbgear.Identity_None{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_Identity_OutOfDate(in any) *pbgear.Identity_OutOfDate { + out := &pbgear.Identity_OutOfDate{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_Identity_PalletIdentitySimpleIdentityInfo(in any) *pbgear.Identity_PalletIdentitySimpleIdentityInfo { + out := &pbgear.Identity_PalletIdentitySimpleIdentityInfo{} + v := in.(registry.Valuable) + _ = v + + // field Additional + out.Additional = To_Identity_PalletIdentitySimpleIdentityInfo_additional(v.ValueAt(0)) + // field Display + out.Display = To_Identity_PalletIdentitySimpleIdentityInfo_display(v.ValueAt(1)) + // field Legal + out.Legal = To_Identity_PalletIdentitySimpleIdentityInfo_legal(v.ValueAt(2)) + // field Web + out.Web = To_Identity_PalletIdentitySimpleIdentityInfo_web(v.ValueAt(3)) + // field Riot + out.Riot = To_Identity_PalletIdentitySimpleIdentityInfo_riot(v.ValueAt(4)) + // field Email + out.Email = To_Identity_PalletIdentitySimpleIdentityInfo_email(v.ValueAt(5)) + // primitive field PgpFingerprint + out.PgpFingerprint = To_bytes(v.ValueAt(6)) + // field Image + out.Image = To_Identity_PalletIdentitySimpleIdentityInfo_image(v.ValueAt(7)) + // field Twitter + out.Twitter = To_Identity_PalletIdentitySimpleIdentityInfo_twitter(v.ValueAt(8)) + + return out //from message +} + +func To_Identity_PalletIdentitySimpleIdentityInfo_additional(in any) *pbgear.BoundedCollectionsBoundedVecBoundedVec { + v := in.(registry.Valuable) + return To_BoundedCollectionsBoundedVecBoundedVec(v.ValueAt(0) //simple field +} +func To_Identity_PalletIdentitySimpleIdentityInfo_display(in any) *pbgear.Identity_Display { + v := in.(registry.Valuable) + return To_Identity_Display(v.ValueAt(0) //simple field +} +func To_Identity_PalletIdentitySimpleIdentityInfo_legal(in any) *pbgear.Identity_Legal { + v := in.(registry.Valuable) + return To_Identity_Legal(v.ValueAt(0) //simple field +} +func To_Identity_PalletIdentitySimpleIdentityInfo_web(in any) *pbgear.Identity_Web { + v := in.(registry.Valuable) + return To_Identity_Web(v.ValueAt(0) //simple field +} +func To_Identity_PalletIdentitySimpleIdentityInfo_riot(in any) *pbgear.Identity_Riot { + v := in.(registry.Valuable) + return To_Identity_Riot(v.ValueAt(0) //simple field +} +func To_Identity_PalletIdentitySimpleIdentityInfo_email(in any) *pbgear.Identity_Email { + v := in.(registry.Valuable) + return To_Identity_Email(v.ValueAt(0) //simple field +} +func To_Identity_PalletIdentitySimpleIdentityInfo_image(in any) *pbgear.Identity_Image { + v := in.(registry.Valuable) + return To_Identity_Image(v.ValueAt(0) //simple field +} +func To_Identity_PalletIdentitySimpleIdentityInfo_twitter(in any) *pbgear.Identity_Twitter { + v := in.(registry.Valuable) + return To_Identity_Twitter(v.ValueAt(0) //simple field +} + + +func To_Identity_PalletIdentityTypesBitFlags(in any) *pbgear.Identity_PalletIdentityTypesBitFlags { + out := &pbgear.Identity_PalletIdentityTypesBitFlags{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint64(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_ProvideJudgementCall(in any) *pbgear.Identity_ProvideJudgementCall { + out := &pbgear.Identity_ProvideJudgementCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field RegIndex + out.RegIndex = To_uint32(v.ValueAt(0)) + // field Target + out.Target = To_Identity_ProvideJudgementCall_target(v.ValueAt(1)) + // field Judgement + out.Judgement = To_Identity_ProvideJudgementCall_judgement(v.ValueAt(2)) + // field Identity + out.Identity = To_Identity_ProvideJudgementCall_identity(v.ValueAt(3)) + + return out //from message +} + +func To_Identity_ProvideJudgementCall_target(in any) *pbgear.Identity_Target { + v := in.(registry.Valuable) + return To_Identity_Target(v.ValueAt(0) //simple field +} +func To_Identity_ProvideJudgementCall_judgement(in any) *pbgear.Identity_Judgement { + v := in.(registry.Valuable) + return To_Identity_Judgement(v.ValueAt(0) //simple field +} +func To_Identity_ProvideJudgementCall_identity(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field +} + + +func To_Identity_QuitSubCall(in any) *pbgear.Identity_QuitSubCall { + out := &pbgear.Identity_QuitSubCall{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_Identity_Raw(in any) *pbgear.Identity_Raw { + out := &pbgear.Identity_Raw{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw0(in any) *pbgear.Identity_Raw0 { + out := &pbgear.Identity_Raw0{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw1(in any) *pbgear.Identity_Raw1 { + out := &pbgear.Identity_Raw1{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw10(in any) *pbgear.Identity_Raw10 { + out := &pbgear.Identity_Raw10{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw11(in any) *pbgear.Identity_Raw11 { + out := &pbgear.Identity_Raw11{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw12(in any) *pbgear.Identity_Raw12 { + out := &pbgear.Identity_Raw12{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw13(in any) *pbgear.Identity_Raw13 { + out := &pbgear.Identity_Raw13{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw14(in any) *pbgear.Identity_Raw14 { + out := &pbgear.Identity_Raw14{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw15(in any) *pbgear.Identity_Raw15 { + out := &pbgear.Identity_Raw15{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw16(in any) *pbgear.Identity_Raw16 { + out := &pbgear.Identity_Raw16{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw17(in any) *pbgear.Identity_Raw17 { + out := &pbgear.Identity_Raw17{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw18(in any) *pbgear.Identity_Raw18 { + out := &pbgear.Identity_Raw18{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw19(in any) *pbgear.Identity_Raw19 { + out := &pbgear.Identity_Raw19{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw2(in any) *pbgear.Identity_Raw2 { + out := &pbgear.Identity_Raw2{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw20(in any) *pbgear.Identity_Raw20 { + out := &pbgear.Identity_Raw20{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw21(in any) *pbgear.Identity_Raw21 { + out := &pbgear.Identity_Raw21{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw22(in any) *pbgear.Identity_Raw22 { + out := &pbgear.Identity_Raw22{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw23(in any) *pbgear.Identity_Raw23 { + out := &pbgear.Identity_Raw23{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw24(in any) *pbgear.Identity_Raw24 { + out := &pbgear.Identity_Raw24{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw25(in any) *pbgear.Identity_Raw25 { + out := &pbgear.Identity_Raw25{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw26(in any) *pbgear.Identity_Raw26 { + out := &pbgear.Identity_Raw26{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw27(in any) *pbgear.Identity_Raw27 { + out := &pbgear.Identity_Raw27{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw28(in any) *pbgear.Identity_Raw28 { + out := &pbgear.Identity_Raw28{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw29(in any) *pbgear.Identity_Raw29 { + out := &pbgear.Identity_Raw29{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw3(in any) *pbgear.Identity_Raw3 { + out := &pbgear.Identity_Raw3{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw30(in any) *pbgear.Identity_Raw30 { + out := &pbgear.Identity_Raw30{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw31(in any) *pbgear.Identity_Raw31 { + out := &pbgear.Identity_Raw31{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw32(in any) *pbgear.Identity_Raw32 { + out := &pbgear.Identity_Raw32{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw4(in any) *pbgear.Identity_Raw4 { + out := &pbgear.Identity_Raw4{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw5(in any) *pbgear.Identity_Raw5 { + out := &pbgear.Identity_Raw5{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw6(in any) *pbgear.Identity_Raw6 { + out := &pbgear.Identity_Raw6{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw7(in any) *pbgear.Identity_Raw7 { + out := &pbgear.Identity_Raw7{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw8(in any) *pbgear.Identity_Raw8 { + out := &pbgear.Identity_Raw8{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Raw9(in any) *pbgear.Identity_Raw9 { + out := &pbgear.Identity_Raw9{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Reasonable(in any) *pbgear.Identity_Reasonable { + out := &pbgear.Identity_Reasonable{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_Identity_RemoveSubCall(in any) *pbgear.Identity_RemoveSubCall { + out := &pbgear.Identity_RemoveSubCall{} + v := in.(registry.Valuable) + _ = v + + // field Sub + out.Sub = To_Identity_RemoveSubCall_sub(v.ValueAt(0)) + + return out //from message +} + +func To_Identity_RemoveSubCall_sub(in any) *pbgear.Identity_Sub { + v := in.(registry.Valuable) + return To_Identity_Sub(v.ValueAt(0) //simple field +} + + +func To_Identity_RenameSubCall(in any) *pbgear.Identity_RenameSubCall { + out := &pbgear.Identity_RenameSubCall{} + v := in.(registry.Valuable) + _ = v + + // field Sub + out.Sub = To_Identity_RenameSubCall_sub(v.ValueAt(0)) + // field Data + out.Data = To_Identity_RenameSubCall_data(v.ValueAt(1)) + + return out //from message +} + +func To_Identity_RenameSubCall_sub(in any) *pbgear.Identity_Sub { + v := in.(registry.Valuable) + return To_Identity_Sub(v.ValueAt(0) //simple field +} +func To_Identity_RenameSubCall_data(in any) *pbgear.Identity_Data { + v := in.(registry.Valuable) + return To_Identity_Data(v.ValueAt(0) //simple field +} + + +func To_Identity_RequestJudgementCall(in any) *pbgear.Identity_RequestJudgementCall { + out := &pbgear.Identity_RequestJudgementCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field RegIndex + out.RegIndex = To_uint32(v.ValueAt(0)) + // primitive field MaxFee + out.MaxFee = To_string(v.ValueAt(1)) + + return out //from message +} + + + +func To_Identity_Riot(in any) *pbgear.Identity_Riot { + out := &pbgear.Identity_Riot{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Identity_Riot_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Identity_Riot_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Identity_Riot_None{ + None: To_Identity_None(param), + } + case 1: + return &pbgear.Identity_Riot_Raw0{ + Raw0: To_Identity_Raw0(param), + } + case 2: + return &pbgear.Identity_Riot_Raw1{ + Raw1: To_Identity_Raw1(param), + } + case 3: + return &pbgear.Identity_Riot_Raw2{ + Raw2: To_Identity_Raw2(param), + } + case 4: + return &pbgear.Identity_Riot_Raw3{ + Raw3: To_Identity_Raw3(param), + } + case 5: + return &pbgear.Identity_Riot_Raw4{ + Raw4: To_Identity_Raw4(param), + } + case 6: + return &pbgear.Identity_Riot_Raw5{ + Raw5: To_Identity_Raw5(param), + } + case 7: + return &pbgear.Identity_Riot_Raw6{ + Raw6: To_Identity_Raw6(param), + } + case 8: + return &pbgear.Identity_Riot_Raw7{ + Raw7: To_Identity_Raw7(param), + } + case 9: + return &pbgear.Identity_Riot_Raw8{ + Raw8: To_Identity_Raw8(param), + } + case 10: + return &pbgear.Identity_Riot_Raw9{ + Raw9: To_Identity_Raw9(param), + } + case 11: + return &pbgear.Identity_Riot_Raw10{ + Raw10: To_Identity_Raw10(param), + } + case 12: + return &pbgear.Identity_Riot_Raw11{ + Raw11: To_Identity_Raw11(param), + } + case 13: + return &pbgear.Identity_Riot_Raw12{ + Raw12: To_Identity_Raw12(param), + } + case 14: + return &pbgear.Identity_Riot_Raw13{ + Raw13: To_Identity_Raw13(param), + } + case 15: + return &pbgear.Identity_Riot_Raw14{ + Raw14: To_Identity_Raw14(param), + } + case 16: + return &pbgear.Identity_Riot_Raw15{ + Raw15: To_Identity_Raw15(param), + } + case 17: + return &pbgear.Identity_Riot_Raw16{ + Raw16: To_Identity_Raw16(param), + } + case 18: + return &pbgear.Identity_Riot_Raw17{ + Raw17: To_Identity_Raw17(param), + } + case 19: + return &pbgear.Identity_Riot_Raw18{ + Raw18: To_Identity_Raw18(param), + } + case 20: + return &pbgear.Identity_Riot_Raw19{ + Raw19: To_Identity_Raw19(param), + } + case 21: + return &pbgear.Identity_Riot_Raw20{ + Raw20: To_Identity_Raw20(param), + } + case 22: + return &pbgear.Identity_Riot_Raw21{ + Raw21: To_Identity_Raw21(param), + } + case 23: + return &pbgear.Identity_Riot_Raw22{ + Raw22: To_Identity_Raw22(param), + } + case 24: + return &pbgear.Identity_Riot_Raw23{ + Raw23: To_Identity_Raw23(param), + } + case 25: + return &pbgear.Identity_Riot_Raw24{ + Raw24: To_Identity_Raw24(param), + } + case 26: + return &pbgear.Identity_Riot_Raw25{ + Raw25: To_Identity_Raw25(param), + } + case 27: + return &pbgear.Identity_Riot_Raw26{ + Raw26: To_Identity_Raw26(param), + } + case 28: + return &pbgear.Identity_Riot_Raw27{ + Raw27: To_Identity_Raw27(param), + } + case 29: + return &pbgear.Identity_Riot_Raw28{ + Raw28: To_Identity_Raw28(param), + } + case 30: + return &pbgear.Identity_Riot_Raw29{ + Raw29: To_Identity_Raw29(param), + } + case 31: + return &pbgear.Identity_Riot_Raw30{ + Raw30: To_Identity_Raw30(param), + } + case 32: + return &pbgear.Identity_Riot_Raw31{ + Raw31: To_Identity_Raw31(param), + } + case 33: + return &pbgear.Identity_Riot_Raw32{ + Raw32: To_Identity_Raw32(param), + } + case 34: + return &pbgear.Identity_Riot_BlakeTwo256{ + BlakeTwo256: To_Identity_BlakeTwo256(param), + } + case 35: + return &pbgear.Identity_Riot_Sha256{ + Sha256: To_Identity_Sha256(param), + } + case 36: + return &pbgear.Identity_Riot_Keccak256{ + Keccak256: To_Identity_Keccak256(param), + } + case 37: + return &pbgear.Identity_Riot_ShaThree256{ + ShaThree256: To_Identity_ShaThree256(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Identity_SetAccountIdCall(in any) *pbgear.Identity_SetAccountIdCall { + out := &pbgear.Identity_SetAccountIdCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) + // field New + out.New = To_Identity_SetAccountIdCall_new(v.ValueAt(1)) + + return out //from message +} + +func To_Identity_SetAccountIdCall_new(in any) *pbgear.Identity_New { + v := in.(registry.Valuable) + return To_Identity_New(v.ValueAt(0) //simple field +} + + +func To_Identity_SetFeeCall(in any) *pbgear.Identity_SetFeeCall { + out := &pbgear.Identity_SetFeeCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) + // primitive field Fee + out.Fee = To_string(v.ValueAt(1)) + + return out //from message +} + + + +func To_Identity_SetFieldsCall(in any) *pbgear.Identity_SetFieldsCall { + out := &pbgear.Identity_SetFieldsCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) + // field Fields + out.Fields = To_Identity_SetFieldsCall_fields(v.ValueAt(1)) + + return out //from message +} + +func To_Identity_SetFieldsCall_fields(in any) *pbgear.Identity_PalletIdentityTypesBitFlags { + v := in.(registry.Valuable) + return To_Identity_PalletIdentityTypesBitFlags(v.ValueAt(0) //simple field +} + + +func To_Identity_SetIdentityCall(in any) *pbgear.Identity_SetIdentityCall { + out := &pbgear.Identity_SetIdentityCall{} + v := in.(registry.Valuable) + _ = v + + // field Info + out.Info = To_Identity_SetIdentityCall_info(v.ValueAt(0)) + + return out //from message +} + +func To_Identity_SetIdentityCall_info(in any) *pbgear.Identity_PalletIdentitySimpleIdentityInfo { + v := in.(registry.Valuable) + return To_Identity_PalletIdentitySimpleIdentityInfo(v.ValueAt(0) //simple field +} + + +func To_Identity_SetSubsCall(in any) *pbgear.Identity_SetSubsCall { + out := &pbgear.Identity_SetSubsCall{} + v := in.(registry.Valuable) + _ = v + + // repeated field Subs + out.Subs = To_Repeated_Identity_SetSubsCall_subs(v.ValueAt(0)) + + return out //from message +} + + +func To_Repeated_Identity_SetSubsCall_subs(in any) []*pbgear.Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData { + items := in.([]interface{}) + + var out []*pbgear.Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData(w) + out = append(out, o) + } + return nil //funcForRepeatedField +} + + +func To_Identity_Sha256(in any) *pbgear.Identity_Sha256 { + out := &pbgear.Identity_Sha256{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_ShaThree256(in any) *pbgear.Identity_ShaThree256 { + out := &pbgear.Identity_ShaThree256{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Identity_Sub(in any) *pbgear.Identity_Sub { + out := &pbgear.Identity_Sub{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Identity_Sub_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ImOnline_AllGoodEvent{} - return out +func To_OneOf_Identity_Sub_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Identity_Sub_Id{ + Id: To_Identity_Id(param), + } + case 1: + return &pbgear.Identity_Sub_Index{ + Index: To_Identity_Index(param), + } + case 2: + return &pbgear.Identity_Sub_Raw{ + Raw: To_Identity_Raw(param), + } + case 3: + return &pbgear.Identity_Sub_Address32{ + Address32: To_Identity_Address32(param), + } + case 4: + return &pbgear.Identity_Sub_Address20{ + Address20: To_Identity_Address20(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Identity_Target(in any) *pbgear.Identity_Target { + out := &pbgear.Identity_Target{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Identity_Target_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Identity_Target_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Identity_Target_Id{ + Id: To_Identity_Id(param), + } + case 1: + return &pbgear.Identity_Target_Index{ + Index: To_Identity_Index(param), + } + case 2: + return &pbgear.Identity_Target_Raw{ + Raw: To_Identity_Raw(param), + } + case 3: + return &pbgear.Identity_Target_Address32{ + Address32: To_Identity_Address32(param), + } + case 4: + return &pbgear.Identity_Target_Address20{ + Address20: To_Identity_Address20(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Identity_TupleNull(in any) *pbgear.Identity_TupleNull { + out := &pbgear.Identity_TupleNull{} + v := in.(registry.Valuable) + _ = v + + // field Value + out.Value = To_Identity_TupleNull_value(v.ValueAt(0)) + + return out //from message +} + +func To_Identity_TupleNull_value(in any) *pbgear.TupleNull { + v := in.(registry.Valuable) + return To_TupleNull(v.ValueAt(0) //simple field +} + + +func To_Identity_TuplePalletIdentityTypesDatapalletIdentityTypesData(in any) *pbgear.Identity_TuplePalletIdentityTypesDatapalletIdentityTypesData { + out := &pbgear.Identity_TuplePalletIdentityTypesDatapalletIdentityTypesData{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Identity_TuplePalletIdentityTypesDatapalletIdentityTypesData_value0(v.ValueAt(0)) + // field Value1 + out.Value1 = To_Identity_TuplePalletIdentityTypesDatapalletIdentityTypesData_value1(v.ValueAt(1)) + + return out //from message +} + +func To_Identity_TuplePalletIdentityTypesDatapalletIdentityTypesData_value0(in any) *pbgear.Identity_Value0 { + v := in.(registry.Valuable) + return To_Identity_Value0(v.ValueAt(0) //simple field +} +func To_Identity_TuplePalletIdentityTypesDatapalletIdentityTypesData_value1(in any) *pbgear.Identity_Value1 { + v := in.(registry.Valuable) + return To_Identity_Value1(v.ValueAt(0) //simple field +} + + +func To_Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData(in any) *pbgear.Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData { + out := &pbgear.Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData_value0(v.ValueAt(0)) + // field Value1 + out.Value1 = To_Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData_value1(v.ValueAt(1)) + + return out //from message +} + +func To_Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field +} +func To_Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData_value1(in any) *pbgear.Identity_Value1 { + v := in.(registry.Valuable) + return To_Identity_Value1(v.ValueAt(0) //simple field +} + + +func To_Identity_Twitter(in any) *pbgear.Identity_Twitter { + out := &pbgear.Identity_Twitter{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Identity_Twitter_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Identity_Twitter_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Identity_Twitter_None{ + None: To_Identity_None(param), + } + case 1: + return &pbgear.Identity_Twitter_Raw0{ + Raw0: To_Identity_Raw0(param), + } + case 2: + return &pbgear.Identity_Twitter_Raw1{ + Raw1: To_Identity_Raw1(param), + } + case 3: + return &pbgear.Identity_Twitter_Raw2{ + Raw2: To_Identity_Raw2(param), + } + case 4: + return &pbgear.Identity_Twitter_Raw3{ + Raw3: To_Identity_Raw3(param), + } + case 5: + return &pbgear.Identity_Twitter_Raw4{ + Raw4: To_Identity_Raw4(param), + } + case 6: + return &pbgear.Identity_Twitter_Raw5{ + Raw5: To_Identity_Raw5(param), + } + case 7: + return &pbgear.Identity_Twitter_Raw6{ + Raw6: To_Identity_Raw6(param), + } + case 8: + return &pbgear.Identity_Twitter_Raw7{ + Raw7: To_Identity_Raw7(param), + } + case 9: + return &pbgear.Identity_Twitter_Raw8{ + Raw8: To_Identity_Raw8(param), + } + case 10: + return &pbgear.Identity_Twitter_Raw9{ + Raw9: To_Identity_Raw9(param), + } + case 11: + return &pbgear.Identity_Twitter_Raw10{ + Raw10: To_Identity_Raw10(param), + } + case 12: + return &pbgear.Identity_Twitter_Raw11{ + Raw11: To_Identity_Raw11(param), + } + case 13: + return &pbgear.Identity_Twitter_Raw12{ + Raw12: To_Identity_Raw12(param), + } + case 14: + return &pbgear.Identity_Twitter_Raw13{ + Raw13: To_Identity_Raw13(param), + } + case 15: + return &pbgear.Identity_Twitter_Raw14{ + Raw14: To_Identity_Raw14(param), + } + case 16: + return &pbgear.Identity_Twitter_Raw15{ + Raw15: To_Identity_Raw15(param), + } + case 17: + return &pbgear.Identity_Twitter_Raw16{ + Raw16: To_Identity_Raw16(param), + } + case 18: + return &pbgear.Identity_Twitter_Raw17{ + Raw17: To_Identity_Raw17(param), + } + case 19: + return &pbgear.Identity_Twitter_Raw18{ + Raw18: To_Identity_Raw18(param), + } + case 20: + return &pbgear.Identity_Twitter_Raw19{ + Raw19: To_Identity_Raw19(param), + } + case 21: + return &pbgear.Identity_Twitter_Raw20{ + Raw20: To_Identity_Raw20(param), + } + case 22: + return &pbgear.Identity_Twitter_Raw21{ + Raw21: To_Identity_Raw21(param), + } + case 23: + return &pbgear.Identity_Twitter_Raw22{ + Raw22: To_Identity_Raw22(param), + } + case 24: + return &pbgear.Identity_Twitter_Raw23{ + Raw23: To_Identity_Raw23(param), + } + case 25: + return &pbgear.Identity_Twitter_Raw24{ + Raw24: To_Identity_Raw24(param), + } + case 26: + return &pbgear.Identity_Twitter_Raw25{ + Raw25: To_Identity_Raw25(param), + } + case 27: + return &pbgear.Identity_Twitter_Raw26{ + Raw26: To_Identity_Raw26(param), + } + case 28: + return &pbgear.Identity_Twitter_Raw27{ + Raw27: To_Identity_Raw27(param), + } + case 29: + return &pbgear.Identity_Twitter_Raw28{ + Raw28: To_Identity_Raw28(param), + } + case 30: + return &pbgear.Identity_Twitter_Raw29{ + Raw29: To_Identity_Raw29(param), + } + case 31: + return &pbgear.Identity_Twitter_Raw30{ + Raw30: To_Identity_Raw30(param), + } + case 32: + return &pbgear.Identity_Twitter_Raw31{ + Raw31: To_Identity_Raw31(param), + } + case 33: + return &pbgear.Identity_Twitter_Raw32{ + Raw32: To_Identity_Raw32(param), + } + case 34: + return &pbgear.Identity_Twitter_BlakeTwo256{ + BlakeTwo256: To_Identity_BlakeTwo256(param), + } + case 35: + return &pbgear.Identity_Twitter_Sha256{ + Sha256: To_Identity_Sha256(param), + } + case 36: + return &pbgear.Identity_Twitter_Keccak256{ + Keccak256: To_Identity_Keccak256(param), + } + case 37: + return &pbgear.Identity_Twitter_ShaThree256{ + ShaThree256: To_Identity_ShaThree256(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Identity_Unknown(in any) *pbgear.Identity_Unknown { + out := &pbgear.Identity_Unknown{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} + + + +func To_Identity_Value0(in any) *pbgear.Identity_Value0 { + out := &pbgear.Identity_Value0{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Identity_Value0_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Identity_Value0_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Identity_Value0_None{ + None: To_Identity_None(param), + } + case 1: + return &pbgear.Identity_Value0_Raw0{ + Raw0: To_Identity_Raw0(param), + } + case 2: + return &pbgear.Identity_Value0_Raw1{ + Raw1: To_Identity_Raw1(param), + } + case 3: + return &pbgear.Identity_Value0_Raw2{ + Raw2: To_Identity_Raw2(param), + } + case 4: + return &pbgear.Identity_Value0_Raw3{ + Raw3: To_Identity_Raw3(param), + } + case 5: + return &pbgear.Identity_Value0_Raw4{ + Raw4: To_Identity_Raw4(param), + } + case 6: + return &pbgear.Identity_Value0_Raw5{ + Raw5: To_Identity_Raw5(param), + } + case 7: + return &pbgear.Identity_Value0_Raw6{ + Raw6: To_Identity_Raw6(param), + } + case 8: + return &pbgear.Identity_Value0_Raw7{ + Raw7: To_Identity_Raw7(param), + } + case 9: + return &pbgear.Identity_Value0_Raw8{ + Raw8: To_Identity_Raw8(param), + } + case 10: + return &pbgear.Identity_Value0_Raw9{ + Raw9: To_Identity_Raw9(param), + } + case 11: + return &pbgear.Identity_Value0_Raw10{ + Raw10: To_Identity_Raw10(param), + } + case 12: + return &pbgear.Identity_Value0_Raw11{ + Raw11: To_Identity_Raw11(param), + } + case 13: + return &pbgear.Identity_Value0_Raw12{ + Raw12: To_Identity_Raw12(param), + } + case 14: + return &pbgear.Identity_Value0_Raw13{ + Raw13: To_Identity_Raw13(param), + } + case 15: + return &pbgear.Identity_Value0_Raw14{ + Raw14: To_Identity_Raw14(param), + } + case 16: + return &pbgear.Identity_Value0_Raw15{ + Raw15: To_Identity_Raw15(param), + } + case 17: + return &pbgear.Identity_Value0_Raw16{ + Raw16: To_Identity_Raw16(param), + } + case 18: + return &pbgear.Identity_Value0_Raw17{ + Raw17: To_Identity_Raw17(param), + } + case 19: + return &pbgear.Identity_Value0_Raw18{ + Raw18: To_Identity_Raw18(param), + } + case 20: + return &pbgear.Identity_Value0_Raw19{ + Raw19: To_Identity_Raw19(param), + } + case 21: + return &pbgear.Identity_Value0_Raw20{ + Raw20: To_Identity_Raw20(param), + } + case 22: + return &pbgear.Identity_Value0_Raw21{ + Raw21: To_Identity_Raw21(param), + } + case 23: + return &pbgear.Identity_Value0_Raw22{ + Raw22: To_Identity_Raw22(param), + } + case 24: + return &pbgear.Identity_Value0_Raw23{ + Raw23: To_Identity_Raw23(param), + } + case 25: + return &pbgear.Identity_Value0_Raw24{ + Raw24: To_Identity_Raw24(param), + } + case 26: + return &pbgear.Identity_Value0_Raw25{ + Raw25: To_Identity_Raw25(param), + } + case 27: + return &pbgear.Identity_Value0_Raw26{ + Raw26: To_Identity_Raw26(param), + } + case 28: + return &pbgear.Identity_Value0_Raw27{ + Raw27: To_Identity_Raw27(param), + } + case 29: + return &pbgear.Identity_Value0_Raw28{ + Raw28: To_Identity_Raw28(param), + } + case 30: + return &pbgear.Identity_Value0_Raw29{ + Raw29: To_Identity_Raw29(param), + } + case 31: + return &pbgear.Identity_Value0_Raw30{ + Raw30: To_Identity_Raw30(param), + } + case 32: + return &pbgear.Identity_Value0_Raw31{ + Raw31: To_Identity_Raw31(param), + } + case 33: + return &pbgear.Identity_Value0_Raw32{ + Raw32: To_Identity_Raw32(param), + } + case 34: + return &pbgear.Identity_Value0_BlakeTwo256{ + BlakeTwo256: To_Identity_BlakeTwo256(param), + } + case 35: + return &pbgear.Identity_Value0_Sha256{ + Sha256: To_Identity_Sha256(param), + } + case 36: + return &pbgear.Identity_Value0_Keccak256{ + Keccak256: To_Identity_Keccak256(param), + } + case 37: + return &pbgear.Identity_Value0_ShaThree256{ + ShaThree256: To_Identity_ShaThree256(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Identity_Value1(in any) *pbgear.Identity_Value1 { + out := &pbgear.Identity_Value1{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Identity_Value1_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Identity_Value1_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Identity_Value1_None{ + None: To_Identity_None(param), + } + case 1: + return &pbgear.Identity_Value1_Raw0{ + Raw0: To_Identity_Raw0(param), + } + case 2: + return &pbgear.Identity_Value1_Raw1{ + Raw1: To_Identity_Raw1(param), + } + case 3: + return &pbgear.Identity_Value1_Raw2{ + Raw2: To_Identity_Raw2(param), + } + case 4: + return &pbgear.Identity_Value1_Raw3{ + Raw3: To_Identity_Raw3(param), + } + case 5: + return &pbgear.Identity_Value1_Raw4{ + Raw4: To_Identity_Raw4(param), + } + case 6: + return &pbgear.Identity_Value1_Raw5{ + Raw5: To_Identity_Raw5(param), + } + case 7: + return &pbgear.Identity_Value1_Raw6{ + Raw6: To_Identity_Raw6(param), + } + case 8: + return &pbgear.Identity_Value1_Raw7{ + Raw7: To_Identity_Raw7(param), + } + case 9: + return &pbgear.Identity_Value1_Raw8{ + Raw8: To_Identity_Raw8(param), + } + case 10: + return &pbgear.Identity_Value1_Raw9{ + Raw9: To_Identity_Raw9(param), + } + case 11: + return &pbgear.Identity_Value1_Raw10{ + Raw10: To_Identity_Raw10(param), + } + case 12: + return &pbgear.Identity_Value1_Raw11{ + Raw11: To_Identity_Raw11(param), + } + case 13: + return &pbgear.Identity_Value1_Raw12{ + Raw12: To_Identity_Raw12(param), + } + case 14: + return &pbgear.Identity_Value1_Raw13{ + Raw13: To_Identity_Raw13(param), + } + case 15: + return &pbgear.Identity_Value1_Raw14{ + Raw14: To_Identity_Raw14(param), + } + case 16: + return &pbgear.Identity_Value1_Raw15{ + Raw15: To_Identity_Raw15(param), + } + case 17: + return &pbgear.Identity_Value1_Raw16{ + Raw16: To_Identity_Raw16(param), + } + case 18: + return &pbgear.Identity_Value1_Raw17{ + Raw17: To_Identity_Raw17(param), + } + case 19: + return &pbgear.Identity_Value1_Raw18{ + Raw18: To_Identity_Raw18(param), + } + case 20: + return &pbgear.Identity_Value1_Raw19{ + Raw19: To_Identity_Raw19(param), + } + case 21: + return &pbgear.Identity_Value1_Raw20{ + Raw20: To_Identity_Raw20(param), + } + case 22: + return &pbgear.Identity_Value1_Raw21{ + Raw21: To_Identity_Raw21(param), + } + case 23: + return &pbgear.Identity_Value1_Raw22{ + Raw22: To_Identity_Raw22(param), + } + case 24: + return &pbgear.Identity_Value1_Raw23{ + Raw23: To_Identity_Raw23(param), + } + case 25: + return &pbgear.Identity_Value1_Raw24{ + Raw24: To_Identity_Raw24(param), + } + case 26: + return &pbgear.Identity_Value1_Raw25{ + Raw25: To_Identity_Raw25(param), + } + case 27: + return &pbgear.Identity_Value1_Raw26{ + Raw26: To_Identity_Raw26(param), + } + case 28: + return &pbgear.Identity_Value1_Raw27{ + Raw27: To_Identity_Raw27(param), + } + case 29: + return &pbgear.Identity_Value1_Raw28{ + Raw28: To_Identity_Raw28(param), + } + case 30: + return &pbgear.Identity_Value1_Raw29{ + Raw29: To_Identity_Raw29(param), + } + case 31: + return &pbgear.Identity_Value1_Raw30{ + Raw30: To_Identity_Raw30(param), + } + case 32: + return &pbgear.Identity_Value1_Raw31{ + Raw31: To_Identity_Raw31(param), + } + case 33: + return &pbgear.Identity_Value1_Raw32{ + Raw32: To_Identity_Raw32(param), + } + case 34: + return &pbgear.Identity_Value1_BlakeTwo256{ + BlakeTwo256: To_Identity_BlakeTwo256(param), + } + case 35: + return &pbgear.Identity_Value1_Sha256{ + Sha256: To_Identity_Sha256(param), + } + case 36: + return &pbgear.Identity_Value1_Keccak256{ + Keccak256: To_Identity_Keccak256(param), + } + case 37: + return &pbgear.Identity_Value1_ShaThree256{ + ShaThree256: To_Identity_ShaThree256(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Identity_Web(in any) *pbgear.Identity_Web { + out := &pbgear.Identity_Web{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Identity_Web_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Identity_Web_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Identity_Web_None{ + None: To_Identity_None(param), + } + case 1: + return &pbgear.Identity_Web_Raw0{ + Raw0: To_Identity_Raw0(param), + } + case 2: + return &pbgear.Identity_Web_Raw1{ + Raw1: To_Identity_Raw1(param), + } + case 3: + return &pbgear.Identity_Web_Raw2{ + Raw2: To_Identity_Raw2(param), + } + case 4: + return &pbgear.Identity_Web_Raw3{ + Raw3: To_Identity_Raw3(param), + } + case 5: + return &pbgear.Identity_Web_Raw4{ + Raw4: To_Identity_Raw4(param), + } + case 6: + return &pbgear.Identity_Web_Raw5{ + Raw5: To_Identity_Raw5(param), + } + case 7: + return &pbgear.Identity_Web_Raw6{ + Raw6: To_Identity_Raw6(param), + } + case 8: + return &pbgear.Identity_Web_Raw7{ + Raw7: To_Identity_Raw7(param), + } + case 9: + return &pbgear.Identity_Web_Raw8{ + Raw8: To_Identity_Raw8(param), + } + case 10: + return &pbgear.Identity_Web_Raw9{ + Raw9: To_Identity_Raw9(param), + } + case 11: + return &pbgear.Identity_Web_Raw10{ + Raw10: To_Identity_Raw10(param), + } + case 12: + return &pbgear.Identity_Web_Raw11{ + Raw11: To_Identity_Raw11(param), + } + case 13: + return &pbgear.Identity_Web_Raw12{ + Raw12: To_Identity_Raw12(param), + } + case 14: + return &pbgear.Identity_Web_Raw13{ + Raw13: To_Identity_Raw13(param), + } + case 15: + return &pbgear.Identity_Web_Raw14{ + Raw14: To_Identity_Raw14(param), + } + case 16: + return &pbgear.Identity_Web_Raw15{ + Raw15: To_Identity_Raw15(param), + } + case 17: + return &pbgear.Identity_Web_Raw16{ + Raw16: To_Identity_Raw16(param), + } + case 18: + return &pbgear.Identity_Web_Raw17{ + Raw17: To_Identity_Raw17(param), + } + case 19: + return &pbgear.Identity_Web_Raw18{ + Raw18: To_Identity_Raw18(param), + } + case 20: + return &pbgear.Identity_Web_Raw19{ + Raw19: To_Identity_Raw19(param), + } + case 21: + return &pbgear.Identity_Web_Raw20{ + Raw20: To_Identity_Raw20(param), + } + case 22: + return &pbgear.Identity_Web_Raw21{ + Raw21: To_Identity_Raw21(param), + } + case 23: + return &pbgear.Identity_Web_Raw22{ + Raw22: To_Identity_Raw22(param), + } + case 24: + return &pbgear.Identity_Web_Raw23{ + Raw23: To_Identity_Raw23(param), + } + case 25: + return &pbgear.Identity_Web_Raw24{ + Raw24: To_Identity_Raw24(param), + } + case 26: + return &pbgear.Identity_Web_Raw25{ + Raw25: To_Identity_Raw25(param), + } + case 27: + return &pbgear.Identity_Web_Raw26{ + Raw26: To_Identity_Raw26(param), + } + case 28: + return &pbgear.Identity_Web_Raw27{ + Raw27: To_Identity_Raw27(param), + } + case 29: + return &pbgear.Identity_Web_Raw28{ + Raw28: To_Identity_Raw28(param), + } + case 30: + return &pbgear.Identity_Web_Raw29{ + Raw29: To_Identity_Raw29(param), + } + case 31: + return &pbgear.Identity_Web_Raw30{ + Raw30: To_Identity_Raw30(param), + } + case 32: + return &pbgear.Identity_Web_Raw31{ + Raw31: To_Identity_Raw31(param), + } + case 33: + return &pbgear.Identity_Web_Raw32{ + Raw32: To_Identity_Raw32(param), + } + case 34: + return &pbgear.Identity_Web_BlakeTwo256{ + BlakeTwo256: To_Identity_BlakeTwo256(param), + } + case 35: + return &pbgear.Identity_Web_Sha256{ + Sha256: To_Identity_Sha256(param), + } + case 36: + return &pbgear.Identity_Web_Keccak256{ + Keccak256: To_Identity_Keccak256(param), + } + case 37: + return &pbgear.Identity_Web_ShaThree256{ + ShaThree256: To_Identity_ShaThree256(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_ImOnlinePallet(in any) *pbgear.ImOnlinePallet { + out := &pbgear.ImOnlinePallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_ImOnlinePallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_ImOnlinePallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.ImOnlinePallet_HeartbeatCall{ + HeartbeatCall: To_ImOnline_HeartbeatCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } } - func To_ImOnline_HeartbeatCall(in registry.DecodedFields) *pbgear.ImOnline_HeartbeatCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_ImOnline_HeartbeatCall(in any) *pbgear.ImOnline_HeartbeatCall { out := &pbgear.ImOnline_HeartbeatCall{} - out.Heartbeat = To_ImOnline_PalletImOnlineHeartbeat(fields[0].Value.(registry.DecodedFields)) - - out.Signature = To_ImOnline_PalletImOnlineSr25519AppSr25519Signature(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field Heartbeat + out.Heartbeat = To_ImOnline_HeartbeatCall_heartbeat(v.ValueAt(0)) + // field Signature + out.Signature = To_ImOnline_HeartbeatCall_signature(v.ValueAt(1)) - func To_ImOnline_HeartbeatReceivedEvent(in registry.DecodedFields) *pbgear.ImOnline_HeartbeatReceivedEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ImOnline_HeartbeatReceivedEvent{} - out.AuthorityId = To_ImOnline_PalletImOnlineSr25519AppSr25519Public(fields[0].Value.(registry.DecodedFields)) - - return out +func To_ImOnline_HeartbeatCall_heartbeat(in any) *pbgear.ImOnline_PalletImOnlineHeartbeat { + v := in.(registry.Valuable) + return To_ImOnline_PalletImOnlineHeartbeat(v.ValueAt(0) //simple field +} +func To_ImOnline_HeartbeatCall_signature(in any) *pbgear.ImOnline_PalletImOnlineSr25519AppSr25519Signature { + v := in.(registry.Valuable) + return To_ImOnline_PalletImOnlineSr25519AppSr25519Signature(v.ValueAt(0) //simple field } - func To_ImOnline_PalletImOnlineHeartbeat(in registry.DecodedFields) *pbgear.ImOnline_PalletImOnlineHeartbeat { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_ImOnline_PalletImOnlineHeartbeat(in any) *pbgear.ImOnline_PalletImOnlineHeartbeat { out := &pbgear.ImOnline_PalletImOnlineHeartbeat{} - out.BlockNumber = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.SessionIndex = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.AuthorityIndex = To_uint32(fields[2].Value.(registry.DecodedFields)) - - out.ValidatorsLen = To_uint32(fields[3].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field BlockNumber + out.BlockNumber = To_uint32(v.ValueAt(0)) + // primitive field SessionIndex + out.SessionIndex = To_uint32(v.ValueAt(1)) + // primitive field AuthorityIndex + out.AuthorityIndex = To_uint32(v.ValueAt(2)) + // primitive field ValidatorsLen + out.ValidatorsLen = To_uint32(v.ValueAt(3)) - func To_ImOnline_PalletImOnlineSr25519AppSr25519Public(in registry.DecodedFields) *pbgear.ImOnline_PalletImOnlineSr25519AppSr25519Public { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_ImOnline_PalletImOnlineSr25519AppSr25519Public(in any) *pbgear.ImOnline_PalletImOnlineSr25519AppSr25519Public { out := &pbgear.ImOnline_PalletImOnlineSr25519AppSr25519Public{} - out.Value = To_SpCoreSr25519Public(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_ImOnline_PalletImOnlineSr25519AppSr25519Signature(in registry.DecodedFields) *pbgear.ImOnline_PalletImOnlineSr25519AppSr25519Signature { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ImOnline_PalletImOnlineSr25519AppSr25519Signature{} - out.Value = To_SpCoreSr25519Signature(fields[0].Value.(registry.DecodedFields)) - - return out -} + // field Value0 + out.Value0 = To_ImOnline_PalletImOnlineSr25519AppSr25519Public_value0(v.ValueAt(0)) - func To_ImOnline_SomeOfflineEvent(in registry.DecodedFields) *pbgear.ImOnline_SomeOfflineEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ImOnline_SomeOfflineEvent{} - out.Offline = To_repeated_ImOnline_TupleSpCoreCryptoAccountId32PalletStakingExposure(fields[0].Value.(registry.DecodedFields)) - - return out +func To_ImOnline_PalletImOnlineSr25519AppSr25519Public_value0(in any) *pbgear.SpCoreSr25519Public { + v := in.(registry.Valuable) + return To_SpCoreSr25519Public(v.ValueAt(0) //simple field } -func To_repeated_ImOnline_TupleSpCoreCryptoAccountId32PalletStakingExposure(f registry.DecodedFields) []*pbgear.ImOnline_TupleSpCoreCryptoAccountId32PalletStakingExposure { - fields := []*registry.DecodedField(f) - _ = fields - out := make([]*pbgear.ImOnline_TupleSpCoreCryptoAccountId32PalletStakingExposure, len(fields)) - for _, f := range fields { - out = append(out, To_ImOnline_TupleSpCoreCryptoAccountId32PalletStakingExposure(f.Value.([]*registry.DecodedField))) - } - return out -} - func To_ImOnline_TupleSpCoreCryptoAccountId32PalletStakingExposure(in registry.DecodedFields) *pbgear.ImOnline_TupleSpCoreCryptoAccountId32PalletStakingExposure { +func To_ImOnline_PalletImOnlineSr25519AppSr25519Signature(in any) *pbgear.ImOnline_PalletImOnlineSr25519AppSr25519Signature { + out := &pbgear.ImOnline_PalletImOnlineSr25519AppSr25519Signature{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_ImOnline_PalletImOnlineSr25519AppSr25519Signature_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.ImOnline_TupleSpCoreCryptoAccountId32PalletStakingExposure{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Value1 = To_Staking_PalletStakingExposure(fields[1].Value.(registry.DecodedFields)) - - return out +func To_ImOnline_PalletImOnlineSr25519AppSr25519Signature_value0(in any) *pbgear.SpCoreSr25519Signature { + v := in.(registry.Valuable) + return To_SpCoreSr25519Signature(v.ValueAt(0) //simple field } - func To_Module(in registry.DecodedFields) *pbgear.Module { + +func To_MultisigPallet(in any) *pbgear.MultisigPallet { + out := &pbgear.MultisigPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_MultisigPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Module{} - out.Value0 = To_SpRuntimeModuleError(fields[0].Value.(registry.DecodedFields)) - - return out +func To_OneOf_MultisigPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.MultisigPallet_AsMultiThreshold1Call{ + AsMultiThreshold1Call: To_Multisig_AsMultiThreshold1Call(param), + } + case 1: + return &pbgear.MultisigPallet_AsMultiCall{ + AsMultiCall: To_Multisig_AsMultiCall(param), + } + case 2: + return &pbgear.MultisigPallet_ApproveAsMultiCall{ + ApproveAsMultiCall: To_Multisig_ApproveAsMultiCall(param), + } + case 3: + return &pbgear.MultisigPallet_CancelAsMultiCall{ + CancelAsMultiCall: To_Multisig_CancelAsMultiCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } } - func To_Multisig_ApproveAsMultiCall(in registry.DecodedFields) *pbgear.Multisig_ApproveAsMultiCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Multisig_ApproveAsMultiCall(in any) *pbgear.Multisig_ApproveAsMultiCall { out := &pbgear.Multisig_ApproveAsMultiCall{} - out.Threshold = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.OtherSignatories = To_repeated_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.MaybeTimepoint = To_optional_Multisig_PalletMultisigTimepoint(fields[2].Value.(registry.DecodedFields)) - - out.CallHash = To_bytes(fields[3].Value.([]interface{})) - out.MaxWeight = To_SpWeightsWeightV2Weight(fields[4].Value.(registry.DecodedFields)) - - return out + v := in.(registry.Valuable) + _ = v + + // primitive field Threshold + out.Threshold = To_uint32(v.ValueAt(0)) + // repeated field OtherSignatories + out.OtherSignatories = To_Repeated_Multisig_ApproveAsMultiCall_other_signatories(v.ValueAt(1)) + // optional field MaybeTimepoint + out.MaybeTimepoint = To_Optional_Multisig_ApproveAsMultiCall_maybe_timepoint(v.ValueAt(2)) + // primitive field CallHash + out.CallHash = To_bytes(v.ValueAt(3)) + // field MaxWeight + out.MaxWeight = To_Multisig_ApproveAsMultiCall_max_weight(v.ValueAt(4)) + + return out //from message } - func To_optional_Multisig_PalletMultisigTimepoint(f registry.DecodedFields) *pbgear.Multisig_PalletMultisigTimepoint { - fields := []*registry.DecodedField(f) - _ = fields + + +func To_Repeated_Multisig_ApproveAsMultiCall_other_signatories(in any) []*pbgear.SpCoreCryptoAccountId32 { + items := in.([]interface{}) - var out = To_Multisig_PalletMultisigTimepoint(fields) - return out + var out []*pbgear.SpCoreCryptoAccountId32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_SpCoreCryptoAccountId32(w) + out = append(out, o) } + return nil //funcForRepeatedField +} +func To_Optional_Multisig_ApproveAsMultiCall_maybe_timepoint(in any) *pbgear.Multisig_PalletMultisigTimepoint { + return nil //funcForOptionalField +} +func To_Multisig_ApproveAsMultiCall_max_weight(in any) *pbgear.SpWeightsWeightV2Weight { + v := in.(registry.Valuable) + return To_SpWeightsWeightV2Weight(v.ValueAt(0) //simple field +} - func To_Multisig_AsMultiCall(in registry.DecodedFields) *pbgear.Multisig_AsMultiCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Multisig_AsMultiCall(in any) *pbgear.Multisig_AsMultiCall { out := &pbgear.Multisig_AsMultiCall{} - out.Threshold = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.OtherSignatories = To_repeated_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.MaybeTimepoint = To_optional_Multisig_PalletMultisigTimepoint(fields[2].Value.(registry.DecodedFields)) - - - switch { - case matchFields(fields, []int64{66}): - out.Call = &pbgear.Multisig_AsMultiCall_SystemRemark{ - SystemRemark: To_System_RemarkCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{70}): - out.Call = &pbgear.Multisig_AsMultiCall_SystemSetHeapPages{ - SystemSetHeapPages: To_System_SetHeapPagesCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{71}): - out.Call = &pbgear.Multisig_AsMultiCall_SystemSetCode{ - SystemSetCode: To_System_SetCodeCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{81}): - out.Call = &pbgear.Multisig_AsMultiCall_SystemSetCodeWithoutChecks{ - SystemSetCodeWithoutChecks: To_System_SetCodeWithoutChecksCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{93}): - out.Call = &pbgear.Multisig_AsMultiCall_SystemSetStorage{ - SystemSetStorage: To_System_SetStorageCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{98}): - out.Call = &pbgear.Multisig_AsMultiCall_SystemKillStorage{ - SystemKillStorage: To_System_KillStorageCall(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // primitive field Threshold + out.Threshold = To_uint32(v.ValueAt(0)) + // repeated field OtherSignatories + out.OtherSignatories = To_Repeated_Multisig_AsMultiCall_other_signatories(v.ValueAt(1)) + // optional field MaybeTimepoint + out.MaybeTimepoint = To_Optional_Multisig_AsMultiCall_maybe_timepoint(v.ValueAt(2)) + // oneOf field Call + v3 := To_OneOf_Multisig_AsMultiCall_call(v.ValueAt(3)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v3)) + // field MaxWeight + out.MaxWeight = To_Multisig_AsMultiCall_max_weight(v.ValueAt(4)) + + return out //from message +} + + +func To_Repeated_Multisig_AsMultiCall_other_signatories(in any) []*pbgear.SpCoreCryptoAccountId32 { + items := in.([]interface{}) + + var out []*pbgear.SpCoreCryptoAccountId32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_SpCoreCryptoAccountId32(w) + out = append(out, o) + } + return nil //funcForRepeatedField +} +func To_Optional_Multisig_AsMultiCall_maybe_timepoint(in any) *pbgear.Multisig_PalletMultisigTimepoint { + return nil //funcForOptionalField +} +func To_OneOf_Multisig_AsMultiCall_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Multisig_AsMultiCall_System{ + System: To_SystemPallet(param), + } + case 1: + return &pbgear.Multisig_AsMultiCall_Timestamp{ + Timestamp: To_TimestampPallet(param), + } + case 3: + return &pbgear.Multisig_AsMultiCall_Babe{ + Babe: To_BabePallet(param), + } + case 4: + return &pbgear.Multisig_AsMultiCall_Grandpa{ + Grandpa: To_GrandpaPallet(param), } - case matchFields(fields, []int64{100}): - out.Call = &pbgear.Multisig_AsMultiCall_SystemKillPrefix{ - SystemKillPrefix: To_System_KillPrefixCall(fields), //Passthrough fields... + case 5: + return &pbgear.Multisig_AsMultiCall_Balances{ + Balances: To_BalancesPallet(param), } - case matchFields(fields, []int64{101}): - out.Call = &pbgear.Multisig_AsMultiCall_SystemRemarkWithEvent{ - SystemRemarkWithEvent: To_System_RemarkWithEventCall(fields), //Passthrough fields... + case 10: + return &pbgear.Multisig_AsMultiCall_Vesting{ + Vesting: To_VestingPallet(param), } - case matchFields(fields, []int64{105}): - out.Call = &pbgear.Multisig_AsMultiCall_TimestampSet{ - TimestampSet: To_Timestamp_SetCall(fields), //Passthrough fields... + case 11: + return &pbgear.Multisig_AsMultiCall_BagsList{ + BagsList: To_BagsListPallet(param), } - case matchFields(fields, []int64{113}): - out.Call = &pbgear.Multisig_AsMultiCall_BabeReportEquivocation{ - BabeReportEquivocation: To_Babe_ReportEquivocationCall(fields), //Passthrough fields... + case 12: + return &pbgear.Multisig_AsMultiCall_ImOnline{ + ImOnline: To_ImOnlinePallet(param), } - case matchFields(fields, []int64{116}): - out.Call = &pbgear.Multisig_AsMultiCall_BabeReportEquivocationUnsigned{ - BabeReportEquivocationUnsigned: To_Babe_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 13: + return &pbgear.Multisig_AsMultiCall_Staking{ + Staking: To_StakingPallet(param), } - case matchFields(fields, []int64{118}): - out.Call = &pbgear.Multisig_AsMultiCall_BabePlanConfigChange{ - BabePlanConfigChange: To_Babe_PlanConfigChangeCall(fields), //Passthrough fields... + case 7: + return &pbgear.Multisig_AsMultiCall_Session{ + Session: To_SessionPallet(param), } - case matchFields(fields, []int64{124}): - out.Call = &pbgear.Multisig_AsMultiCall_GrandpaReportEquivocation{ - GrandpaReportEquivocation: To_Grandpa_ReportEquivocationCall(fields), //Passthrough fields... + case 14: + return &pbgear.Multisig_AsMultiCall_Treasury{ + Treasury: To_TreasuryPallet(param), } - case matchFields(fields, []int64{129}): - out.Call = &pbgear.Multisig_AsMultiCall_GrandpaReportEquivocationUnsigned{ - GrandpaReportEquivocationUnsigned: To_Grandpa_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 8: + return &pbgear.Multisig_AsMultiCall_Utility{ + Utility: To_UtilityPallet(param), } - case matchFields(fields, []int64{132}): - out.Call = &pbgear.Multisig_AsMultiCall_GrandpaNoteStalled{ - GrandpaNoteStalled: To_Grandpa_NoteStalledCall(fields), //Passthrough fields... + case 16: + return &pbgear.Multisig_AsMultiCall_ConvictionVoting{ + ConvictionVoting: To_ConvictionVotingPallet(param), } - case matchFields(fields, []int64{133}): - out.Call = &pbgear.Multisig_AsMultiCall_BalancesTransferAllowDeath{ - BalancesTransferAllowDeath: To_Balances_TransferAllowDeathCall(fields), //Passthrough fields... + case 17: + return &pbgear.Multisig_AsMultiCall_Referenda{ + Referenda: To_ReferendaPallet(param), } - case matchFields(fields, []int64{134}): - out.Call = &pbgear.Multisig_AsMultiCall_BalancesForceTransfer{ - BalancesForceTransfer: To_Balances_ForceTransferCall(fields), //Passthrough fields... + case 18: + return &pbgear.Multisig_AsMultiCall_FellowshipCollective{ + FellowshipCollective: To_FellowshipCollectivePallet(param), } - case matchFields(fields, []int64{135}): - out.Call = &pbgear.Multisig_AsMultiCall_BalancesTransferKeepAlive{ - BalancesTransferKeepAlive: To_Balances_TransferKeepAliveCall(fields), //Passthrough fields... + case 19: + return &pbgear.Multisig_AsMultiCall_FellowshipReferenda{ + FellowshipReferenda: To_FellowshipReferendaPallet(param), } - case matchFields(fields, []int64{138}): - out.Call = &pbgear.Multisig_AsMultiCall_BalancesTransferAll{ - BalancesTransferAll: To_Balances_TransferAllCall(fields), //Passthrough fields... + case 21: + return &pbgear.Multisig_AsMultiCall_Whitelist{ + Whitelist: To_WhitelistPallet(param), } - case matchFields(fields, []int64{140}): - out.Call = &pbgear.Multisig_AsMultiCall_BalancesForceUnreserve{ - BalancesForceUnreserve: To_Balances_ForceUnreserveCall(fields), //Passthrough fields... + case 22: + return &pbgear.Multisig_AsMultiCall_Scheduler{ + Scheduler: To_SchedulerPallet(param), } - case matchFields(fields, []int64{182}): - out.Call = &pbgear.Multisig_AsMultiCall_BalancesUpgradeAccounts{ - BalancesUpgradeAccounts: To_Balances_UpgradeAccountsCall(fields), //Passthrough fields... + case 23: + return &pbgear.Multisig_AsMultiCall_Preimage{ + Preimage: To_PreimagePallet(param), } - case matchFields(fields, []int64{185}): - out.Call = &pbgear.Multisig_AsMultiCall_BalancesForceSetBalance{ - BalancesForceSetBalance: To_Balances_ForceSetBalanceCall(fields), //Passthrough fields... + case 24: + return &pbgear.Multisig_AsMultiCall_Identity{ + Identity: To_IdentityPallet(param), } - case matchFields(fields, []int64{188}): - out.Call = &pbgear.Multisig_AsMultiCall_VestingVest{ - VestingVest: To_Vesting_VestCall(fields), //Passthrough fields... + case 25: + return &pbgear.Multisig_AsMultiCall_Proxy{ + Proxy: To_ProxyPallet(param), } - case matchFields(fields, []int64{249}): - out.Call = &pbgear.Multisig_AsMultiCall_VestingVestOther{ - VestingVestOther: To_Vesting_VestOtherCall(fields), //Passthrough fields... + case 26: + return &pbgear.Multisig_AsMultiCall_Multisig{ + Multisig: To_MultisigPallet(param), } - case matchFields(fields, []int64{250}): - out.Call = &pbgear.Multisig_AsMultiCall_VestingVestedTransfer{ - VestingVestedTransfer: To_Vesting_VestedTransferCall(fields), //Passthrough fields... + case 27: + return &pbgear.Multisig_AsMultiCall_ElectionProviderMultiPhase{ + ElectionProviderMultiPhase: To_ElectionProviderMultiPhasePallet(param), } - case matchFields(fields, []int64{251}): - out.Call = &pbgear.Multisig_AsMultiCall_VestingForceVestedTransfer{ - VestingForceVestedTransfer: To_Vesting_ForceVestedTransferCall(fields), //Passthrough fields... + case 29: + return &pbgear.Multisig_AsMultiCall_Bounties{ + Bounties: To_BountiesPallet(param), } - case matchFields(fields, []int64{262}): - out.Call = &pbgear.Multisig_AsMultiCall_VestingMergeSchedules{ - VestingMergeSchedules: To_Vesting_MergeSchedulesCall(fields), //Passthrough fields... + case 30: + return &pbgear.Multisig_AsMultiCall_ChildBounties{ + ChildBounties: To_ChildBountiesPallet(param), } - case matchFields(fields, []int64{267}): - out.Call = &pbgear.Multisig_AsMultiCall_BagsListRebag{ - BagsListRebag: To_BagsList_RebagCall(fields), //Passthrough fields... + case 31: + return &pbgear.Multisig_AsMultiCall_NominationPools{ + NominationPools: To_NominationPoolsPallet(param), } - case matchFields(fields, []int64{268}): - out.Call = &pbgear.Multisig_AsMultiCall_BagsListPutInFrontOf{ - BagsListPutInFrontOf: To_BagsList_PutInFrontOfCall(fields), //Passthrough fields... + case 104: + return &pbgear.Multisig_AsMultiCall_Gear{ + Gear: To_GearPallet(param), } + case 106: + return &pbgear.Multisig_AsMultiCall_StakingRewards{ + StakingRewards: To_StakingRewardsPallet(param), + } + case 107: + return &pbgear.Multisig_AsMultiCall_GearVoucher{ + GearVoucher: To_GearVoucherPallet(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - out.MaxWeight = To_SpWeightsWeightV2Weight(fields[4].Value.(registry.DecodedFields)) - - return out +} +func To_Multisig_AsMultiCall_max_weight(in any) *pbgear.SpWeightsWeightV2Weight { + v := in.(registry.Valuable) + return To_SpWeightsWeightV2Weight(v.ValueAt(0) //simple field } - func To_Multisig_AsMultiThreshold1Call(in registry.DecodedFields) *pbgear.Multisig_AsMultiThreshold1Call { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Multisig_AsMultiThreshold1Call(in any) *pbgear.Multisig_AsMultiThreshold1Call { out := &pbgear.Multisig_AsMultiThreshold1Call{} - out.OtherSignatories = To_repeated_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - - switch { - case matchFields(fields, []int64{66}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_SystemRemark{ - SystemRemark: To_System_RemarkCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{70}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_SystemSetHeapPages{ - SystemSetHeapPages: To_System_SetHeapPagesCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{71}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_SystemSetCode{ - SystemSetCode: To_System_SetCodeCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{81}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_SystemSetCodeWithoutChecks{ - SystemSetCodeWithoutChecks: To_System_SetCodeWithoutChecksCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{93}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_SystemSetStorage{ - SystemSetStorage: To_System_SetStorageCall(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // repeated field OtherSignatories + out.OtherSignatories = To_Repeated_Multisig_AsMultiThreshold1Call_other_signatories(v.ValueAt(0)) + // oneOf field Call + v1 := To_OneOf_Multisig_AsMultiThreshold1Call_call(v.ValueAt(1)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v1)) + + return out //from message +} + + +func To_Repeated_Multisig_AsMultiThreshold1Call_other_signatories(in any) []*pbgear.SpCoreCryptoAccountId32 { + items := in.([]interface{}) + + var out []*pbgear.SpCoreCryptoAccountId32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_SpCoreCryptoAccountId32(w) + out = append(out, o) + } + return nil //funcForRepeatedField +} +func To_OneOf_Multisig_AsMultiThreshold1Call_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Multisig_AsMultiThreshold1Call_System{ + System: To_SystemPallet(param), + } + case 1: + return &pbgear.Multisig_AsMultiThreshold1Call_Timestamp{ + Timestamp: To_TimestampPallet(param), } - case matchFields(fields, []int64{98}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_SystemKillStorage{ - SystemKillStorage: To_System_KillStorageCall(fields), //Passthrough fields... + case 3: + return &pbgear.Multisig_AsMultiThreshold1Call_Babe{ + Babe: To_BabePallet(param), } - case matchFields(fields, []int64{100}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_SystemKillPrefix{ - SystemKillPrefix: To_System_KillPrefixCall(fields), //Passthrough fields... + case 4: + return &pbgear.Multisig_AsMultiThreshold1Call_Grandpa{ + Grandpa: To_GrandpaPallet(param), } - case matchFields(fields, []int64{101}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_SystemRemarkWithEvent{ - SystemRemarkWithEvent: To_System_RemarkWithEventCall(fields), //Passthrough fields... + case 5: + return &pbgear.Multisig_AsMultiThreshold1Call_Balances{ + Balances: To_BalancesPallet(param), } - case matchFields(fields, []int64{105}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_TimestampSet{ - TimestampSet: To_Timestamp_SetCall(fields), //Passthrough fields... + case 10: + return &pbgear.Multisig_AsMultiThreshold1Call_Vesting{ + Vesting: To_VestingPallet(param), } - case matchFields(fields, []int64{113}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_BabeReportEquivocation{ - BabeReportEquivocation: To_Babe_ReportEquivocationCall(fields), //Passthrough fields... + case 11: + return &pbgear.Multisig_AsMultiThreshold1Call_BagsList{ + BagsList: To_BagsListPallet(param), } - case matchFields(fields, []int64{116}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_BabeReportEquivocationUnsigned{ - BabeReportEquivocationUnsigned: To_Babe_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 12: + return &pbgear.Multisig_AsMultiThreshold1Call_ImOnline{ + ImOnline: To_ImOnlinePallet(param), } - case matchFields(fields, []int64{118}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_BabePlanConfigChange{ - BabePlanConfigChange: To_Babe_PlanConfigChangeCall(fields), //Passthrough fields... + case 13: + return &pbgear.Multisig_AsMultiThreshold1Call_Staking{ + Staking: To_StakingPallet(param), } - case matchFields(fields, []int64{124}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_GrandpaReportEquivocation{ - GrandpaReportEquivocation: To_Grandpa_ReportEquivocationCall(fields), //Passthrough fields... + case 7: + return &pbgear.Multisig_AsMultiThreshold1Call_Session{ + Session: To_SessionPallet(param), } - case matchFields(fields, []int64{129}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_GrandpaReportEquivocationUnsigned{ - GrandpaReportEquivocationUnsigned: To_Grandpa_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 14: + return &pbgear.Multisig_AsMultiThreshold1Call_Treasury{ + Treasury: To_TreasuryPallet(param), } - case matchFields(fields, []int64{132}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_GrandpaNoteStalled{ - GrandpaNoteStalled: To_Grandpa_NoteStalledCall(fields), //Passthrough fields... + case 8: + return &pbgear.Multisig_AsMultiThreshold1Call_Utility{ + Utility: To_UtilityPallet(param), } - case matchFields(fields, []int64{133}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_BalancesTransferAllowDeath{ - BalancesTransferAllowDeath: To_Balances_TransferAllowDeathCall(fields), //Passthrough fields... + case 16: + return &pbgear.Multisig_AsMultiThreshold1Call_ConvictionVoting{ + ConvictionVoting: To_ConvictionVotingPallet(param), } - case matchFields(fields, []int64{134}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_BalancesForceTransfer{ - BalancesForceTransfer: To_Balances_ForceTransferCall(fields), //Passthrough fields... + case 17: + return &pbgear.Multisig_AsMultiThreshold1Call_Referenda{ + Referenda: To_ReferendaPallet(param), } - case matchFields(fields, []int64{135}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_BalancesTransferKeepAlive{ - BalancesTransferKeepAlive: To_Balances_TransferKeepAliveCall(fields), //Passthrough fields... + case 18: + return &pbgear.Multisig_AsMultiThreshold1Call_FellowshipCollective{ + FellowshipCollective: To_FellowshipCollectivePallet(param), } - case matchFields(fields, []int64{138}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_BalancesTransferAll{ - BalancesTransferAll: To_Balances_TransferAllCall(fields), //Passthrough fields... + case 19: + return &pbgear.Multisig_AsMultiThreshold1Call_FellowshipReferenda{ + FellowshipReferenda: To_FellowshipReferendaPallet(param), } - case matchFields(fields, []int64{140}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_BalancesForceUnreserve{ - BalancesForceUnreserve: To_Balances_ForceUnreserveCall(fields), //Passthrough fields... + case 21: + return &pbgear.Multisig_AsMultiThreshold1Call_Whitelist{ + Whitelist: To_WhitelistPallet(param), } - case matchFields(fields, []int64{182}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_BalancesUpgradeAccounts{ - BalancesUpgradeAccounts: To_Balances_UpgradeAccountsCall(fields), //Passthrough fields... + case 22: + return &pbgear.Multisig_AsMultiThreshold1Call_Scheduler{ + Scheduler: To_SchedulerPallet(param), } - case matchFields(fields, []int64{185}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_BalancesForceSetBalance{ - BalancesForceSetBalance: To_Balances_ForceSetBalanceCall(fields), //Passthrough fields... + case 23: + return &pbgear.Multisig_AsMultiThreshold1Call_Preimage{ + Preimage: To_PreimagePallet(param), } - case matchFields(fields, []int64{188}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_VestingVest{ - VestingVest: To_Vesting_VestCall(fields), //Passthrough fields... + case 24: + return &pbgear.Multisig_AsMultiThreshold1Call_Identity{ + Identity: To_IdentityPallet(param), } - case matchFields(fields, []int64{249}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_VestingVestOther{ - VestingVestOther: To_Vesting_VestOtherCall(fields), //Passthrough fields... + case 25: + return &pbgear.Multisig_AsMultiThreshold1Call_Proxy{ + Proxy: To_ProxyPallet(param), } - case matchFields(fields, []int64{250}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_VestingVestedTransfer{ - VestingVestedTransfer: To_Vesting_VestedTransferCall(fields), //Passthrough fields... + case 26: + return &pbgear.Multisig_AsMultiThreshold1Call_Multisig{ + Multisig: To_MultisigPallet(param), } - case matchFields(fields, []int64{251}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_VestingForceVestedTransfer{ - VestingForceVestedTransfer: To_Vesting_ForceVestedTransferCall(fields), //Passthrough fields... + case 27: + return &pbgear.Multisig_AsMultiThreshold1Call_ElectionProviderMultiPhase{ + ElectionProviderMultiPhase: To_ElectionProviderMultiPhasePallet(param), } - case matchFields(fields, []int64{262}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_VestingMergeSchedules{ - VestingMergeSchedules: To_Vesting_MergeSchedulesCall(fields), //Passthrough fields... + case 29: + return &pbgear.Multisig_AsMultiThreshold1Call_Bounties{ + Bounties: To_BountiesPallet(param), } - case matchFields(fields, []int64{267}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_BagsListRebag{ - BagsListRebag: To_BagsList_RebagCall(fields), //Passthrough fields... + case 30: + return &pbgear.Multisig_AsMultiThreshold1Call_ChildBounties{ + ChildBounties: To_ChildBountiesPallet(param), } - case matchFields(fields, []int64{268}): - out.Call = &pbgear.Multisig_AsMultiThreshold1Call_BagsListPutInFrontOf{ - BagsListPutInFrontOf: To_BagsList_PutInFrontOfCall(fields), //Passthrough fields... + case 31: + return &pbgear.Multisig_AsMultiThreshold1Call_NominationPools{ + NominationPools: To_NominationPoolsPallet(param), } + case 104: + return &pbgear.Multisig_AsMultiThreshold1Call_Gear{ + Gear: To_GearPallet(param), + } + case 106: + return &pbgear.Multisig_AsMultiThreshold1Call_StakingRewards{ + StakingRewards: To_StakingRewardsPallet(param), + } + case 107: + return &pbgear.Multisig_AsMultiThreshold1Call_GearVoucher{ + GearVoucher: To_GearVoucherPallet(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Multisig_CancelAsMultiCall(in registry.DecodedFields) *pbgear.Multisig_CancelAsMultiCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Multisig_CancelAsMultiCall(in any) *pbgear.Multisig_CancelAsMultiCall { out := &pbgear.Multisig_CancelAsMultiCall{} - out.Threshold = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.OtherSignatories = To_repeated_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.Timepoint = To_Multisig_PalletMultisigTimepoint(fields[2].Value.(registry.DecodedFields)) - - out.CallHash = To_bytes(fields[3].Value.([]interface{})) - return out -} - - func To_Multisig_Err(in registry.DecodedFields) *pbgear.Multisig_Err { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Multisig_Err{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out -} - - func To_Multisig_MultisigApprovalEvent(in registry.DecodedFields) *pbgear.Multisig_MultisigApprovalEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Multisig_MultisigApprovalEvent{} - out.Approving = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Timepoint = To_Multisig_PalletMultisigTimepoint(fields[1].Value.(registry.DecodedFields)) - - out.Multisig = To_SpCoreCryptoAccountId32(fields[2].Value.(registry.DecodedFields)) - - out.CallHash = To_bytes(fields[3].Value.([]interface{})) - return out -} - - func To_Multisig_MultisigCancelledEvent(in registry.DecodedFields) *pbgear.Multisig_MultisigCancelledEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Multisig_MultisigCancelledEvent{} - out.Cancelling = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Timepoint = To_Multisig_PalletMultisigTimepoint(fields[1].Value.(registry.DecodedFields)) - - out.Multisig = To_SpCoreCryptoAccountId32(fields[2].Value.(registry.DecodedFields)) - - out.CallHash = To_bytes(fields[3].Value.([]interface{})) - return out -} - - func To_Multisig_MultisigExecutedEvent(in registry.DecodedFields) *pbgear.Multisig_MultisigExecutedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Multisig_MultisigExecutedEvent{} - out.Approving = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Timepoint = To_Multisig_PalletMultisigTimepoint(fields[1].Value.(registry.DecodedFields)) - - out.Multisig = To_SpCoreCryptoAccountId32(fields[2].Value.(registry.DecodedFields)) - - out.CallHash = To_bytes(fields[3].Value.([]interface{})) - out.Result = To_Multisig_Result(fields[4].Value.(registry.DecodedFields)) - - return out -} - - func To_Multisig_NewMultisigEvent(in registry.DecodedFields) *pbgear.Multisig_NewMultisigEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Multisig_NewMultisigEvent{} - out.Approving = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Multisig = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.CallHash = To_bytes(fields[2].Value.([]interface{})) - return out -} - - func To_Multisig_Ok(in registry.DecodedFields) *pbgear.Multisig_Ok { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Multisig_Ok{} - out.Value0 = To_Multisig_TupleNull(fields[0].Value.(registry.DecodedFields)) - - return out -} - - func To_Multisig_PalletMultisigTimepoint(in registry.DecodedFields) *pbgear.Multisig_PalletMultisigTimepoint { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Multisig_PalletMultisigTimepoint{} - out.Height = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Index = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Threshold + out.Threshold = To_uint32(v.ValueAt(0)) + // repeated field OtherSignatories + out.OtherSignatories = To_Repeated_Multisig_CancelAsMultiCall_other_signatories(v.ValueAt(1)) + // field Timepoint + out.Timepoint = To_Multisig_CancelAsMultiCall_timepoint(v.ValueAt(2)) + // primitive field CallHash + out.CallHash = To_bytes(v.ValueAt(3)) - func To_Multisig_Result(in registry.DecodedFields) *pbgear.Multisig_Result { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Multisig_Result{} - - switch { - case matchFields(fields, []int64{58}): - out.Value = &pbgear.Multisig_Result_Ok{ - Ok: To_Multisig_Ok(fields), //Passthrough fields... - } - case matchFields(fields, []int64{25}): - out.Value = &pbgear.Multisig_Result_Err{ - Err: To_Multisig_Err(fields), //Passthrough fields... - } + +func To_Repeated_Multisig_CancelAsMultiCall_other_signatories(in any) []*pbgear.SpCoreCryptoAccountId32 { + items := in.([]interface{}) + + var out []*pbgear.SpCoreCryptoAccountId32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_SpCoreCryptoAccountId32(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } - - func To_Multisig_TupleNull(in registry.DecodedFields) *pbgear.Multisig_TupleNull { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Multisig_TupleNull{} - return out +func To_Multisig_CancelAsMultiCall_timepoint(in any) *pbgear.Multisig_PalletMultisigTimepoint { + v := in.(registry.Valuable) + return To_Multisig_PalletMultisigTimepoint(v.ValueAt(0) //simple field } - func To_No(in registry.DecodedFields) *pbgear.No { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.No{} - return out + +func To_Multisig_PalletMultisigTimepoint(in any) *pbgear.Multisig_PalletMultisigTimepoint { + out := &pbgear.Multisig_PalletMultisigTimepoint{} + v := in.(registry.Valuable) + _ = v + + // primitive field Height + out.Height = To_uint32(v.ValueAt(0)) + // primitive field Index + out.Index = To_uint32(v.ValueAt(1)) + + return out //from message } + + + +func To_NominationPoolsPallet(in any) *pbgear.NominationPoolsPallet { + out := &pbgear.NominationPoolsPallet{} + v := in.(registry.Valuable) + _ = v - func To_NoProviders(in registry.DecodedFields) *pbgear.NoProviders { + // oneOf field Call + v0 := To_OneOf_NominationPoolsPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NoProviders{} - return out +func To_OneOf_NominationPoolsPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPoolsPallet_JoinCall{ + JoinCall: To_NominationPools_JoinCall(param), + } + case 1: + return &pbgear.NominationPoolsPallet_BondExtraCall{ + BondExtraCall: To_NominationPools_BondExtraCall(param), + } + case 2: + return &pbgear.NominationPoolsPallet_ClaimPayoutCall{ + ClaimPayoutCall: To_NominationPools_ClaimPayoutCall(param), + } + case 3: + return &pbgear.NominationPoolsPallet_UnbondCall{ + UnbondCall: To_NominationPools_UnbondCall(param), + } + case 4: + return &pbgear.NominationPoolsPallet_PoolWithdrawUnbondedCall{ + PoolWithdrawUnbondedCall: To_NominationPools_PoolWithdrawUnbondedCall(param), + } + case 5: + return &pbgear.NominationPoolsPallet_WithdrawUnbondedCall{ + WithdrawUnbondedCall: To_NominationPools_WithdrawUnbondedCall(param), + } + case 6: + return &pbgear.NominationPoolsPallet_CreateCall{ + CreateCall: To_NominationPools_CreateCall(param), + } + case 7: + return &pbgear.NominationPoolsPallet_CreateWithPoolIdCall{ + CreateWithPoolIdCall: To_NominationPools_CreateWithPoolIdCall(param), + } + case 8: + return &pbgear.NominationPoolsPallet_NominateCall{ + NominateCall: To_NominationPools_NominateCall(param), + } + case 9: + return &pbgear.NominationPoolsPallet_SetStateCall{ + SetStateCall: To_NominationPools_SetStateCall(param), + } + case 10: + return &pbgear.NominationPoolsPallet_SetMetadataCall{ + SetMetadataCall: To_NominationPools_SetMetadataCall(param), + } + case 11: + return &pbgear.NominationPoolsPallet_SetConfigsCall{ + SetConfigsCall: To_NominationPools_SetConfigsCall(param), + } + case 12: + return &pbgear.NominationPoolsPallet_UpdateRolesCall{ + UpdateRolesCall: To_NominationPools_UpdateRolesCall(param), + } + case 13: + return &pbgear.NominationPoolsPallet_ChillCall{ + ChillCall: To_NominationPools_ChillCall(param), + } + case 14: + return &pbgear.NominationPoolsPallet_BondExtraOtherCall{ + BondExtraOtherCall: To_NominationPools_BondExtraOtherCall(param), + } + case 15: + return &pbgear.NominationPoolsPallet_SetClaimPermissionCall{ + SetClaimPermissionCall: To_NominationPools_SetClaimPermissionCall(param), + } + case 16: + return &pbgear.NominationPoolsPallet_ClaimPayoutOtherCall{ + ClaimPayoutOtherCall: To_NominationPools_ClaimPayoutOtherCall(param), + } + case 17: + return &pbgear.NominationPoolsPallet_SetCommissionCall{ + SetCommissionCall: To_NominationPools_SetCommissionCall(param), + } + case 18: + return &pbgear.NominationPoolsPallet_SetCommissionMaxCall{ + SetCommissionMaxCall: To_NominationPools_SetCommissionMaxCall(param), + } + case 19: + return &pbgear.NominationPoolsPallet_SetCommissionChangeRateCall{ + SetCommissionChangeRateCall: To_NominationPools_SetCommissionChangeRateCall(param), + } + case 20: + return &pbgear.NominationPoolsPallet_ClaimCommissionCall{ + ClaimCommissionCall: To_NominationPools_ClaimCommissionCall(param), + } + case 21: + return &pbgear.NominationPoolsPallet_AdjustPoolDepositCall{ + AdjustPoolDepositCall: To_NominationPools_AdjustPoolDepositCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } } - func To_NominationPools_Address20(in registry.DecodedFields) *pbgear.NominationPools_Address20 { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_NominationPools_Address20(in any) *pbgear.NominationPools_Address20 { out := &pbgear.NominationPools_Address20{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_NominationPools_Address32(in registry.DecodedFields) *pbgear.NominationPools_Address32 { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_Address32(in any) *pbgear.NominationPools_Address32 { out := &pbgear.NominationPools_Address32{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v - func To_NominationPools_AdjustPoolDepositCall(in registry.DecodedFields) *pbgear.NominationPools_AdjustPoolDepositCall { + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_AdjustPoolDepositCall(in any) *pbgear.NominationPools_AdjustPoolDepositCall { out := &pbgear.NominationPools_AdjustPoolDepositCall{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field PoolId + out.PoolId = To_uint32(v.ValueAt(0)) - func To_NominationPools_Blocked(in registry.DecodedFields) *pbgear.NominationPools_Blocked { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_Blocked(in any) *pbgear.NominationPools_Blocked { out := &pbgear.NominationPools_Blocked{} - return out -} + v := in.(registry.Valuable) + _ = v - func To_NominationPools_BondExtraCall(in registry.DecodedFields) *pbgear.NominationPools_BondExtraCall { + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_BondExtraCall(in any) *pbgear.NominationPools_BondExtraCall { out := &pbgear.NominationPools_BondExtraCall{} - out.Extra = To_NominationPools_Extra(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field Extra + out.Extra = To_NominationPools_BondExtraCall_extra(v.ValueAt(0)) - func To_NominationPools_BondExtraOtherCall(in registry.DecodedFields) *pbgear.NominationPools_BondExtraOtherCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_BondExtraOtherCall{} - out.Member = To_NominationPools_Member(fields[0].Value.(registry.DecodedFields)) - - out.Extra = To_NominationPools_Extra(fields[1].Value.(registry.DecodedFields)) - - return out +func To_NominationPools_BondExtraCall_extra(in any) *pbgear.NominationPools_Extra { + v := in.(registry.Valuable) + return To_NominationPools_Extra(v.ValueAt(0) //simple field } - func To_NominationPools_BondedEvent(in registry.DecodedFields) *pbgear.NominationPools_BondedEvent { + +func To_NominationPools_BondExtraOtherCall(in any) *pbgear.NominationPools_BondExtraOtherCall { + out := &pbgear.NominationPools_BondExtraOtherCall{} + v := in.(registry.Valuable) + _ = v + + // field Member + out.Member = To_NominationPools_BondExtraOtherCall_member(v.ValueAt(0)) + // field Extra + out.Extra = To_NominationPools_BondExtraOtherCall_extra(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_BondedEvent{} - out.Member = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.PoolId = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.Bonded = To_string(fields[2].Value.(registry.DecodedFields)) - - out.Joined = To_bool(fields[3].Value.(registry.DecodedFields)) - - return out +func To_NominationPools_BondExtraOtherCall_member(in any) *pbgear.NominationPools_Member { + v := in.(registry.Valuable) + return To_NominationPools_Member(v.ValueAt(0) //simple field +} +func To_NominationPools_BondExtraOtherCall_extra(in any) *pbgear.NominationPools_Extra { + v := in.(registry.Valuable) + return To_NominationPools_Extra(v.ValueAt(0) //simple field } - func To_NominationPools_Bouncer(in registry.DecodedFields) *pbgear.NominationPools_Bouncer { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_NominationPools_Bouncer(in any) *pbgear.NominationPools_Bouncer { out := &pbgear.NominationPools_Bouncer{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.NominationPools_Bouncer_Id{ - Id: To_NominationPools_Id(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_NominationPools_Bouncer_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_NominationPools_Bouncer_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPools_Bouncer_Id{ + Id: To_NominationPools_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.NominationPools_Bouncer_Index{ - Index: To_NominationPools_Index(fields), //Passthrough fields... + case 1: + return &pbgear.NominationPools_Bouncer_Index{ + Index: To_NominationPools_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.NominationPools_Bouncer_Raw{ - Raw: To_NominationPools_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.NominationPools_Bouncer_Raw{ + Raw: To_NominationPools_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.NominationPools_Bouncer_Address32{ - Address32: To_NominationPools_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.NominationPools_Bouncer_Address32{ + Address32: To_NominationPools_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.NominationPools_Bouncer_Address20{ - Address20: To_NominationPools_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.NominationPools_Bouncer_Address20{ + Address20: To_NominationPools_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_NominationPools_ChillCall(in registry.DecodedFields) *pbgear.NominationPools_ChillCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_NominationPools_ChillCall(in any) *pbgear.NominationPools_ChillCall { out := &pbgear.NominationPools_ChillCall{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_NominationPools_ClaimCommissionCall(in registry.DecodedFields) *pbgear.NominationPools_ClaimCommissionCall { + // primitive field PoolId + out.PoolId = To_uint32(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_ClaimCommissionCall(in any) *pbgear.NominationPools_ClaimCommissionCall { out := &pbgear.NominationPools_ClaimCommissionCall{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field PoolId + out.PoolId = To_uint32(v.ValueAt(0)) - func To_NominationPools_ClaimPayoutCall(in registry.DecodedFields) *pbgear.NominationPools_ClaimPayoutCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_ClaimPayoutCall(in any) *pbgear.NominationPools_ClaimPayoutCall { out := &pbgear.NominationPools_ClaimPayoutCall{} - return out -} + v := in.(registry.Valuable) + _ = v - func To_NominationPools_ClaimPayoutOtherCall(in registry.DecodedFields) *pbgear.NominationPools_ClaimPayoutOtherCall { + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_ClaimPayoutOtherCall(in any) *pbgear.NominationPools_ClaimPayoutOtherCall { out := &pbgear.NominationPools_ClaimPayoutOtherCall{} - out.Other = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field Other + out.Other = To_NominationPools_ClaimPayoutOtherCall_other(v.ValueAt(0)) - func To_NominationPools_CompactTupleNull(in types.UCompact) *pbgear.NominationPools_CompactTupleNull { + return out //from message +} - out := &pbgear.NominationPools_CompactTupleNull{} - out.Value = To_TupleNull() - return out +func To_NominationPools_ClaimPayoutOtherCall_other(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_NominationPools_CreateCall(in registry.DecodedFields) *pbgear.NominationPools_CreateCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_NominationPools_CreateCall(in any) *pbgear.NominationPools_CreateCall { out := &pbgear.NominationPools_CreateCall{} - out.Amount = To_CompactString(fields[0].Value.(types.UCompact)) - - out.Root = To_NominationPools_Root(fields[1].Value.(registry.DecodedFields)) - - out.Nominator = To_NominationPools_Nominator(fields[2].Value.(registry.DecodedFields)) - - out.Bouncer = To_NominationPools_Bouncer(fields[3].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_NominationPools_CreateWithPoolIdCall(in registry.DecodedFields) *pbgear.NominationPools_CreateWithPoolIdCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_CreateWithPoolIdCall{} - out.Amount = To_CompactString(fields[0].Value.(types.UCompact)) - - out.Root = To_NominationPools_Root(fields[1].Value.(registry.DecodedFields)) - - out.Nominator = To_NominationPools_Nominator(fields[2].Value.(registry.DecodedFields)) - - out.Bouncer = To_NominationPools_Bouncer(fields[3].Value.(registry.DecodedFields)) - - out.PoolId = To_uint32(fields[4].Value.(registry.DecodedFields)) - - return out -} + // primitive field Amount + out.Amount = To_string(v.ValueAt(0)) + // field Root + out.Root = To_NominationPools_CreateCall_root(v.ValueAt(1)) + // field Nominator + out.Nominator = To_NominationPools_CreateCall_nominator(v.ValueAt(2)) + // field Bouncer + out.Bouncer = To_NominationPools_CreateCall_bouncer(v.ValueAt(3)) - func To_NominationPools_CreatedEvent(in registry.DecodedFields) *pbgear.NominationPools_CreatedEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_CreatedEvent{} - out.Depositor = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.PoolId = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out +func To_NominationPools_CreateCall_root(in any) *pbgear.NominationPools_Root { + v := in.(registry.Valuable) + return To_NominationPools_Root(v.ValueAt(0) //simple field } +func To_NominationPools_CreateCall_nominator(in any) *pbgear.NominationPools_Nominator { + v := in.(registry.Valuable) + return To_NominationPools_Nominator(v.ValueAt(0) //simple field +} +func To_NominationPools_CreateCall_bouncer(in any) *pbgear.NominationPools_Bouncer { + v := in.(registry.Valuable) + return To_NominationPools_Bouncer(v.ValueAt(0) //simple field +} + + +func To_NominationPools_CreateWithPoolIdCall(in any) *pbgear.NominationPools_CreateWithPoolIdCall { + out := &pbgear.NominationPools_CreateWithPoolIdCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Amount + out.Amount = To_string(v.ValueAt(0)) + // field Root + out.Root = To_NominationPools_CreateWithPoolIdCall_root(v.ValueAt(1)) + // field Nominator + out.Nominator = To_NominationPools_CreateWithPoolIdCall_nominator(v.ValueAt(2)) + // field Bouncer + out.Bouncer = To_NominationPools_CreateWithPoolIdCall_bouncer(v.ValueAt(3)) + // primitive field PoolId + out.PoolId = To_uint32(v.ValueAt(4)) - func To_NominationPools_DestroyedEvent(in registry.DecodedFields) *pbgear.NominationPools_DestroyedEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_DestroyedEvent{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out +func To_NominationPools_CreateWithPoolIdCall_root(in any) *pbgear.NominationPools_Root { + v := in.(registry.Valuable) + return To_NominationPools_Root(v.ValueAt(0) //simple field +} +func To_NominationPools_CreateWithPoolIdCall_nominator(in any) *pbgear.NominationPools_Nominator { + v := in.(registry.Valuable) + return To_NominationPools_Nominator(v.ValueAt(0) //simple field +} +func To_NominationPools_CreateWithPoolIdCall_bouncer(in any) *pbgear.NominationPools_Bouncer { + v := in.(registry.Valuable) + return To_NominationPools_Bouncer(v.ValueAt(0) //simple field } - func To_NominationPools_Destroying(in registry.DecodedFields) *pbgear.NominationPools_Destroying { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_NominationPools_Destroying(in any) *pbgear.NominationPools_Destroying { out := &pbgear.NominationPools_Destroying{} - return out -} + v := in.(registry.Valuable) + _ = v - func To_NominationPools_Extra(in registry.DecodedFields) *pbgear.NominationPools_Extra { + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_Extra(in any) *pbgear.NominationPools_Extra { out := &pbgear.NominationPools_Extra{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.NominationPools_Extra_FreeBalance{ - FreeBalance: To_NominationPools_FreeBalance(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_NominationPools_Extra_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_NominationPools_Extra_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPools_Extra_FreeBalance{ + FreeBalance: To_NominationPools_FreeBalance(param), + } + case 1: + return &pbgear.NominationPools_Extra_Rewards{ + Rewards: To_NominationPools_Rewards(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_NominationPools_FreeBalance(in registry.DecodedFields) *pbgear.NominationPools_FreeBalance { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_NominationPools_FreeBalance(in any) *pbgear.NominationPools_FreeBalance { out := &pbgear.NominationPools_FreeBalance{} - out.Value0 = To_string(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_string(v.ValueAt(0)) - func To_NominationPools_GlobalMaxCommission(in registry.DecodedFields) *pbgear.NominationPools_GlobalMaxCommission { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_GlobalMaxCommission(in any) *pbgear.NominationPools_GlobalMaxCommission { out := &pbgear.NominationPools_GlobalMaxCommission{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.NominationPools_GlobalMaxCommission_Noop{ - Noop: To_NominationPools_Noop(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_NominationPools_GlobalMaxCommission_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_NominationPools_GlobalMaxCommission_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPools_GlobalMaxCommission_Noop{ + Noop: To_NominationPools_Noop(param), + } + case 1: + return &pbgear.NominationPools_GlobalMaxCommission_Set{ + Set: To_NominationPools_Set(param), + } + case 2: + return &pbgear.NominationPools_GlobalMaxCommission_Remove{ + Remove: To_NominationPools_Remove(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_NominationPools_Id(in registry.DecodedFields) *pbgear.NominationPools_Id { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_NominationPools_Id(in any) *pbgear.NominationPools_Id { out := &pbgear.NominationPools_Id{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_NominationPools_Id_value0(v.ValueAt(0)) - func To_NominationPools_Index(in registry.DecodedFields) *pbgear.NominationPools_Index { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_Index{} - out.Value0 = To_NominationPools_CompactTupleNull(fields[0].Value.(types.UCompact)) - - return out +func To_NominationPools_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_NominationPools_JoinCall(in registry.DecodedFields) *pbgear.NominationPools_JoinCall { + +func To_NominationPools_Index(in any) *pbgear.NominationPools_Index { + out := &pbgear.NominationPools_Index{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_NominationPools_Index_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_JoinCall{} - out.Amount = To_CompactString(fields[0].Value.(types.UCompact)) - - out.PoolId = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out +func To_NominationPools_Index_value0(in any) *pbgear.NominationPools_TupleNull { + v := in.(registry.Valuable) + return To_NominationPools_TupleNull(v.ValueAt(0) //simple field } - func To_NominationPools_MaxMembers(in registry.DecodedFields) *pbgear.NominationPools_MaxMembers { + +func To_NominationPools_JoinCall(in any) *pbgear.NominationPools_JoinCall { + out := &pbgear.NominationPools_JoinCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Amount + out.Amount = To_string(v.ValueAt(0)) + // primitive field PoolId + out.PoolId = To_uint32(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_MaxMembers(in any) *pbgear.NominationPools_MaxMembers { out := &pbgear.NominationPools_MaxMembers{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.NominationPools_MaxMembers_Noop{ - Noop: To_NominationPools_Noop(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_NominationPools_MaxMembers_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_NominationPools_MaxMembers_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPools_MaxMembers_Noop{ + Noop: To_NominationPools_Noop(param), } + case 1: + return &pbgear.NominationPools_MaxMembers_Set{ + Set: To_NominationPools_Set(param), + } + case 2: + return &pbgear.NominationPools_MaxMembers_Remove{ + Remove: To_NominationPools_Remove(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_NominationPools_MaxMembersPerPool(in registry.DecodedFields) *pbgear.NominationPools_MaxMembersPerPool { + +func To_NominationPools_MaxMembersPerPool(in any) *pbgear.NominationPools_MaxMembersPerPool { + out := &pbgear.NominationPools_MaxMembersPerPool{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_NominationPools_MaxMembersPerPool_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_MaxMembersPerPool{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.NominationPools_MaxMembersPerPool_Noop{ - Noop: To_NominationPools_Noop(fields), //Passthrough fields... +func To_OneOf_NominationPools_MaxMembersPerPool_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPools_MaxMembersPerPool_Noop{ + Noop: To_NominationPools_Noop(param), + } + case 1: + return &pbgear.NominationPools_MaxMembersPerPool_Set{ + Set: To_NominationPools_Set(param), } + case 2: + return &pbgear.NominationPools_MaxMembersPerPool_Remove{ + Remove: To_NominationPools_Remove(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_NominationPools_MaxPools(in registry.DecodedFields) *pbgear.NominationPools_MaxPools { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_NominationPools_MaxPools(in any) *pbgear.NominationPools_MaxPools { out := &pbgear.NominationPools_MaxPools{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.NominationPools_MaxPools_Noop{ - Noop: To_NominationPools_Noop(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_NominationPools_MaxPools_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_NominationPools_MaxPools_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPools_MaxPools_Noop{ + Noop: To_NominationPools_Noop(param), + } + case 1: + return &pbgear.NominationPools_MaxPools_Set{ + Set: To_NominationPools_Set(param), + } + case 2: + return &pbgear.NominationPools_MaxPools_Remove{ + Remove: To_NominationPools_Remove(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_NominationPools_Member(in registry.DecodedFields) *pbgear.NominationPools_Member { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_NominationPools_Member(in any) *pbgear.NominationPools_Member { out := &pbgear.NominationPools_Member{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.NominationPools_Member_Id{ - Id: To_NominationPools_Id(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_NominationPools_Member_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_NominationPools_Member_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPools_Member_Id{ + Id: To_NominationPools_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.NominationPools_Member_Index{ - Index: To_NominationPools_Index(fields), //Passthrough fields... + case 1: + return &pbgear.NominationPools_Member_Index{ + Index: To_NominationPools_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.NominationPools_Member_Raw{ - Raw: To_NominationPools_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.NominationPools_Member_Raw{ + Raw: To_NominationPools_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.NominationPools_Member_Address32{ - Address32: To_NominationPools_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.NominationPools_Member_Address32{ + Address32: To_NominationPools_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.NominationPools_Member_Address20{ - Address20: To_NominationPools_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.NominationPools_Member_Address20{ + Address20: To_NominationPools_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_NominationPools_MemberAccount(in registry.DecodedFields) *pbgear.NominationPools_MemberAccount { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_NominationPools_MemberAccount(in any) *pbgear.NominationPools_MemberAccount { out := &pbgear.NominationPools_MemberAccount{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.NominationPools_MemberAccount_Id{ - Id: To_NominationPools_Id(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_NominationPools_MemberAccount_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_NominationPools_MemberAccount_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPools_MemberAccount_Id{ + Id: To_NominationPools_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.NominationPools_MemberAccount_Index{ - Index: To_NominationPools_Index(fields), //Passthrough fields... + case 1: + return &pbgear.NominationPools_MemberAccount_Index{ + Index: To_NominationPools_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.NominationPools_MemberAccount_Raw{ - Raw: To_NominationPools_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.NominationPools_MemberAccount_Raw{ + Raw: To_NominationPools_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.NominationPools_MemberAccount_Address32{ - Address32: To_NominationPools_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.NominationPools_MemberAccount_Address32{ + Address32: To_NominationPools_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.NominationPools_MemberAccount_Address20{ - Address20: To_NominationPools_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.NominationPools_MemberAccount_Address20{ + Address20: To_NominationPools_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_NominationPools_MemberRemovedEvent(in registry.DecodedFields) *pbgear.NominationPools_MemberRemovedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_MemberRemovedEvent{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Member = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_NominationPools_MinBalanceDeficitAdjustedEvent(in registry.DecodedFields) *pbgear.NominationPools_MinBalanceDeficitAdjustedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_MinBalanceDeficitAdjustedEvent{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_NominationPools_MinCreateBond(in any) *pbgear.NominationPools_MinCreateBond { + out := &pbgear.NominationPools_MinCreateBond{} + v := in.(registry.Valuable) + _ = v - func To_NominationPools_MinBalanceExcessAdjustedEvent(in registry.DecodedFields) *pbgear.NominationPools_MinBalanceExcessAdjustedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_MinBalanceExcessAdjustedEvent{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} + // oneOf field Value + v0 := To_OneOf_NominationPools_MinCreateBond_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) - func To_NominationPools_MinCreateBond(in registry.DecodedFields) *pbgear.NominationPools_MinCreateBond { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_MinCreateBond{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.NominationPools_MinCreateBond_Noop{ - Noop: To_NominationPools_Noop(fields), //Passthrough fields... +func To_OneOf_NominationPools_MinCreateBond_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPools_MinCreateBond_Noop{ + Noop: To_NominationPools_Noop(param), } + case 1: + return &pbgear.NominationPools_MinCreateBond_Set{ + Set: To_NominationPools_Set(param), + } + case 2: + return &pbgear.NominationPools_MinCreateBond_Remove{ + Remove: To_NominationPools_Remove(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_NominationPools_MinJoinBond(in registry.DecodedFields) *pbgear.NominationPools_MinJoinBond { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_NominationPools_MinJoinBond(in any) *pbgear.NominationPools_MinJoinBond { out := &pbgear.NominationPools_MinJoinBond{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.NominationPools_MinJoinBond_Noop{ - Noop: To_NominationPools_Noop(fields), //Passthrough fields... - } - } - return out -} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_NominationPools_MinJoinBond_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) - func To_NominationPools_NewBouncer(in registry.DecodedFields) *pbgear.NominationPools_NewBouncer { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_NewBouncer{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.NominationPools_NewBouncer_Noop{ - Noop: To_NominationPools_Noop(fields), //Passthrough fields... +func To_OneOf_NominationPools_MinJoinBond_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPools_MinJoinBond_Noop{ + Noop: To_NominationPools_Noop(param), + } + case 1: + return &pbgear.NominationPools_MinJoinBond_Set{ + Set: To_NominationPools_Set(param), } + case 2: + return &pbgear.NominationPools_MinJoinBond_Remove{ + Remove: To_NominationPools_Remove(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_NominationPools_NewNominator(in registry.DecodedFields) *pbgear.NominationPools_NewNominator { + +func To_NominationPools_NewBouncer(in any) *pbgear.NominationPools_NewBouncer { + out := &pbgear.NominationPools_NewBouncer{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_NominationPools_NewBouncer_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_NewNominator{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.NominationPools_NewNominator_Noop{ - Noop: To_NominationPools_Noop(fields), //Passthrough fields... +func To_OneOf_NominationPools_NewBouncer_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPools_NewBouncer_Noop{ + Noop: To_NominationPools_Noop(param), } + case 1: + return &pbgear.NominationPools_NewBouncer_Set{ + Set: To_NominationPools_Set(param), + } + case 2: + return &pbgear.NominationPools_NewBouncer_Remove{ + Remove: To_NominationPools_Remove(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_NominationPools_NewRoot(in registry.DecodedFields) *pbgear.NominationPools_NewRoot { + +func To_NominationPools_NewNominator(in any) *pbgear.NominationPools_NewNominator { + out := &pbgear.NominationPools_NewNominator{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_NominationPools_NewNominator_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_NewRoot{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.NominationPools_NewRoot_Noop{ - Noop: To_NominationPools_Noop(fields), //Passthrough fields... +func To_OneOf_NominationPools_NewNominator_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPools_NewNominator_Noop{ + Noop: To_NominationPools_Noop(param), + } + case 1: + return &pbgear.NominationPools_NewNominator_Set{ + Set: To_NominationPools_Set(param), } + case 2: + return &pbgear.NominationPools_NewNominator_Remove{ + Remove: To_NominationPools_Remove(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_NominationPools_NewState(in registry.DecodedFields) *pbgear.NominationPools_NewState { + +func To_NominationPools_NewRoot(in any) *pbgear.NominationPools_NewRoot { + out := &pbgear.NominationPools_NewRoot{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_NominationPools_NewRoot_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_NewState{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.NominationPools_NewState_Open{ - Open: To_NominationPools_Open(fields), //Passthrough fields... +func To_OneOf_NominationPools_NewRoot_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPools_NewRoot_Noop{ + Noop: To_NominationPools_Noop(param), + } + case 1: + return &pbgear.NominationPools_NewRoot_Set{ + Set: To_NominationPools_Set(param), } + case 2: + return &pbgear.NominationPools_NewRoot_Remove{ + Remove: To_NominationPools_Remove(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_NominationPools_NominateCall(in registry.DecodedFields) *pbgear.NominationPools_NominateCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_NominationPools_NominateCall(in any) *pbgear.NominationPools_NominateCall { out := &pbgear.NominationPools_NominateCall{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Validators = To_repeated_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_NominationPools_Nominator(in registry.DecodedFields) *pbgear.NominationPools_Nominator { + // primitive field PoolId + out.PoolId = To_uint32(v.ValueAt(0)) + // repeated field Validators + out.Validators = To_Repeated_NominationPools_NominateCall_validators(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + +func To_Repeated_NominationPools_NominateCall_validators(in any) []*pbgear.SpCoreCryptoAccountId32 { + items := in.([]interface{}) + + var out []*pbgear.SpCoreCryptoAccountId32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_SpCoreCryptoAccountId32(w) + out = append(out, o) + } + return nil //funcForRepeatedField +} + + +func To_NominationPools_Nominator(in any) *pbgear.NominationPools_Nominator { out := &pbgear.NominationPools_Nominator{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.NominationPools_Nominator_Id{ - Id: To_NominationPools_Id(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_NominationPools_Nominator_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_NominationPools_Nominator_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPools_Nominator_Id{ + Id: To_NominationPools_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.NominationPools_Nominator_Index{ - Index: To_NominationPools_Index(fields), //Passthrough fields... + case 1: + return &pbgear.NominationPools_Nominator_Index{ + Index: To_NominationPools_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.NominationPools_Nominator_Raw{ - Raw: To_NominationPools_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.NominationPools_Nominator_Raw{ + Raw: To_NominationPools_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.NominationPools_Nominator_Address32{ - Address32: To_NominationPools_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.NominationPools_Nominator_Address32{ + Address32: To_NominationPools_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.NominationPools_Nominator_Address20{ - Address20: To_NominationPools_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.NominationPools_Nominator_Address20{ + Address20: To_NominationPools_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_NominationPools_Noop(in registry.DecodedFields) *pbgear.NominationPools_Noop { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_NominationPools_Noop(in any) *pbgear.NominationPools_Noop { out := &pbgear.NominationPools_Noop{} - return out -} + v := in.(registry.Valuable) + _ = v + - func To_NominationPools_Open(in registry.DecodedFields) *pbgear.NominationPools_Open { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_Open(in any) *pbgear.NominationPools_Open { out := &pbgear.NominationPools_Open{} - return out -} + v := in.(registry.Valuable) + _ = v - func To_NominationPools_PaidOutEvent(in registry.DecodedFields) *pbgear.NominationPools_PaidOutEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_PaidOutEvent{} - out.Member = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.PoolId = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.Payout = To_string(fields[2].Value.(registry.DecodedFields)) - - return out -} - func To_NominationPools_PalletNominationPoolsCommissionChangeRate(in registry.DecodedFields) *pbgear.NominationPools_PalletNominationPoolsCommissionChangeRate { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_PalletNominationPoolsCommissionChangeRate(in any) *pbgear.NominationPools_PalletNominationPoolsCommissionChangeRate { out := &pbgear.NominationPools_PalletNominationPoolsCommissionChangeRate{} - out.MaxIncrease = To_SpArithmeticPerThingsPerbill(fields[0].Value.(registry.DecodedFields)) - - out.MinDelay = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_NominationPools_Permission(in registry.DecodedFields) *pbgear.NominationPools_Permission { + // field MaxIncrease + out.MaxIncrease = To_NominationPools_PalletNominationPoolsCommissionChangeRate_max_increase(v.ValueAt(0)) + // primitive field MinDelay + out.MinDelay = To_uint32(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields +func To_NominationPools_PalletNominationPoolsCommissionChangeRate_max_increase(in any) *pbgear.SpArithmeticPerThingsPerbill { + v := in.(registry.Valuable) + return To_SpArithmeticPerThingsPerbill(v.ValueAt(0) //simple field +} + + +func To_NominationPools_Permission(in any) *pbgear.NominationPools_Permission { out := &pbgear.NominationPools_Permission{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.NominationPools_Permission_Permissioned{ - Permissioned: To_NominationPools_Permissioned(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_NominationPools_Permission_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_NominationPools_Permission_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPools_Permission_Permissioned{ + Permissioned: To_NominationPools_Permissioned(param), } + case 1: + return &pbgear.NominationPools_Permission_PermissionlessCompound{ + PermissionlessCompound: To_NominationPools_PermissionlessCompound(param), + } + case 2: + return &pbgear.NominationPools_Permission_PermissionlessWithdraw{ + PermissionlessWithdraw: To_NominationPools_PermissionlessWithdraw(param), + } + case 3: + return &pbgear.NominationPools_Permission_PermissionlessAll{ + PermissionlessAll: To_NominationPools_PermissionlessAll(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_NominationPools_Permissioned(in registry.DecodedFields) *pbgear.NominationPools_Permissioned { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_NominationPools_Permissioned(in any) *pbgear.NominationPools_Permissioned { out := &pbgear.NominationPools_Permissioned{} - return out -} + v := in.(registry.Valuable) + _ = v - func To_NominationPools_PermissionlessAll(in registry.DecodedFields) *pbgear.NominationPools_PermissionlessAll { + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_PermissionlessAll(in any) *pbgear.NominationPools_PermissionlessAll { out := &pbgear.NominationPools_PermissionlessAll{} - return out -} + v := in.(registry.Valuable) + _ = v + - func To_NominationPools_PermissionlessCompound(in registry.DecodedFields) *pbgear.NominationPools_PermissionlessCompound { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_PermissionlessCompound(in any) *pbgear.NominationPools_PermissionlessCompound { out := &pbgear.NominationPools_PermissionlessCompound{} - return out -} + v := in.(registry.Valuable) + _ = v - func To_NominationPools_PermissionlessWithdraw(in registry.DecodedFields) *pbgear.NominationPools_PermissionlessWithdraw { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_PermissionlessWithdraw{} - return out -} - func To_NominationPools_PoolCommissionChangeRateUpdatedEvent(in registry.DecodedFields) *pbgear.NominationPools_PoolCommissionChangeRateUpdatedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_PoolCommissionChangeRateUpdatedEvent{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.ChangeRate = To_NominationPools_PalletNominationPoolsCommissionChangeRate(fields[1].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_NominationPools_PoolCommissionClaimedEvent(in registry.DecodedFields) *pbgear.NominationPools_PoolCommissionClaimedEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_PoolCommissionClaimedEvent{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Commission = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_NominationPools_PoolCommissionUpdatedEvent(in registry.DecodedFields) *pbgear.NominationPools_PoolCommissionUpdatedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_PoolCommissionUpdatedEvent{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Current = To_optional_NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_optional_NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32(f registry.DecodedFields) *pbgear.NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32 { - fields := []*registry.DecodedField(f) - _ = fields - var out = To_NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32(fields) - return out - } +func To_NominationPools_PermissionlessWithdraw(in any) *pbgear.NominationPools_PermissionlessWithdraw { + out := &pbgear.NominationPools_PermissionlessWithdraw{} + v := in.(registry.Valuable) + _ = v - func To_NominationPools_PoolMaxCommissionUpdatedEvent(in registry.DecodedFields) *pbgear.NominationPools_PoolMaxCommissionUpdatedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_PoolMaxCommissionUpdatedEvent{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.MaxCommission = To_SpArithmeticPerThingsPerbill(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_NominationPools_PoolSlashedEvent(in registry.DecodedFields) *pbgear.NominationPools_PoolSlashedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_PoolSlashedEvent{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Balance = To_string(fields[1].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_NominationPools_PoolWithdrawUnbondedCall(in registry.DecodedFields) *pbgear.NominationPools_PoolWithdrawUnbondedCall { - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_PoolWithdrawUnbondedCall(in any) *pbgear.NominationPools_PoolWithdrawUnbondedCall { out := &pbgear.NominationPools_PoolWithdrawUnbondedCall{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.NumSlashingSpans = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field PoolId + out.PoolId = To_uint32(v.ValueAt(0)) + // primitive field NumSlashingSpans + out.NumSlashingSpans = To_uint32(v.ValueAt(1)) - func To_NominationPools_Raw(in registry.DecodedFields) *pbgear.NominationPools_Raw { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_Raw(in any) *pbgear.NominationPools_Raw { out := &pbgear.NominationPools_Raw{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v - func To_NominationPools_Remove(in registry.DecodedFields) *pbgear.NominationPools_Remove { + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_Remove(in any) *pbgear.NominationPools_Remove { out := &pbgear.NominationPools_Remove{} - return out -} + v := in.(registry.Valuable) + _ = v + - func To_NominationPools_Rewards(in registry.DecodedFields) *pbgear.NominationPools_Rewards { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_Rewards(in any) *pbgear.NominationPools_Rewards { out := &pbgear.NominationPools_Rewards{} - return out -} + v := in.(registry.Valuable) + _ = v - func To_NominationPools_RolesUpdatedEvent(in registry.DecodedFields) *pbgear.NominationPools_RolesUpdatedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_RolesUpdatedEvent{} - out.Root = To_optional_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Bouncer = To_optional_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.Nominator = To_optional_SpCoreCryptoAccountId32(fields[2].Value.(registry.DecodedFields)) - - return out -} - func To_NominationPools_Root(in registry.DecodedFields) *pbgear.NominationPools_Root { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_Root(in any) *pbgear.NominationPools_Root { out := &pbgear.NominationPools_Root{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.NominationPools_Root_Id{ - Id: To_NominationPools_Id(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_NominationPools_Root_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_NominationPools_Root_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPools_Root_Id{ + Id: To_NominationPools_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.NominationPools_Root_Index{ - Index: To_NominationPools_Index(fields), //Passthrough fields... + case 1: + return &pbgear.NominationPools_Root_Index{ + Index: To_NominationPools_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.NominationPools_Root_Raw{ - Raw: To_NominationPools_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.NominationPools_Root_Raw{ + Raw: To_NominationPools_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.NominationPools_Root_Address32{ - Address32: To_NominationPools_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.NominationPools_Root_Address32{ + Address32: To_NominationPools_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.NominationPools_Root_Address20{ - Address20: To_NominationPools_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.NominationPools_Root_Address20{ + Address20: To_NominationPools_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_NominationPools_Set(in registry.DecodedFields) *pbgear.NominationPools_Set { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_NominationPools_Set(in any) *pbgear.NominationPools_Set { out := &pbgear.NominationPools_Set{} - out.Value0 = To_string(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_string(v.ValueAt(0)) - func To_NominationPools_SetClaimPermissionCall(in registry.DecodedFields) *pbgear.NominationPools_SetClaimPermissionCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_SetClaimPermissionCall(in any) *pbgear.NominationPools_SetClaimPermissionCall { out := &pbgear.NominationPools_SetClaimPermissionCall{} - out.Permission = To_NominationPools_Permission(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_NominationPools_SetCommissionCall(in registry.DecodedFields) *pbgear.NominationPools_SetCommissionCall { + // field Permission + out.Permission = To_NominationPools_SetClaimPermissionCall_permission(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_SetCommissionCall{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.NewCommission = To_optional_NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - return out +func To_NominationPools_SetClaimPermissionCall_permission(in any) *pbgear.NominationPools_Permission { + v := in.(registry.Valuable) + return To_NominationPools_Permission(v.ValueAt(0) //simple field } - func To_NominationPools_SetCommissionChangeRateCall(in registry.DecodedFields) *pbgear.NominationPools_SetCommissionChangeRateCall { + +func To_NominationPools_SetCommissionCall(in any) *pbgear.NominationPools_SetCommissionCall { + out := &pbgear.NominationPools_SetCommissionCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field PoolId + out.PoolId = To_uint32(v.ValueAt(0)) + // optional field NewCommission + out.NewCommission = To_Optional_NominationPools_SetCommissionCall_new_commission(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_SetCommissionChangeRateCall{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.ChangeRate = To_NominationPools_PalletNominationPoolsCommissionChangeRate(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Optional_NominationPools_SetCommissionCall_new_commission(in any) *pbgear.NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32 { + return nil //funcForOptionalField } - func To_NominationPools_SetCommissionMaxCall(in registry.DecodedFields) *pbgear.NominationPools_SetCommissionMaxCall { + +func To_NominationPools_SetCommissionChangeRateCall(in any) *pbgear.NominationPools_SetCommissionChangeRateCall { + out := &pbgear.NominationPools_SetCommissionChangeRateCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field PoolId + out.PoolId = To_uint32(v.ValueAt(0)) + // field ChangeRate + out.ChangeRate = To_NominationPools_SetCommissionChangeRateCall_change_rate(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_SetCommissionMaxCall{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.MaxCommission = To_SpArithmeticPerThingsPerbill(fields[1].Value.(registry.DecodedFields)) - - return out +func To_NominationPools_SetCommissionChangeRateCall_change_rate(in any) *pbgear.NominationPools_PalletNominationPoolsCommissionChangeRate { + v := in.(registry.Valuable) + return To_NominationPools_PalletNominationPoolsCommissionChangeRate(v.ValueAt(0) //simple field } - func To_NominationPools_SetConfigsCall(in registry.DecodedFields) *pbgear.NominationPools_SetConfigsCall { + +func To_NominationPools_SetCommissionMaxCall(in any) *pbgear.NominationPools_SetCommissionMaxCall { + out := &pbgear.NominationPools_SetCommissionMaxCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field PoolId + out.PoolId = To_uint32(v.ValueAt(0)) + // field MaxCommission + out.MaxCommission = To_NominationPools_SetCommissionMaxCall_max_commission(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields +func To_NominationPools_SetCommissionMaxCall_max_commission(in any) *pbgear.SpArithmeticPerThingsPerbill { + v := in.(registry.Valuable) + return To_SpArithmeticPerThingsPerbill(v.ValueAt(0) //simple field +} + + +func To_NominationPools_SetConfigsCall(in any) *pbgear.NominationPools_SetConfigsCall { out := &pbgear.NominationPools_SetConfigsCall{} - out.MinJoinBond = To_NominationPools_MinJoinBond(fields[0].Value.(registry.DecodedFields)) - - out.MinCreateBond = To_NominationPools_MinCreateBond(fields[1].Value.(registry.DecodedFields)) - - out.MaxPools = To_NominationPools_MaxPools(fields[2].Value.(registry.DecodedFields)) - - out.MaxMembers = To_NominationPools_MaxMembers(fields[3].Value.(registry.DecodedFields)) - - out.MaxMembersPerPool = To_NominationPools_MaxMembersPerPool(fields[4].Value.(registry.DecodedFields)) - - out.GlobalMaxCommission = To_NominationPools_GlobalMaxCommission(fields[5].Value.(registry.DecodedFields)) - - return out -} - - func To_NominationPools_SetMetadataCall(in registry.DecodedFields) *pbgear.NominationPools_SetMetadataCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_SetMetadataCall{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Metadata = To_bytes(fields[1].Value.([]interface{})) - return out + v := in.(registry.Valuable) + _ = v + + // field MinJoinBond + out.MinJoinBond = To_NominationPools_SetConfigsCall_min_join_bond(v.ValueAt(0)) + // field MinCreateBond + out.MinCreateBond = To_NominationPools_SetConfigsCall_min_create_bond(v.ValueAt(1)) + // field MaxPools + out.MaxPools = To_NominationPools_SetConfigsCall_max_pools(v.ValueAt(2)) + // field MaxMembers + out.MaxMembers = To_NominationPools_SetConfigsCall_max_members(v.ValueAt(3)) + // field MaxMembersPerPool + out.MaxMembersPerPool = To_NominationPools_SetConfigsCall_max_members_per_pool(v.ValueAt(4)) + // field GlobalMaxCommission + out.GlobalMaxCommission = To_NominationPools_SetConfigsCall_global_max_commission(v.ValueAt(5)) + + return out //from message +} + +func To_NominationPools_SetConfigsCall_min_join_bond(in any) *pbgear.NominationPools_MinJoinBond { + v := in.(registry.Valuable) + return To_NominationPools_MinJoinBond(v.ValueAt(0) //simple field +} +func To_NominationPools_SetConfigsCall_min_create_bond(in any) *pbgear.NominationPools_MinCreateBond { + v := in.(registry.Valuable) + return To_NominationPools_MinCreateBond(v.ValueAt(0) //simple field +} +func To_NominationPools_SetConfigsCall_max_pools(in any) *pbgear.NominationPools_MaxPools { + v := in.(registry.Valuable) + return To_NominationPools_MaxPools(v.ValueAt(0) //simple field } +func To_NominationPools_SetConfigsCall_max_members(in any) *pbgear.NominationPools_MaxMembers { + v := in.(registry.Valuable) + return To_NominationPools_MaxMembers(v.ValueAt(0) //simple field +} +func To_NominationPools_SetConfigsCall_max_members_per_pool(in any) *pbgear.NominationPools_MaxMembersPerPool { + v := in.(registry.Valuable) + return To_NominationPools_MaxMembersPerPool(v.ValueAt(0) //simple field +} +func To_NominationPools_SetConfigsCall_global_max_commission(in any) *pbgear.NominationPools_GlobalMaxCommission { + v := in.(registry.Valuable) + return To_NominationPools_GlobalMaxCommission(v.ValueAt(0) //simple field +} + - func To_NominationPools_SetStateCall(in registry.DecodedFields) *pbgear.NominationPools_SetStateCall { +func To_NominationPools_SetMetadataCall(in any) *pbgear.NominationPools_SetMetadataCall { + out := &pbgear.NominationPools_SetMetadataCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field PoolId + out.PoolId = To_uint32(v.ValueAt(0)) + // primitive field Metadata + out.Metadata = To_bytes(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_NominationPools_SetStateCall(in any) *pbgear.NominationPools_SetStateCall { out := &pbgear.NominationPools_SetStateCall{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.State = To_NominationPools_State(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field PoolId + out.PoolId = To_uint32(v.ValueAt(0)) + // field State + out.State = To_NominationPools_SetStateCall_state(v.ValueAt(1)) - func To_NominationPools_State(in registry.DecodedFields) *pbgear.NominationPools_State { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields +func To_NominationPools_SetStateCall_state(in any) *pbgear.NominationPools_State { + v := in.(registry.Valuable) + return To_NominationPools_State(v.ValueAt(0) //simple field +} + + +func To_NominationPools_State(in any) *pbgear.NominationPools_State { out := &pbgear.NominationPools_State{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.NominationPools_State_Open{ - Open: To_NominationPools_Open(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_NominationPools_State_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_NominationPools_State_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.NominationPools_State_Open{ + Open: To_NominationPools_Open(param), + } + case 1: + return &pbgear.NominationPools_State_Blocked{ + Blocked: To_NominationPools_Blocked(param), } + case 2: + return &pbgear.NominationPools_State_Destroying{ + Destroying: To_NominationPools_Destroying(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_NominationPools_StateChangedEvent(in registry.DecodedFields) *pbgear.NominationPools_StateChangedEvent { + +func To_NominationPools_TupleNull(in any) *pbgear.NominationPools_TupleNull { + out := &pbgear.NominationPools_TupleNull{} + v := in.(registry.Valuable) + _ = v + + // field Value + out.Value = To_NominationPools_TupleNull_value(v.ValueAt(0)) + + return out //from message +} + +func To_NominationPools_TupleNull_value(in any) *pbgear.TupleNull { + v := in.(registry.Valuable) + return To_TupleNull(v.ValueAt(0) //simple field +} + + +func To_NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32(in any) *pbgear.NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32 { + out := &pbgear.NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32_value0(v.ValueAt(0)) + // field Value1 + out.Value1 = To_NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32_value1(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_StateChangedEvent{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.NewState = To_NominationPools_NewState(fields[1].Value.(registry.DecodedFields)) - - return out +func To_NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32_value0(in any) *pbgear.SpArithmeticPerThingsPerbill { + v := in.(registry.Valuable) + return To_SpArithmeticPerThingsPerbill(v.ValueAt(0) //simple field +} +func To_NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32_value1(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32(in registry.DecodedFields) *pbgear.NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32 { + +func To_NominationPools_UnbondCall(in any) *pbgear.NominationPools_UnbondCall { + out := &pbgear.NominationPools_UnbondCall{} + v := in.(registry.Valuable) + _ = v + + // field MemberAccount + out.MemberAccount = To_NominationPools_UnbondCall_member_account(v.ValueAt(0)) + // primitive field UnbondingPoints + out.UnbondingPoints = To_string(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32{} - out.Value0 = To_SpArithmeticPerThingsPerbill(fields[0].Value.(registry.DecodedFields)) - - out.Value1 = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - return out +func To_NominationPools_UnbondCall_member_account(in any) *pbgear.NominationPools_MemberAccount { + v := in.(registry.Valuable) + return To_NominationPools_MemberAccount(v.ValueAt(0) //simple field } - func To_NominationPools_UnbondCall(in registry.DecodedFields) *pbgear.NominationPools_UnbondCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_UnbondCall{} - out.MemberAccount = To_NominationPools_MemberAccount(fields[0].Value.(registry.DecodedFields)) - - out.UnbondingPoints = To_CompactString(fields[1].Value.(types.UCompact)) - - return out -} - - func To_NominationPools_UnbondedEvent(in registry.DecodedFields) *pbgear.NominationPools_UnbondedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_UnbondedEvent{} - out.Member = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.PoolId = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.Balance = To_string(fields[2].Value.(registry.DecodedFields)) - - out.Points = To_string(fields[3].Value.(registry.DecodedFields)) - - out.Era = To_uint32(fields[4].Value.(registry.DecodedFields)) - - return out -} - - func To_NominationPools_UnbondingPoolSlashedEvent(in registry.DecodedFields) *pbgear.NominationPools_UnbondingPoolSlashedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_UnbondingPoolSlashedEvent{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Era = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.Balance = To_string(fields[2].Value.(registry.DecodedFields)) - - return out -} - - func To_NominationPools_UpdateRolesCall(in registry.DecodedFields) *pbgear.NominationPools_UpdateRolesCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_NominationPools_UpdateRolesCall(in any) *pbgear.NominationPools_UpdateRolesCall { out := &pbgear.NominationPools_UpdateRolesCall{} - out.PoolId = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.NewRoot = To_NominationPools_NewRoot(fields[1].Value.(registry.DecodedFields)) - - out.NewNominator = To_NominationPools_NewNominator(fields[2].Value.(registry.DecodedFields)) - - out.NewBouncer = To_NominationPools_NewBouncer(fields[3].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_NominationPools_WithdrawUnbondedCall(in registry.DecodedFields) *pbgear.NominationPools_WithdrawUnbondedCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_WithdrawUnbondedCall{} - out.MemberAccount = To_NominationPools_MemberAccount(fields[0].Value.(registry.DecodedFields)) - - out.NumSlashingSpans = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} + // primitive field PoolId + out.PoolId = To_uint32(v.ValueAt(0)) + // field NewRoot + out.NewRoot = To_NominationPools_UpdateRolesCall_new_root(v.ValueAt(1)) + // field NewNominator + out.NewNominator = To_NominationPools_UpdateRolesCall_new_nominator(v.ValueAt(2)) + // field NewBouncer + out.NewBouncer = To_NominationPools_UpdateRolesCall_new_bouncer(v.ValueAt(3)) - func To_NominationPools_WithdrawnEvent(in registry.DecodedFields) *pbgear.NominationPools_WithdrawnEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NominationPools_WithdrawnEvent{} - out.Member = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.PoolId = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.Balance = To_string(fields[2].Value.(registry.DecodedFields)) - - out.Points = To_string(fields[3].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_NotExpendable(in registry.DecodedFields) *pbgear.NotExpendable { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.NotExpendable{} - return out +func To_NominationPools_UpdateRolesCall_new_root(in any) *pbgear.NominationPools_NewRoot { + v := in.(registry.Valuable) + return To_NominationPools_NewRoot(v.ValueAt(0) //simple field +} +func To_NominationPools_UpdateRolesCall_new_nominator(in any) *pbgear.NominationPools_NewNominator { + v := in.(registry.Valuable) + return To_NominationPools_NewNominator(v.ValueAt(0) //simple field } +func To_NominationPools_UpdateRolesCall_new_bouncer(in any) *pbgear.NominationPools_NewBouncer { + v := in.(registry.Valuable) + return To_NominationPools_NewBouncer(v.ValueAt(0) //simple field +} + + +func To_NominationPools_WithdrawUnbondedCall(in any) *pbgear.NominationPools_WithdrawUnbondedCall { + out := &pbgear.NominationPools_WithdrawUnbondedCall{} + v := in.(registry.Valuable) + _ = v - func To_Offences_OffenceEvent(in registry.DecodedFields) *pbgear.Offences_OffenceEvent { + // field MemberAccount + out.MemberAccount = To_NominationPools_WithdrawUnbondedCall_member_account(v.ValueAt(0)) + // primitive field NumSlashingSpans + out.NumSlashingSpans = To_uint32(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Offences_OffenceEvent{} - out.Kind = To_bytes(fields[0].Value.([]interface{})) - out.Timeslot = To_bytes(fields[1].Value.([]interface{})) - return out +func To_NominationPools_WithdrawUnbondedCall_member_account(in any) *pbgear.NominationPools_MemberAccount { + v := in.(registry.Valuable) + return To_NominationPools_MemberAccount(v.ValueAt(0) //simple field } - func To_OnlyProvider(in registry.DecodedFields) *pbgear.OnlyProvider { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.OnlyProvider{} - return out + +func To_None(in any) *pbgear.None { + out := &pbgear.None{} + v := in.(registry.Valuable) + _ = v + + + return out //from message } + + - func To_Other(in registry.DecodedFields) *pbgear.Other { +func To_OffencesPallet(in any) *pbgear.OffencesPallet { + out := &pbgear.OffencesPallet{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Other{} - return out + + +func To_OriginsPallet(in any) *pbgear.OriginsPallet { + out := &pbgear.OriginsPallet{} + v := in.(registry.Valuable) + _ = v + + + return out //from message } + - func To_PaysFee(in registry.DecodedFields) *pbgear.PaysFee { + +func To_PreimagePallet(in any) *pbgear.PreimagePallet { + out := &pbgear.PreimagePallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_PreimagePallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.PaysFee{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.PaysFee_Yes{ - Yes: To_Yes(fields), //Passthrough fields... +func To_OneOf_PreimagePallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.PreimagePallet_NotePreimageCall{ + NotePreimageCall: To_Preimage_NotePreimageCall(param), + } + case 1: + return &pbgear.PreimagePallet_UnnotePreimageCall{ + UnnotePreimageCall: To_Preimage_UnnotePreimageCall(param), + } + case 2: + return &pbgear.PreimagePallet_RequestPreimageCall{ + RequestPreimageCall: To_Preimage_RequestPreimageCall(param), + } + case 3: + return &pbgear.PreimagePallet_UnrequestPreimageCall{ + UnrequestPreimageCall: To_Preimage_UnrequestPreimageCall(param), } + case 4: + return &pbgear.PreimagePallet_EnsureUpdatedCall{ + EnsureUpdatedCall: To_Preimage_EnsureUpdatedCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Preimage_ClearedEvent(in registry.DecodedFields) *pbgear.Preimage_ClearedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Preimage_ClearedEvent{} - out.Hash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Preimage_EnsureUpdatedCall(in registry.DecodedFields) *pbgear.Preimage_EnsureUpdatedCall { - - fields := []*registry.DecodedField(in) - _ = fields +func To_Preimage_EnsureUpdatedCall(in any) *pbgear.Preimage_EnsureUpdatedCall { out := &pbgear.Preimage_EnsureUpdatedCall{} - out.Hashes = To_repeated_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - return out + v := in.(registry.Valuable) + _ = v + + // repeated field Hashes + out.Hashes = To_Repeated_Preimage_EnsureUpdatedCall_hashes(v.ValueAt(0)) + + return out //from message } -func To_repeated_PrimitiveTypesH256(f registry.DecodedFields) []*pbgear.PrimitiveTypesH256 { - fields := []*registry.DecodedField(f) - _ = fields + + +func To_Repeated_Preimage_EnsureUpdatedCall_hashes(in any) []*pbgear.PrimitiveTypesH256 { + items := in.([]interface{}) - out := make([]*pbgear.PrimitiveTypesH256, len(fields)) - for _, f := range fields { - out = append(out, To_PrimitiveTypesH256(f.Value.([]*registry.DecodedField))) + var out []*pbgear.PrimitiveTypesH256 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_PrimitiveTypesH256(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } - func To_Preimage_NotePreimageCall(in registry.DecodedFields) *pbgear.Preimage_NotePreimageCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Preimage_NotePreimageCall(in any) *pbgear.Preimage_NotePreimageCall { out := &pbgear.Preimage_NotePreimageCall{} - out.Bytes = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v - func To_Preimage_NotedEvent(in registry.DecodedFields) *pbgear.Preimage_NotedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Preimage_NotedEvent{} - out.Hash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - return out -} + // primitive field Bytes + out.Bytes = To_bytes(v.ValueAt(0)) - func To_Preimage_RequestPreimageCall(in registry.DecodedFields) *pbgear.Preimage_RequestPreimageCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Preimage_RequestPreimageCall(in any) *pbgear.Preimage_RequestPreimageCall { out := &pbgear.Preimage_RequestPreimageCall{} - out.Hash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Preimage_RequestedEvent(in registry.DecodedFields) *pbgear.Preimage_RequestedEvent { + // field Hash + out.Hash = To_Preimage_RequestPreimageCall_hash(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Preimage_RequestedEvent{} - out.Hash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Preimage_RequestPreimageCall_hash(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field } - func To_Preimage_UnnotePreimageCall(in registry.DecodedFields) *pbgear.Preimage_UnnotePreimageCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Preimage_UnnotePreimageCall(in any) *pbgear.Preimage_UnnotePreimageCall { out := &pbgear.Preimage_UnnotePreimageCall{} - out.Hash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field Hash + out.Hash = To_Preimage_UnnotePreimageCall_hash(v.ValueAt(0)) - func To_Preimage_UnrequestPreimageCall(in registry.DecodedFields) *pbgear.Preimage_UnrequestPreimageCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Preimage_UnrequestPreimageCall{} - out.Hash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Preimage_UnnotePreimageCall_hash(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field } - func To_PrimaryAndSecondaryPlainSlots(in registry.DecodedFields) *pbgear.PrimaryAndSecondaryPlainSlots { + +func To_Preimage_UnrequestPreimageCall(in any) *pbgear.Preimage_UnrequestPreimageCall { + out := &pbgear.Preimage_UnrequestPreimageCall{} + v := in.(registry.Valuable) + _ = v + + // field Hash + out.Hash = To_Preimage_UnrequestPreimageCall_hash(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.PrimaryAndSecondaryPlainSlots{} - return out +func To_Preimage_UnrequestPreimageCall_hash(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field } - func To_PrimaryAndSecondaryVRFSlots(in registry.DecodedFields) *pbgear.PrimaryAndSecondaryVRFSlots { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.PrimaryAndSecondaryVRFSlots{} - return out + +func To_PrimaryAndSecondaryPlainSlots(in any) *pbgear.PrimaryAndSecondaryPlainSlots { + out := &pbgear.PrimaryAndSecondaryPlainSlots{} + v := in.(registry.Valuable) + _ = v + + + return out //from message } + + + +func To_PrimaryAndSecondaryVrfSlots(in any) *pbgear.PrimaryAndSecondaryVrfSlots { + out := &pbgear.PrimaryAndSecondaryVrfSlots{} + v := in.(registry.Valuable) + _ = v - func To_PrimarySlots(in registry.DecodedFields) *pbgear.PrimarySlots { + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_PrimarySlots(in any) *pbgear.PrimarySlots { out := &pbgear.PrimarySlots{} - return out -} + v := in.(registry.Valuable) + _ = v + - func To_PrimitiveTypesH256(in registry.DecodedFields) *pbgear.PrimitiveTypesH256 { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_PrimitiveTypesH256(in any) *pbgear.PrimitiveTypesH256 { out := &pbgear.PrimitiveTypesH256{} - out.Value = To_bytes(fields[0].Value.([]interface{})) - return out + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message } + - func To_Proxy_AddProxyCall(in registry.DecodedFields) *pbgear.Proxy_AddProxyCall { + +func To_ProxyPallet(in any) *pbgear.ProxyPallet { + out := &pbgear.ProxyPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_ProxyPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_AddProxyCall{} - out.Delegate = To_Proxy_Delegate(fields[0].Value.(registry.DecodedFields)) - - out.ProxyType = To_Proxy_ProxyType(fields[1].Value.(registry.DecodedFields)) - - out.Delay = To_uint32(fields[2].Value.(registry.DecodedFields)) - - return out +func To_OneOf_ProxyPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.ProxyPallet_ProxyCall{ + ProxyCall: To_Proxy_ProxyCall(param), + } + case 1: + return &pbgear.ProxyPallet_AddProxyCall{ + AddProxyCall: To_Proxy_AddProxyCall(param), + } + case 2: + return &pbgear.ProxyPallet_RemoveProxyCall{ + RemoveProxyCall: To_Proxy_RemoveProxyCall(param), + } + case 3: + return &pbgear.ProxyPallet_RemoveProxiesCall{ + RemoveProxiesCall: To_Proxy_RemoveProxiesCall(param), + } + case 4: + return &pbgear.ProxyPallet_CreatePureCall{ + CreatePureCall: To_Proxy_CreatePureCall(param), + } + case 5: + return &pbgear.ProxyPallet_KillPureCall{ + KillPureCall: To_Proxy_KillPureCall(param), + } + case 6: + return &pbgear.ProxyPallet_AnnounceCall{ + AnnounceCall: To_Proxy_AnnounceCall(param), + } + case 7: + return &pbgear.ProxyPallet_RemoveAnnouncementCall{ + RemoveAnnouncementCall: To_Proxy_RemoveAnnouncementCall(param), + } + case 8: + return &pbgear.ProxyPallet_RejectAnnouncementCall{ + RejectAnnouncementCall: To_Proxy_RejectAnnouncementCall(param), + } + case 9: + return &pbgear.ProxyPallet_ProxyAnnouncedCall{ + ProxyAnnouncedCall: To_Proxy_ProxyAnnouncedCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } } - func To_Proxy_Address20(in registry.DecodedFields) *pbgear.Proxy_Address20 { + +func To_Proxy_AddProxyCall(in any) *pbgear.Proxy_AddProxyCall { + out := &pbgear.Proxy_AddProxyCall{} + v := in.(registry.Valuable) + _ = v + + // field Delegate + out.Delegate = To_Proxy_AddProxyCall_delegate(v.ValueAt(0)) + // field ProxyType + out.ProxyType = To_Proxy_AddProxyCall_proxy_type(v.ValueAt(1)) + // primitive field Delay + out.Delay = To_uint32(v.ValueAt(2)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_Address20{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out +func To_Proxy_AddProxyCall_delegate(in any) *pbgear.Proxy_Delegate { + v := in.(registry.Valuable) + return To_Proxy_Delegate(v.ValueAt(0) //simple field +} +func To_Proxy_AddProxyCall_proxy_type(in any) *pbgear.Proxy_ProxyType { + v := in.(registry.Valuable) + return To_Proxy_ProxyType(v.ValueAt(0) //simple field } - func To_Proxy_Address32(in registry.DecodedFields) *pbgear.Proxy_Address32 { + +func To_Proxy_Address20(in any) *pbgear.Proxy_Address20 { + out := &pbgear.Proxy_Address20{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Proxy_Address32(in any) *pbgear.Proxy_Address32 { out := &pbgear.Proxy_Address32{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v - func To_Proxy_AnnounceCall(in registry.DecodedFields) *pbgear.Proxy_AnnounceCall { + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Proxy_AnnounceCall(in any) *pbgear.Proxy_AnnounceCall { out := &pbgear.Proxy_AnnounceCall{} - out.Real = To_Proxy_Real(fields[0].Value.(registry.DecodedFields)) - - out.CallHash = To_PrimitiveTypesH256(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field Real + out.Real = To_Proxy_AnnounceCall_real(v.ValueAt(0)) + // field CallHash + out.CallHash = To_Proxy_AnnounceCall_call_hash(v.ValueAt(1)) - func To_Proxy_AnnouncedEvent(in registry.DecodedFields) *pbgear.Proxy_AnnouncedEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_AnnouncedEvent{} - out.Real = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Proxy = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.CallHash = To_PrimitiveTypesH256(fields[2].Value.(registry.DecodedFields)) - - return out +func To_Proxy_AnnounceCall_real(in any) *pbgear.Proxy_Real { + v := in.(registry.Valuable) + return To_Proxy_Real(v.ValueAt(0) //simple field +} +func To_Proxy_AnnounceCall_call_hash(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field } - func To_Proxy_Any(in registry.DecodedFields) *pbgear.Proxy_Any { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Proxy_Any(in any) *pbgear.Proxy_Any { out := &pbgear.Proxy_Any{} - return out -} + v := in.(registry.Valuable) + _ = v + - func To_Proxy_CancelProxy(in registry.DecodedFields) *pbgear.Proxy_CancelProxy { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Proxy_CancelProxy(in any) *pbgear.Proxy_CancelProxy { out := &pbgear.Proxy_CancelProxy{} - return out -} + v := in.(registry.Valuable) + _ = v - func To_Proxy_CompactTupleNull(in types.UCompact) *pbgear.Proxy_CompactTupleNull { - - out := &pbgear.Proxy_CompactTupleNull{} - out.Value = To_TupleNull() - return out -} - func To_Proxy_CreatePureCall(in registry.DecodedFields) *pbgear.Proxy_CreatePureCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Proxy_CreatePureCall(in any) *pbgear.Proxy_CreatePureCall { out := &pbgear.Proxy_CreatePureCall{} - out.ProxyType = To_Proxy_ProxyType(fields[0].Value.(registry.DecodedFields)) - - out.Delay = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.Index = To_uint32(fields[2].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Proxy_Delegate(in registry.DecodedFields) *pbgear.Proxy_Delegate { + // field ProxyType + out.ProxyType = To_Proxy_CreatePureCall_proxy_type(v.ValueAt(0)) + // primitive field Delay + out.Delay = To_uint32(v.ValueAt(1)) + // primitive field Index + out.Index = To_uint32(v.ValueAt(2)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields +func To_Proxy_CreatePureCall_proxy_type(in any) *pbgear.Proxy_ProxyType { + v := in.(registry.Valuable) + return To_Proxy_ProxyType(v.ValueAt(0) //simple field +} + + +func To_Proxy_Delegate(in any) *pbgear.Proxy_Delegate { out := &pbgear.Proxy_Delegate{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.Proxy_Delegate_Id{ - Id: To_Proxy_Id(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Proxy_Delegate_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Proxy_Delegate_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Proxy_Delegate_Id{ + Id: To_Proxy_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.Proxy_Delegate_Index{ - Index: To_Proxy_Index(fields), //Passthrough fields... + case 1: + return &pbgear.Proxy_Delegate_Index{ + Index: To_Proxy_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.Proxy_Delegate_Raw{ - Raw: To_Proxy_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.Proxy_Delegate_Raw{ + Raw: To_Proxy_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.Proxy_Delegate_Address32{ - Address32: To_Proxy_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.Proxy_Delegate_Address32{ + Address32: To_Proxy_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.Proxy_Delegate_Address20{ - Address20: To_Proxy_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.Proxy_Delegate_Address20{ + Address20: To_Proxy_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Proxy_Err(in registry.DecodedFields) *pbgear.Proxy_Err { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_Err{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Proxy_ForceProxyType(in registry.DecodedFields) *pbgear.Proxy_ForceProxyType { - - fields := []*registry.DecodedField(in) - _ = fields +func To_Proxy_ForceProxyType(in any) *pbgear.Proxy_ForceProxyType { out := &pbgear.Proxy_ForceProxyType{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Proxy_ForceProxyType_Any{ - Any: To_Proxy_Any(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Proxy_ForceProxyType_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Proxy_ForceProxyType_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Proxy_ForceProxyType_Any{ + Any: To_Proxy_Any(param), + } + case 1: + return &pbgear.Proxy_ForceProxyType_NonTransfer{ + NonTransfer: To_Proxy_NonTransfer(param), + } + case 2: + return &pbgear.Proxy_ForceProxyType_Governance{ + Governance: To_Proxy_Governance(param), + } + case 3: + return &pbgear.Proxy_ForceProxyType_Staking{ + Staking: To_Proxy_Staking(param), + } + case 4: + return &pbgear.Proxy_ForceProxyType_IdentityJudgement{ + IdentityJudgement: To_Proxy_IdentityJudgement(param), } + case 5: + return &pbgear.Proxy_ForceProxyType_CancelProxy{ + CancelProxy: To_Proxy_CancelProxy(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Proxy_Governance(in registry.DecodedFields) *pbgear.Proxy_Governance { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Proxy_Governance(in any) *pbgear.Proxy_Governance { out := &pbgear.Proxy_Governance{} - return out -} + v := in.(registry.Valuable) + _ = v - func To_Proxy_Id(in registry.DecodedFields) *pbgear.Proxy_Id { + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Proxy_Id(in any) *pbgear.Proxy_Id { out := &pbgear.Proxy_Id{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Proxy_Id_value0(v.ValueAt(0)) - func To_Proxy_IdentityJudgement(in registry.DecodedFields) *pbgear.Proxy_IdentityJudgement { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_IdentityJudgement{} - return out +func To_Proxy_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_Proxy_Index(in registry.DecodedFields) *pbgear.Proxy_Index { + +func To_Proxy_IdentityJudgement(in any) *pbgear.Proxy_IdentityJudgement { + out := &pbgear.Proxy_IdentityJudgement{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Proxy_Index(in any) *pbgear.Proxy_Index { out := &pbgear.Proxy_Index{} - out.Value0 = To_Proxy_CompactTupleNull(fields[0].Value.(types.UCompact)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Proxy_KillPureCall(in registry.DecodedFields) *pbgear.Proxy_KillPureCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_KillPureCall{} - out.Spawner = To_Proxy_Spawner(fields[0].Value.(registry.DecodedFields)) - - out.ProxyType = To_Proxy_ProxyType(fields[1].Value.(registry.DecodedFields)) - - out.Index = To_uint32(fields[2].Value.(registry.DecodedFields)) - - out.Height = To_CompactUint32(fields[3].Value.(types.UCompact)) - - out.ExtIndex = To_CompactUint32(fields[4].Value.(types.UCompact)) - - return out -} - - func To_Proxy_NonTransfer(in registry.DecodedFields) *pbgear.Proxy_NonTransfer { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_NonTransfer{} - return out -} + // field Value0 + out.Value0 = To_Proxy_Index_value0(v.ValueAt(0)) - func To_Proxy_Ok(in registry.DecodedFields) *pbgear.Proxy_Ok { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_Ok{} - out.Value0 = To_Proxy_TupleNull(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Proxy_Index_value0(in any) *pbgear.Proxy_TupleNull { + v := in.(registry.Valuable) + return To_Proxy_TupleNull(v.ValueAt(0) //simple field } - func To_Proxy_ProxyAddedEvent(in registry.DecodedFields) *pbgear.Proxy_ProxyAddedEvent { + +func To_Proxy_KillPureCall(in any) *pbgear.Proxy_KillPureCall { + out := &pbgear.Proxy_KillPureCall{} + v := in.(registry.Valuable) + _ = v + + // field Spawner + out.Spawner = To_Proxy_KillPureCall_spawner(v.ValueAt(0)) + // field ProxyType + out.ProxyType = To_Proxy_KillPureCall_proxy_type(v.ValueAt(1)) + // primitive field Index + out.Index = To_uint32(v.ValueAt(2)) + // primitive field Height + out.Height = To_uint32(v.ValueAt(3)) + // primitive field ExtIndex + out.ExtIndex = To_uint32(v.ValueAt(4)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_ProxyAddedEvent{} - out.Delegator = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Delegatee = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.ProxyType = To_Proxy_ProxyType(fields[2].Value.(registry.DecodedFields)) - - out.Delay = To_uint32(fields[3].Value.(registry.DecodedFields)) - - return out +func To_Proxy_KillPureCall_spawner(in any) *pbgear.Proxy_Spawner { + v := in.(registry.Valuable) + return To_Proxy_Spawner(v.ValueAt(0) //simple field } +func To_Proxy_KillPureCall_proxy_type(in any) *pbgear.Proxy_ProxyType { + v := in.(registry.Valuable) + return To_Proxy_ProxyType(v.ValueAt(0) //simple field +} + - func To_Proxy_ProxyAnnouncedCall(in registry.DecodedFields) *pbgear.Proxy_ProxyAnnouncedCall { +func To_Proxy_NonTransfer(in any) *pbgear.Proxy_NonTransfer { + out := &pbgear.Proxy_NonTransfer{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Proxy_ProxyAnnouncedCall(in any) *pbgear.Proxy_ProxyAnnouncedCall { out := &pbgear.Proxy_ProxyAnnouncedCall{} - out.Delegate = To_Proxy_Delegate(fields[0].Value.(registry.DecodedFields)) - - out.Real = To_Proxy_Real(fields[1].Value.(registry.DecodedFields)) - - out.ForceProxyType = To_optional_Proxy_ForceProxyType(fields[2].Value.(registry.DecodedFields)) - - - switch { - case matchFields(fields, []int64{66}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_SystemRemark{ - SystemRemark: To_System_RemarkCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{70}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_SystemSetHeapPages{ - SystemSetHeapPages: To_System_SetHeapPagesCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{71}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_SystemSetCode{ - SystemSetCode: To_System_SetCodeCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{81}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_SystemSetCodeWithoutChecks{ - SystemSetCodeWithoutChecks: To_System_SetCodeWithoutChecksCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{93}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_SystemSetStorage{ - SystemSetStorage: To_System_SetStorageCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{98}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_SystemKillStorage{ - SystemKillStorage: To_System_KillStorageCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{100}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_SystemKillPrefix{ - SystemKillPrefix: To_System_KillPrefixCall(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // field Delegate + out.Delegate = To_Proxy_ProxyAnnouncedCall_delegate(v.ValueAt(0)) + // field Real + out.Real = To_Proxy_ProxyAnnouncedCall_real(v.ValueAt(1)) + // optional field ForceProxyType + out.ForceProxyType = To_Optional_Proxy_ProxyAnnouncedCall_force_proxy_type(v.ValueAt(2)) + // oneOf field Call + v3 := To_OneOf_Proxy_ProxyAnnouncedCall_call(v.ValueAt(3)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v3)) + + return out //from message +} + +func To_Proxy_ProxyAnnouncedCall_delegate(in any) *pbgear.Proxy_Delegate { + v := in.(registry.Valuable) + return To_Proxy_Delegate(v.ValueAt(0) //simple field +} +func To_Proxy_ProxyAnnouncedCall_real(in any) *pbgear.Proxy_Real { + v := in.(registry.Valuable) + return To_Proxy_Real(v.ValueAt(0) //simple field +} +func To_Optional_Proxy_ProxyAnnouncedCall_force_proxy_type(in any) *pbgear.Proxy_ForceProxyType { + return nil //funcForOptionalField +} +func To_OneOf_Proxy_ProxyAnnouncedCall_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Proxy_ProxyAnnouncedCall_System{ + System: To_SystemPallet(param), + } + case 1: + return &pbgear.Proxy_ProxyAnnouncedCall_Timestamp{ + Timestamp: To_TimestampPallet(param), + } + case 3: + return &pbgear.Proxy_ProxyAnnouncedCall_Babe{ + Babe: To_BabePallet(param), } - case matchFields(fields, []int64{101}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_SystemRemarkWithEvent{ - SystemRemarkWithEvent: To_System_RemarkWithEventCall(fields), //Passthrough fields... + case 4: + return &pbgear.Proxy_ProxyAnnouncedCall_Grandpa{ + Grandpa: To_GrandpaPallet(param), } - case matchFields(fields, []int64{105}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_TimestampSet{ - TimestampSet: To_Timestamp_SetCall(fields), //Passthrough fields... + case 5: + return &pbgear.Proxy_ProxyAnnouncedCall_Balances{ + Balances: To_BalancesPallet(param), } - case matchFields(fields, []int64{113}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_BabeReportEquivocation{ - BabeReportEquivocation: To_Babe_ReportEquivocationCall(fields), //Passthrough fields... + case 10: + return &pbgear.Proxy_ProxyAnnouncedCall_Vesting{ + Vesting: To_VestingPallet(param), } - case matchFields(fields, []int64{116}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_BabeReportEquivocationUnsigned{ - BabeReportEquivocationUnsigned: To_Babe_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 11: + return &pbgear.Proxy_ProxyAnnouncedCall_BagsList{ + BagsList: To_BagsListPallet(param), } - case matchFields(fields, []int64{118}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_BabePlanConfigChange{ - BabePlanConfigChange: To_Babe_PlanConfigChangeCall(fields), //Passthrough fields... + case 12: + return &pbgear.Proxy_ProxyAnnouncedCall_ImOnline{ + ImOnline: To_ImOnlinePallet(param), } - case matchFields(fields, []int64{124}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_GrandpaReportEquivocation{ - GrandpaReportEquivocation: To_Grandpa_ReportEquivocationCall(fields), //Passthrough fields... + case 13: + return &pbgear.Proxy_ProxyAnnouncedCall_Staking{ + Staking: To_StakingPallet(param), } - case matchFields(fields, []int64{129}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_GrandpaReportEquivocationUnsigned{ - GrandpaReportEquivocationUnsigned: To_Grandpa_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 7: + return &pbgear.Proxy_ProxyAnnouncedCall_Session{ + Session: To_SessionPallet(param), } - case matchFields(fields, []int64{132}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_GrandpaNoteStalled{ - GrandpaNoteStalled: To_Grandpa_NoteStalledCall(fields), //Passthrough fields... + case 14: + return &pbgear.Proxy_ProxyAnnouncedCall_Treasury{ + Treasury: To_TreasuryPallet(param), } - case matchFields(fields, []int64{133}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_BalancesTransferAllowDeath{ - BalancesTransferAllowDeath: To_Balances_TransferAllowDeathCall(fields), //Passthrough fields... + case 8: + return &pbgear.Proxy_ProxyAnnouncedCall_Utility{ + Utility: To_UtilityPallet(param), } - case matchFields(fields, []int64{134}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_BalancesForceTransfer{ - BalancesForceTransfer: To_Balances_ForceTransferCall(fields), //Passthrough fields... + case 16: + return &pbgear.Proxy_ProxyAnnouncedCall_ConvictionVoting{ + ConvictionVoting: To_ConvictionVotingPallet(param), } - case matchFields(fields, []int64{135}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_BalancesTransferKeepAlive{ - BalancesTransferKeepAlive: To_Balances_TransferKeepAliveCall(fields), //Passthrough fields... + case 17: + return &pbgear.Proxy_ProxyAnnouncedCall_Referenda{ + Referenda: To_ReferendaPallet(param), } - case matchFields(fields, []int64{138}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_BalancesTransferAll{ - BalancesTransferAll: To_Balances_TransferAllCall(fields), //Passthrough fields... + case 18: + return &pbgear.Proxy_ProxyAnnouncedCall_FellowshipCollective{ + FellowshipCollective: To_FellowshipCollectivePallet(param), } - case matchFields(fields, []int64{140}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_BalancesForceUnreserve{ - BalancesForceUnreserve: To_Balances_ForceUnreserveCall(fields), //Passthrough fields... + case 19: + return &pbgear.Proxy_ProxyAnnouncedCall_FellowshipReferenda{ + FellowshipReferenda: To_FellowshipReferendaPallet(param), } - case matchFields(fields, []int64{182}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_BalancesUpgradeAccounts{ - BalancesUpgradeAccounts: To_Balances_UpgradeAccountsCall(fields), //Passthrough fields... + case 21: + return &pbgear.Proxy_ProxyAnnouncedCall_Whitelist{ + Whitelist: To_WhitelistPallet(param), } - case matchFields(fields, []int64{185}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_BalancesForceSetBalance{ - BalancesForceSetBalance: To_Balances_ForceSetBalanceCall(fields), //Passthrough fields... + case 22: + return &pbgear.Proxy_ProxyAnnouncedCall_Scheduler{ + Scheduler: To_SchedulerPallet(param), } - case matchFields(fields, []int64{188}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_VestingVest{ - VestingVest: To_Vesting_VestCall(fields), //Passthrough fields... + case 23: + return &pbgear.Proxy_ProxyAnnouncedCall_Preimage{ + Preimage: To_PreimagePallet(param), } - case matchFields(fields, []int64{249}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_VestingVestOther{ - VestingVestOther: To_Vesting_VestOtherCall(fields), //Passthrough fields... + case 24: + return &pbgear.Proxy_ProxyAnnouncedCall_Identity{ + Identity: To_IdentityPallet(param), } - case matchFields(fields, []int64{250}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_VestingVestedTransfer{ - VestingVestedTransfer: To_Vesting_VestedTransferCall(fields), //Passthrough fields... + case 25: + return &pbgear.Proxy_ProxyAnnouncedCall_Proxy{ + Proxy: To_ProxyPallet(param), } - case matchFields(fields, []int64{251}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_VestingForceVestedTransfer{ - VestingForceVestedTransfer: To_Vesting_ForceVestedTransferCall(fields), //Passthrough fields... + case 26: + return &pbgear.Proxy_ProxyAnnouncedCall_Multisig{ + Multisig: To_MultisigPallet(param), } - case matchFields(fields, []int64{262}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_VestingMergeSchedules{ - VestingMergeSchedules: To_Vesting_MergeSchedulesCall(fields), //Passthrough fields... + case 27: + return &pbgear.Proxy_ProxyAnnouncedCall_ElectionProviderMultiPhase{ + ElectionProviderMultiPhase: To_ElectionProviderMultiPhasePallet(param), } - case matchFields(fields, []int64{267}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_BagsListRebag{ - BagsListRebag: To_BagsList_RebagCall(fields), //Passthrough fields... + case 29: + return &pbgear.Proxy_ProxyAnnouncedCall_Bounties{ + Bounties: To_BountiesPallet(param), } - case matchFields(fields, []int64{268}): - out.Call = &pbgear.Proxy_ProxyAnnouncedCall_BagsListPutInFrontOf{ - BagsListPutInFrontOf: To_BagsList_PutInFrontOfCall(fields), //Passthrough fields... + case 30: + return &pbgear.Proxy_ProxyAnnouncedCall_ChildBounties{ + ChildBounties: To_ChildBountiesPallet(param), } + case 31: + return &pbgear.Proxy_ProxyAnnouncedCall_NominationPools{ + NominationPools: To_NominationPoolsPallet(param), + } + case 104: + return &pbgear.Proxy_ProxyAnnouncedCall_Gear{ + Gear: To_GearPallet(param), + } + case 106: + return &pbgear.Proxy_ProxyAnnouncedCall_StakingRewards{ + StakingRewards: To_StakingRewardsPallet(param), + } + case 107: + return &pbgear.Proxy_ProxyAnnouncedCall_GearVoucher{ + GearVoucher: To_GearVoucherPallet(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_optional_Proxy_ForceProxyType(f registry.DecodedFields) *pbgear.Proxy_ForceProxyType { - fields := []*registry.DecodedField(f) - _ = fields - var out = To_Proxy_ForceProxyType(fields) - return out - } - func To_Proxy_ProxyCall(in registry.DecodedFields) *pbgear.Proxy_ProxyCall { - - fields := []*registry.DecodedField(in) - _ = fields +func To_Proxy_ProxyCall(in any) *pbgear.Proxy_ProxyCall { out := &pbgear.Proxy_ProxyCall{} - out.Real = To_Proxy_Real(fields[0].Value.(registry.DecodedFields)) - - out.ForceProxyType = To_optional_Proxy_ForceProxyType(fields[1].Value.(registry.DecodedFields)) - - - switch { - case matchFields(fields, []int64{66}): - out.Call = &pbgear.Proxy_ProxyCall_SystemRemark{ - SystemRemark: To_System_RemarkCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{70}): - out.Call = &pbgear.Proxy_ProxyCall_SystemSetHeapPages{ - SystemSetHeapPages: To_System_SetHeapPagesCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{71}): - out.Call = &pbgear.Proxy_ProxyCall_SystemSetCode{ - SystemSetCode: To_System_SetCodeCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{81}): - out.Call = &pbgear.Proxy_ProxyCall_SystemSetCodeWithoutChecks{ - SystemSetCodeWithoutChecks: To_System_SetCodeWithoutChecksCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{93}): - out.Call = &pbgear.Proxy_ProxyCall_SystemSetStorage{ - SystemSetStorage: To_System_SetStorageCall(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // field Real + out.Real = To_Proxy_ProxyCall_real(v.ValueAt(0)) + // optional field ForceProxyType + out.ForceProxyType = To_Optional_Proxy_ProxyCall_force_proxy_type(v.ValueAt(1)) + // oneOf field Call + v2 := To_OneOf_Proxy_ProxyCall_call(v.ValueAt(2)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v2)) + + return out //from message +} + +func To_Proxy_ProxyCall_real(in any) *pbgear.Proxy_Real { + v := in.(registry.Valuable) + return To_Proxy_Real(v.ValueAt(0) //simple field +} +func To_Optional_Proxy_ProxyCall_force_proxy_type(in any) *pbgear.Proxy_ForceProxyType { + return nil //funcForOptionalField +} +func To_OneOf_Proxy_ProxyCall_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Proxy_ProxyCall_System{ + System: To_SystemPallet(param), + } + case 1: + return &pbgear.Proxy_ProxyCall_Timestamp{ + Timestamp: To_TimestampPallet(param), + } + case 3: + return &pbgear.Proxy_ProxyCall_Babe{ + Babe: To_BabePallet(param), + } + case 4: + return &pbgear.Proxy_ProxyCall_Grandpa{ + Grandpa: To_GrandpaPallet(param), } - case matchFields(fields, []int64{98}): - out.Call = &pbgear.Proxy_ProxyCall_SystemKillStorage{ - SystemKillStorage: To_System_KillStorageCall(fields), //Passthrough fields... + case 5: + return &pbgear.Proxy_ProxyCall_Balances{ + Balances: To_BalancesPallet(param), } - case matchFields(fields, []int64{100}): - out.Call = &pbgear.Proxy_ProxyCall_SystemKillPrefix{ - SystemKillPrefix: To_System_KillPrefixCall(fields), //Passthrough fields... + case 10: + return &pbgear.Proxy_ProxyCall_Vesting{ + Vesting: To_VestingPallet(param), } - case matchFields(fields, []int64{101}): - out.Call = &pbgear.Proxy_ProxyCall_SystemRemarkWithEvent{ - SystemRemarkWithEvent: To_System_RemarkWithEventCall(fields), //Passthrough fields... + case 11: + return &pbgear.Proxy_ProxyCall_BagsList{ + BagsList: To_BagsListPallet(param), } - case matchFields(fields, []int64{105}): - out.Call = &pbgear.Proxy_ProxyCall_TimestampSet{ - TimestampSet: To_Timestamp_SetCall(fields), //Passthrough fields... + case 12: + return &pbgear.Proxy_ProxyCall_ImOnline{ + ImOnline: To_ImOnlinePallet(param), } - case matchFields(fields, []int64{113}): - out.Call = &pbgear.Proxy_ProxyCall_BabeReportEquivocation{ - BabeReportEquivocation: To_Babe_ReportEquivocationCall(fields), //Passthrough fields... + case 13: + return &pbgear.Proxy_ProxyCall_Staking{ + Staking: To_StakingPallet(param), } - case matchFields(fields, []int64{116}): - out.Call = &pbgear.Proxy_ProxyCall_BabeReportEquivocationUnsigned{ - BabeReportEquivocationUnsigned: To_Babe_ReportEquivocationUnsignedCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{118}): - out.Call = &pbgear.Proxy_ProxyCall_BabePlanConfigChange{ - BabePlanConfigChange: To_Babe_PlanConfigChangeCall(fields), //Passthrough fields... + case 7: + return &pbgear.Proxy_ProxyCall_Session{ + Session: To_SessionPallet(param), } - case matchFields(fields, []int64{124}): - out.Call = &pbgear.Proxy_ProxyCall_GrandpaReportEquivocation{ - GrandpaReportEquivocation: To_Grandpa_ReportEquivocationCall(fields), //Passthrough fields... + case 14: + return &pbgear.Proxy_ProxyCall_Treasury{ + Treasury: To_TreasuryPallet(param), } - case matchFields(fields, []int64{129}): - out.Call = &pbgear.Proxy_ProxyCall_GrandpaReportEquivocationUnsigned{ - GrandpaReportEquivocationUnsigned: To_Grandpa_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 8: + return &pbgear.Proxy_ProxyCall_Utility{ + Utility: To_UtilityPallet(param), } - case matchFields(fields, []int64{132}): - out.Call = &pbgear.Proxy_ProxyCall_GrandpaNoteStalled{ - GrandpaNoteStalled: To_Grandpa_NoteStalledCall(fields), //Passthrough fields... + case 16: + return &pbgear.Proxy_ProxyCall_ConvictionVoting{ + ConvictionVoting: To_ConvictionVotingPallet(param), } - case matchFields(fields, []int64{133}): - out.Call = &pbgear.Proxy_ProxyCall_BalancesTransferAllowDeath{ - BalancesTransferAllowDeath: To_Balances_TransferAllowDeathCall(fields), //Passthrough fields... + case 17: + return &pbgear.Proxy_ProxyCall_Referenda{ + Referenda: To_ReferendaPallet(param), } - case matchFields(fields, []int64{134}): - out.Call = &pbgear.Proxy_ProxyCall_BalancesForceTransfer{ - BalancesForceTransfer: To_Balances_ForceTransferCall(fields), //Passthrough fields... + case 18: + return &pbgear.Proxy_ProxyCall_FellowshipCollective{ + FellowshipCollective: To_FellowshipCollectivePallet(param), } - case matchFields(fields, []int64{135}): - out.Call = &pbgear.Proxy_ProxyCall_BalancesTransferKeepAlive{ - BalancesTransferKeepAlive: To_Balances_TransferKeepAliveCall(fields), //Passthrough fields... + case 19: + return &pbgear.Proxy_ProxyCall_FellowshipReferenda{ + FellowshipReferenda: To_FellowshipReferendaPallet(param), } - case matchFields(fields, []int64{138}): - out.Call = &pbgear.Proxy_ProxyCall_BalancesTransferAll{ - BalancesTransferAll: To_Balances_TransferAllCall(fields), //Passthrough fields... + case 21: + return &pbgear.Proxy_ProxyCall_Whitelist{ + Whitelist: To_WhitelistPallet(param), } - case matchFields(fields, []int64{140}): - out.Call = &pbgear.Proxy_ProxyCall_BalancesForceUnreserve{ - BalancesForceUnreserve: To_Balances_ForceUnreserveCall(fields), //Passthrough fields... + case 22: + return &pbgear.Proxy_ProxyCall_Scheduler{ + Scheduler: To_SchedulerPallet(param), } - case matchFields(fields, []int64{182}): - out.Call = &pbgear.Proxy_ProxyCall_BalancesUpgradeAccounts{ - BalancesUpgradeAccounts: To_Balances_UpgradeAccountsCall(fields), //Passthrough fields... + case 23: + return &pbgear.Proxy_ProxyCall_Preimage{ + Preimage: To_PreimagePallet(param), } - case matchFields(fields, []int64{185}): - out.Call = &pbgear.Proxy_ProxyCall_BalancesForceSetBalance{ - BalancesForceSetBalance: To_Balances_ForceSetBalanceCall(fields), //Passthrough fields... + case 24: + return &pbgear.Proxy_ProxyCall_Identity{ + Identity: To_IdentityPallet(param), } - case matchFields(fields, []int64{188}): - out.Call = &pbgear.Proxy_ProxyCall_VestingVest{ - VestingVest: To_Vesting_VestCall(fields), //Passthrough fields... + case 25: + return &pbgear.Proxy_ProxyCall_Proxy{ + Proxy: To_ProxyPallet(param), } - case matchFields(fields, []int64{249}): - out.Call = &pbgear.Proxy_ProxyCall_VestingVestOther{ - VestingVestOther: To_Vesting_VestOtherCall(fields), //Passthrough fields... + case 26: + return &pbgear.Proxy_ProxyCall_Multisig{ + Multisig: To_MultisigPallet(param), } - case matchFields(fields, []int64{250}): - out.Call = &pbgear.Proxy_ProxyCall_VestingVestedTransfer{ - VestingVestedTransfer: To_Vesting_VestedTransferCall(fields), //Passthrough fields... + case 27: + return &pbgear.Proxy_ProxyCall_ElectionProviderMultiPhase{ + ElectionProviderMultiPhase: To_ElectionProviderMultiPhasePallet(param), } - case matchFields(fields, []int64{251}): - out.Call = &pbgear.Proxy_ProxyCall_VestingForceVestedTransfer{ - VestingForceVestedTransfer: To_Vesting_ForceVestedTransferCall(fields), //Passthrough fields... + case 29: + return &pbgear.Proxy_ProxyCall_Bounties{ + Bounties: To_BountiesPallet(param), } - case matchFields(fields, []int64{262}): - out.Call = &pbgear.Proxy_ProxyCall_VestingMergeSchedules{ - VestingMergeSchedules: To_Vesting_MergeSchedulesCall(fields), //Passthrough fields... + case 30: + return &pbgear.Proxy_ProxyCall_ChildBounties{ + ChildBounties: To_ChildBountiesPallet(param), } - case matchFields(fields, []int64{267}): - out.Call = &pbgear.Proxy_ProxyCall_BagsListRebag{ - BagsListRebag: To_BagsList_RebagCall(fields), //Passthrough fields... + case 31: + return &pbgear.Proxy_ProxyCall_NominationPools{ + NominationPools: To_NominationPoolsPallet(param), } - case matchFields(fields, []int64{268}): - out.Call = &pbgear.Proxy_ProxyCall_BagsListPutInFrontOf{ - BagsListPutInFrontOf: To_BagsList_PutInFrontOfCall(fields), //Passthrough fields... + case 104: + return &pbgear.Proxy_ProxyCall_Gear{ + Gear: To_GearPallet(param), } + case 106: + return &pbgear.Proxy_ProxyCall_StakingRewards{ + StakingRewards: To_StakingRewardsPallet(param), + } + case 107: + return &pbgear.Proxy_ProxyCall_GearVoucher{ + GearVoucher: To_GearVoucherPallet(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Proxy_ProxyExecutedEvent(in registry.DecodedFields) *pbgear.Proxy_ProxyExecutedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_ProxyExecutedEvent{} - out.Result = To_Proxy_Result(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Proxy_ProxyRemovedEvent(in registry.DecodedFields) *pbgear.Proxy_ProxyRemovedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_ProxyRemovedEvent{} - out.Delegator = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Delegatee = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.ProxyType = To_Proxy_ProxyType(fields[2].Value.(registry.DecodedFields)) - - out.Delay = To_uint32(fields[3].Value.(registry.DecodedFields)) - - return out -} +func To_Proxy_ProxyType(in any) *pbgear.Proxy_ProxyType { + out := &pbgear.Proxy_ProxyType{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Proxy_ProxyType_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) - func To_Proxy_ProxyType(in registry.DecodedFields) *pbgear.Proxy_ProxyType { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_ProxyType{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Proxy_ProxyType_Any{ - Any: To_Proxy_Any(fields), //Passthrough fields... +func To_OneOf_Proxy_ProxyType_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Proxy_ProxyType_Any{ + Any: To_Proxy_Any(param), + } + case 1: + return &pbgear.Proxy_ProxyType_NonTransfer{ + NonTransfer: To_Proxy_NonTransfer(param), + } + case 2: + return &pbgear.Proxy_ProxyType_Governance{ + Governance: To_Proxy_Governance(param), + } + case 3: + return &pbgear.Proxy_ProxyType_Staking{ + Staking: To_Proxy_Staking(param), + } + case 4: + return &pbgear.Proxy_ProxyType_IdentityJudgement{ + IdentityJudgement: To_Proxy_IdentityJudgement(param), + } + case 5: + return &pbgear.Proxy_ProxyType_CancelProxy{ + CancelProxy: To_Proxy_CancelProxy(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Proxy_PureCreatedEvent(in registry.DecodedFields) *pbgear.Proxy_PureCreatedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_PureCreatedEvent{} - out.Pure = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Who = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.ProxyType = To_Proxy_ProxyType(fields[2].Value.(registry.DecodedFields)) - - out.DisambiguationIndex = To_uint32(fields[3].Value.(registry.DecodedFields)) - - return out -} - func To_Proxy_Raw(in registry.DecodedFields) *pbgear.Proxy_Raw { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_Raw{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} +func To_Proxy_Raw(in any) *pbgear.Proxy_Raw { + out := &pbgear.Proxy_Raw{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Proxy_Real(in any) *pbgear.Proxy_Real { + out := &pbgear.Proxy_Real{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Proxy_Real_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) - func To_Proxy_Real(in registry.DecodedFields) *pbgear.Proxy_Real { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_Real{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.Proxy_Real_Id{ - Id: To_Proxy_Id(fields), //Passthrough fields... +func To_OneOf_Proxy_Real_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Proxy_Real_Id{ + Id: To_Proxy_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.Proxy_Real_Index{ - Index: To_Proxy_Index(fields), //Passthrough fields... + case 1: + return &pbgear.Proxy_Real_Index{ + Index: To_Proxy_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.Proxy_Real_Raw{ - Raw: To_Proxy_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.Proxy_Real_Raw{ + Raw: To_Proxy_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.Proxy_Real_Address32{ - Address32: To_Proxy_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.Proxy_Real_Address32{ + Address32: To_Proxy_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.Proxy_Real_Address20{ - Address20: To_Proxy_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.Proxy_Real_Address20{ + Address20: To_Proxy_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Proxy_RejectAnnouncementCall(in registry.DecodedFields) *pbgear.Proxy_RejectAnnouncementCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Proxy_RejectAnnouncementCall(in any) *pbgear.Proxy_RejectAnnouncementCall { out := &pbgear.Proxy_RejectAnnouncementCall{} - out.Delegate = To_Proxy_Delegate(fields[0].Value.(registry.DecodedFields)) - - out.CallHash = To_PrimitiveTypesH256(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Proxy_RemoveAnnouncementCall(in registry.DecodedFields) *pbgear.Proxy_RemoveAnnouncementCall { + // field Delegate + out.Delegate = To_Proxy_RejectAnnouncementCall_delegate(v.ValueAt(0)) + // field CallHash + out.CallHash = To_Proxy_RejectAnnouncementCall_call_hash(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_RemoveAnnouncementCall{} - out.Real = To_Proxy_Real(fields[0].Value.(registry.DecodedFields)) - - out.CallHash = To_PrimitiveTypesH256(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Proxy_RejectAnnouncementCall_delegate(in any) *pbgear.Proxy_Delegate { + v := in.(registry.Valuable) + return To_Proxy_Delegate(v.ValueAt(0) //simple field +} +func To_Proxy_RejectAnnouncementCall_call_hash(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field } - func To_Proxy_RemoveProxiesCall(in registry.DecodedFields) *pbgear.Proxy_RemoveProxiesCall { + +func To_Proxy_RemoveAnnouncementCall(in any) *pbgear.Proxy_RemoveAnnouncementCall { + out := &pbgear.Proxy_RemoveAnnouncementCall{} + v := in.(registry.Valuable) + _ = v + + // field Real + out.Real = To_Proxy_RemoveAnnouncementCall_real(v.ValueAt(0)) + // field CallHash + out.CallHash = To_Proxy_RemoveAnnouncementCall_call_hash(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_RemoveProxiesCall{} - return out +func To_Proxy_RemoveAnnouncementCall_real(in any) *pbgear.Proxy_Real { + v := in.(registry.Valuable) + return To_Proxy_Real(v.ValueAt(0) //simple field } +func To_Proxy_RemoveAnnouncementCall_call_hash(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field +} + - func To_Proxy_RemoveProxyCall(in registry.DecodedFields) *pbgear.Proxy_RemoveProxyCall { +func To_Proxy_RemoveProxiesCall(in any) *pbgear.Proxy_RemoveProxiesCall { + out := &pbgear.Proxy_RemoveProxiesCall{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Proxy_RemoveProxyCall(in any) *pbgear.Proxy_RemoveProxyCall { out := &pbgear.Proxy_RemoveProxyCall{} - out.Delegate = To_Proxy_Delegate(fields[0].Value.(registry.DecodedFields)) - - out.ProxyType = To_Proxy_ProxyType(fields[1].Value.(registry.DecodedFields)) - - out.Delay = To_uint32(fields[2].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field Delegate + out.Delegate = To_Proxy_RemoveProxyCall_delegate(v.ValueAt(0)) + // field ProxyType + out.ProxyType = To_Proxy_RemoveProxyCall_proxy_type(v.ValueAt(1)) + // primitive field Delay + out.Delay = To_uint32(v.ValueAt(2)) - func To_Proxy_Result(in registry.DecodedFields) *pbgear.Proxy_Result { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Proxy_Result{} - - switch { - case matchFields(fields, []int64{58}): - out.Value = &pbgear.Proxy_Result_Ok{ - Ok: To_Proxy_Ok(fields), //Passthrough fields... - } - case matchFields(fields, []int64{25}): - out.Value = &pbgear.Proxy_Result_Err{ - Err: To_Proxy_Err(fields), //Passthrough fields... - } - } - return out +func To_Proxy_RemoveProxyCall_delegate(in any) *pbgear.Proxy_Delegate { + v := in.(registry.Valuable) + return To_Proxy_Delegate(v.ValueAt(0) //simple field +} +func To_Proxy_RemoveProxyCall_proxy_type(in any) *pbgear.Proxy_ProxyType { + v := in.(registry.Valuable) + return To_Proxy_ProxyType(v.ValueAt(0) //simple field } - func To_Proxy_Spawner(in registry.DecodedFields) *pbgear.Proxy_Spawner { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Proxy_Spawner(in any) *pbgear.Proxy_Spawner { out := &pbgear.Proxy_Spawner{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.Proxy_Spawner_Id{ - Id: To_Proxy_Id(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Proxy_Spawner_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Proxy_Spawner_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Proxy_Spawner_Id{ + Id: To_Proxy_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.Proxy_Spawner_Index{ - Index: To_Proxy_Index(fields), //Passthrough fields... + case 1: + return &pbgear.Proxy_Spawner_Index{ + Index: To_Proxy_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.Proxy_Spawner_Raw{ - Raw: To_Proxy_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.Proxy_Spawner_Raw{ + Raw: To_Proxy_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.Proxy_Spawner_Address32{ - Address32: To_Proxy_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.Proxy_Spawner_Address32{ + Address32: To_Proxy_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.Proxy_Spawner_Address20{ - Address20: To_Proxy_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.Proxy_Spawner_Address20{ + Address20: To_Proxy_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Proxy_Staking(in registry.DecodedFields) *pbgear.Proxy_Staking { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Proxy_Staking(in any) *pbgear.Proxy_Staking { out := &pbgear.Proxy_Staking{} - return out -} + v := in.(registry.Valuable) + _ = v + - func To_Proxy_TupleNull(in registry.DecodedFields) *pbgear.Proxy_TupleNull { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Proxy_TupleNull(in any) *pbgear.Proxy_TupleNull { out := &pbgear.Proxy_TupleNull{} - return out -} + v := in.(registry.Valuable) + _ = v - func To_RankedCollective_PalletRankedCollectiveTally(in registry.DecodedFields) *pbgear.RankedCollective_PalletRankedCollectiveTally { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.RankedCollective_PalletRankedCollectiveTally{} - out.BareAyes = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Ayes = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.Nays = To_uint32(fields[2].Value.(registry.DecodedFields)) - - return out -} + // field Value + out.Value = To_Proxy_TupleNull_value(v.ValueAt(0)) - func To_Referenda_After(in registry.DecodedFields) *pbgear.Referenda_After { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_After{} - out.Value0 = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Proxy_TupleNull_value(in any) *pbgear.TupleNull { + v := in.(registry.Valuable) + return To_TupleNull(v.ValueAt(0) //simple field } - func To_Referenda_ApprovedEvent(in registry.DecodedFields) *pbgear.Referenda_ApprovedEvent { + +func To_ReferendaPallet(in any) *pbgear.ReferendaPallet { + out := &pbgear.ReferendaPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_ReferendaPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_ApprovedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out +func To_OneOf_ReferendaPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.ReferendaPallet_SubmitCall{ + SubmitCall: To_Referenda_SubmitCall(param), + } + case 1: + return &pbgear.ReferendaPallet_PlaceDecisionDepositCall{ + PlaceDecisionDepositCall: To_Referenda_PlaceDecisionDepositCall(param), + } + case 2: + return &pbgear.ReferendaPallet_RefundDecisionDepositCall{ + RefundDecisionDepositCall: To_Referenda_RefundDecisionDepositCall(param), + } + case 3: + return &pbgear.ReferendaPallet_CancelCall{ + CancelCall: To_Referenda_CancelCall(param), + } + case 4: + return &pbgear.ReferendaPallet_KillCall{ + KillCall: To_Referenda_KillCall(param), + } + case 5: + return &pbgear.ReferendaPallet_NudgeReferendumCall{ + NudgeReferendumCall: To_Referenda_NudgeReferendumCall(param), + } + case 6: + return &pbgear.ReferendaPallet_OneFewerDecidingCall{ + OneFewerDecidingCall: To_Referenda_OneFewerDecidingCall(param), + } + case 7: + return &pbgear.ReferendaPallet_RefundSubmissionDepositCall{ + RefundSubmissionDepositCall: To_Referenda_RefundSubmissionDepositCall(param), + } + case 8: + return &pbgear.ReferendaPallet_SetMetadataCall{ + SetMetadataCall: To_Referenda_SetMetadataCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } } - func To_Referenda_At(in registry.DecodedFields) *pbgear.Referenda_At { + +func To_Referenda_After(in any) *pbgear.Referenda_After { + out := &pbgear.Referenda_After{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Referenda_At(in any) *pbgear.Referenda_At { out := &pbgear.Referenda_At{} - out.Value0 = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) - func To_Referenda_CancelCall(in registry.DecodedFields) *pbgear.Referenda_CancelCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Referenda_CancelCall(in any) *pbgear.Referenda_CancelCall { out := &pbgear.Referenda_CancelCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Referenda_CancelledEvent(in registry.DecodedFields) *pbgear.Referenda_CancelledEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_CancelledEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Tally = To_ConvictionVoting_PalletConvictionVotingTypesTally(fields[1].Value.(registry.DecodedFields)) - - return out -} + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) - func To_Referenda_ConfirmAbortedEvent(in registry.DecodedFields) *pbgear.Referenda_ConfirmAbortedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_ConfirmAbortedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_Referenda_ConfirmStartedEvent(in registry.DecodedFields) *pbgear.Referenda_ConfirmStartedEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_ConfirmStartedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Referenda_ConfirmedEvent(in registry.DecodedFields) *pbgear.Referenda_ConfirmedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_ConfirmedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Tally = To_ConvictionVoting_PalletConvictionVotingTypesTally(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_Referenda_DecisionDepositPlacedEvent(in registry.DecodedFields) *pbgear.Referenda_DecisionDepositPlacedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_DecisionDepositPlacedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Who = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[2].Value.(registry.DecodedFields)) - - return out -} +func To_Referenda_EnactmentMoment(in any) *pbgear.Referenda_EnactmentMoment { + out := &pbgear.Referenda_EnactmentMoment{} + v := in.(registry.Valuable) + _ = v - func To_Referenda_DecisionDepositRefundedEvent(in registry.DecodedFields) *pbgear.Referenda_DecisionDepositRefundedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_DecisionDepositRefundedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Who = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[2].Value.(registry.DecodedFields)) - - return out -} + // oneOf field Value + v0 := To_OneOf_Referenda_EnactmentMoment_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) - func To_Referenda_DecisionStartedEvent(in registry.DecodedFields) *pbgear.Referenda_DecisionStartedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_DecisionStartedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Track = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.Proposal = To_Referenda_Proposal(fields[2].Value.(registry.DecodedFields)) - - out.Tally = To_ConvictionVoting_PalletConvictionVotingTypesTally(fields[3].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_Referenda_DepositSlashedEvent(in registry.DecodedFields) *pbgear.Referenda_DepositSlashedEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_DepositSlashedEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_OneOf_Referenda_EnactmentMoment_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value - func To_Referenda_EnactmentMoment(in registry.DecodedFields) *pbgear.Referenda_EnactmentMoment { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_EnactmentMoment{} - - switch { - case matchFields(fields, []int64{4}): - out.Value = &pbgear.Referenda_EnactmentMoment_At{ - At: To_Referenda_At(fields), //Passthrough fields... + switch variantIn.VariantByte { + case 0: + return &pbgear.Referenda_EnactmentMoment_At{ + At: To_Referenda_At(param), } - case matchFields(fields, []int64{4}): - out.Value = &pbgear.Referenda_EnactmentMoment_After{ - After: To_Referenda_After(fields), //Passthrough fields... + case 1: + return &pbgear.Referenda_EnactmentMoment_After{ + After: To_Referenda_After(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Referenda_Inline(in registry.DecodedFields) *pbgear.Referenda_Inline { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Referenda_Inline(in any) *pbgear.Referenda_Inline { out := &pbgear.Referenda_Inline{} - out.Value0 = To_BoundedCollectionsBoundedVecBoundedVec(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Referenda_KillCall(in registry.DecodedFields) *pbgear.Referenda_KillCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_KillCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + // field Value0 + out.Value0 = To_Referenda_Inline_value0(v.ValueAt(0)) - func To_Referenda_KilledEvent(in registry.DecodedFields) *pbgear.Referenda_KilledEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_KilledEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Tally = To_ConvictionVoting_PalletConvictionVotingTypesTally(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Referenda_Inline_value0(in any) *pbgear.BoundedCollectionsBoundedVecBoundedVec { + v := in.(registry.Valuable) + return To_BoundedCollectionsBoundedVecBoundedVec(v.ValueAt(0) //simple field } - func To_Referenda_Legacy(in registry.DecodedFields) *pbgear.Referenda_Legacy { + +func To_Referenda_KillCall(in any) *pbgear.Referenda_KillCall { + out := &pbgear.Referenda_KillCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Referenda_Legacy(in any) *pbgear.Referenda_Legacy { out := &pbgear.Referenda_Legacy{} - out.Hash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Referenda_Lookup(in registry.DecodedFields) *pbgear.Referenda_Lookup { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_Lookup{} - out.Hash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - out.Len = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} + // field Hash + out.Hash = To_Referenda_Legacy_hash(v.ValueAt(0)) - func To_Referenda_MetadataClearedEvent(in registry.DecodedFields) *pbgear.Referenda_MetadataClearedEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_MetadataClearedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Hash = To_PrimitiveTypesH256(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Referenda_Legacy_hash(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field } - func To_Referenda_MetadataSetEvent(in registry.DecodedFields) *pbgear.Referenda_MetadataSetEvent { + +func To_Referenda_Lookup(in any) *pbgear.Referenda_Lookup { + out := &pbgear.Referenda_Lookup{} + v := in.(registry.Valuable) + _ = v + + // field Hash + out.Hash = To_Referenda_Lookup_hash(v.ValueAt(0)) + // primitive field Len + out.Len = To_uint32(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_MetadataSetEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Hash = To_PrimitiveTypesH256(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Referenda_Lookup_hash(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field } - func To_Referenda_NudgeReferendumCall(in registry.DecodedFields) *pbgear.Referenda_NudgeReferendumCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Referenda_NudgeReferendumCall(in any) *pbgear.Referenda_NudgeReferendumCall { out := &pbgear.Referenda_NudgeReferendumCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) - func To_Referenda_OneFewerDecidingCall(in registry.DecodedFields) *pbgear.Referenda_OneFewerDecidingCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Referenda_OneFewerDecidingCall(in any) *pbgear.Referenda_OneFewerDecidingCall { out := &pbgear.Referenda_OneFewerDecidingCall{} - out.Track = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Referenda_Origins(in registry.DecodedFields) *pbgear.Referenda_Origins { + // primitive field Track + out.Track = To_uint32(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Referenda_Origins(in any) *pbgear.Referenda_Origins { out := &pbgear.Referenda_Origins{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Referenda_Origins_value0(v.ValueAt(0)) - func To_Referenda_PlaceDecisionDepositCall(in registry.DecodedFields) *pbgear.Referenda_PlaceDecisionDepositCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_PlaceDecisionDepositCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Referenda_Origins_value0(in any) *pbgear.Value0 { + v := in.(registry.Valuable) + return To_Value0(v.ValueAt(0) //simple field } - func To_Referenda_Proposal(in registry.DecodedFields) *pbgear.Referenda_Proposal { + +func To_Referenda_PlaceDecisionDepositCall(in any) *pbgear.Referenda_PlaceDecisionDepositCall { + out := &pbgear.Referenda_PlaceDecisionDepositCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Referenda_Proposal(in any) *pbgear.Referenda_Proposal { out := &pbgear.Referenda_Proposal{} - - switch { - case matchFields(fields, []int64{12}): - out.Value = &pbgear.Referenda_Proposal_Legacy{ - Legacy: To_Referenda_Legacy(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Referenda_Proposal_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Referenda_Proposal_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Referenda_Proposal_Legacy{ + Legacy: To_Referenda_Legacy(param), } - case matchFields(fields, []int64{279}): - out.Value = &pbgear.Referenda_Proposal_Inline{ - Inline: To_Referenda_Inline(fields), //Passthrough fields... + case 1: + return &pbgear.Referenda_Proposal_Inline{ + Inline: To_Referenda_Inline(param), } - case matchFields(fields, []int64{12, 4}): - out.Value = &pbgear.Referenda_Proposal_Lookup{ - Lookup: To_Referenda_Lookup(fields), //Passthrough fields... + case 2: + return &pbgear.Referenda_Proposal_Lookup{ + Lookup: To_Referenda_Lookup(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Referenda_ProposalOrigin(in registry.DecodedFields) *pbgear.Referenda_ProposalOrigin { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Referenda_ProposalOrigin(in any) *pbgear.Referenda_ProposalOrigin { out := &pbgear.Referenda_ProposalOrigin{} - - switch { - case matchFields(fields, []int64{121}): - out.Value = &pbgear.Referenda_ProposalOrigin_System{ - System: To_Referenda_System(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Referenda_ProposalOrigin_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Referenda_ProposalOrigin_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Referenda_ProposalOrigin_System{ + System: To_Referenda_System(param), } - case matchFields(fields, []int64{122}): - out.Value = &pbgear.Referenda_ProposalOrigin_Origins{ - Origins: To_Referenda_Origins(fields), //Passthrough fields... + case 20: + return &pbgear.Referenda_ProposalOrigin_Origins{ + Origins: To_Referenda_Origins(param), } - case matchFields(fields, []int64{123}): - out.Value = &pbgear.Referenda_ProposalOrigin_Void{ - Void: To_Referenda_Void(fields), //Passthrough fields... + case 2: + return &pbgear.Referenda_ProposalOrigin_Void{ + Void: To_Referenda_Void(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Referenda_RefundDecisionDepositCall(in registry.DecodedFields) *pbgear.Referenda_RefundDecisionDepositCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Referenda_RefundDecisionDepositCall(in any) *pbgear.Referenda_RefundDecisionDepositCall { out := &pbgear.Referenda_RefundDecisionDepositCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Referenda_RefundSubmissionDepositCall(in registry.DecodedFields) *pbgear.Referenda_RefundSubmissionDepositCall { + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Referenda_RefundSubmissionDepositCall(in any) *pbgear.Referenda_RefundSubmissionDepositCall { out := &pbgear.Referenda_RefundSubmissionDepositCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Referenda_RejectedEvent(in registry.DecodedFields) *pbgear.Referenda_RejectedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_RejectedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Tally = To_ConvictionVoting_PalletConvictionVotingTypesTally(fields[1].Value.(registry.DecodedFields)) - - return out -} + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) - func To_Referenda_SetMetadataCall(in registry.DecodedFields) *pbgear.Referenda_SetMetadataCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Referenda_SetMetadataCall(in any) *pbgear.Referenda_SetMetadataCall { out := &pbgear.Referenda_SetMetadataCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.MaybeHash = To_optional_PrimitiveTypesH256(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) + // optional field MaybeHash + out.MaybeHash = To_Optional_Referenda_SetMetadataCall_maybe_hash(v.ValueAt(1)) - func To_Referenda_SubmissionDepositRefundedEvent(in registry.DecodedFields) *pbgear.Referenda_SubmissionDepositRefundedEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_SubmissionDepositRefundedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Who = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[2].Value.(registry.DecodedFields)) - - return out +func To_Optional_Referenda_SetMetadataCall_maybe_hash(in any) *pbgear.PrimitiveTypesH256 { + return nil //funcForOptionalField } - func To_Referenda_SubmitCall(in registry.DecodedFields) *pbgear.Referenda_SubmitCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Referenda_SubmitCall(in any) *pbgear.Referenda_SubmitCall { out := &pbgear.Referenda_SubmitCall{} - out.ProposalOrigin = To_Referenda_ProposalOrigin(fields[0].Value.(registry.DecodedFields)) - - out.Proposal = To_Referenda_Proposal(fields[1].Value.(registry.DecodedFields)) - - out.EnactmentMoment = To_Referenda_EnactmentMoment(fields[2].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Referenda_SubmittedEvent(in registry.DecodedFields) *pbgear.Referenda_SubmittedEvent { + // field ProposalOrigin + out.ProposalOrigin = To_Referenda_SubmitCall_proposal_origin(v.ValueAt(0)) + // field Proposal + out.Proposal = To_Referenda_SubmitCall_proposal(v.ValueAt(1)) + // field EnactmentMoment + out.EnactmentMoment = To_Referenda_SubmitCall_enactment_moment(v.ValueAt(2)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_SubmittedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Track = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.Proposal = To_Referenda_Proposal(fields[2].Value.(registry.DecodedFields)) - - return out +func To_Referenda_SubmitCall_proposal_origin(in any) *pbgear.Referenda_ProposalOrigin { + v := in.(registry.Valuable) + return To_Referenda_ProposalOrigin(v.ValueAt(0) //simple field +} +func To_Referenda_SubmitCall_proposal(in any) *pbgear.Referenda_Proposal { + v := in.(registry.Valuable) + return To_Referenda_Proposal(v.ValueAt(0) //simple field +} +func To_Referenda_SubmitCall_enactment_moment(in any) *pbgear.Referenda_EnactmentMoment { + v := in.(registry.Valuable) + return To_Referenda_EnactmentMoment(v.ValueAt(0) //simple field } - func To_Referenda_System(in registry.DecodedFields) *pbgear.Referenda_System { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Referenda_System(in any) *pbgear.Referenda_System { out := &pbgear.Referenda_System{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Referenda_System_value0(v.ValueAt(0)) - func To_Referenda_TimedOutEvent(in registry.DecodedFields) *pbgear.Referenda_TimedOutEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Referenda_TimedOutEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Tally = To_ConvictionVoting_PalletConvictionVotingTypesTally(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Referenda_System_value0(in any) *pbgear.Value0 { + v := in.(registry.Valuable) + return To_Value0(v.ValueAt(0) //simple field } - func To_Referenda_Void(in registry.DecodedFields) *pbgear.Referenda_Void { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Referenda_Void(in any) *pbgear.Referenda_Void { out := &pbgear.Referenda_Void{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_RootNotAllowed(in registry.DecodedFields) *pbgear.RootNotAllowed { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.RootNotAllowed{} - return out -} + // field Value0 + out.Value0 = To_Referenda_Void_value0(v.ValueAt(0)) - func To_Scheduler_CallUnavailableEvent(in registry.DecodedFields) *pbgear.Scheduler_CallUnavailableEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Scheduler_CallUnavailableEvent{} - out.Task = To_Scheduler_TupleUint32Uint32(fields[0].Value.(registry.DecodedFields)) - - out.Id = To_bytes(fields[1].Value.([]interface{})) - return out + return out //from message } - - func To_Scheduler_CancelCall(in registry.DecodedFields) *pbgear.Scheduler_CancelCall { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Scheduler_CancelCall{} - out.When = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Index = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Referenda_Void_value0(in any) *pbgear.Value0 { + v := in.(registry.Valuable) + return To_Value0(v.ValueAt(0) //simple field } - func To_Scheduler_CancelNamedCall(in registry.DecodedFields) *pbgear.Scheduler_CancelNamedCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Scheduler_CancelNamedCall{} - out.Id = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_Scheduler_CanceledEvent(in registry.DecodedFields) *pbgear.Scheduler_CanceledEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Scheduler_CanceledEvent{} - out.When = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Index = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_Root(in any) *pbgear.Root { + out := &pbgear.Root{} + v := in.(registry.Valuable) + _ = v - func To_Scheduler_DispatchedEvent(in registry.DecodedFields) *pbgear.Scheduler_DispatchedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Scheduler_DispatchedEvent{} - out.Task = To_Scheduler_TupleUint32Uint32(fields[0].Value.(registry.DecodedFields)) - - out.Id = To_bytes(fields[1].Value.([]interface{})) - out.Result = To_Scheduler_Result(fields[2].Value.(registry.DecodedFields)) - - return out -} - func To_Scheduler_Err(in registry.DecodedFields) *pbgear.Scheduler_Err { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Scheduler_Err{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_Scheduler_Ok(in registry.DecodedFields) *pbgear.Scheduler_Ok { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Scheduler_Ok{} - out.Value0 = To_Scheduler_TupleNull(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Scheduler_PeriodicFailedEvent(in registry.DecodedFields) *pbgear.Scheduler_PeriodicFailedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Scheduler_PeriodicFailedEvent{} - out.Task = To_Scheduler_TupleUint32Uint32(fields[0].Value.(registry.DecodedFields)) - - out.Id = To_bytes(fields[1].Value.([]interface{})) - return out -} - func To_Scheduler_PermanentlyOverweightEvent(in registry.DecodedFields) *pbgear.Scheduler_PermanentlyOverweightEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Scheduler_PermanentlyOverweightEvent{} - out.Task = To_Scheduler_TupleUint32Uint32(fields[0].Value.(registry.DecodedFields)) - - out.Id = To_bytes(fields[1].Value.([]interface{})) - return out -} +func To_SchedulerPallet(in any) *pbgear.SchedulerPallet { + out := &pbgear.SchedulerPallet{} + v := in.(registry.Valuable) + _ = v - func To_Scheduler_Result(in registry.DecodedFields) *pbgear.Scheduler_Result { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Scheduler_Result{} - - switch { - case matchFields(fields, []int64{58}): - out.Value = &pbgear.Scheduler_Result_Ok{ - Ok: To_Scheduler_Ok(fields), //Passthrough fields... - } - case matchFields(fields, []int64{25}): - out.Value = &pbgear.Scheduler_Result_Err{ - Err: To_Scheduler_Err(fields), //Passthrough fields... - } - } - return out -} + // oneOf field Call + v0 := To_OneOf_SchedulerPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) - func To_Scheduler_ScheduleAfterCall(in registry.DecodedFields) *pbgear.Scheduler_ScheduleAfterCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Scheduler_ScheduleAfterCall{} - out.After = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.MaybePeriodic = To_optional_Scheduler_TupleUint32Uint32(fields[1].Value.(registry.DecodedFields)) - - out.Priority = To_uint32(fields[2].Value.(registry.DecodedFields)) - - - switch { - case matchFields(fields, []int64{66}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_SystemRemark{ - SystemRemark: To_System_RemarkCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{70}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_SystemSetHeapPages{ - SystemSetHeapPages: To_System_SetHeapPagesCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{71}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_SystemSetCode{ - SystemSetCode: To_System_SetCodeCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{81}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_SystemSetCodeWithoutChecks{ - SystemSetCodeWithoutChecks: To_System_SetCodeWithoutChecksCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{93}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_SystemSetStorage{ - SystemSetStorage: To_System_SetStorageCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{98}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_SystemKillStorage{ - SystemKillStorage: To_System_KillStorageCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{100}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_SystemKillPrefix{ - SystemKillPrefix: To_System_KillPrefixCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{101}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_SystemRemarkWithEvent{ - SystemRemarkWithEvent: To_System_RemarkWithEventCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{105}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_TimestampSet{ - TimestampSet: To_Timestamp_SetCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{113}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_BabeReportEquivocation{ - BabeReportEquivocation: To_Babe_ReportEquivocationCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{116}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_BabeReportEquivocationUnsigned{ - BabeReportEquivocationUnsigned: To_Babe_ReportEquivocationUnsignedCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{118}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_BabePlanConfigChange{ - BabePlanConfigChange: To_Babe_PlanConfigChangeCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{124}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_GrandpaReportEquivocation{ - GrandpaReportEquivocation: To_Grandpa_ReportEquivocationCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{129}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_GrandpaReportEquivocationUnsigned{ - GrandpaReportEquivocationUnsigned: To_Grandpa_ReportEquivocationUnsignedCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{132}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_GrandpaNoteStalled{ - GrandpaNoteStalled: To_Grandpa_NoteStalledCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{133}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_BalancesTransferAllowDeath{ - BalancesTransferAllowDeath: To_Balances_TransferAllowDeathCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{134}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_BalancesForceTransfer{ - BalancesForceTransfer: To_Balances_ForceTransferCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{135}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_BalancesTransferKeepAlive{ - BalancesTransferKeepAlive: To_Balances_TransferKeepAliveCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{138}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_BalancesTransferAll{ - BalancesTransferAll: To_Balances_TransferAllCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{140}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_BalancesForceUnreserve{ - BalancesForceUnreserve: To_Balances_ForceUnreserveCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{182}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_BalancesUpgradeAccounts{ - BalancesUpgradeAccounts: To_Balances_UpgradeAccountsCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{185}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_BalancesForceSetBalance{ - BalancesForceSetBalance: To_Balances_ForceSetBalanceCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{188}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_VestingVest{ - VestingVest: To_Vesting_VestCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{249}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_VestingVestOther{ - VestingVestOther: To_Vesting_VestOtherCall(fields), //Passthrough fields... +func To_OneOf_SchedulerPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.SchedulerPallet_ScheduleCall{ + ScheduleCall: To_Scheduler_ScheduleCall(param), } - case matchFields(fields, []int64{250}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_VestingVestedTransfer{ - VestingVestedTransfer: To_Vesting_VestedTransferCall(fields), //Passthrough fields... + case 1: + return &pbgear.SchedulerPallet_CancelCall{ + CancelCall: To_Scheduler_CancelCall(param), } - case matchFields(fields, []int64{251}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_VestingForceVestedTransfer{ - VestingForceVestedTransfer: To_Vesting_ForceVestedTransferCall(fields), //Passthrough fields... + case 2: + return &pbgear.SchedulerPallet_ScheduleNamedCall{ + ScheduleNamedCall: To_Scheduler_ScheduleNamedCall(param), } - case matchFields(fields, []int64{262}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_VestingMergeSchedules{ - VestingMergeSchedules: To_Vesting_MergeSchedulesCall(fields), //Passthrough fields... + case 3: + return &pbgear.SchedulerPallet_CancelNamedCall{ + CancelNamedCall: To_Scheduler_CancelNamedCall(param), } - case matchFields(fields, []int64{267}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_BagsListRebag{ - BagsListRebag: To_BagsList_RebagCall(fields), //Passthrough fields... + case 4: + return &pbgear.SchedulerPallet_ScheduleAfterCall{ + ScheduleAfterCall: To_Scheduler_ScheduleAfterCall(param), } - case matchFields(fields, []int64{268}): - out.Call = &pbgear.Scheduler_ScheduleAfterCall_BagsListPutInFrontOf{ - BagsListPutInFrontOf: To_BagsList_PutInFrontOfCall(fields), //Passthrough fields... + case 5: + return &pbgear.SchedulerPallet_ScheduleNamedAfterCall{ + ScheduleNamedAfterCall: To_Scheduler_ScheduleNamedAfterCall(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_optional_Scheduler_TupleUint32Uint32(f registry.DecodedFields) *pbgear.Scheduler_TupleUint32Uint32 { - fields := []*registry.DecodedField(f) - _ = fields - var out = To_Scheduler_TupleUint32Uint32(fields) - return out - } - func To_Scheduler_ScheduleCall(in registry.DecodedFields) *pbgear.Scheduler_ScheduleCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Scheduler_ScheduleCall{} - out.When = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.MaybePeriodic = To_optional_Scheduler_TupleUint32Uint32(fields[1].Value.(registry.DecodedFields)) - - out.Priority = To_uint32(fields[2].Value.(registry.DecodedFields)) - - - switch { - case matchFields(fields, []int64{66}): - out.Call = &pbgear.Scheduler_ScheduleCall_SystemRemark{ - SystemRemark: To_System_RemarkCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{70}): - out.Call = &pbgear.Scheduler_ScheduleCall_SystemSetHeapPages{ - SystemSetHeapPages: To_System_SetHeapPagesCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{71}): - out.Call = &pbgear.Scheduler_ScheduleCall_SystemSetCode{ - SystemSetCode: To_System_SetCodeCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{81}): - out.Call = &pbgear.Scheduler_ScheduleCall_SystemSetCodeWithoutChecks{ - SystemSetCodeWithoutChecks: To_System_SetCodeWithoutChecksCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{93}): - out.Call = &pbgear.Scheduler_ScheduleCall_SystemSetStorage{ - SystemSetStorage: To_System_SetStorageCall(fields), //Passthrough fields... +func To_Scheduler_CancelCall(in any) *pbgear.Scheduler_CancelCall { + out := &pbgear.Scheduler_CancelCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field When + out.When = To_uint32(v.ValueAt(0)) + // primitive field Index + out.Index = To_uint32(v.ValueAt(1)) + + return out //from message +} + + + +func To_Scheduler_CancelNamedCall(in any) *pbgear.Scheduler_CancelNamedCall { + out := &pbgear.Scheduler_CancelNamedCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Id + out.Id = To_bytes(v.ValueAt(0)) + + return out //from message +} + + + +func To_Scheduler_ScheduleAfterCall(in any) *pbgear.Scheduler_ScheduleAfterCall { + out := &pbgear.Scheduler_ScheduleAfterCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field After + out.After = To_uint32(v.ValueAt(0)) + // optional field MaybePeriodic + out.MaybePeriodic = To_Optional_Scheduler_ScheduleAfterCall_maybe_periodic(v.ValueAt(1)) + // primitive field Priority + out.Priority = To_uint32(v.ValueAt(2)) + // oneOf field Call + v3 := To_OneOf_Scheduler_ScheduleAfterCall_call(v.ValueAt(3)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v3)) + + return out //from message +} + +func To_Optional_Scheduler_ScheduleAfterCall_maybe_periodic(in any) *pbgear.Scheduler_TupleUint32Uint32 { + return nil //funcForOptionalField +} +func To_OneOf_Scheduler_ScheduleAfterCall_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Scheduler_ScheduleAfterCall_System{ + System: To_SystemPallet(param), + } + case 1: + return &pbgear.Scheduler_ScheduleAfterCall_Timestamp{ + Timestamp: To_TimestampPallet(param), + } + case 3: + return &pbgear.Scheduler_ScheduleAfterCall_Babe{ + Babe: To_BabePallet(param), } - case matchFields(fields, []int64{98}): - out.Call = &pbgear.Scheduler_ScheduleCall_SystemKillStorage{ - SystemKillStorage: To_System_KillStorageCall(fields), //Passthrough fields... + case 4: + return &pbgear.Scheduler_ScheduleAfterCall_Grandpa{ + Grandpa: To_GrandpaPallet(param), } - case matchFields(fields, []int64{100}): - out.Call = &pbgear.Scheduler_ScheduleCall_SystemKillPrefix{ - SystemKillPrefix: To_System_KillPrefixCall(fields), //Passthrough fields... + case 5: + return &pbgear.Scheduler_ScheduleAfterCall_Balances{ + Balances: To_BalancesPallet(param), } - case matchFields(fields, []int64{101}): - out.Call = &pbgear.Scheduler_ScheduleCall_SystemRemarkWithEvent{ - SystemRemarkWithEvent: To_System_RemarkWithEventCall(fields), //Passthrough fields... + case 10: + return &pbgear.Scheduler_ScheduleAfterCall_Vesting{ + Vesting: To_VestingPallet(param), } - case matchFields(fields, []int64{105}): - out.Call = &pbgear.Scheduler_ScheduleCall_TimestampSet{ - TimestampSet: To_Timestamp_SetCall(fields), //Passthrough fields... + case 11: + return &pbgear.Scheduler_ScheduleAfterCall_BagsList{ + BagsList: To_BagsListPallet(param), } - case matchFields(fields, []int64{113}): - out.Call = &pbgear.Scheduler_ScheduleCall_BabeReportEquivocation{ - BabeReportEquivocation: To_Babe_ReportEquivocationCall(fields), //Passthrough fields... + case 12: + return &pbgear.Scheduler_ScheduleAfterCall_ImOnline{ + ImOnline: To_ImOnlinePallet(param), } - case matchFields(fields, []int64{116}): - out.Call = &pbgear.Scheduler_ScheduleCall_BabeReportEquivocationUnsigned{ - BabeReportEquivocationUnsigned: To_Babe_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 13: + return &pbgear.Scheduler_ScheduleAfterCall_Staking{ + Staking: To_StakingPallet(param), } - case matchFields(fields, []int64{118}): - out.Call = &pbgear.Scheduler_ScheduleCall_BabePlanConfigChange{ - BabePlanConfigChange: To_Babe_PlanConfigChangeCall(fields), //Passthrough fields... + case 7: + return &pbgear.Scheduler_ScheduleAfterCall_Session{ + Session: To_SessionPallet(param), } - case matchFields(fields, []int64{124}): - out.Call = &pbgear.Scheduler_ScheduleCall_GrandpaReportEquivocation{ - GrandpaReportEquivocation: To_Grandpa_ReportEquivocationCall(fields), //Passthrough fields... + case 14: + return &pbgear.Scheduler_ScheduleAfterCall_Treasury{ + Treasury: To_TreasuryPallet(param), } - case matchFields(fields, []int64{129}): - out.Call = &pbgear.Scheduler_ScheduleCall_GrandpaReportEquivocationUnsigned{ - GrandpaReportEquivocationUnsigned: To_Grandpa_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 8: + return &pbgear.Scheduler_ScheduleAfterCall_Utility{ + Utility: To_UtilityPallet(param), } - case matchFields(fields, []int64{132}): - out.Call = &pbgear.Scheduler_ScheduleCall_GrandpaNoteStalled{ - GrandpaNoteStalled: To_Grandpa_NoteStalledCall(fields), //Passthrough fields... + case 16: + return &pbgear.Scheduler_ScheduleAfterCall_ConvictionVoting{ + ConvictionVoting: To_ConvictionVotingPallet(param), } - case matchFields(fields, []int64{133}): - out.Call = &pbgear.Scheduler_ScheduleCall_BalancesTransferAllowDeath{ - BalancesTransferAllowDeath: To_Balances_TransferAllowDeathCall(fields), //Passthrough fields... + case 17: + return &pbgear.Scheduler_ScheduleAfterCall_Referenda{ + Referenda: To_ReferendaPallet(param), } - case matchFields(fields, []int64{134}): - out.Call = &pbgear.Scheduler_ScheduleCall_BalancesForceTransfer{ - BalancesForceTransfer: To_Balances_ForceTransferCall(fields), //Passthrough fields... + case 18: + return &pbgear.Scheduler_ScheduleAfterCall_FellowshipCollective{ + FellowshipCollective: To_FellowshipCollectivePallet(param), } - case matchFields(fields, []int64{135}): - out.Call = &pbgear.Scheduler_ScheduleCall_BalancesTransferKeepAlive{ - BalancesTransferKeepAlive: To_Balances_TransferKeepAliveCall(fields), //Passthrough fields... + case 19: + return &pbgear.Scheduler_ScheduleAfterCall_FellowshipReferenda{ + FellowshipReferenda: To_FellowshipReferendaPallet(param), } - case matchFields(fields, []int64{138}): - out.Call = &pbgear.Scheduler_ScheduleCall_BalancesTransferAll{ - BalancesTransferAll: To_Balances_TransferAllCall(fields), //Passthrough fields... + case 21: + return &pbgear.Scheduler_ScheduleAfterCall_Whitelist{ + Whitelist: To_WhitelistPallet(param), } - case matchFields(fields, []int64{140}): - out.Call = &pbgear.Scheduler_ScheduleCall_BalancesForceUnreserve{ - BalancesForceUnreserve: To_Balances_ForceUnreserveCall(fields), //Passthrough fields... + case 22: + return &pbgear.Scheduler_ScheduleAfterCall_Scheduler{ + Scheduler: To_SchedulerPallet(param), } - case matchFields(fields, []int64{182}): - out.Call = &pbgear.Scheduler_ScheduleCall_BalancesUpgradeAccounts{ - BalancesUpgradeAccounts: To_Balances_UpgradeAccountsCall(fields), //Passthrough fields... + case 23: + return &pbgear.Scheduler_ScheduleAfterCall_Preimage{ + Preimage: To_PreimagePallet(param), } - case matchFields(fields, []int64{185}): - out.Call = &pbgear.Scheduler_ScheduleCall_BalancesForceSetBalance{ - BalancesForceSetBalance: To_Balances_ForceSetBalanceCall(fields), //Passthrough fields... + case 24: + return &pbgear.Scheduler_ScheduleAfterCall_Identity{ + Identity: To_IdentityPallet(param), } - case matchFields(fields, []int64{188}): - out.Call = &pbgear.Scheduler_ScheduleCall_VestingVest{ - VestingVest: To_Vesting_VestCall(fields), //Passthrough fields... + case 25: + return &pbgear.Scheduler_ScheduleAfterCall_Proxy{ + Proxy: To_ProxyPallet(param), } - case matchFields(fields, []int64{249}): - out.Call = &pbgear.Scheduler_ScheduleCall_VestingVestOther{ - VestingVestOther: To_Vesting_VestOtherCall(fields), //Passthrough fields... + case 26: + return &pbgear.Scheduler_ScheduleAfterCall_Multisig{ + Multisig: To_MultisigPallet(param), } - case matchFields(fields, []int64{250}): - out.Call = &pbgear.Scheduler_ScheduleCall_VestingVestedTransfer{ - VestingVestedTransfer: To_Vesting_VestedTransferCall(fields), //Passthrough fields... + case 27: + return &pbgear.Scheduler_ScheduleAfterCall_ElectionProviderMultiPhase{ + ElectionProviderMultiPhase: To_ElectionProviderMultiPhasePallet(param), } - case matchFields(fields, []int64{251}): - out.Call = &pbgear.Scheduler_ScheduleCall_VestingForceVestedTransfer{ - VestingForceVestedTransfer: To_Vesting_ForceVestedTransferCall(fields), //Passthrough fields... + case 29: + return &pbgear.Scheduler_ScheduleAfterCall_Bounties{ + Bounties: To_BountiesPallet(param), } - case matchFields(fields, []int64{262}): - out.Call = &pbgear.Scheduler_ScheduleCall_VestingMergeSchedules{ - VestingMergeSchedules: To_Vesting_MergeSchedulesCall(fields), //Passthrough fields... + case 30: + return &pbgear.Scheduler_ScheduleAfterCall_ChildBounties{ + ChildBounties: To_ChildBountiesPallet(param), } - case matchFields(fields, []int64{267}): - out.Call = &pbgear.Scheduler_ScheduleCall_BagsListRebag{ - BagsListRebag: To_BagsList_RebagCall(fields), //Passthrough fields... + case 31: + return &pbgear.Scheduler_ScheduleAfterCall_NominationPools{ + NominationPools: To_NominationPoolsPallet(param), } - case matchFields(fields, []int64{268}): - out.Call = &pbgear.Scheduler_ScheduleCall_BagsListPutInFrontOf{ - BagsListPutInFrontOf: To_BagsList_PutInFrontOfCall(fields), //Passthrough fields... + case 104: + return &pbgear.Scheduler_ScheduleAfterCall_Gear{ + Gear: To_GearPallet(param), } + case 106: + return &pbgear.Scheduler_ScheduleAfterCall_StakingRewards{ + StakingRewards: To_StakingRewardsPallet(param), + } + case 107: + return &pbgear.Scheduler_ScheduleAfterCall_GearVoucher{ + GearVoucher: To_GearVoucherPallet(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Scheduler_ScheduleNamedAfterCall(in registry.DecodedFields) *pbgear.Scheduler_ScheduleNamedAfterCall { + +func To_Scheduler_ScheduleCall(in any) *pbgear.Scheduler_ScheduleCall { + out := &pbgear.Scheduler_ScheduleCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field When + out.When = To_uint32(v.ValueAt(0)) + // optional field MaybePeriodic + out.MaybePeriodic = To_Optional_Scheduler_ScheduleCall_maybe_periodic(v.ValueAt(1)) + // primitive field Priority + out.Priority = To_uint32(v.ValueAt(2)) + // oneOf field Call + v3 := To_OneOf_Scheduler_ScheduleCall_call(v.ValueAt(3)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v3)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Scheduler_ScheduleNamedAfterCall{} - out.Id = To_bytes(fields[0].Value.([]interface{})) - out.After = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.MaybePeriodic = To_optional_Scheduler_TupleUint32Uint32(fields[2].Value.(registry.DecodedFields)) - - out.Priority = To_uint32(fields[3].Value.(registry.DecodedFields)) - - - switch { - case matchFields(fields, []int64{66}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_SystemRemark{ - SystemRemark: To_System_RemarkCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{70}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_SystemSetHeapPages{ - SystemSetHeapPages: To_System_SetHeapPagesCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{71}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_SystemSetCode{ - SystemSetCode: To_System_SetCodeCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{81}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_SystemSetCodeWithoutChecks{ - SystemSetCodeWithoutChecks: To_System_SetCodeWithoutChecksCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{93}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_SystemSetStorage{ - SystemSetStorage: To_System_SetStorageCall(fields), //Passthrough fields... +func To_Optional_Scheduler_ScheduleCall_maybe_periodic(in any) *pbgear.Scheduler_TupleUint32Uint32 { + return nil //funcForOptionalField +} +func To_OneOf_Scheduler_ScheduleCall_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Scheduler_ScheduleCall_System{ + System: To_SystemPallet(param), + } + case 1: + return &pbgear.Scheduler_ScheduleCall_Timestamp{ + Timestamp: To_TimestampPallet(param), + } + case 3: + return &pbgear.Scheduler_ScheduleCall_Babe{ + Babe: To_BabePallet(param), } - case matchFields(fields, []int64{98}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_SystemKillStorage{ - SystemKillStorage: To_System_KillStorageCall(fields), //Passthrough fields... + case 4: + return &pbgear.Scheduler_ScheduleCall_Grandpa{ + Grandpa: To_GrandpaPallet(param), } - case matchFields(fields, []int64{100}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_SystemKillPrefix{ - SystemKillPrefix: To_System_KillPrefixCall(fields), //Passthrough fields... + case 5: + return &pbgear.Scheduler_ScheduleCall_Balances{ + Balances: To_BalancesPallet(param), } - case matchFields(fields, []int64{101}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_SystemRemarkWithEvent{ - SystemRemarkWithEvent: To_System_RemarkWithEventCall(fields), //Passthrough fields... + case 10: + return &pbgear.Scheduler_ScheduleCall_Vesting{ + Vesting: To_VestingPallet(param), } - case matchFields(fields, []int64{105}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_TimestampSet{ - TimestampSet: To_Timestamp_SetCall(fields), //Passthrough fields... + case 11: + return &pbgear.Scheduler_ScheduleCall_BagsList{ + BagsList: To_BagsListPallet(param), } - case matchFields(fields, []int64{113}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_BabeReportEquivocation{ - BabeReportEquivocation: To_Babe_ReportEquivocationCall(fields), //Passthrough fields... + case 12: + return &pbgear.Scheduler_ScheduleCall_ImOnline{ + ImOnline: To_ImOnlinePallet(param), } - case matchFields(fields, []int64{116}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_BabeReportEquivocationUnsigned{ - BabeReportEquivocationUnsigned: To_Babe_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 13: + return &pbgear.Scheduler_ScheduleCall_Staking{ + Staking: To_StakingPallet(param), } - case matchFields(fields, []int64{118}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_BabePlanConfigChange{ - BabePlanConfigChange: To_Babe_PlanConfigChangeCall(fields), //Passthrough fields... + case 7: + return &pbgear.Scheduler_ScheduleCall_Session{ + Session: To_SessionPallet(param), } - case matchFields(fields, []int64{124}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_GrandpaReportEquivocation{ - GrandpaReportEquivocation: To_Grandpa_ReportEquivocationCall(fields), //Passthrough fields... + case 14: + return &pbgear.Scheduler_ScheduleCall_Treasury{ + Treasury: To_TreasuryPallet(param), } - case matchFields(fields, []int64{129}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_GrandpaReportEquivocationUnsigned{ - GrandpaReportEquivocationUnsigned: To_Grandpa_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 8: + return &pbgear.Scheduler_ScheduleCall_Utility{ + Utility: To_UtilityPallet(param), } - case matchFields(fields, []int64{132}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_GrandpaNoteStalled{ - GrandpaNoteStalled: To_Grandpa_NoteStalledCall(fields), //Passthrough fields... + case 16: + return &pbgear.Scheduler_ScheduleCall_ConvictionVoting{ + ConvictionVoting: To_ConvictionVotingPallet(param), } - case matchFields(fields, []int64{133}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_BalancesTransferAllowDeath{ - BalancesTransferAllowDeath: To_Balances_TransferAllowDeathCall(fields), //Passthrough fields... + case 17: + return &pbgear.Scheduler_ScheduleCall_Referenda{ + Referenda: To_ReferendaPallet(param), } - case matchFields(fields, []int64{134}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_BalancesForceTransfer{ - BalancesForceTransfer: To_Balances_ForceTransferCall(fields), //Passthrough fields... + case 18: + return &pbgear.Scheduler_ScheduleCall_FellowshipCollective{ + FellowshipCollective: To_FellowshipCollectivePallet(param), } - case matchFields(fields, []int64{135}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_BalancesTransferKeepAlive{ - BalancesTransferKeepAlive: To_Balances_TransferKeepAliveCall(fields), //Passthrough fields... + case 19: + return &pbgear.Scheduler_ScheduleCall_FellowshipReferenda{ + FellowshipReferenda: To_FellowshipReferendaPallet(param), } - case matchFields(fields, []int64{138}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_BalancesTransferAll{ - BalancesTransferAll: To_Balances_TransferAllCall(fields), //Passthrough fields... + case 21: + return &pbgear.Scheduler_ScheduleCall_Whitelist{ + Whitelist: To_WhitelistPallet(param), } - case matchFields(fields, []int64{140}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_BalancesForceUnreserve{ - BalancesForceUnreserve: To_Balances_ForceUnreserveCall(fields), //Passthrough fields... + case 22: + return &pbgear.Scheduler_ScheduleCall_Scheduler{ + Scheduler: To_SchedulerPallet(param), } - case matchFields(fields, []int64{182}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_BalancesUpgradeAccounts{ - BalancesUpgradeAccounts: To_Balances_UpgradeAccountsCall(fields), //Passthrough fields... + case 23: + return &pbgear.Scheduler_ScheduleCall_Preimage{ + Preimage: To_PreimagePallet(param), } - case matchFields(fields, []int64{185}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_BalancesForceSetBalance{ - BalancesForceSetBalance: To_Balances_ForceSetBalanceCall(fields), //Passthrough fields... + case 24: + return &pbgear.Scheduler_ScheduleCall_Identity{ + Identity: To_IdentityPallet(param), } - case matchFields(fields, []int64{188}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_VestingVest{ - VestingVest: To_Vesting_VestCall(fields), //Passthrough fields... + case 25: + return &pbgear.Scheduler_ScheduleCall_Proxy{ + Proxy: To_ProxyPallet(param), } - case matchFields(fields, []int64{249}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_VestingVestOther{ - VestingVestOther: To_Vesting_VestOtherCall(fields), //Passthrough fields... + case 26: + return &pbgear.Scheduler_ScheduleCall_Multisig{ + Multisig: To_MultisigPallet(param), } - case matchFields(fields, []int64{250}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_VestingVestedTransfer{ - VestingVestedTransfer: To_Vesting_VestedTransferCall(fields), //Passthrough fields... + case 27: + return &pbgear.Scheduler_ScheduleCall_ElectionProviderMultiPhase{ + ElectionProviderMultiPhase: To_ElectionProviderMultiPhasePallet(param), } - case matchFields(fields, []int64{251}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_VestingForceVestedTransfer{ - VestingForceVestedTransfer: To_Vesting_ForceVestedTransferCall(fields), //Passthrough fields... + case 29: + return &pbgear.Scheduler_ScheduleCall_Bounties{ + Bounties: To_BountiesPallet(param), } - case matchFields(fields, []int64{262}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_VestingMergeSchedules{ - VestingMergeSchedules: To_Vesting_MergeSchedulesCall(fields), //Passthrough fields... + case 30: + return &pbgear.Scheduler_ScheduleCall_ChildBounties{ + ChildBounties: To_ChildBountiesPallet(param), } - case matchFields(fields, []int64{267}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_BagsListRebag{ - BagsListRebag: To_BagsList_RebagCall(fields), //Passthrough fields... + case 31: + return &pbgear.Scheduler_ScheduleCall_NominationPools{ + NominationPools: To_NominationPoolsPallet(param), } - case matchFields(fields, []int64{268}): - out.Call = &pbgear.Scheduler_ScheduleNamedAfterCall_BagsListPutInFrontOf{ - BagsListPutInFrontOf: To_BagsList_PutInFrontOfCall(fields), //Passthrough fields... + case 104: + return &pbgear.Scheduler_ScheduleCall_Gear{ + Gear: To_GearPallet(param), } + case 106: + return &pbgear.Scheduler_ScheduleCall_StakingRewards{ + StakingRewards: To_StakingRewardsPallet(param), + } + case 107: + return &pbgear.Scheduler_ScheduleCall_GearVoucher{ + GearVoucher: To_GearVoucherPallet(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Scheduler_ScheduleNamedCall(in registry.DecodedFields) *pbgear.Scheduler_ScheduleNamedCall { + +func To_Scheduler_ScheduleNamedAfterCall(in any) *pbgear.Scheduler_ScheduleNamedAfterCall { + out := &pbgear.Scheduler_ScheduleNamedAfterCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Id + out.Id = To_bytes(v.ValueAt(0)) + // primitive field After + out.After = To_uint32(v.ValueAt(1)) + // optional field MaybePeriodic + out.MaybePeriodic = To_Optional_Scheduler_ScheduleNamedAfterCall_maybe_periodic(v.ValueAt(2)) + // primitive field Priority + out.Priority = To_uint32(v.ValueAt(3)) + // oneOf field Call + v4 := To_OneOf_Scheduler_ScheduleNamedAfterCall_call(v.ValueAt(4)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v4)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Scheduler_ScheduleNamedCall{} - out.Id = To_bytes(fields[0].Value.([]interface{})) - out.When = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.MaybePeriodic = To_optional_Scheduler_TupleUint32Uint32(fields[2].Value.(registry.DecodedFields)) - - out.Priority = To_uint32(fields[3].Value.(registry.DecodedFields)) - - - switch { - case matchFields(fields, []int64{66}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_SystemRemark{ - SystemRemark: To_System_RemarkCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{70}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_SystemSetHeapPages{ - SystemSetHeapPages: To_System_SetHeapPagesCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{71}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_SystemSetCode{ - SystemSetCode: To_System_SetCodeCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{81}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_SystemSetCodeWithoutChecks{ - SystemSetCodeWithoutChecks: To_System_SetCodeWithoutChecksCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{93}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_SystemSetStorage{ - SystemSetStorage: To_System_SetStorageCall(fields), //Passthrough fields... +func To_Optional_Scheduler_ScheduleNamedAfterCall_maybe_periodic(in any) *pbgear.Scheduler_TupleUint32Uint32 { + return nil //funcForOptionalField +} +func To_OneOf_Scheduler_ScheduleNamedAfterCall_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Scheduler_ScheduleNamedAfterCall_System{ + System: To_SystemPallet(param), + } + case 1: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Timestamp{ + Timestamp: To_TimestampPallet(param), } - case matchFields(fields, []int64{98}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_SystemKillStorage{ - SystemKillStorage: To_System_KillStorageCall(fields), //Passthrough fields... + case 3: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Babe{ + Babe: To_BabePallet(param), } - case matchFields(fields, []int64{100}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_SystemKillPrefix{ - SystemKillPrefix: To_System_KillPrefixCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{101}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_SystemRemarkWithEvent{ - SystemRemarkWithEvent: To_System_RemarkWithEventCall(fields), //Passthrough fields... + case 4: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Grandpa{ + Grandpa: To_GrandpaPallet(param), } - case matchFields(fields, []int64{105}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_TimestampSet{ - TimestampSet: To_Timestamp_SetCall(fields), //Passthrough fields... + case 5: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Balances{ + Balances: To_BalancesPallet(param), + } + case 10: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Vesting{ + Vesting: To_VestingPallet(param), + } + case 11: + return &pbgear.Scheduler_ScheduleNamedAfterCall_BagsList{ + BagsList: To_BagsListPallet(param), + } + case 12: + return &pbgear.Scheduler_ScheduleNamedAfterCall_ImOnline{ + ImOnline: To_ImOnlinePallet(param), + } + case 13: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Staking{ + Staking: To_StakingPallet(param), + } + case 7: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Session{ + Session: To_SessionPallet(param), + } + case 14: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Treasury{ + Treasury: To_TreasuryPallet(param), + } + case 8: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Utility{ + Utility: To_UtilityPallet(param), + } + case 16: + return &pbgear.Scheduler_ScheduleNamedAfterCall_ConvictionVoting{ + ConvictionVoting: To_ConvictionVotingPallet(param), + } + case 17: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Referenda{ + Referenda: To_ReferendaPallet(param), + } + case 18: + return &pbgear.Scheduler_ScheduleNamedAfterCall_FellowshipCollective{ + FellowshipCollective: To_FellowshipCollectivePallet(param), + } + case 19: + return &pbgear.Scheduler_ScheduleNamedAfterCall_FellowshipReferenda{ + FellowshipReferenda: To_FellowshipReferendaPallet(param), + } + case 21: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Whitelist{ + Whitelist: To_WhitelistPallet(param), + } + case 22: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Scheduler{ + Scheduler: To_SchedulerPallet(param), + } + case 23: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Preimage{ + Preimage: To_PreimagePallet(param), } - case matchFields(fields, []int64{113}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_BabeReportEquivocation{ - BabeReportEquivocation: To_Babe_ReportEquivocationCall(fields), //Passthrough fields... + case 24: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Identity{ + Identity: To_IdentityPallet(param), } - case matchFields(fields, []int64{116}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_BabeReportEquivocationUnsigned{ - BabeReportEquivocationUnsigned: To_Babe_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 25: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Proxy{ + Proxy: To_ProxyPallet(param), } - case matchFields(fields, []int64{118}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_BabePlanConfigChange{ - BabePlanConfigChange: To_Babe_PlanConfigChangeCall(fields), //Passthrough fields... + case 26: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Multisig{ + Multisig: To_MultisigPallet(param), } - case matchFields(fields, []int64{124}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_GrandpaReportEquivocation{ - GrandpaReportEquivocation: To_Grandpa_ReportEquivocationCall(fields), //Passthrough fields... + case 27: + return &pbgear.Scheduler_ScheduleNamedAfterCall_ElectionProviderMultiPhase{ + ElectionProviderMultiPhase: To_ElectionProviderMultiPhasePallet(param), } - case matchFields(fields, []int64{129}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_GrandpaReportEquivocationUnsigned{ - GrandpaReportEquivocationUnsigned: To_Grandpa_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 29: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Bounties{ + Bounties: To_BountiesPallet(param), } - case matchFields(fields, []int64{132}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_GrandpaNoteStalled{ - GrandpaNoteStalled: To_Grandpa_NoteStalledCall(fields), //Passthrough fields... + case 30: + return &pbgear.Scheduler_ScheduleNamedAfterCall_ChildBounties{ + ChildBounties: To_ChildBountiesPallet(param), + } + case 31: + return &pbgear.Scheduler_ScheduleNamedAfterCall_NominationPools{ + NominationPools: To_NominationPoolsPallet(param), + } + case 104: + return &pbgear.Scheduler_ScheduleNamedAfterCall_Gear{ + Gear: To_GearPallet(param), + } + case 106: + return &pbgear.Scheduler_ScheduleNamedAfterCall_StakingRewards{ + StakingRewards: To_StakingRewardsPallet(param), + } + case 107: + return &pbgear.Scheduler_ScheduleNamedAfterCall_GearVoucher{ + GearVoucher: To_GearVoucherPallet(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_Scheduler_ScheduleNamedCall(in any) *pbgear.Scheduler_ScheduleNamedCall { + out := &pbgear.Scheduler_ScheduleNamedCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Id + out.Id = To_bytes(v.ValueAt(0)) + // primitive field When + out.When = To_uint32(v.ValueAt(1)) + // optional field MaybePeriodic + out.MaybePeriodic = To_Optional_Scheduler_ScheduleNamedCall_maybe_periodic(v.ValueAt(2)) + // primitive field Priority + out.Priority = To_uint32(v.ValueAt(3)) + // oneOf field Call + v4 := To_OneOf_Scheduler_ScheduleNamedCall_call(v.ValueAt(4)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v4)) + + return out //from message +} + +func To_Optional_Scheduler_ScheduleNamedCall_maybe_periodic(in any) *pbgear.Scheduler_TupleUint32Uint32 { + return nil //funcForOptionalField +} +func To_OneOf_Scheduler_ScheduleNamedCall_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Scheduler_ScheduleNamedCall_System{ + System: To_SystemPallet(param), } - case matchFields(fields, []int64{133}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_BalancesTransferAllowDeath{ - BalancesTransferAllowDeath: To_Balances_TransferAllowDeathCall(fields), //Passthrough fields... + case 1: + return &pbgear.Scheduler_ScheduleNamedCall_Timestamp{ + Timestamp: To_TimestampPallet(param), } - case matchFields(fields, []int64{134}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_BalancesForceTransfer{ - BalancesForceTransfer: To_Balances_ForceTransferCall(fields), //Passthrough fields... + case 3: + return &pbgear.Scheduler_ScheduleNamedCall_Babe{ + Babe: To_BabePallet(param), } - case matchFields(fields, []int64{135}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_BalancesTransferKeepAlive{ - BalancesTransferKeepAlive: To_Balances_TransferKeepAliveCall(fields), //Passthrough fields... + case 4: + return &pbgear.Scheduler_ScheduleNamedCall_Grandpa{ + Grandpa: To_GrandpaPallet(param), } - case matchFields(fields, []int64{138}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_BalancesTransferAll{ - BalancesTransferAll: To_Balances_TransferAllCall(fields), //Passthrough fields... + case 5: + return &pbgear.Scheduler_ScheduleNamedCall_Balances{ + Balances: To_BalancesPallet(param), + } + case 10: + return &pbgear.Scheduler_ScheduleNamedCall_Vesting{ + Vesting: To_VestingPallet(param), + } + case 11: + return &pbgear.Scheduler_ScheduleNamedCall_BagsList{ + BagsList: To_BagsListPallet(param), + } + case 12: + return &pbgear.Scheduler_ScheduleNamedCall_ImOnline{ + ImOnline: To_ImOnlinePallet(param), + } + case 13: + return &pbgear.Scheduler_ScheduleNamedCall_Staking{ + Staking: To_StakingPallet(param), + } + case 7: + return &pbgear.Scheduler_ScheduleNamedCall_Session{ + Session: To_SessionPallet(param), + } + case 14: + return &pbgear.Scheduler_ScheduleNamedCall_Treasury{ + Treasury: To_TreasuryPallet(param), + } + case 8: + return &pbgear.Scheduler_ScheduleNamedCall_Utility{ + Utility: To_UtilityPallet(param), + } + case 16: + return &pbgear.Scheduler_ScheduleNamedCall_ConvictionVoting{ + ConvictionVoting: To_ConvictionVotingPallet(param), + } + case 17: + return &pbgear.Scheduler_ScheduleNamedCall_Referenda{ + Referenda: To_ReferendaPallet(param), + } + case 18: + return &pbgear.Scheduler_ScheduleNamedCall_FellowshipCollective{ + FellowshipCollective: To_FellowshipCollectivePallet(param), + } + case 19: + return &pbgear.Scheduler_ScheduleNamedCall_FellowshipReferenda{ + FellowshipReferenda: To_FellowshipReferendaPallet(param), + } + case 21: + return &pbgear.Scheduler_ScheduleNamedCall_Whitelist{ + Whitelist: To_WhitelistPallet(param), + } + case 22: + return &pbgear.Scheduler_ScheduleNamedCall_Scheduler{ + Scheduler: To_SchedulerPallet(param), + } + case 23: + return &pbgear.Scheduler_ScheduleNamedCall_Preimage{ + Preimage: To_PreimagePallet(param), } - case matchFields(fields, []int64{140}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_BalancesForceUnreserve{ - BalancesForceUnreserve: To_Balances_ForceUnreserveCall(fields), //Passthrough fields... + case 24: + return &pbgear.Scheduler_ScheduleNamedCall_Identity{ + Identity: To_IdentityPallet(param), } - case matchFields(fields, []int64{182}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_BalancesUpgradeAccounts{ - BalancesUpgradeAccounts: To_Balances_UpgradeAccountsCall(fields), //Passthrough fields... + case 25: + return &pbgear.Scheduler_ScheduleNamedCall_Proxy{ + Proxy: To_ProxyPallet(param), } - case matchFields(fields, []int64{185}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_BalancesForceSetBalance{ - BalancesForceSetBalance: To_Balances_ForceSetBalanceCall(fields), //Passthrough fields... + case 26: + return &pbgear.Scheduler_ScheduleNamedCall_Multisig{ + Multisig: To_MultisigPallet(param), } - case matchFields(fields, []int64{188}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_VestingVest{ - VestingVest: To_Vesting_VestCall(fields), //Passthrough fields... + case 27: + return &pbgear.Scheduler_ScheduleNamedCall_ElectionProviderMultiPhase{ + ElectionProviderMultiPhase: To_ElectionProviderMultiPhasePallet(param), } - case matchFields(fields, []int64{249}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_VestingVestOther{ - VestingVestOther: To_Vesting_VestOtherCall(fields), //Passthrough fields... + case 29: + return &pbgear.Scheduler_ScheduleNamedCall_Bounties{ + Bounties: To_BountiesPallet(param), } - case matchFields(fields, []int64{250}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_VestingVestedTransfer{ - VestingVestedTransfer: To_Vesting_VestedTransferCall(fields), //Passthrough fields... + case 30: + return &pbgear.Scheduler_ScheduleNamedCall_ChildBounties{ + ChildBounties: To_ChildBountiesPallet(param), } - case matchFields(fields, []int64{251}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_VestingForceVestedTransfer{ - VestingForceVestedTransfer: To_Vesting_ForceVestedTransferCall(fields), //Passthrough fields... + case 31: + return &pbgear.Scheduler_ScheduleNamedCall_NominationPools{ + NominationPools: To_NominationPoolsPallet(param), } - case matchFields(fields, []int64{262}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_VestingMergeSchedules{ - VestingMergeSchedules: To_Vesting_MergeSchedulesCall(fields), //Passthrough fields... + case 104: + return &pbgear.Scheduler_ScheduleNamedCall_Gear{ + Gear: To_GearPallet(param), } - case matchFields(fields, []int64{267}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_BagsListRebag{ - BagsListRebag: To_BagsList_RebagCall(fields), //Passthrough fields... + case 106: + return &pbgear.Scheduler_ScheduleNamedCall_StakingRewards{ + StakingRewards: To_StakingRewardsPallet(param), } - case matchFields(fields, []int64{268}): - out.Call = &pbgear.Scheduler_ScheduleNamedCall_BagsListPutInFrontOf{ - BagsListPutInFrontOf: To_BagsList_PutInFrontOfCall(fields), //Passthrough fields... + case 107: + return &pbgear.Scheduler_ScheduleNamedCall_GearVoucher{ + GearVoucher: To_GearVoucherPallet(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out -} - - func To_Scheduler_ScheduledEvent(in registry.DecodedFields) *pbgear.Scheduler_ScheduledEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Scheduler_ScheduledEvent{} - out.When = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Index = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out } - func To_Scheduler_TupleNull(in registry.DecodedFields) *pbgear.Scheduler_TupleNull { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Scheduler_TupleNull{} - return out -} - func To_Scheduler_TupleUint32Uint32(in registry.DecodedFields) *pbgear.Scheduler_TupleUint32Uint32 { - - fields := []*registry.DecodedField(in) - _ = fields +func To_Scheduler_TupleUint32Uint32(in any) *pbgear.Scheduler_TupleUint32Uint32 { out := &pbgear.Scheduler_TupleUint32Uint32{} - out.Value0 = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Value1 = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + // primitive field Value1 + out.Value1 = To_uint32(v.ValueAt(1)) + + return out //from message } + + + +func To_SessionPallet(in any) *pbgear.SessionPallet { + out := &pbgear.SessionPallet{} + v := in.(registry.Valuable) + _ = v - func To_Session_NewSessionEvent(in registry.DecodedFields) *pbgear.Session_NewSessionEvent { + // oneOf field Call + v0 := To_OneOf_SessionPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Session_NewSessionEvent{} - out.SessionIndex = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out +func To_OneOf_SessionPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.SessionPallet_SetKeysCall{ + SetKeysCall: To_Session_SetKeysCall(param), + } + case 1: + return &pbgear.SessionPallet_PurgeKeysCall{ + PurgeKeysCall: To_Session_PurgeKeysCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } } - func To_Session_PurgeKeysCall(in registry.DecodedFields) *pbgear.Session_PurgeKeysCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Session_PurgeKeysCall(in any) *pbgear.Session_PurgeKeysCall { out := &pbgear.Session_PurgeKeysCall{} - return out -} + v := in.(registry.Valuable) + _ = v + - func To_Session_SetKeysCall(in registry.DecodedFields) *pbgear.Session_SetKeysCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Session_SetKeysCall(in any) *pbgear.Session_SetKeysCall { out := &pbgear.Session_SetKeysCall{} - out.Keys = To_VaraRuntimeSessionKeys(fields[0].Value.(registry.DecodedFields)) - - out.Proof = To_bytes(fields[1].Value.([]interface{})) - return out + v := in.(registry.Valuable) + _ = v + + // field Keys + out.Keys = To_Session_SetKeysCall_keys(v.ValueAt(0)) + // primitive field Proof + out.Proof = To_bytes(v.ValueAt(1)) + + return out //from message +} + +func To_Session_SetKeysCall_keys(in any) *pbgear.VaraRuntimeSessionKeys { + v := in.(registry.Valuable) + return To_VaraRuntimeSessionKeys(v.ValueAt(0) //simple field } - func To_SpArithmeticPerThingsPerU16(in registry.DecodedFields) *pbgear.SpArithmeticPerThingsPerU16 { + +func To_Signed(in any) *pbgear.Signed { + out := &pbgear.Signed{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Signed_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.SpArithmeticPerThingsPerU16{} - out.Value = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Signed_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_SpArithmeticPerThingsPerbill(in registry.DecodedFields) *pbgear.SpArithmeticPerThingsPerbill { + +func To_SpArithmeticPerThingsPerU16(in any) *pbgear.SpArithmeticPerThingsPerU16 { + out := &pbgear.SpArithmeticPerThingsPerU16{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_SpArithmeticPerThingsPerbill(in any) *pbgear.SpArithmeticPerThingsPerbill { out := &pbgear.SpArithmeticPerThingsPerbill{} - out.Value = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_SpArithmeticPerThingsPercent(in registry.DecodedFields) *pbgear.SpArithmeticPerThingsPercent { + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_SpArithmeticPerThingsPercent(in any) *pbgear.SpArithmeticPerThingsPercent { out := &pbgear.SpArithmeticPerThingsPercent{} - out.Value = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint32(v.ValueAt(0)) - func To_SpAuthorityDiscoveryAppPublic(in registry.DecodedFields) *pbgear.SpAuthorityDiscoveryAppPublic { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_SpAuthorityDiscoveryAppPublic(in any) *pbgear.SpAuthorityDiscoveryAppPublic { out := &pbgear.SpAuthorityDiscoveryAppPublic{} - out.Value = To_SpCoreSr25519Public(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_SpConsensusBabeAppPublic(in registry.DecodedFields) *pbgear.SpConsensusBabeAppPublic { + // field Value0 + out.Value0 = To_SpAuthorityDiscoveryAppPublic_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.SpConsensusBabeAppPublic{} - out.Value = To_SpCoreSr25519Public(fields[0].Value.(registry.DecodedFields)) - - return out +func To_SpAuthorityDiscoveryAppPublic_value0(in any) *pbgear.SpCoreSr25519Public { + v := in.(registry.Valuable) + return To_SpCoreSr25519Public(v.ValueAt(0) //simple field } - func To_SpConsensusGrandpaAppPublic(in registry.DecodedFields) *pbgear.SpConsensusGrandpaAppPublic { + +func To_SpConsensusBabeAppPublic(in any) *pbgear.SpConsensusBabeAppPublic { + out := &pbgear.SpConsensusBabeAppPublic{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_SpConsensusBabeAppPublic_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.SpConsensusGrandpaAppPublic{} - out.Value = To_SpCoreEd25519Public(fields[0].Value.(registry.DecodedFields)) - - return out +func To_SpConsensusBabeAppPublic_value0(in any) *pbgear.SpCoreSr25519Public { + v := in.(registry.Valuable) + return To_SpCoreSr25519Public(v.ValueAt(0) //simple field } - func To_SpConsensusGrandpaAppSignature(in registry.DecodedFields) *pbgear.SpConsensusGrandpaAppSignature { + +func To_SpConsensusGrandpaAppPublic(in any) *pbgear.SpConsensusGrandpaAppPublic { + out := &pbgear.SpConsensusGrandpaAppPublic{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_SpConsensusGrandpaAppPublic_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.SpConsensusGrandpaAppSignature{} - out.Value = To_SpCoreEd25519Signature(fields[0].Value.(registry.DecodedFields)) - - return out +func To_SpConsensusGrandpaAppPublic_value0(in any) *pbgear.SpCoreEd25519Public { + v := in.(registry.Valuable) + return To_SpCoreEd25519Public(v.ValueAt(0) //simple field } - func To_SpConsensusGrandpaEquivocationProof(in registry.DecodedFields) *pbgear.SpConsensusGrandpaEquivocationProof { + +func To_SpConsensusGrandpaAppSignature(in any) *pbgear.SpConsensusGrandpaAppSignature { + out := &pbgear.SpConsensusGrandpaAppSignature{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_SpConsensusGrandpaAppSignature_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.SpConsensusGrandpaEquivocationProof{} - out.SetId = To_uint64(fields[0].Value.(registry.DecodedFields)) - - out.Equivocation = To_Grandpa_Equivocation(fields[1].Value.(registry.DecodedFields)) - - return out +func To_SpConsensusGrandpaAppSignature_value0(in any) *pbgear.SpCoreEd25519Signature { + v := in.(registry.Valuable) + return To_SpCoreEd25519Signature(v.ValueAt(0) //simple field } - func To_SpConsensusSlotsEquivocationProof(in registry.DecodedFields) *pbgear.SpConsensusSlotsEquivocationProof { + +func To_SpConsensusGrandpaEquivocationProof(in any) *pbgear.SpConsensusGrandpaEquivocationProof { + out := &pbgear.SpConsensusGrandpaEquivocationProof{} + v := in.(registry.Valuable) + _ = v + + // primitive field SetId + out.SetId = To_uint64(v.ValueAt(0)) + // field Equivocation + out.Equivocation = To_SpConsensusGrandpaEquivocationProof_equivocation(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.SpConsensusSlotsEquivocationProof{} - out.Offender = To_SpConsensusBabeAppPublic(fields[0].Value.(registry.DecodedFields)) - - out.Slot = To_SpConsensusSlotsSlot(fields[1].Value.(registry.DecodedFields)) - - out.FirstHeader = To_SpRuntimeGenericHeaderHeader(fields[2].Value.(registry.DecodedFields)) - - out.SecondHeader = To_SpRuntimeGenericHeaderHeader(fields[3].Value.(registry.DecodedFields)) - - return out +func To_SpConsensusGrandpaEquivocationProof_equivocation(in any) *pbgear.Grandpa_Equivocation { + v := in.(registry.Valuable) + return To_Grandpa_Equivocation(v.ValueAt(0) //simple field } - func To_SpConsensusSlotsSlot(in registry.DecodedFields) *pbgear.SpConsensusSlotsSlot { + +func To_SpConsensusSlotsEquivocationProof(in any) *pbgear.SpConsensusSlotsEquivocationProof { + out := &pbgear.SpConsensusSlotsEquivocationProof{} + v := in.(registry.Valuable) + _ = v + + // field Offender + out.Offender = To_SpConsensusSlotsEquivocationProof_offender(v.ValueAt(0)) + // field Slot + out.Slot = To_SpConsensusSlotsEquivocationProof_slot(v.ValueAt(1)) + // field FirstHeader + out.FirstHeader = To_SpConsensusSlotsEquivocationProof_first_header(v.ValueAt(2)) + // field SecondHeader + out.SecondHeader = To_SpConsensusSlotsEquivocationProof_second_header(v.ValueAt(3)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.SpConsensusSlotsSlot{} - out.Value = To_uint64(fields[0].Value.(registry.DecodedFields)) - - return out +func To_SpConsensusSlotsEquivocationProof_offender(in any) *pbgear.SpConsensusBabeAppPublic { + v := in.(registry.Valuable) + return To_SpConsensusBabeAppPublic(v.ValueAt(0) //simple field +} +func To_SpConsensusSlotsEquivocationProof_slot(in any) *pbgear.SpConsensusSlotsSlot { + v := in.(registry.Valuable) + return To_SpConsensusSlotsSlot(v.ValueAt(0) //simple field +} +func To_SpConsensusSlotsEquivocationProof_first_header(in any) *pbgear.SpRuntimeGenericHeaderHeader { + v := in.(registry.Valuable) + return To_SpRuntimeGenericHeaderHeader(v.ValueAt(0) //simple field +} +func To_SpConsensusSlotsEquivocationProof_second_header(in any) *pbgear.SpRuntimeGenericHeaderHeader { + v := in.(registry.Valuable) + return To_SpRuntimeGenericHeaderHeader(v.ValueAt(0) //simple field } - func To_SpCoreCryptoAccountId32(in registry.DecodedFields) *pbgear.SpCoreCryptoAccountId32 { + +func To_SpConsensusSlotsSlot(in any) *pbgear.SpConsensusSlotsSlot { + out := &pbgear.SpConsensusSlotsSlot{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_uint64(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_SpCoreCryptoAccountId32(in any) *pbgear.SpCoreCryptoAccountId32 { out := &pbgear.SpCoreCryptoAccountId32{} - out.Value = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v - func To_SpCoreEd25519Public(in registry.DecodedFields) *pbgear.SpCoreEd25519Public { + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_SpCoreEd25519Public(in any) *pbgear.SpCoreEd25519Public { out := &pbgear.SpCoreEd25519Public{} - out.Value = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_SpCoreEd25519Signature(in registry.DecodedFields) *pbgear.SpCoreEd25519Signature { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_SpCoreEd25519Signature(in any) *pbgear.SpCoreEd25519Signature { out := &pbgear.SpCoreEd25519Signature{} - out.Value = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v - func To_SpCoreSr25519Public(in registry.DecodedFields) *pbgear.SpCoreSr25519Public { + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_SpCoreSr25519Public(in any) *pbgear.SpCoreSr25519Public { out := &pbgear.SpCoreSr25519Public{} - out.Value = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_SpCoreSr25519Signature(in registry.DecodedFields) *pbgear.SpCoreSr25519Signature { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_SpCoreSr25519Signature(in any) *pbgear.SpCoreSr25519Signature { out := &pbgear.SpCoreSr25519Signature{} - out.Value = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v - func To_SpNposElectionsElectionScore(in registry.DecodedFields) *pbgear.SpNposElectionsElectionScore { + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_SpNposElectionsElectionScore(in any) *pbgear.SpNposElectionsElectionScore { out := &pbgear.SpNposElectionsElectionScore{} - out.MinimalStake = To_string(fields[0].Value.(registry.DecodedFields)) - - out.SumStake = To_string(fields[1].Value.(registry.DecodedFields)) - - out.SumStakeSquared = To_string(fields[2].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field MinimalStake + out.MinimalStake = To_string(v.ValueAt(0)) + // primitive field SumStake + out.SumStake = To_string(v.ValueAt(1)) + // primitive field SumStakeSquared + out.SumStakeSquared = To_string(v.ValueAt(2)) - func To_SpNposElectionsSupport(in registry.DecodedFields) *pbgear.SpNposElectionsSupport { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_SpNposElectionsSupport(in any) *pbgear.SpNposElectionsSupport { out := &pbgear.SpNposElectionsSupport{} - out.Total = To_string(fields[0].Value.(registry.DecodedFields)) - - out.Voters = To_repeated_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String(fields[1].Value.(registry.DecodedFields)) - - return out + v := in.(registry.Valuable) + _ = v + + // primitive field Total + out.Total = To_string(v.ValueAt(0)) + // repeated field Voters + out.Voters = To_Repeated_SpNposElectionsSupport_voters(v.ValueAt(1)) + + return out //from message } -func To_repeated_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String { - fields := []*registry.DecodedField(f) - _ = fields + - out := make([]*pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String(f.Value.([]*registry.DecodedField))) +func To_Repeated_SpNposElectionsSupport_voters(in any) []*pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } - func To_SpRuntimeDispatchErrorWithPostInfo(in registry.DecodedFields) *pbgear.SpRuntimeDispatchErrorWithPostInfo { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.SpRuntimeDispatchErrorWithPostInfo{} - out.PostInfo = To_FrameSupportDispatchPostDispatchInfo(fields[0].Value.(registry.DecodedFields)) - - out.Error = To_Error(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_SpRuntimeGenericDigestDigest(in registry.DecodedFields) *pbgear.SpRuntimeGenericDigestDigest { - - fields := []*registry.DecodedField(in) - _ = fields +func To_SpRuntimeGenericDigestDigest(in any) *pbgear.SpRuntimeGenericDigestDigest { out := &pbgear.SpRuntimeGenericDigestDigest{} - out.Logs = To_repeated_SpRuntimeGenericDigestDigestItem(fields[0].Value.(registry.DecodedFields)) - - return out + v := in.(registry.Valuable) + _ = v + + // repeated field Logs + out.Logs = To_Repeated_SpRuntimeGenericDigestDigest_logs(v.ValueAt(0)) + + return out //from message } -func To_repeated_SpRuntimeGenericDigestDigestItem(f registry.DecodedFields) []*pbgear.SpRuntimeGenericDigestDigestItem { - fields := []*registry.DecodedField(f) - _ = fields + - out := make([]*pbgear.SpRuntimeGenericDigestDigestItem, len(fields)) - for _, f := range fields { - out = append(out, To_SpRuntimeGenericDigestDigestItem(f.Value.([]*registry.DecodedField))) +func To_Repeated_SpRuntimeGenericDigestDigest_logs(in any) []*pbgear.SpRuntimeGenericDigestDigestItem { + items := in.([]interface{}) + + var out []*pbgear.SpRuntimeGenericDigestDigestItem + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_SpRuntimeGenericDigestDigestItem(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } - func To_SpRuntimeGenericDigestDigestItem(in registry.DecodedFields) *pbgear.SpRuntimeGenericDigestDigestItem { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_SpRuntimeGenericDigestDigestItem(in any) *pbgear.SpRuntimeGenericDigestDigestItem { out := &pbgear.SpRuntimeGenericDigestDigestItem{} - out.Logs = To_Babe_Logs(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field Logs + out.Logs = To_SpRuntimeGenericDigestDigestItem_logs(v.ValueAt(0)) - func To_SpRuntimeGenericHeaderHeader(in registry.DecodedFields) *pbgear.SpRuntimeGenericHeaderHeader { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields +func To_SpRuntimeGenericDigestDigestItem_logs(in any) *pbgear.Babe_Logs { + v := in.(registry.Valuable) + return To_Babe_Logs(v.ValueAt(0) //simple field +} + + +func To_SpRuntimeGenericHeaderHeader(in any) *pbgear.SpRuntimeGenericHeaderHeader { out := &pbgear.SpRuntimeGenericHeaderHeader{} - out.ParentHash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - out.Number = To_CompactUint32(fields[1].Value.(types.UCompact)) - - out.StateRoot = To_PrimitiveTypesH256(fields[2].Value.(registry.DecodedFields)) - - out.ExtrinsicsRoot = To_PrimitiveTypesH256(fields[3].Value.(registry.DecodedFields)) - - out.Digest = To_SpRuntimeGenericDigestDigest(fields[4].Value.(registry.DecodedFields)) - - return out -} - - func To_SpRuntimeModuleError(in registry.DecodedFields) *pbgear.SpRuntimeModuleError { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.SpRuntimeModuleError{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Error = To_bytes(fields[1].Value.([]interface{})) - return out -} - - func To_SpRuntimeMultiaddressMultiAddress(in registry.DecodedFields) *pbgear.SpRuntimeMultiaddressMultiAddress { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.SpRuntimeMultiaddressMultiAddress{} - out.Targets = To_Staking_Targets(fields[0].Value.(registry.DecodedFields)) - - return out + v := in.(registry.Valuable) + _ = v + + // field ParentHash + out.ParentHash = To_SpRuntimeGenericHeaderHeader_parent_hash(v.ValueAt(0)) + // primitive field Number + out.Number = To_uint32(v.ValueAt(1)) + // field StateRoot + out.StateRoot = To_SpRuntimeGenericHeaderHeader_state_root(v.ValueAt(2)) + // field ExtrinsicsRoot + out.ExtrinsicsRoot = To_SpRuntimeGenericHeaderHeader_extrinsics_root(v.ValueAt(3)) + // field Digest + out.Digest = To_SpRuntimeGenericHeaderHeader_digest(v.ValueAt(4)) + + return out //from message +} + +func To_SpRuntimeGenericHeaderHeader_parent_hash(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field +} +func To_SpRuntimeGenericHeaderHeader_state_root(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field } +func To_SpRuntimeGenericHeaderHeader_extrinsics_root(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field +} +func To_SpRuntimeGenericHeaderHeader_digest(in any) *pbgear.SpRuntimeGenericDigestDigest { + v := in.(registry.Valuable) + return To_SpRuntimeGenericDigestDigest(v.ValueAt(0) //simple field +} + + +func To_SpRuntimeMultiaddressMultiAddress(in any) *pbgear.SpRuntimeMultiaddressMultiAddress { + out := &pbgear.SpRuntimeMultiaddressMultiAddress{} + v := in.(registry.Valuable) + _ = v + + // field Targets + out.Targets = To_SpRuntimeMultiaddressMultiAddress_targets(v.ValueAt(0)) - func To_SpSessionMembershipProof(in registry.DecodedFields) *pbgear.SpSessionMembershipProof { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields +func To_SpRuntimeMultiaddressMultiAddress_targets(in any) *pbgear.Staking_Targets { + v := in.(registry.Valuable) + return To_Staking_Targets(v.ValueAt(0) //simple field +} + + +func To_SpSessionMembershipProof(in any) *pbgear.SpSessionMembershipProof { out := &pbgear.SpSessionMembershipProof{} - out.Session = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.TrieNodes = To_repeated_Babe_BabeTrieNodesList(fields[1].Value.(registry.DecodedFields)) - - out.ValidatorCount = To_uint32(fields[2].Value.(registry.DecodedFields)) - - return out + v := in.(registry.Valuable) + _ = v + + // primitive field Session + out.Session = To_uint32(v.ValueAt(0)) + // repeated field TrieNodes + out.TrieNodes = To_Repeated_SpSessionMembershipProof_trie_nodes(v.ValueAt(1)) + // primitive field ValidatorCount + out.ValidatorCount = To_uint32(v.ValueAt(2)) + + return out //from message } -func To_repeated_Babe_BabeTrieNodesList(f registry.DecodedFields) []*pbgear.Babe_BabeTrieNodesList { - fields := []*registry.DecodedField(f) - _ = fields + + +func To_Repeated_SpSessionMembershipProof_trie_nodes(in any) []*pbgear.Babe_BabeTrieNodesList { + items := in.([]interface{}) - out := make([]*pbgear.Babe_BabeTrieNodesList, len(fields)) - for _, f := range fields { - out = append(out, To_Babe_BabeTrieNodesList(f.Value.([]*registry.DecodedField))) + var out []*pbgear.Babe_BabeTrieNodesList + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_Babe_BabeTrieNodesList(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } - func To_SpWeightsWeightV2Weight(in registry.DecodedFields) *pbgear.SpWeightsWeightV2Weight { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_SpWeightsWeightV2Weight(in any) *pbgear.SpWeightsWeightV2Weight { out := &pbgear.SpWeightsWeightV2Weight{} - out.RefTime = To_CompactUint64(fields[0].Value.(types.UCompact)) - - out.ProofSize = To_CompactUint64(fields[1].Value.(types.UCompact)) - - return out + v := in.(registry.Valuable) + _ = v + + // primitive field RefTime + out.RefTime = To_uint64(v.ValueAt(0)) + // primitive field ProofSize + out.ProofSize = To_uint64(v.ValueAt(1)) + + return out //from message +} + + + +func To_StakingPallet(in any) *pbgear.StakingPallet { + out := &pbgear.StakingPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_StakingPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_StakingPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.StakingPallet_BondCall{ + BondCall: To_Staking_BondCall(param), + } + case 1: + return &pbgear.StakingPallet_BondExtraCall{ + BondExtraCall: To_Staking_BondExtraCall(param), + } + case 2: + return &pbgear.StakingPallet_UnbondCall{ + UnbondCall: To_Staking_UnbondCall(param), + } + case 3: + return &pbgear.StakingPallet_WithdrawUnbondedCall{ + WithdrawUnbondedCall: To_Staking_WithdrawUnbondedCall(param), + } + case 4: + return &pbgear.StakingPallet_ValidateCall{ + ValidateCall: To_Staking_ValidateCall(param), + } + case 5: + return &pbgear.StakingPallet_NominateCall{ + NominateCall: To_Staking_NominateCall(param), + } + case 6: + return &pbgear.StakingPallet_ChillCall{ + ChillCall: To_Staking_ChillCall(param), + } + case 7: + return &pbgear.StakingPallet_SetPayeeCall{ + SetPayeeCall: To_Staking_SetPayeeCall(param), + } + case 8: + return &pbgear.StakingPallet_SetControllerCall{ + SetControllerCall: To_Staking_SetControllerCall(param), + } + case 9: + return &pbgear.StakingPallet_SetValidatorCountCall{ + SetValidatorCountCall: To_Staking_SetValidatorCountCall(param), + } + case 10: + return &pbgear.StakingPallet_IncreaseValidatorCountCall{ + IncreaseValidatorCountCall: To_Staking_IncreaseValidatorCountCall(param), + } + case 11: + return &pbgear.StakingPallet_ScaleValidatorCountCall{ + ScaleValidatorCountCall: To_Staking_ScaleValidatorCountCall(param), + } + case 12: + return &pbgear.StakingPallet_ForceNoErasCall{ + ForceNoErasCall: To_Staking_ForceNoErasCall(param), + } + case 13: + return &pbgear.StakingPallet_ForceNewEraCall{ + ForceNewEraCall: To_Staking_ForceNewEraCall(param), + } + case 14: + return &pbgear.StakingPallet_SetInvulnerablesCall{ + SetInvulnerablesCall: To_Staking_SetInvulnerablesCall(param), + } + case 15: + return &pbgear.StakingPallet_ForceUnstakeCall{ + ForceUnstakeCall: To_Staking_ForceUnstakeCall(param), + } + case 16: + return &pbgear.StakingPallet_ForceNewEraAlwaysCall{ + ForceNewEraAlwaysCall: To_Staking_ForceNewEraAlwaysCall(param), + } + case 17: + return &pbgear.StakingPallet_CancelDeferredSlashCall{ + CancelDeferredSlashCall: To_Staking_CancelDeferredSlashCall(param), + } + case 18: + return &pbgear.StakingPallet_PayoutStakersCall{ + PayoutStakersCall: To_Staking_PayoutStakersCall(param), + } + case 19: + return &pbgear.StakingPallet_RebondCall{ + RebondCall: To_Staking_RebondCall(param), + } + case 20: + return &pbgear.StakingPallet_ReapStashCall{ + ReapStashCall: To_Staking_ReapStashCall(param), + } + case 21: + return &pbgear.StakingPallet_KickCall{ + KickCall: To_Staking_KickCall(param), + } + case 22: + return &pbgear.StakingPallet_SetStakingConfigsCall{ + SetStakingConfigsCall: To_Staking_SetStakingConfigsCall(param), + } + case 23: + return &pbgear.StakingPallet_ChillOtherCall{ + ChillOtherCall: To_Staking_ChillOtherCall(param), + } + case 24: + return &pbgear.StakingPallet_ForceApplyMinCommissionCall{ + ForceApplyMinCommissionCall: To_Staking_ForceApplyMinCommissionCall(param), + } + case 25: + return &pbgear.StakingPallet_SetMinCommissionCall{ + SetMinCommissionCall: To_Staking_SetMinCommissionCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } } - func To_StakingRewards_Address20(in registry.DecodedFields) *pbgear.StakingRewards_Address20 { + +func To_StakingRewardsPallet(in any) *pbgear.StakingRewardsPallet { + out := &pbgear.StakingRewardsPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_StakingRewardsPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields +func To_OneOf_StakingRewardsPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.StakingRewardsPallet_RefillCall{ + RefillCall: To_StakingRewards_RefillCall(param), + } + case 1: + return &pbgear.StakingRewardsPallet_ForceRefillCall{ + ForceRefillCall: To_StakingRewards_ForceRefillCall(param), + } + case 2: + return &pbgear.StakingRewardsPallet_WithdrawCall{ + WithdrawCall: To_StakingRewards_WithdrawCall(param), + } + case 3: + return &pbgear.StakingRewardsPallet_AlignSupplyCall{ + AlignSupplyCall: To_StakingRewards_AlignSupplyCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } +} + + +func To_StakingRewards_Address20(in any) *pbgear.StakingRewards_Address20 { out := &pbgear.StakingRewards_Address20{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_StakingRewards_Address32(in registry.DecodedFields) *pbgear.StakingRewards_Address32 { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_StakingRewards_Address32(in any) *pbgear.StakingRewards_Address32 { out := &pbgear.StakingRewards_Address32{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v - func To_StakingRewards_AlignSupplyCall(in registry.DecodedFields) *pbgear.StakingRewards_AlignSupplyCall { + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_StakingRewards_AlignSupplyCall(in any) *pbgear.StakingRewards_AlignSupplyCall { out := &pbgear.StakingRewards_AlignSupplyCall{} - out.Target = To_string(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_StakingRewards_BurnedEvent(in registry.DecodedFields) *pbgear.StakingRewards_BurnedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.StakingRewards_BurnedEvent{} - out.Amount = To_string(fields[0].Value.(registry.DecodedFields)) - - return out -} + // primitive field Target + out.Target = To_string(v.ValueAt(0)) - func To_StakingRewards_CompactTupleNull(in types.UCompact) *pbgear.StakingRewards_CompactTupleNull { - - out := &pbgear.StakingRewards_CompactTupleNull{} - out.Value = To_TupleNull() - return out + return out //from message } - - func To_StakingRewards_DepositedEvent(in registry.DecodedFields) *pbgear.StakingRewards_DepositedEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.StakingRewards_DepositedEvent{} - out.Amount = To_string(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_StakingRewards_ForceRefillCall(in registry.DecodedFields) *pbgear.StakingRewards_ForceRefillCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_StakingRewards_ForceRefillCall(in any) *pbgear.StakingRewards_ForceRefillCall { out := &pbgear.StakingRewards_ForceRefillCall{} - out.From = To_StakingRewards_From(fields[0].Value.(registry.DecodedFields)) - - out.Value = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field From + out.From = To_StakingRewards_ForceRefillCall_from(v.ValueAt(0)) + // primitive field Value + out.Value = To_string(v.ValueAt(1)) - func To_StakingRewards_From(in registry.DecodedFields) *pbgear.StakingRewards_From { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields +func To_StakingRewards_ForceRefillCall_from(in any) *pbgear.StakingRewards_From { + v := in.(registry.Valuable) + return To_StakingRewards_From(v.ValueAt(0) //simple field +} + + +func To_StakingRewards_From(in any) *pbgear.StakingRewards_From { out := &pbgear.StakingRewards_From{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.StakingRewards_From_Id{ - Id: To_StakingRewards_Id(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_StakingRewards_From_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_StakingRewards_From_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.StakingRewards_From_Id{ + Id: To_StakingRewards_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.StakingRewards_From_Index{ - Index: To_StakingRewards_Index(fields), //Passthrough fields... + case 1: + return &pbgear.StakingRewards_From_Index{ + Index: To_StakingRewards_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.StakingRewards_From_Raw{ - Raw: To_StakingRewards_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.StakingRewards_From_Raw{ + Raw: To_StakingRewards_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.StakingRewards_From_Address32{ - Address32: To_StakingRewards_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.StakingRewards_From_Address32{ + Address32: To_StakingRewards_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.StakingRewards_From_Address20{ - Address20: To_StakingRewards_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.StakingRewards_From_Address20{ + Address20: To_StakingRewards_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_StakingRewards_Id(in registry.DecodedFields) *pbgear.StakingRewards_Id { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_StakingRewards_Id(in any) *pbgear.StakingRewards_Id { out := &pbgear.StakingRewards_Id{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_StakingRewards_Index(in registry.DecodedFields) *pbgear.StakingRewards_Index { + // field Value0 + out.Value0 = To_StakingRewards_Id_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.StakingRewards_Index{} - out.Value0 = To_StakingRewards_CompactTupleNull(fields[0].Value.(types.UCompact)) - - return out +func To_StakingRewards_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_StakingRewards_MintedEvent(in registry.DecodedFields) *pbgear.StakingRewards_MintedEvent { + +func To_StakingRewards_Index(in any) *pbgear.StakingRewards_Index { + out := &pbgear.StakingRewards_Index{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_StakingRewards_Index_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.StakingRewards_MintedEvent{} - out.Amount = To_string(fields[0].Value.(registry.DecodedFields)) - - return out +func To_StakingRewards_Index_value0(in any) *pbgear.StakingRewards_TupleNull { + v := in.(registry.Valuable) + return To_StakingRewards_TupleNull(v.ValueAt(0) //simple field } - func To_StakingRewards_Raw(in registry.DecodedFields) *pbgear.StakingRewards_Raw { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_StakingRewards_Raw(in any) *pbgear.StakingRewards_Raw { out := &pbgear.StakingRewards_Raw{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_StakingRewards_RefillCall(in registry.DecodedFields) *pbgear.StakingRewards_RefillCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_StakingRewards_RefillCall(in any) *pbgear.StakingRewards_RefillCall { out := &pbgear.StakingRewards_RefillCall{} - out.Value = To_string(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_StakingRewards_To(in registry.DecodedFields) *pbgear.StakingRewards_To { + // primitive field Value + out.Value = To_string(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_StakingRewards_To(in any) *pbgear.StakingRewards_To { out := &pbgear.StakingRewards_To{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.StakingRewards_To_Id{ - Id: To_StakingRewards_Id(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_StakingRewards_To_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_StakingRewards_To_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.StakingRewards_To_Id{ + Id: To_StakingRewards_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.StakingRewards_To_Index{ - Index: To_StakingRewards_Index(fields), //Passthrough fields... + case 1: + return &pbgear.StakingRewards_To_Index{ + Index: To_StakingRewards_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.StakingRewards_To_Raw{ - Raw: To_StakingRewards_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.StakingRewards_To_Raw{ + Raw: To_StakingRewards_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.StakingRewards_To_Address32{ - Address32: To_StakingRewards_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.StakingRewards_To_Address32{ + Address32: To_StakingRewards_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.StakingRewards_To_Address20{ - Address20: To_StakingRewards_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.StakingRewards_To_Address20{ + Address20: To_StakingRewards_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_StakingRewards_WithdrawCall(in registry.DecodedFields) *pbgear.StakingRewards_WithdrawCall { + +func To_StakingRewards_TupleNull(in any) *pbgear.StakingRewards_TupleNull { + out := &pbgear.StakingRewards_TupleNull{} + v := in.(registry.Valuable) + _ = v + + // field Value + out.Value = To_StakingRewards_TupleNull_value(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.StakingRewards_WithdrawCall{} - out.To = To_StakingRewards_To(fields[0].Value.(registry.DecodedFields)) - - out.Value = To_string(fields[1].Value.(registry.DecodedFields)) - - return out +func To_StakingRewards_TupleNull_value(in any) *pbgear.TupleNull { + v := in.(registry.Valuable) + return To_TupleNull(v.ValueAt(0) //simple field } - func To_StakingRewards_WithdrawnEvent(in registry.DecodedFields) *pbgear.StakingRewards_WithdrawnEvent { + +func To_StakingRewards_WithdrawCall(in any) *pbgear.StakingRewards_WithdrawCall { + out := &pbgear.StakingRewards_WithdrawCall{} + v := in.(registry.Valuable) + _ = v + + // field To + out.To = To_StakingRewards_WithdrawCall_to(v.ValueAt(0)) + // primitive field Value + out.Value = To_string(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.StakingRewards_WithdrawnEvent{} - out.Amount = To_string(fields[0].Value.(registry.DecodedFields)) - - return out +func To_StakingRewards_WithdrawCall_to(in any) *pbgear.StakingRewards_To { + v := in.(registry.Valuable) + return To_StakingRewards_To(v.ValueAt(0) //simple field } - func To_Staking_Account(in registry.DecodedFields) *pbgear.Staking_Account { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Staking_Account(in any) *pbgear.Staking_Account { out := &pbgear.Staking_Account{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Staking_Address20(in registry.DecodedFields) *pbgear.Staking_Address20 { + // field Value0 + out.Value0 = To_Staking_Account_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_Address20{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out +func To_Staking_Account_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_Staking_Address32(in registry.DecodedFields) *pbgear.Staking_Address32 { + +func To_Staking_Address20(in any) *pbgear.Staking_Address20 { + out := &pbgear.Staking_Address20{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_Address32(in any) *pbgear.Staking_Address32 { out := &pbgear.Staking_Address32{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_Staking_BondCall(in registry.DecodedFields) *pbgear.Staking_BondCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_BondCall(in any) *pbgear.Staking_BondCall { out := &pbgear.Staking_BondCall{} - out.Value = To_CompactString(fields[0].Value.(types.UCompact)) - - out.Payee = To_Staking_Payee(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Staking_BondExtraCall(in registry.DecodedFields) *pbgear.Staking_BondExtraCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_BondExtraCall{} - out.MaxAdditional = To_CompactString(fields[0].Value.(types.UCompact)) - - return out -} + // primitive field Value + out.Value = To_string(v.ValueAt(0)) + // field Payee + out.Payee = To_Staking_BondCall_payee(v.ValueAt(1)) - func To_Staking_BondedEvent(in registry.DecodedFields) *pbgear.Staking_BondedEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_BondedEvent{} - out.Stash = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Staking_BondCall_payee(in any) *pbgear.Staking_Payee { + v := in.(registry.Valuable) + return To_Staking_Payee(v.ValueAt(0) //simple field } - func To_Staking_CancelDeferredSlashCall(in registry.DecodedFields) *pbgear.Staking_CancelDeferredSlashCall { + +func To_Staking_BondExtraCall(in any) *pbgear.Staking_BondExtraCall { + out := &pbgear.Staking_BondExtraCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field MaxAdditional + out.MaxAdditional = To_string(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_CancelDeferredSlashCall(in any) *pbgear.Staking_CancelDeferredSlashCall { out := &pbgear.Staking_CancelDeferredSlashCall{} - out.Era = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.SlashIndices = To_repeated_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Staking_ChillCall(in registry.DecodedFields) *pbgear.Staking_ChillCall { + // primitive field Era + out.Era = To_uint32(v.ValueAt(0)) + // primitive field SlashIndices + out.SlashIndices = To_Repeated_uint32(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + + +func To_Staking_ChillCall(in any) *pbgear.Staking_ChillCall { out := &pbgear.Staking_ChillCall{} - return out -} + v := in.(registry.Valuable) + _ = v - func To_Staking_ChillOtherCall(in registry.DecodedFields) *pbgear.Staking_ChillOtherCall { + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_ChillOtherCall(in any) *pbgear.Staking_ChillOtherCall { out := &pbgear.Staking_ChillOtherCall{} - out.Controller = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Staking_ChillThreshold(in registry.DecodedFields) *pbgear.Staking_ChillThreshold { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_ChillThreshold{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Staking_ChillThreshold_Noop{ - Noop: To_Staking_Noop(fields), //Passthrough fields... - } - } - return out -} + // field Controller + out.Controller = To_Staking_ChillOtherCall_controller(v.ValueAt(0)) - func To_Staking_ChilledEvent(in registry.DecodedFields) *pbgear.Staking_ChilledEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_ChilledEvent{} - out.Stash = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_Staking_CompactTupleNull(in types.UCompact) *pbgear.Staking_CompactTupleNull { - out := &pbgear.Staking_CompactTupleNull{} - out.Value = To_TupleNull() - return out +func To_Staking_ChillOtherCall_controller(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_Staking_Controller(in registry.DecodedFields) *pbgear.Staking_Controller { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_Controller{} - return out -} - func To_Staking_Dest(in registry.DecodedFields) *pbgear.Staking_Dest { +func To_Staking_ChillThreshold(in any) *pbgear.Staking_ChillThreshold { + out := &pbgear.Staking_ChillThreshold{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Staking_ChillThreshold_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_Dest{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Staking_Dest_Staked{ - Staked: To_Staking_Staked(fields), //Passthrough fields... +func To_OneOf_Staking_ChillThreshold_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Staking_ChillThreshold_Noop{ + Noop: To_Staking_Noop(param), } + case 1: + return &pbgear.Staking_ChillThreshold_Set{ + Set: To_Staking_Set(param), + } + case 2: + return &pbgear.Staking_ChillThreshold_Remove{ + Remove: To_Staking_Remove(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Staking_EraPaidEvent(in registry.DecodedFields) *pbgear.Staking_EraPaidEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_EraPaidEvent{} - out.EraIndex = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.ValidatorPayout = To_string(fields[1].Value.(registry.DecodedFields)) - - out.Remainder = To_string(fields[2].Value.(registry.DecodedFields)) - - return out -} - func To_Staking_ForceAlways(in registry.DecodedFields) *pbgear.Staking_ForceAlways { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_ForceAlways{} - return out -} +func To_Staking_Controller(in any) *pbgear.Staking_Controller { + out := &pbgear.Staking_Controller{} + v := in.(registry.Valuable) + _ = v + - func To_Staking_ForceApplyMinCommissionCall(in registry.DecodedFields) *pbgear.Staking_ForceApplyMinCommissionCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_ForceApplyMinCommissionCall(in any) *pbgear.Staking_ForceApplyMinCommissionCall { out := &pbgear.Staking_ForceApplyMinCommissionCall{} - out.ValidatorStash = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Staking_ForceEraEvent(in registry.DecodedFields) *pbgear.Staking_ForceEraEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_ForceEraEvent{} - out.Mode = To_Staking_Mode(fields[0].Value.(registry.DecodedFields)) - - return out -} + // field ValidatorStash + out.ValidatorStash = To_Staking_ForceApplyMinCommissionCall_validator_stash(v.ValueAt(0)) - func To_Staking_ForceNew(in registry.DecodedFields) *pbgear.Staking_ForceNew { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_ForceNew{} - return out +func To_Staking_ForceApplyMinCommissionCall_validator_stash(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_Staking_ForceNewEraAlwaysCall(in registry.DecodedFields) *pbgear.Staking_ForceNewEraAlwaysCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Staking_ForceNewEraAlwaysCall(in any) *pbgear.Staking_ForceNewEraAlwaysCall { out := &pbgear.Staking_ForceNewEraAlwaysCall{} - return out -} + v := in.(registry.Valuable) + _ = v - func To_Staking_ForceNewEraCall(in registry.DecodedFields) *pbgear.Staking_ForceNewEraCall { + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_ForceNewEraCall(in any) *pbgear.Staking_ForceNewEraCall { out := &pbgear.Staking_ForceNewEraCall{} - return out -} + v := in.(registry.Valuable) + _ = v + - func To_Staking_ForceNoErasCall(in registry.DecodedFields) *pbgear.Staking_ForceNoErasCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_ForceNoErasCall(in any) *pbgear.Staking_ForceNoErasCall { out := &pbgear.Staking_ForceNoErasCall{} - return out -} + v := in.(registry.Valuable) + _ = v - func To_Staking_ForceNone(in registry.DecodedFields) *pbgear.Staking_ForceNone { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_ForceNone{} - return out -} - func To_Staking_ForceUnstakeCall(in registry.DecodedFields) *pbgear.Staking_ForceUnstakeCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_ForceUnstakeCall(in any) *pbgear.Staking_ForceUnstakeCall { out := &pbgear.Staking_ForceUnstakeCall{} - out.Stash = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.NumSlashingSpans = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Staking_Id(in registry.DecodedFields) *pbgear.Staking_Id { + // field Stash + out.Stash = To_Staking_ForceUnstakeCall_stash(v.ValueAt(0)) + // primitive field NumSlashingSpans + out.NumSlashingSpans = To_uint32(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_Id{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Staking_ForceUnstakeCall_stash(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_Staking_IncreaseValidatorCountCall(in registry.DecodedFields) *pbgear.Staking_IncreaseValidatorCountCall { + +func To_Staking_Id(in any) *pbgear.Staking_Id { + out := &pbgear.Staking_Id{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Staking_Id_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_IncreaseValidatorCountCall{} - out.Additional = To_CompactUint32(fields[0].Value.(types.UCompact)) - - return out +func To_Staking_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_Staking_Index(in registry.DecodedFields) *pbgear.Staking_Index { + +func To_Staking_IncreaseValidatorCountCall(in any) *pbgear.Staking_IncreaseValidatorCountCall { + out := &pbgear.Staking_IncreaseValidatorCountCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Additional + out.Additional = To_uint32(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_Index(in any) *pbgear.Staking_Index { out := &pbgear.Staking_Index{} - out.Value0 = To_Staking_CompactTupleNull(fields[0].Value.(types.UCompact)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Staking_Index_value0(v.ValueAt(0)) - func To_Staking_KickCall(in registry.DecodedFields) *pbgear.Staking_KickCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields +func To_Staking_Index_value0(in any) *pbgear.Staking_TupleNull { + v := in.(registry.Valuable) + return To_Staking_TupleNull(v.ValueAt(0) //simple field +} + + +func To_Staking_KickCall(in any) *pbgear.Staking_KickCall { out := &pbgear.Staking_KickCall{} - out.Who = To_repeated_SpRuntimeMultiaddressMultiAddress(fields[0].Value.(registry.DecodedFields)) - - return out + v := in.(registry.Valuable) + _ = v + + // repeated field Who + out.Who = To_Repeated_Staking_KickCall_who(v.ValueAt(0)) + + return out //from message } -func To_repeated_SpRuntimeMultiaddressMultiAddress(f registry.DecodedFields) []*pbgear.SpRuntimeMultiaddressMultiAddress { - fields := []*registry.DecodedField(f) - _ = fields + + +func To_Repeated_Staking_KickCall_who(in any) []*pbgear.SpRuntimeMultiaddressMultiAddress { + items := in.([]interface{}) - out := make([]*pbgear.SpRuntimeMultiaddressMultiAddress, len(fields)) - for _, f := range fields { - out = append(out, To_SpRuntimeMultiaddressMultiAddress(f.Value.([]*registry.DecodedField))) + var out []*pbgear.SpRuntimeMultiaddressMultiAddress + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_SpRuntimeMultiaddressMultiAddress(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } - func To_Staking_KickedEvent(in registry.DecodedFields) *pbgear.Staking_KickedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_KickedEvent{} - out.Nominator = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Stash = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_Staking_MaxNominatorCount(in registry.DecodedFields) *pbgear.Staking_MaxNominatorCount { - - fields := []*registry.DecodedField(in) - _ = fields +func To_Staking_MaxNominatorCount(in any) *pbgear.Staking_MaxNominatorCount { out := &pbgear.Staking_MaxNominatorCount{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Staking_MaxNominatorCount_Noop{ - Noop: To_Staking_Noop(fields), //Passthrough fields... - } - } - return out -} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Staking_MaxNominatorCount_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) - func To_Staking_MaxValidatorCount(in registry.DecodedFields) *pbgear.Staking_MaxValidatorCount { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_MaxValidatorCount{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Staking_MaxValidatorCount_Noop{ - Noop: To_Staking_Noop(fields), //Passthrough fields... +func To_OneOf_Staking_MaxNominatorCount_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Staking_MaxNominatorCount_Noop{ + Noop: To_Staking_Noop(param), + } + case 1: + return &pbgear.Staking_MaxNominatorCount_Set{ + Set: To_Staking_Set(param), } + case 2: + return &pbgear.Staking_MaxNominatorCount_Remove{ + Remove: To_Staking_Remove(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Staking_MinCommission(in registry.DecodedFields) *pbgear.Staking_MinCommission { + +func To_Staking_MaxValidatorCount(in any) *pbgear.Staking_MaxValidatorCount { + out := &pbgear.Staking_MaxValidatorCount{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Staking_MaxValidatorCount_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_MinCommission{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Staking_MinCommission_Noop{ - Noop: To_Staking_Noop(fields), //Passthrough fields... +func To_OneOf_Staking_MaxValidatorCount_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Staking_MaxValidatorCount_Noop{ + Noop: To_Staking_Noop(param), } + case 1: + return &pbgear.Staking_MaxValidatorCount_Set{ + Set: To_Staking_Set(param), + } + case 2: + return &pbgear.Staking_MaxValidatorCount_Remove{ + Remove: To_Staking_Remove(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Staking_MinNominatorBond(in registry.DecodedFields) *pbgear.Staking_MinNominatorBond { + +func To_Staking_MinCommission(in any) *pbgear.Staking_MinCommission { + out := &pbgear.Staking_MinCommission{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Staking_MinCommission_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_MinNominatorBond{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Staking_MinNominatorBond_Noop{ - Noop: To_Staking_Noop(fields), //Passthrough fields... +func To_OneOf_Staking_MinCommission_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Staking_MinCommission_Noop{ + Noop: To_Staking_Noop(param), + } + case 1: + return &pbgear.Staking_MinCommission_Set{ + Set: To_Staking_Set(param), } + case 2: + return &pbgear.Staking_MinCommission_Remove{ + Remove: To_Staking_Remove(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Staking_MinValidatorBond(in registry.DecodedFields) *pbgear.Staking_MinValidatorBond { + +func To_Staking_MinNominatorBond(in any) *pbgear.Staking_MinNominatorBond { + out := &pbgear.Staking_MinNominatorBond{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Staking_MinNominatorBond_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_MinValidatorBond{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Staking_MinValidatorBond_Noop{ - Noop: To_Staking_Noop(fields), //Passthrough fields... +func To_OneOf_Staking_MinNominatorBond_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Staking_MinNominatorBond_Noop{ + Noop: To_Staking_Noop(param), + } + case 1: + return &pbgear.Staking_MinNominatorBond_Set{ + Set: To_Staking_Set(param), + } + case 2: + return &pbgear.Staking_MinNominatorBond_Remove{ + Remove: To_Staking_Remove(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Staking_Mode(in registry.DecodedFields) *pbgear.Staking_Mode { + +func To_Staking_MinValidatorBond(in any) *pbgear.Staking_MinValidatorBond { + out := &pbgear.Staking_MinValidatorBond{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Staking_MinValidatorBond_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_Mode{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Staking_Mode_NotForcing{ - NotForcing: To_Staking_NotForcing(fields), //Passthrough fields... +func To_OneOf_Staking_MinValidatorBond_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Staking_MinValidatorBond_Noop{ + Noop: To_Staking_Noop(param), + } + case 1: + return &pbgear.Staking_MinValidatorBond_Set{ + Set: To_Staking_Set(param), + } + case 2: + return &pbgear.Staking_MinValidatorBond_Remove{ + Remove: To_Staking_Remove(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Staking_NominateCall(in registry.DecodedFields) *pbgear.Staking_NominateCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Staking_NominateCall(in any) *pbgear.Staking_NominateCall { out := &pbgear.Staking_NominateCall{} - out.Targets = To_repeated_SpRuntimeMultiaddressMultiAddress(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // repeated field Targets + out.Targets = To_Repeated_Staking_NominateCall_targets(v.ValueAt(0)) - func To_Staking_None(in registry.DecodedFields) *pbgear.Staking_None { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_None{} - return out + +func To_Repeated_Staking_NominateCall_targets(in any) []*pbgear.SpRuntimeMultiaddressMultiAddress { + items := in.([]interface{}) + + var out []*pbgear.SpRuntimeMultiaddressMultiAddress + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_SpRuntimeMultiaddressMultiAddress(w) + out = append(out, o) + } + return nil //funcForRepeatedField } - func To_Staking_Noop(in registry.DecodedFields) *pbgear.Staking_Noop { + +func To_Staking_None(in any) *pbgear.Staking_None { + out := &pbgear.Staking_None{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_Noop(in any) *pbgear.Staking_Noop { out := &pbgear.Staking_Noop{} - return out + v := in.(registry.Valuable) + _ = v + + + return out //from message } + + + +func To_Staking_PalletStakingValidatorPrefs(in any) *pbgear.Staking_PalletStakingValidatorPrefs { + out := &pbgear.Staking_PalletStakingValidatorPrefs{} + v := in.(registry.Valuable) + _ = v + + // field Commission + out.Commission = To_Staking_PalletStakingValidatorPrefs_commission(v.ValueAt(0)) + // primitive field Blocked + out.Blocked = To_bool(v.ValueAt(1)) - func To_Staking_NotForcing(in registry.DecodedFields) *pbgear.Staking_NotForcing { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_NotForcing{} - return out + return out //from message } - - func To_Staking_OldSlashingReportDiscardedEvent(in registry.DecodedFields) *pbgear.Staking_OldSlashingReportDiscardedEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_OldSlashingReportDiscardedEvent{} - out.SessionIndex = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Staking_PalletStakingValidatorPrefs_commission(in any) *pbgear.SpArithmeticPerThingsPerbill { + v := in.(registry.Valuable) + return To_SpArithmeticPerThingsPerbill(v.ValueAt(0) //simple field } - func To_Staking_PalletStakingExposure(in registry.DecodedFields) *pbgear.Staking_PalletStakingExposure { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_PalletStakingExposure{} - out.Total = To_CompactString(fields[0].Value.(types.UCompact)) - - out.Own = To_CompactString(fields[1].Value.(types.UCompact)) - - out.Others = To_repeated_Staking_PalletStakingIndividualExposure(fields[2].Value.(registry.DecodedFields)) - - return out -} -func To_repeated_Staking_PalletStakingIndividualExposure(f registry.DecodedFields) []*pbgear.Staking_PalletStakingIndividualExposure { - fields := []*registry.DecodedField(f) - _ = fields - out := make([]*pbgear.Staking_PalletStakingIndividualExposure, len(fields)) - for _, f := range fields { - out = append(out, To_Staking_PalletStakingIndividualExposure(f.Value.([]*registry.DecodedField))) - } - return out -} +func To_Staking_Payee(in any) *pbgear.Staking_Payee { + out := &pbgear.Staking_Payee{} + v := in.(registry.Valuable) + _ = v - func To_Staking_PalletStakingIndividualExposure(in registry.DecodedFields) *pbgear.Staking_PalletStakingIndividualExposure { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_PalletStakingIndividualExposure{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Value = To_CompactString(fields[1].Value.(types.UCompact)) - - return out -} + // oneOf field Value + v0 := To_OneOf_Staking_Payee_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) - func To_Staking_PalletStakingValidatorPrefs(in registry.DecodedFields) *pbgear.Staking_PalletStakingValidatorPrefs { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_PalletStakingValidatorPrefs{} - out.Commission = To_CompactSpArithmeticPerThingsPerbill(fields[0].Value.(types.UCompact)) - - out.Blocked = To_bool(fields[1].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_Staking_Payee(in registry.DecodedFields) *pbgear.Staking_Payee { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_Payee{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Staking_Payee_Staked{ - Staked: To_Staking_Staked(fields), //Passthrough fields... +func To_OneOf_Staking_Payee_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Staking_Payee_Staked{ + Staked: To_Staking_Staked(param), + } + case 1: + return &pbgear.Staking_Payee_Stash{ + Stash: To_Staking_Stash(param), + } + case 2: + return &pbgear.Staking_Payee_Controller{ + Controller: To_Staking_Controller(param), } + case 3: + return &pbgear.Staking_Payee_Account{ + Account: To_Staking_Account(param), + } + case 4: + return &pbgear.Staking_Payee_None{ + None: To_Staking_None(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Staking_PayoutStakersCall(in registry.DecodedFields) *pbgear.Staking_PayoutStakersCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Staking_PayoutStakersCall(in any) *pbgear.Staking_PayoutStakersCall { out := &pbgear.Staking_PayoutStakersCall{} - out.ValidatorStash = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Era = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field ValidatorStash + out.ValidatorStash = To_Staking_PayoutStakersCall_validator_stash(v.ValueAt(0)) + // primitive field Era + out.Era = To_uint32(v.ValueAt(1)) - func To_Staking_PayoutStartedEvent(in registry.DecodedFields) *pbgear.Staking_PayoutStartedEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_PayoutStartedEvent{} - out.EraIndex = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.ValidatorStash = To_SpCoreCryptoAccountId32(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Staking_PayoutStakersCall_validator_stash(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_Staking_Raw(in registry.DecodedFields) *pbgear.Staking_Raw { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Staking_Raw(in any) *pbgear.Staking_Raw { out := &pbgear.Staking_Raw{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v - func To_Staking_ReapStashCall(in registry.DecodedFields) *pbgear.Staking_ReapStashCall { + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_ReapStashCall(in any) *pbgear.Staking_ReapStashCall { out := &pbgear.Staking_ReapStashCall{} - out.Stash = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.NumSlashingSpans = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field Stash + out.Stash = To_Staking_ReapStashCall_stash(v.ValueAt(0)) + // primitive field NumSlashingSpans + out.NumSlashingSpans = To_uint32(v.ValueAt(1)) - func To_Staking_RebondCall(in registry.DecodedFields) *pbgear.Staking_RebondCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_RebondCall{} - out.Value = To_CompactString(fields[0].Value.(types.UCompact)) - - return out +func To_Staking_ReapStashCall_stash(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_Staking_Remove(in registry.DecodedFields) *pbgear.Staking_Remove { + +func To_Staking_RebondCall(in any) *pbgear.Staking_RebondCall { + out := &pbgear.Staking_RebondCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value + out.Value = To_string(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_Remove(in any) *pbgear.Staking_Remove { out := &pbgear.Staking_Remove{} - return out -} + v := in.(registry.Valuable) + _ = v - func To_Staking_RewardedEvent(in registry.DecodedFields) *pbgear.Staking_RewardedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_RewardedEvent{} - out.Stash = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Dest = To_Staking_Dest(fields[1].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[2].Value.(registry.DecodedFields)) - - return out -} - func To_Staking_ScaleValidatorCountCall(in registry.DecodedFields) *pbgear.Staking_ScaleValidatorCountCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_ScaleValidatorCountCall(in any) *pbgear.Staking_ScaleValidatorCountCall { out := &pbgear.Staking_ScaleValidatorCountCall{} - out.Factor = To_SpArithmeticPerThingsPercent(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Staking_Set(in registry.DecodedFields) *pbgear.Staking_Set { + // field Factor + out.Factor = To_Staking_ScaleValidatorCountCall_factor(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_Set{} - out.Value0 = To_string(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Staking_ScaleValidatorCountCall_factor(in any) *pbgear.SpArithmeticPerThingsPercent { + v := in.(registry.Valuable) + return To_SpArithmeticPerThingsPercent(v.ValueAt(0) //simple field } - func To_Staking_SetControllerCall(in registry.DecodedFields) *pbgear.Staking_SetControllerCall { + +func To_Staking_Set(in any) *pbgear.Staking_Set { + out := &pbgear.Staking_Set{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_string(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_SetControllerCall(in any) *pbgear.Staking_SetControllerCall { out := &pbgear.Staking_SetControllerCall{} - return out -} + v := in.(registry.Valuable) + _ = v + - func To_Staking_SetInvulnerablesCall(in registry.DecodedFields) *pbgear.Staking_SetInvulnerablesCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_SetInvulnerablesCall(in any) *pbgear.Staking_SetInvulnerablesCall { out := &pbgear.Staking_SetInvulnerablesCall{} - out.Invulnerables = To_repeated_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Staking_SetMinCommissionCall(in registry.DecodedFields) *pbgear.Staking_SetMinCommissionCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_SetMinCommissionCall{} - out.New = To_SpArithmeticPerThingsPerbill(fields[0].Value.(registry.DecodedFields)) - - return out -} + // repeated field Invulnerables + out.Invulnerables = To_Repeated_Staking_SetInvulnerablesCall_invulnerables(v.ValueAt(0)) - func To_Staking_SetPayeeCall(in registry.DecodedFields) *pbgear.Staking_SetPayeeCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_SetPayeeCall{} - out.Payee = To_Staking_Payee(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_Staking_SetStakingConfigsCall(in registry.DecodedFields) *pbgear.Staking_SetStakingConfigsCall { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_SetStakingConfigsCall{} - out.MinNominatorBond = To_Staking_MinNominatorBond(fields[0].Value.(registry.DecodedFields)) - - out.MinValidatorBond = To_Staking_MinValidatorBond(fields[1].Value.(registry.DecodedFields)) - - out.MaxNominatorCount = To_Staking_MaxNominatorCount(fields[2].Value.(registry.DecodedFields)) - - out.MaxValidatorCount = To_Staking_MaxValidatorCount(fields[3].Value.(registry.DecodedFields)) - - out.ChillThreshold = To_Staking_ChillThreshold(fields[4].Value.(registry.DecodedFields)) - - out.MinCommission = To_Staking_MinCommission(fields[5].Value.(registry.DecodedFields)) - - return out -} - - func To_Staking_SetValidatorCountCall(in registry.DecodedFields) *pbgear.Staking_SetValidatorCountCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_SetValidatorCountCall{} - out.New = To_CompactUint32(fields[0].Value.(types.UCompact)) - - return out -} - func To_Staking_SlashReportedEvent(in registry.DecodedFields) *pbgear.Staking_SlashReportedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_SlashReportedEvent{} - out.Validator = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Fraction = To_SpArithmeticPerThingsPerbill(fields[1].Value.(registry.DecodedFields)) - - out.SlashEra = To_uint32(fields[2].Value.(registry.DecodedFields)) - - return out +func To_Repeated_Staking_SetInvulnerablesCall_invulnerables(in any) []*pbgear.SpCoreCryptoAccountId32 { + items := in.([]interface{}) + + var out []*pbgear.SpCoreCryptoAccountId32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_SpCoreCryptoAccountId32(w) + out = append(out, o) + } + return nil //funcForRepeatedField } - func To_Staking_SlashedEvent(in registry.DecodedFields) *pbgear.Staking_SlashedEvent { + +func To_Staking_SetMinCommissionCall(in any) *pbgear.Staking_SetMinCommissionCall { + out := &pbgear.Staking_SetMinCommissionCall{} + v := in.(registry.Valuable) + _ = v + + // field New + out.New = To_Staking_SetMinCommissionCall_new(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_SlashedEvent{} - out.Staker = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Staking_SetMinCommissionCall_new(in any) *pbgear.SpArithmeticPerThingsPerbill { + v := in.(registry.Valuable) + return To_SpArithmeticPerThingsPerbill(v.ValueAt(0) //simple field } - func To_Staking_SnapshotTargetsSizeExceededEvent(in registry.DecodedFields) *pbgear.Staking_SnapshotTargetsSizeExceededEvent { + +func To_Staking_SetPayeeCall(in any) *pbgear.Staking_SetPayeeCall { + out := &pbgear.Staking_SetPayeeCall{} + v := in.(registry.Valuable) + _ = v + + // field Payee + out.Payee = To_Staking_SetPayeeCall_payee(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_SnapshotTargetsSizeExceededEvent{} - out.Size = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Staking_SetPayeeCall_payee(in any) *pbgear.Staking_Payee { + v := in.(registry.Valuable) + return To_Staking_Payee(v.ValueAt(0) //simple field } - func To_Staking_SnapshotVotersSizeExceededEvent(in registry.DecodedFields) *pbgear.Staking_SnapshotVotersSizeExceededEvent { + +func To_Staking_SetStakingConfigsCall(in any) *pbgear.Staking_SetStakingConfigsCall { + out := &pbgear.Staking_SetStakingConfigsCall{} + v := in.(registry.Valuable) + _ = v + + // field MinNominatorBond + out.MinNominatorBond = To_Staking_SetStakingConfigsCall_min_nominator_bond(v.ValueAt(0)) + // field MinValidatorBond + out.MinValidatorBond = To_Staking_SetStakingConfigsCall_min_validator_bond(v.ValueAt(1)) + // field MaxNominatorCount + out.MaxNominatorCount = To_Staking_SetStakingConfigsCall_max_nominator_count(v.ValueAt(2)) + // field MaxValidatorCount + out.MaxValidatorCount = To_Staking_SetStakingConfigsCall_max_validator_count(v.ValueAt(3)) + // field ChillThreshold + out.ChillThreshold = To_Staking_SetStakingConfigsCall_chill_threshold(v.ValueAt(4)) + // field MinCommission + out.MinCommission = To_Staking_SetStakingConfigsCall_min_commission(v.ValueAt(5)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_SnapshotVotersSizeExceededEvent{} - out.Size = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Staking_SetStakingConfigsCall_min_nominator_bond(in any) *pbgear.Staking_MinNominatorBond { + v := in.(registry.Valuable) + return To_Staking_MinNominatorBond(v.ValueAt(0) //simple field +} +func To_Staking_SetStakingConfigsCall_min_validator_bond(in any) *pbgear.Staking_MinValidatorBond { + v := in.(registry.Valuable) + return To_Staking_MinValidatorBond(v.ValueAt(0) //simple field +} +func To_Staking_SetStakingConfigsCall_max_nominator_count(in any) *pbgear.Staking_MaxNominatorCount { + v := in.(registry.Valuable) + return To_Staking_MaxNominatorCount(v.ValueAt(0) //simple field +} +func To_Staking_SetStakingConfigsCall_max_validator_count(in any) *pbgear.Staking_MaxValidatorCount { + v := in.(registry.Valuable) + return To_Staking_MaxValidatorCount(v.ValueAt(0) //simple field +} +func To_Staking_SetStakingConfigsCall_chill_threshold(in any) *pbgear.Staking_ChillThreshold { + v := in.(registry.Valuable) + return To_Staking_ChillThreshold(v.ValueAt(0) //simple field } +func To_Staking_SetStakingConfigsCall_min_commission(in any) *pbgear.Staking_MinCommission { + v := in.(registry.Valuable) + return To_Staking_MinCommission(v.ValueAt(0) //simple field +} + + +func To_Staking_SetValidatorCountCall(in any) *pbgear.Staking_SetValidatorCountCall { + out := &pbgear.Staking_SetValidatorCountCall{} + v := in.(registry.Valuable) + _ = v - func To_Staking_Staked(in registry.DecodedFields) *pbgear.Staking_Staked { + // primitive field New + out.New = To_uint32(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_Staked(in any) *pbgear.Staking_Staked { out := &pbgear.Staking_Staked{} - return out -} + v := in.(registry.Valuable) + _ = v - func To_Staking_StakersElectedEvent(in registry.DecodedFields) *pbgear.Staking_StakersElectedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_StakersElectedEvent{} - return out -} - func To_Staking_StakingElectionFailedEvent(in registry.DecodedFields) *pbgear.Staking_StakingElectionFailedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_StakingElectionFailedEvent{} - return out + return out //from message } - - func To_Staking_Stash(in registry.DecodedFields) *pbgear.Staking_Stash { - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_Stash(in any) *pbgear.Staking_Stash { out := &pbgear.Staking_Stash{} - return out -} + v := in.(registry.Valuable) + _ = v - func To_Staking_Targets(in registry.DecodedFields) *pbgear.Staking_Targets { + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_Targets(in any) *pbgear.Staking_Targets { out := &pbgear.Staking_Targets{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.Staking_Targets_Id{ - Id: To_Staking_Id(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Staking_Targets_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Staking_Targets_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Staking_Targets_Id{ + Id: To_Staking_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.Staking_Targets_Index{ - Index: To_Staking_Index(fields), //Passthrough fields... + case 1: + return &pbgear.Staking_Targets_Index{ + Index: To_Staking_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.Staking_Targets_Raw{ - Raw: To_Staking_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.Staking_Targets_Raw{ + Raw: To_Staking_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.Staking_Targets_Address32{ - Address32: To_Staking_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.Staking_Targets_Address32{ + Address32: To_Staking_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.Staking_Targets_Address20{ - Address20: To_Staking_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.Staking_Targets_Address20{ + Address20: To_Staking_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Staking_UnbondCall(in registry.DecodedFields) *pbgear.Staking_UnbondCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_UnbondCall{} - out.Value = To_CompactString(fields[0].Value.(types.UCompact)) - - return out -} - func To_Staking_UnbondedEvent(in registry.DecodedFields) *pbgear.Staking_UnbondedEvent { +func To_Staking_TupleNull(in any) *pbgear.Staking_TupleNull { + out := &pbgear.Staking_TupleNull{} + v := in.(registry.Valuable) + _ = v + + // field Value + out.Value = To_Staking_TupleNull_value(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_UnbondedEvent{} - out.Stash = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Staking_TupleNull_value(in any) *pbgear.TupleNull { + v := in.(registry.Valuable) + return To_TupleNull(v.ValueAt(0) //simple field } - func To_Staking_ValidateCall(in registry.DecodedFields) *pbgear.Staking_ValidateCall { + +func To_Staking_UnbondCall(in any) *pbgear.Staking_UnbondCall { + out := &pbgear.Staking_UnbondCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value + out.Value = To_string(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Staking_ValidateCall(in any) *pbgear.Staking_ValidateCall { out := &pbgear.Staking_ValidateCall{} - out.Prefs = To_Staking_PalletStakingValidatorPrefs(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field Prefs + out.Prefs = To_Staking_ValidateCall_prefs(v.ValueAt(0)) - func To_Staking_ValidatorPrefsSetEvent(in registry.DecodedFields) *pbgear.Staking_ValidatorPrefsSetEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_ValidatorPrefsSetEvent{} - out.Stash = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Prefs = To_Staking_PalletStakingValidatorPrefs(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Staking_ValidateCall_prefs(in any) *pbgear.Staking_PalletStakingValidatorPrefs { + v := in.(registry.Valuable) + return To_Staking_PalletStakingValidatorPrefs(v.ValueAt(0) //simple field } - func To_Staking_Who(in registry.DecodedFields) *pbgear.Staking_Who { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Staking_Who(in any) *pbgear.Staking_Who { out := &pbgear.Staking_Who{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.Staking_Who_Id{ - Id: To_Staking_Id(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Staking_Who_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Staking_Who_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Staking_Who_Id{ + Id: To_Staking_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.Staking_Who_Index{ - Index: To_Staking_Index(fields), //Passthrough fields... + case 1: + return &pbgear.Staking_Who_Index{ + Index: To_Staking_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.Staking_Who_Raw{ - Raw: To_Staking_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.Staking_Who_Raw{ + Raw: To_Staking_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.Staking_Who_Address32{ - Address32: To_Staking_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.Staking_Who_Address32{ + Address32: To_Staking_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.Staking_Who_Address20{ - Address20: To_Staking_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.Staking_Who_Address20{ + Address20: To_Staking_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Staking_WithdrawUnbondedCall(in registry.DecodedFields) *pbgear.Staking_WithdrawUnbondedCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Staking_WithdrawUnbondedCall(in any) *pbgear.Staking_WithdrawUnbondedCall { out := &pbgear.Staking_WithdrawUnbondedCall{} - out.NumSlashingSpans = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Staking_WithdrawnEvent(in registry.DecodedFields) *pbgear.Staking_WithdrawnEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Staking_WithdrawnEvent{} - out.Stash = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} + // primitive field NumSlashingSpans + out.NumSlashingSpans = To_uint32(v.ValueAt(0)) - func To_System_Arithmetic(in registry.DecodedFields) *pbgear.System_Arithmetic { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_Arithmetic{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_System_BadOrigin(in registry.DecodedFields) *pbgear.System_BadOrigin { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_BadOrigin{} - return out -} - func To_System_CannotLookup(in registry.DecodedFields) *pbgear.System_CannotLookup { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_CannotLookup{} - return out -} - func To_System_Class(in registry.DecodedFields) *pbgear.System_Class { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_Class{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.System_Class_Normal{ - Normal: To_System_Normal(fields), //Passthrough fields... - } - } - return out -} +func To_SystemPallet(in any) *pbgear.SystemPallet { + out := &pbgear.SystemPallet{} + v := in.(registry.Valuable) + _ = v - func To_System_CodeUpdatedEvent(in registry.DecodedFields) *pbgear.System_CodeUpdatedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_CodeUpdatedEvent{} - return out -} + // oneOf field Call + v0 := To_OneOf_SystemPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) - func To_System_ConsumerRemaining(in registry.DecodedFields) *pbgear.System_ConsumerRemaining { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_ConsumerRemaining{} - return out + return out //from message } - - func To_System_Corruption(in registry.DecodedFields) *pbgear.System_Corruption { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_Corruption{} - return out -} +func To_OneOf_SystemPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value - func To_System_DispatchError(in registry.DecodedFields) *pbgear.System_DispatchError { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_DispatchError{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.System_DispatchError_Other{ - Other: To_System_Other(fields), //Passthrough fields... + switch variantIn.VariantByte { + case 0: + return &pbgear.SystemPallet_RemarkCall{ + RemarkCall: To_System_RemarkCall(param), + } + case 1: + return &pbgear.SystemPallet_SetHeapPagesCall{ + SetHeapPagesCall: To_System_SetHeapPagesCall(param), + } + case 2: + return &pbgear.SystemPallet_SetCodeCall{ + SetCodeCall: To_System_SetCodeCall(param), + } + case 3: + return &pbgear.SystemPallet_SetCodeWithoutChecksCall{ + SetCodeWithoutChecksCall: To_System_SetCodeWithoutChecksCall(param), + } + case 4: + return &pbgear.SystemPallet_SetStorageCall{ + SetStorageCall: To_System_SetStorageCall(param), } + case 5: + return &pbgear.SystemPallet_KillStorageCall{ + KillStorageCall: To_System_KillStorageCall(param), + } + case 6: + return &pbgear.SystemPallet_KillPrefixCall{ + KillPrefixCall: To_System_KillPrefixCall(param), + } + case 7: + return &pbgear.SystemPallet_RemarkWithEventCall{ + RemarkWithEventCall: To_System_RemarkWithEventCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_System_Exhausted(in registry.DecodedFields) *pbgear.System_Exhausted { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_Exhausted{} - return out -} - func To_System_ExtrinsicFailedEvent(in registry.DecodedFields) *pbgear.System_ExtrinsicFailedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_ExtrinsicFailedEvent{} - out.DispatchError = To_System_DispatchError(fields[0].Value.(registry.DecodedFields)) - - out.DispatchInfo = To_FrameSupportDispatchDispatchInfo(fields[1].Value.(registry.DecodedFields)) - - return out -} +func To_System_KillPrefixCall(in any) *pbgear.System_KillPrefixCall { + out := &pbgear.System_KillPrefixCall{} + v := in.(registry.Valuable) + _ = v - func To_System_ExtrinsicSuccessEvent(in registry.DecodedFields) *pbgear.System_ExtrinsicSuccessEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_ExtrinsicSuccessEvent{} - out.DispatchInfo = To_FrameSupportDispatchDispatchInfo(fields[0].Value.(registry.DecodedFields)) - - return out -} + // primitive field Prefix + out.Prefix = To_bytes(v.ValueAt(0)) + // primitive field Subkeys + out.Subkeys = To_uint32(v.ValueAt(1)) - func To_System_KillPrefixCall(in registry.DecodedFields) *pbgear.System_KillPrefixCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_KillPrefixCall{} - out.Prefix = To_bytes(fields[0].Value.([]interface{})) - out.Subkeys = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_System_KillStorageCall(in registry.DecodedFields) *pbgear.System_KillStorageCall { - fields := []*registry.DecodedField(in) - _ = fields + + +func To_System_KillStorageCall(in any) *pbgear.System_KillStorageCall { out := &pbgear.System_KillStorageCall{} - out.Keys = To_repeated_System_SystemKeysList(fields[0].Value.(registry.DecodedFields)) - - return out + v := in.(registry.Valuable) + _ = v + + // repeated field Keys + out.Keys = To_Repeated_System_KillStorageCall_keys(v.ValueAt(0)) + + return out //from message } -func To_repeated_System_SystemKeysList(f registry.DecodedFields) []*pbgear.System_SystemKeysList { - fields := []*registry.DecodedField(f) - _ = fields + - out := make([]*pbgear.System_SystemKeysList, len(fields)) - for _, f := range fields { - out = append(out, To_System_SystemKeysList(f.Value.([]*registry.DecodedField))) +func To_Repeated_System_KillStorageCall_keys(in any) []*pbgear.System_SystemKeysList { + items := in.([]interface{}) + + var out []*pbgear.System_SystemKeysList + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_System_SystemKeysList(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } - func To_System_KilledAccountEvent(in registry.DecodedFields) *pbgear.System_KilledAccountEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_KilledAccountEvent{} - out.Account = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_System_Mandatory(in registry.DecodedFields) *pbgear.System_Mandatory { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_Mandatory{} - return out -} +func To_System_RemarkCall(in any) *pbgear.System_RemarkCall { + out := &pbgear.System_RemarkCall{} + v := in.(registry.Valuable) + _ = v - func To_System_Module(in registry.DecodedFields) *pbgear.System_Module { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_Module{} - out.Value0 = To_SpRuntimeModuleError(fields[0].Value.(registry.DecodedFields)) - - return out -} + // primitive field Remark + out.Remark = To_bytes(v.ValueAt(0)) - func To_System_NewAccountEvent(in registry.DecodedFields) *pbgear.System_NewAccountEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_NewAccountEvent{} - out.Account = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_System_No(in registry.DecodedFields) *pbgear.System_No { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_No{} - return out -} - func To_System_NoProviders(in registry.DecodedFields) *pbgear.System_NoProviders { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_NoProviders{} - return out -} - func To_System_Normal(in registry.DecodedFields) *pbgear.System_Normal { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_Normal{} - return out -} +func To_System_RemarkWithEventCall(in any) *pbgear.System_RemarkWithEventCall { + out := &pbgear.System_RemarkWithEventCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Remark + out.Remark = To_bytes(v.ValueAt(0)) - func To_System_Operational(in registry.DecodedFields) *pbgear.System_Operational { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_Operational{} - return out + + +func To_System_SetCodeCall(in any) *pbgear.System_SetCodeCall { + out := &pbgear.System_SetCodeCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Code + out.Code = To_bytes(v.ValueAt(0)) + + return out //from message } + + - func To_System_Other(in registry.DecodedFields) *pbgear.System_Other { +func To_System_SetCodeWithoutChecksCall(in any) *pbgear.System_SetCodeWithoutChecksCall { + out := &pbgear.System_SetCodeWithoutChecksCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Code + out.Code = To_bytes(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_Other{} - return out + + +func To_System_SetHeapPagesCall(in any) *pbgear.System_SetHeapPagesCall { + out := &pbgear.System_SetHeapPagesCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Pages + out.Pages = To_uint64(v.ValueAt(0)) + + return out //from message } + + + +func To_System_SetStorageCall(in any) *pbgear.System_SetStorageCall { + out := &pbgear.System_SetStorageCall{} + v := in.(registry.Valuable) + _ = v + + // repeated field Items + out.Items = To_Repeated_System_SetStorageCall_items(v.ValueAt(0)) - func To_System_PaysFee(in registry.DecodedFields) *pbgear.System_PaysFee { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_PaysFee{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.System_PaysFee_Yes{ - Yes: To_System_Yes(fields), //Passthrough fields... - } + +func To_Repeated_System_SetStorageCall_items(in any) []*pbgear.System_TupleSystemItemsListSystemItemsList { + items := in.([]interface{}) + + var out []*pbgear.System_TupleSystemItemsListSystemItemsList + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_System_TupleSystemItemsListSystemItemsList(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } - func To_System_RemarkCall(in registry.DecodedFields) *pbgear.System_RemarkCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_RemarkCall{} - out.Remark = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_System_RemarkWithEventCall(in registry.DecodedFields) *pbgear.System_RemarkWithEventCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_RemarkWithEventCall{} - out.Remark = To_bytes(fields[0].Value.([]interface{})) - return out -} +func To_System_SystemKeysList(in any) *pbgear.System_SystemKeysList { + out := &pbgear.System_SystemKeysList{} + v := in.(registry.Valuable) + _ = v - func To_System_RemarkedEvent(in registry.DecodedFields) *pbgear.System_RemarkedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_RemarkedEvent{} - out.Sender = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Hash = To_PrimitiveTypesH256(fields[1].Value.(registry.DecodedFields)) - - return out -} + // primitive field Keys + out.Keys = To_bytes(v.ValueAt(0)) - func To_System_RootNotAllowed(in registry.DecodedFields) *pbgear.System_RootNotAllowed { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_RootNotAllowed{} - return out + return out //from message } - - func To_System_SetCodeCall(in registry.DecodedFields) *pbgear.System_SetCodeCall { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_SetCodeCall{} - out.Code = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_System_SetCodeWithoutChecksCall(in registry.DecodedFields) *pbgear.System_SetCodeWithoutChecksCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_SetCodeWithoutChecksCall{} - out.Code = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_System_SetHeapPagesCall(in registry.DecodedFields) *pbgear.System_SetHeapPagesCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_SetHeapPagesCall{} - out.Pages = To_uint64(fields[0].Value.(registry.DecodedFields)) - - return out +func To_System_TupleSystemItemsListSystemItemsList(in any) *pbgear.System_TupleSystemItemsListSystemItemsList { + out := &pbgear.System_TupleSystemItemsListSystemItemsList{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + // primitive field Value1 + out.Value1 = To_bytes(v.ValueAt(1)) + + return out //from message } + + + +func To_TimestampPallet(in any) *pbgear.TimestampPallet { + out := &pbgear.TimestampPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_TimestampPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) - func To_System_SetStorageCall(in registry.DecodedFields) *pbgear.System_SetStorageCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_SetStorageCall{} - out.Items = To_repeated_System_TupleSystemItemsListSystemItemsList(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } -func To_repeated_System_TupleSystemItemsListSystemItemsList(f registry.DecodedFields) []*pbgear.System_TupleSystemItemsListSystemItemsList { - fields := []*registry.DecodedField(f) - _ = fields + +func To_OneOf_TimestampPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value - out := make([]*pbgear.System_TupleSystemItemsListSystemItemsList, len(fields)) - for _, f := range fields { - out = append(out, To_System_TupleSystemItemsListSystemItemsList(f.Value.([]*registry.DecodedField))) + switch variantIn.VariantByte { + case 0: + return &pbgear.TimestampPallet_SetCall{ + SetCall: To_Timestamp_SetCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_System_SystemKeysList(in registry.DecodedFields) *pbgear.System_SystemKeysList { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_SystemKeysList{} - out.Keys = To_bytes(fields[0].Value.([]interface{})) - return out -} - func To_System_Token(in registry.DecodedFields) *pbgear.System_Token { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_Token{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out -} +func To_Timestamp_SetCall(in any) *pbgear.Timestamp_SetCall { + out := &pbgear.Timestamp_SetCall{} + v := in.(registry.Valuable) + _ = v - func To_System_TooManyConsumers(in registry.DecodedFields) *pbgear.System_TooManyConsumers { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_TooManyConsumers{} - return out -} + // primitive field Now + out.Now = To_uint64(v.ValueAt(0)) - func To_System_Transactional(in registry.DecodedFields) *pbgear.System_Transactional { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_Transactional{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_System_TupleSystemItemsListSystemItemsList(in registry.DecodedFields) *pbgear.System_TupleSystemItemsListSystemItemsList { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_TupleSystemItemsListSystemItemsList{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - out.Value1 = To_bytes(fields[1].Value.([]interface{})) - return out -} - func To_System_Unavailable(in registry.DecodedFields) *pbgear.System_Unavailable { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_Unavailable{} - return out -} - func To_System_Yes(in registry.DecodedFields) *pbgear.System_Yes { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.System_Yes{} - return out -} +func To_TransactionPaymentPallet(in any) *pbgear.TransactionPaymentPallet { + out := &pbgear.TransactionPaymentPallet{} + v := in.(registry.Valuable) + _ = v - func To_Timestamp_SetCall(in registry.DecodedFields) *pbgear.Timestamp_SetCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Timestamp_SetCall{} - out.Now = To_CompactUint64(fields[0].Value.(types.UCompact)) - - return out -} - func To_Token(in registry.DecodedFields) *pbgear.Token { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Token{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_TooManyConsumers(in registry.DecodedFields) *pbgear.TooManyConsumers { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.TooManyConsumers{} - return out -} - func To_TransactionPayment_TransactionFeePaidEvent(in registry.DecodedFields) *pbgear.TransactionPayment_TransactionFeePaidEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.TransactionPayment_TransactionFeePaidEvent{} - out.Who = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.ActualFee = To_string(fields[1].Value.(registry.DecodedFields)) - - out.Tip = To_string(fields[2].Value.(registry.DecodedFields)) - - return out -} - func To_Transactional(in registry.DecodedFields) *pbgear.Transactional { +func To_TreasuryPallet(in any) *pbgear.TreasuryPallet { + out := &pbgear.TreasuryPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_TreasuryPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Transactional{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out +func To_OneOf_TreasuryPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.TreasuryPallet_ProposeSpendCall{ + ProposeSpendCall: To_Treasury_ProposeSpendCall(param), + } + case 1: + return &pbgear.TreasuryPallet_RejectProposalCall{ + RejectProposalCall: To_Treasury_RejectProposalCall(param), + } + case 2: + return &pbgear.TreasuryPallet_ApproveProposalCall{ + ApproveProposalCall: To_Treasury_ApproveProposalCall(param), + } + case 3: + return &pbgear.TreasuryPallet_SpendLocalCall{ + SpendLocalCall: To_Treasury_SpendLocalCall(param), + } + case 4: + return &pbgear.TreasuryPallet_RemoveApprovalCall{ + RemoveApprovalCall: To_Treasury_RemoveApprovalCall(param), + } + case 5: + return &pbgear.TreasuryPallet_SpendCall{ + SpendCall: To_Treasury_SpendCall(param), + } + case 6: + return &pbgear.TreasuryPallet_PayoutCall{ + PayoutCall: To_Treasury_PayoutCall(param), + } + case 7: + return &pbgear.TreasuryPallet_CheckStatusCall{ + CheckStatusCall: To_Treasury_CheckStatusCall(param), + } + case 8: + return &pbgear.TreasuryPallet_VoidSpendCall{ + VoidSpendCall: To_Treasury_VoidSpendCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } } - func To_Treasury_Address20(in registry.DecodedFields) *pbgear.Treasury_Address20 { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Treasury_Address20(in any) *pbgear.Treasury_Address20 { out := &pbgear.Treasury_Address20{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_Treasury_Address32(in registry.DecodedFields) *pbgear.Treasury_Address32 { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Treasury_Address32(in any) *pbgear.Treasury_Address32 { out := &pbgear.Treasury_Address32{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v - func To_Treasury_ApproveProposalCall(in registry.DecodedFields) *pbgear.Treasury_ApproveProposalCall { + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Treasury_ApproveProposalCall(in any) *pbgear.Treasury_ApproveProposalCall { out := &pbgear.Treasury_ApproveProposalCall{} - out.ProposalId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - return out -} - - func To_Treasury_AssetSpendApprovedEvent(in registry.DecodedFields) *pbgear.Treasury_AssetSpendApprovedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Treasury_AssetSpendApprovedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.AssetKind = To_Treasury_TupleNull(fields[1].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[2].Value.(registry.DecodedFields)) - - out.Beneficiary = To_SpCoreCryptoAccountId32(fields[3].Value.(registry.DecodedFields)) - - out.ValidFrom = To_uint32(fields[4].Value.(registry.DecodedFields)) - - out.ExpireAt = To_uint32(fields[5].Value.(registry.DecodedFields)) - - return out -} - - func To_Treasury_AssetSpendVoidedEvent(in registry.DecodedFields) *pbgear.Treasury_AssetSpendVoidedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Treasury_AssetSpendVoidedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} - - func To_Treasury_AwardedEvent(in registry.DecodedFields) *pbgear.Treasury_AwardedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Treasury_AwardedEvent{} - out.ProposalIndex = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Award = To_string(fields[1].Value.(registry.DecodedFields)) - - out.Account = To_SpCoreCryptoAccountId32(fields[2].Value.(registry.DecodedFields)) - - return out -} - - func To_Treasury_Beneficiary(in registry.DecodedFields) *pbgear.Treasury_Beneficiary { - - fields := []*registry.DecodedField(in) - _ = fields + v := in.(registry.Valuable) + _ = v + + // primitive field ProposalId + out.ProposalId = To_uint32(v.ValueAt(0)) + + return out //from message +} + + + +func To_Treasury_Beneficiary(in any) *pbgear.Treasury_Beneficiary { out := &pbgear.Treasury_Beneficiary{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.Treasury_Beneficiary_Id{ - Id: To_Treasury_Id(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Treasury_Beneficiary_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Treasury_Beneficiary_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Treasury_Beneficiary_Id{ + Id: To_Treasury_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.Treasury_Beneficiary_Index{ - Index: To_Treasury_Index(fields), //Passthrough fields... + case 1: + return &pbgear.Treasury_Beneficiary_Index{ + Index: To_Treasury_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.Treasury_Beneficiary_Raw{ - Raw: To_Treasury_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.Treasury_Beneficiary_Raw{ + Raw: To_Treasury_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.Treasury_Beneficiary_Address32{ - Address32: To_Treasury_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.Treasury_Beneficiary_Address32{ + Address32: To_Treasury_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.Treasury_Beneficiary_Address20{ - Address20: To_Treasury_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.Treasury_Beneficiary_Address20{ + Address20: To_Treasury_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Treasury_BurntEvent(in registry.DecodedFields) *pbgear.Treasury_BurntEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Treasury_BurntEvent{} - out.BurntFunds = To_string(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Treasury_CheckStatusCall(in registry.DecodedFields) *pbgear.Treasury_CheckStatusCall { - - fields := []*registry.DecodedField(in) - _ = fields +func To_Treasury_CheckStatusCall(in any) *pbgear.Treasury_CheckStatusCall { out := &pbgear.Treasury_CheckStatusCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Treasury_CompactTupleNull(in types.UCompact) *pbgear.Treasury_CompactTupleNull { - - out := &pbgear.Treasury_CompactTupleNull{} - out.Value = To_TupleNull() - return out -} + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) - func To_Treasury_DepositEvent(in registry.DecodedFields) *pbgear.Treasury_DepositEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Treasury_DepositEvent{} - out.Value = To_string(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_Treasury_Id(in registry.DecodedFields) *pbgear.Treasury_Id { - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Treasury_Id(in any) *pbgear.Treasury_Id { out := &pbgear.Treasury_Id{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Treasury_Index(in registry.DecodedFields) *pbgear.Treasury_Index { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Treasury_Index{} - out.Value0 = To_Treasury_CompactTupleNull(fields[0].Value.(types.UCompact)) - - return out -} + // field Value0 + out.Value0 = To_Treasury_Id_value0(v.ValueAt(0)) - func To_Treasury_PaidEvent(in registry.DecodedFields) *pbgear.Treasury_PaidEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Treasury_PaidEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.PaymentId = To_Treasury_TupleNull(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Treasury_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_Treasury_PaymentFailedEvent(in registry.DecodedFields) *pbgear.Treasury_PaymentFailedEvent { + +func To_Treasury_Index(in any) *pbgear.Treasury_Index { + out := &pbgear.Treasury_Index{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Treasury_Index_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Treasury_PaymentFailedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.PaymentId = To_Treasury_TupleNull(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Treasury_Index_value0(in any) *pbgear.Treasury_TupleNull { + v := in.(registry.Valuable) + return To_Treasury_TupleNull(v.ValueAt(0) //simple field } - func To_Treasury_PayoutCall(in registry.DecodedFields) *pbgear.Treasury_PayoutCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Treasury_PayoutCall(in any) *pbgear.Treasury_PayoutCall { out := &pbgear.Treasury_PayoutCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Treasury_ProposeSpendCall(in registry.DecodedFields) *pbgear.Treasury_ProposeSpendCall { + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Treasury_ProposeSpendCall(in any) *pbgear.Treasury_ProposeSpendCall { out := &pbgear.Treasury_ProposeSpendCall{} - out.Value = To_CompactString(fields[0].Value.(types.UCompact)) - - out.Beneficiary = To_Treasury_Beneficiary(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Value + out.Value = To_string(v.ValueAt(0)) + // field Beneficiary + out.Beneficiary = To_Treasury_ProposeSpendCall_beneficiary(v.ValueAt(1)) - func To_Treasury_ProposedEvent(in registry.DecodedFields) *pbgear.Treasury_ProposedEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Treasury_ProposedEvent{} - out.ProposalIndex = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Treasury_ProposeSpendCall_beneficiary(in any) *pbgear.Treasury_Beneficiary { + v := in.(registry.Valuable) + return To_Treasury_Beneficiary(v.ValueAt(0) //simple field } - func To_Treasury_Raw(in registry.DecodedFields) *pbgear.Treasury_Raw { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Treasury_Raw(in any) *pbgear.Treasury_Raw { out := &pbgear.Treasury_Raw{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v - func To_Treasury_RejectProposalCall(in registry.DecodedFields) *pbgear.Treasury_RejectProposalCall { + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Treasury_RejectProposalCall(in any) *pbgear.Treasury_RejectProposalCall { out := &pbgear.Treasury_RejectProposalCall{} - out.ProposalId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Treasury_RejectedEvent(in registry.DecodedFields) *pbgear.Treasury_RejectedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Treasury_RejectedEvent{} - out.ProposalIndex = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Slashed = To_string(fields[1].Value.(registry.DecodedFields)) - - return out -} + // primitive field ProposalId + out.ProposalId = To_uint32(v.ValueAt(0)) - func To_Treasury_RemoveApprovalCall(in registry.DecodedFields) *pbgear.Treasury_RemoveApprovalCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Treasury_RemoveApprovalCall(in any) *pbgear.Treasury_RemoveApprovalCall { out := &pbgear.Treasury_RemoveApprovalCall{} - out.ProposalId = To_CompactUint32(fields[0].Value.(types.UCompact)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Treasury_RolloverEvent(in registry.DecodedFields) *pbgear.Treasury_RolloverEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Treasury_RolloverEvent{} - out.RolloverBalance = To_string(fields[0].Value.(registry.DecodedFields)) - - return out -} + // primitive field ProposalId + out.ProposalId = To_uint32(v.ValueAt(0)) - func To_Treasury_SpendApprovedEvent(in registry.DecodedFields) *pbgear.Treasury_SpendApprovedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Treasury_SpendApprovedEvent{} - out.ProposalIndex = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_string(fields[1].Value.(registry.DecodedFields)) - - out.Beneficiary = To_SpCoreCryptoAccountId32(fields[2].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_Treasury_SpendCall(in registry.DecodedFields) *pbgear.Treasury_SpendCall { - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Treasury_SpendCall(in any) *pbgear.Treasury_SpendCall { out := &pbgear.Treasury_SpendCall{} - out.AssetKind = To_Treasury_TupleNull(fields[0].Value.(registry.DecodedFields)) - - out.Amount = To_CompactString(fields[1].Value.(types.UCompact)) - - out.Beneficiary = To_SpCoreCryptoAccountId32(fields[2].Value.(registry.DecodedFields)) - - out.ValidFrom = To_optional_uint32(fields[3].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Treasury_SpendLocalCall(in registry.DecodedFields) *pbgear.Treasury_SpendLocalCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Treasury_SpendLocalCall{} - out.Amount = To_CompactString(fields[0].Value.(types.UCompact)) - - out.Beneficiary = To_Treasury_Beneficiary(fields[1].Value.(registry.DecodedFields)) - - return out -} + // field AssetKind + out.AssetKind = To_Treasury_SpendCall_asset_kind(v.ValueAt(0)) + // primitive field Amount + out.Amount = To_string(v.ValueAt(1)) + // field Beneficiary + out.Beneficiary = To_Treasury_SpendCall_beneficiary(v.ValueAt(2)) + // primitive field ValidFrom + out.ValidFrom = To_Optional_uint32(v.ValueAt(3)) - func To_Treasury_SpendProcessedEvent(in registry.DecodedFields) *pbgear.Treasury_SpendProcessedEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Treasury_SpendProcessedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Treasury_SpendCall_asset_kind(in any) *pbgear.Treasury_TupleNull { + v := in.(registry.Valuable) + return To_Treasury_TupleNull(v.ValueAt(0) //simple field } +func To_Treasury_SpendCall_beneficiary(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field +} + + +func To_Treasury_SpendLocalCall(in any) *pbgear.Treasury_SpendLocalCall { + out := &pbgear.Treasury_SpendLocalCall{} + v := in.(registry.Valuable) + _ = v - func To_Treasury_SpendingEvent(in registry.DecodedFields) *pbgear.Treasury_SpendingEvent { + // primitive field Amount + out.Amount = To_string(v.ValueAt(0)) + // field Beneficiary + out.Beneficiary = To_Treasury_SpendLocalCall_beneficiary(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Treasury_SpendingEvent{} - out.BudgetRemaining = To_string(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Treasury_SpendLocalCall_beneficiary(in any) *pbgear.Treasury_Beneficiary { + v := in.(registry.Valuable) + return To_Treasury_Beneficiary(v.ValueAt(0) //simple field } - func To_Treasury_TupleNull(in registry.DecodedFields) *pbgear.Treasury_TupleNull { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Treasury_TupleNull(in any) *pbgear.Treasury_TupleNull { out := &pbgear.Treasury_TupleNull{} - return out -} + v := in.(registry.Valuable) + _ = v + + // field Value + out.Value = To_Treasury_TupleNull_value(v.ValueAt(0)) - func To_Treasury_UpdatedInactiveEvent(in registry.DecodedFields) *pbgear.Treasury_UpdatedInactiveEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Treasury_UpdatedInactiveEvent{} - out.Reactivated = To_string(fields[0].Value.(registry.DecodedFields)) - - out.Deactivated = To_string(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Treasury_TupleNull_value(in any) *pbgear.TupleNull { + v := in.(registry.Valuable) + return To_TupleNull(v.ValueAt(0) //simple field } - func To_Treasury_VoidSpendCall(in registry.DecodedFields) *pbgear.Treasury_VoidSpendCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Treasury_VoidSpendCall(in any) *pbgear.Treasury_VoidSpendCall { out := &pbgear.Treasury_VoidSpendCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_TupleFinalityGrandpaPrecommitspConsensusGrandpaAppSignature(in registry.DecodedFields) *pbgear.TupleFinalityGrandpaPrecommitspConsensusGrandpaAppSignature { + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_TupleFinalityGrandpaPrecommitspConsensusGrandpaAppSignature(in any) *pbgear.TupleFinalityGrandpaPrecommitspConsensusGrandpaAppSignature { out := &pbgear.TupleFinalityGrandpaPrecommitspConsensusGrandpaAppSignature{} - out.Value0 = To_FinalityGrandpaPrecommit(fields[0].Value.(registry.DecodedFields)) - - out.Value1 = To_SpConsensusGrandpaAppSignature(fields[1].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature(in registry.DecodedFields) *pbgear.TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature{} - out.Value0 = To_FinalityGrandpaPrevote(fields[0].Value.(registry.DecodedFields)) - - out.Value1 = To_SpConsensusGrandpaAppSignature(fields[1].Value.(registry.DecodedFields)) - - return out -} + // field Value0 + out.Value0 = To_TupleFinalityGrandpaPrecommitspConsensusGrandpaAppSignature_value0(v.ValueAt(0)) + // field Value1 + out.Value1 = To_TupleFinalityGrandpaPrecommitspConsensusGrandpaAppSignature_value1(v.ValueAt(1)) - func To_TupleNull() *pbgear.TupleNull { - - out := &pbgear.TupleNull{} - return out + return out //from message } - - func To_Uint32(in registry.DecodedFields) *pbgear.Uint32 { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Uint32{} - out.SlashIndices = To_uint32(fields[0].Value.(registry.DecodedFields)) - - return out +func To_TupleFinalityGrandpaPrecommitspConsensusGrandpaAppSignature_value0(in any) *pbgear.FinalityGrandpaPrecommit { + v := in.(registry.Valuable) + return To_FinalityGrandpaPrecommit(v.ValueAt(0) //simple field } - - func To_Unavailable(in registry.DecodedFields) *pbgear.Unavailable { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Unavailable{} - return out +func To_TupleFinalityGrandpaPrecommitspConsensusGrandpaAppSignature_value1(in any) *pbgear.SpConsensusGrandpaAppSignature { + v := in.(registry.Valuable) + return To_SpConsensusGrandpaAppSignature(v.ValueAt(0) //simple field } - func To_UnknownAsset(in registry.DecodedFields) *pbgear.UnknownAsset { + +func To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature(in any) *pbgear.TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature { + out := &pbgear.TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature_value0(v.ValueAt(0)) + // field Value1 + out.Value1 = To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature_value1(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.UnknownAsset{} - return out +func To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature_value0(in any) *pbgear.FinalityGrandpaPrevote { + v := in.(registry.Valuable) + return To_FinalityGrandpaPrevote(v.ValueAt(0) //simple field +} +func To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature_value1(in any) *pbgear.SpConsensusGrandpaAppSignature { + v := in.(registry.Valuable) + return To_SpConsensusGrandpaAppSignature(v.ValueAt(0) //simple field } - func To_Unsupported(in registry.DecodedFields) *pbgear.Unsupported { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Unsupported{} - return out + +func To_TupleNull(in any) *pbgear.TupleNull { + out := &pbgear.TupleNull{} + v := in.(registry.Valuable) + _ = v + + + return out //from message } + + - func To_Utility_Arithmetic(in registry.DecodedFields) *pbgear.Utility_Arithmetic { +func To_UtilityPallet(in any) *pbgear.UtilityPallet { + out := &pbgear.UtilityPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_UtilityPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_Arithmetic{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out +func To_OneOf_UtilityPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.UtilityPallet_BatchCall{ + BatchCall: To_Utility_BatchCall(param), + } + case 1: + return &pbgear.UtilityPallet_AsDerivativeCall{ + AsDerivativeCall: To_Utility_AsDerivativeCall(param), + } + case 2: + return &pbgear.UtilityPallet_BatchAllCall{ + BatchAllCall: To_Utility_BatchAllCall(param), + } + case 3: + return &pbgear.UtilityPallet_DispatchAsCall{ + DispatchAsCall: To_Utility_DispatchAsCall(param), + } + case 4: + return &pbgear.UtilityPallet_ForceBatchCall{ + ForceBatchCall: To_Utility_ForceBatchCall(param), + } + case 5: + return &pbgear.UtilityPallet_WithWeightCall{ + WithWeightCall: To_Utility_WithWeightCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } } - func To_Utility_AsDerivativeCall(in registry.DecodedFields) *pbgear.Utility_AsDerivativeCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Utility_AsDerivativeCall(in any) *pbgear.Utility_AsDerivativeCall { out := &pbgear.Utility_AsDerivativeCall{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - - switch { - case matchFields(fields, []int64{66}): - out.Call = &pbgear.Utility_AsDerivativeCall_SystemRemark{ - SystemRemark: To_System_RemarkCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{70}): - out.Call = &pbgear.Utility_AsDerivativeCall_SystemSetHeapPages{ - SystemSetHeapPages: To_System_SetHeapPagesCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{71}): - out.Call = &pbgear.Utility_AsDerivativeCall_SystemSetCode{ - SystemSetCode: To_System_SetCodeCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{81}): - out.Call = &pbgear.Utility_AsDerivativeCall_SystemSetCodeWithoutChecks{ - SystemSetCodeWithoutChecks: To_System_SetCodeWithoutChecksCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{93}): - out.Call = &pbgear.Utility_AsDerivativeCall_SystemSetStorage{ - SystemSetStorage: To_System_SetStorageCall(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // primitive field Index + out.Index = To_uint32(v.ValueAt(0)) + // oneOf field Call + v1 := To_OneOf_Utility_AsDerivativeCall_call(v.ValueAt(1)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v1)) + + return out //from message +} + +func To_OneOf_Utility_AsDerivativeCall_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Utility_AsDerivativeCall_System{ + System: To_SystemPallet(param), + } + case 1: + return &pbgear.Utility_AsDerivativeCall_Timestamp{ + Timestamp: To_TimestampPallet(param), + } + case 3: + return &pbgear.Utility_AsDerivativeCall_Babe{ + Babe: To_BabePallet(param), } - case matchFields(fields, []int64{98}): - out.Call = &pbgear.Utility_AsDerivativeCall_SystemKillStorage{ - SystemKillStorage: To_System_KillStorageCall(fields), //Passthrough fields... + case 4: + return &pbgear.Utility_AsDerivativeCall_Grandpa{ + Grandpa: To_GrandpaPallet(param), } - case matchFields(fields, []int64{100}): - out.Call = &pbgear.Utility_AsDerivativeCall_SystemKillPrefix{ - SystemKillPrefix: To_System_KillPrefixCall(fields), //Passthrough fields... + case 5: + return &pbgear.Utility_AsDerivativeCall_Balances{ + Balances: To_BalancesPallet(param), } - case matchFields(fields, []int64{101}): - out.Call = &pbgear.Utility_AsDerivativeCall_SystemRemarkWithEvent{ - SystemRemarkWithEvent: To_System_RemarkWithEventCall(fields), //Passthrough fields... + case 10: + return &pbgear.Utility_AsDerivativeCall_Vesting{ + Vesting: To_VestingPallet(param), } - case matchFields(fields, []int64{105}): - out.Call = &pbgear.Utility_AsDerivativeCall_TimestampSet{ - TimestampSet: To_Timestamp_SetCall(fields), //Passthrough fields... + case 11: + return &pbgear.Utility_AsDerivativeCall_BagsList{ + BagsList: To_BagsListPallet(param), } - case matchFields(fields, []int64{113}): - out.Call = &pbgear.Utility_AsDerivativeCall_BabeReportEquivocation{ - BabeReportEquivocation: To_Babe_ReportEquivocationCall(fields), //Passthrough fields... + case 12: + return &pbgear.Utility_AsDerivativeCall_ImOnline{ + ImOnline: To_ImOnlinePallet(param), } - case matchFields(fields, []int64{116}): - out.Call = &pbgear.Utility_AsDerivativeCall_BabeReportEquivocationUnsigned{ - BabeReportEquivocationUnsigned: To_Babe_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 13: + return &pbgear.Utility_AsDerivativeCall_Staking{ + Staking: To_StakingPallet(param), } - case matchFields(fields, []int64{118}): - out.Call = &pbgear.Utility_AsDerivativeCall_BabePlanConfigChange{ - BabePlanConfigChange: To_Babe_PlanConfigChangeCall(fields), //Passthrough fields... + case 7: + return &pbgear.Utility_AsDerivativeCall_Session{ + Session: To_SessionPallet(param), } - case matchFields(fields, []int64{124}): - out.Call = &pbgear.Utility_AsDerivativeCall_GrandpaReportEquivocation{ - GrandpaReportEquivocation: To_Grandpa_ReportEquivocationCall(fields), //Passthrough fields... + case 14: + return &pbgear.Utility_AsDerivativeCall_Treasury{ + Treasury: To_TreasuryPallet(param), } - case matchFields(fields, []int64{129}): - out.Call = &pbgear.Utility_AsDerivativeCall_GrandpaReportEquivocationUnsigned{ - GrandpaReportEquivocationUnsigned: To_Grandpa_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 8: + return &pbgear.Utility_AsDerivativeCall_Utility{ + Utility: To_UtilityPallet(param), } - case matchFields(fields, []int64{132}): - out.Call = &pbgear.Utility_AsDerivativeCall_GrandpaNoteStalled{ - GrandpaNoteStalled: To_Grandpa_NoteStalledCall(fields), //Passthrough fields... + case 16: + return &pbgear.Utility_AsDerivativeCall_ConvictionVoting{ + ConvictionVoting: To_ConvictionVotingPallet(param), } - case matchFields(fields, []int64{133}): - out.Call = &pbgear.Utility_AsDerivativeCall_BalancesTransferAllowDeath{ - BalancesTransferAllowDeath: To_Balances_TransferAllowDeathCall(fields), //Passthrough fields... + case 17: + return &pbgear.Utility_AsDerivativeCall_Referenda{ + Referenda: To_ReferendaPallet(param), } - case matchFields(fields, []int64{134}): - out.Call = &pbgear.Utility_AsDerivativeCall_BalancesForceTransfer{ - BalancesForceTransfer: To_Balances_ForceTransferCall(fields), //Passthrough fields... + case 18: + return &pbgear.Utility_AsDerivativeCall_FellowshipCollective{ + FellowshipCollective: To_FellowshipCollectivePallet(param), } - case matchFields(fields, []int64{135}): - out.Call = &pbgear.Utility_AsDerivativeCall_BalancesTransferKeepAlive{ - BalancesTransferKeepAlive: To_Balances_TransferKeepAliveCall(fields), //Passthrough fields... + case 19: + return &pbgear.Utility_AsDerivativeCall_FellowshipReferenda{ + FellowshipReferenda: To_FellowshipReferendaPallet(param), } - case matchFields(fields, []int64{138}): - out.Call = &pbgear.Utility_AsDerivativeCall_BalancesTransferAll{ - BalancesTransferAll: To_Balances_TransferAllCall(fields), //Passthrough fields... + case 21: + return &pbgear.Utility_AsDerivativeCall_Whitelist{ + Whitelist: To_WhitelistPallet(param), } - case matchFields(fields, []int64{140}): - out.Call = &pbgear.Utility_AsDerivativeCall_BalancesForceUnreserve{ - BalancesForceUnreserve: To_Balances_ForceUnreserveCall(fields), //Passthrough fields... + case 22: + return &pbgear.Utility_AsDerivativeCall_Scheduler{ + Scheduler: To_SchedulerPallet(param), } - case matchFields(fields, []int64{182}): - out.Call = &pbgear.Utility_AsDerivativeCall_BalancesUpgradeAccounts{ - BalancesUpgradeAccounts: To_Balances_UpgradeAccountsCall(fields), //Passthrough fields... + case 23: + return &pbgear.Utility_AsDerivativeCall_Preimage{ + Preimage: To_PreimagePallet(param), } - case matchFields(fields, []int64{185}): - out.Call = &pbgear.Utility_AsDerivativeCall_BalancesForceSetBalance{ - BalancesForceSetBalance: To_Balances_ForceSetBalanceCall(fields), //Passthrough fields... + case 24: + return &pbgear.Utility_AsDerivativeCall_Identity{ + Identity: To_IdentityPallet(param), } - case matchFields(fields, []int64{188}): - out.Call = &pbgear.Utility_AsDerivativeCall_VestingVest{ - VestingVest: To_Vesting_VestCall(fields), //Passthrough fields... + case 25: + return &pbgear.Utility_AsDerivativeCall_Proxy{ + Proxy: To_ProxyPallet(param), } - case matchFields(fields, []int64{249}): - out.Call = &pbgear.Utility_AsDerivativeCall_VestingVestOther{ - VestingVestOther: To_Vesting_VestOtherCall(fields), //Passthrough fields... + case 26: + return &pbgear.Utility_AsDerivativeCall_Multisig{ + Multisig: To_MultisigPallet(param), } - case matchFields(fields, []int64{250}): - out.Call = &pbgear.Utility_AsDerivativeCall_VestingVestedTransfer{ - VestingVestedTransfer: To_Vesting_VestedTransferCall(fields), //Passthrough fields... + case 27: + return &pbgear.Utility_AsDerivativeCall_ElectionProviderMultiPhase{ + ElectionProviderMultiPhase: To_ElectionProviderMultiPhasePallet(param), } - case matchFields(fields, []int64{251}): - out.Call = &pbgear.Utility_AsDerivativeCall_VestingForceVestedTransfer{ - VestingForceVestedTransfer: To_Vesting_ForceVestedTransferCall(fields), //Passthrough fields... + case 29: + return &pbgear.Utility_AsDerivativeCall_Bounties{ + Bounties: To_BountiesPallet(param), } - case matchFields(fields, []int64{262}): - out.Call = &pbgear.Utility_AsDerivativeCall_VestingMergeSchedules{ - VestingMergeSchedules: To_Vesting_MergeSchedulesCall(fields), //Passthrough fields... + case 30: + return &pbgear.Utility_AsDerivativeCall_ChildBounties{ + ChildBounties: To_ChildBountiesPallet(param), } - case matchFields(fields, []int64{267}): - out.Call = &pbgear.Utility_AsDerivativeCall_BagsListRebag{ - BagsListRebag: To_BagsList_RebagCall(fields), //Passthrough fields... + case 31: + return &pbgear.Utility_AsDerivativeCall_NominationPools{ + NominationPools: To_NominationPoolsPallet(param), } - case matchFields(fields, []int64{268}): - out.Call = &pbgear.Utility_AsDerivativeCall_BagsListPutInFrontOf{ - BagsListPutInFrontOf: To_BagsList_PutInFrontOfCall(fields), //Passthrough fields... + case 104: + return &pbgear.Utility_AsDerivativeCall_Gear{ + Gear: To_GearPallet(param), } + case 106: + return &pbgear.Utility_AsDerivativeCall_StakingRewards{ + StakingRewards: To_StakingRewardsPallet(param), + } + case 107: + return &pbgear.Utility_AsDerivativeCall_GearVoucher{ + GearVoucher: To_GearVoucherPallet(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Utility_AsOrigin(in registry.DecodedFields) *pbgear.Utility_AsOrigin { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Utility_AsOrigin(in any) *pbgear.Utility_AsOrigin { out := &pbgear.Utility_AsOrigin{} - - switch { - case matchFields(fields, []int64{121}): - out.Value = &pbgear.Utility_AsOrigin_System{ - System: To_Utility_System(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Utility_AsOrigin_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Utility_AsOrigin_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Utility_AsOrigin_System{ + System: To_Utility_System(param), } - case matchFields(fields, []int64{122}): - out.Value = &pbgear.Utility_AsOrigin_Origins{ - Origins: To_Utility_Origins(fields), //Passthrough fields... + case 20: + return &pbgear.Utility_AsOrigin_Origins{ + Origins: To_Utility_Origins(param), } - case matchFields(fields, []int64{123}): - out.Value = &pbgear.Utility_AsOrigin_Void{ - Void: To_Utility_Void(fields), //Passthrough fields... + case 2: + return &pbgear.Utility_AsOrigin_Void{ + Void: To_Utility_Void(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Utility_BadOrigin(in registry.DecodedFields) *pbgear.Utility_BadOrigin { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_BadOrigin{} - return out -} - func To_Utility_BatchAllCall(in registry.DecodedFields) *pbgear.Utility_BatchAllCall { - - fields := []*registry.DecodedField(in) - _ = fields +func To_Utility_BatchAllCall(in any) *pbgear.Utility_BatchAllCall { out := &pbgear.Utility_BatchAllCall{} - out.Calls = To_repeated_VaraRuntimeRuntimeCall(fields[0].Value.(registry.DecodedFields)) - - return out + v := in.(registry.Valuable) + _ = v + + // repeated field Calls + out.Calls = To_Repeated_Utility_BatchAllCall_calls(v.ValueAt(0)) + + return out //from message } -func To_repeated_VaraRuntimeRuntimeCall(f registry.DecodedFields) []*pbgear.VaraRuntimeRuntimeCall { - fields := []*registry.DecodedField(f) - _ = fields + + +func To_Repeated_Utility_BatchAllCall_calls(in any) []*pbgear.VaraRuntimeRuntimeCall { + items := in.([]interface{}) - out := make([]*pbgear.VaraRuntimeRuntimeCall, len(fields)) - for _, f := range fields { - out = append(out, To_VaraRuntimeRuntimeCall(f.Value.([]*registry.DecodedField))) + var out []*pbgear.VaraRuntimeRuntimeCall + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_VaraRuntimeRuntimeCall(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } - func To_Utility_BatchCall(in registry.DecodedFields) *pbgear.Utility_BatchCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Utility_BatchCall(in any) *pbgear.Utility_BatchCall { out := &pbgear.Utility_BatchCall{} - out.Calls = To_repeated_VaraRuntimeRuntimeCall(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Utility_BatchCompletedEvent(in registry.DecodedFields) *pbgear.Utility_BatchCompletedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_BatchCompletedEvent{} - return out -} + // repeated field Calls + out.Calls = To_Repeated_Utility_BatchCall_calls(v.ValueAt(0)) - func To_Utility_BatchCompletedWithErrorsEvent(in registry.DecodedFields) *pbgear.Utility_BatchCompletedWithErrorsEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_BatchCompletedWithErrorsEvent{} - return out + return out //from message } - - func To_Utility_BatchInterruptedEvent(in registry.DecodedFields) *pbgear.Utility_BatchInterruptedEvent { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_BatchInterruptedEvent{} - out.Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Error = To_Utility_Error(fields[1].Value.(registry.DecodedFields)) - - return out -} - func To_Utility_CannotLookup(in registry.DecodedFields) *pbgear.Utility_CannotLookup { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_CannotLookup{} - return out -} +func To_Repeated_Utility_BatchCall_calls(in any) []*pbgear.VaraRuntimeRuntimeCall { + items := in.([]interface{}) - func To_Utility_ConsumerRemaining(in registry.DecodedFields) *pbgear.Utility_ConsumerRemaining { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_ConsumerRemaining{} - return out + var out []*pbgear.VaraRuntimeRuntimeCall + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_VaraRuntimeRuntimeCall(w) + out = append(out, o) + } + return nil //funcForRepeatedField } - func To_Utility_Corruption(in registry.DecodedFields) *pbgear.Utility_Corruption { + +func To_Utility_DispatchAsCall(in any) *pbgear.Utility_DispatchAsCall { + out := &pbgear.Utility_DispatchAsCall{} + v := in.(registry.Valuable) + _ = v + + // field AsOrigin + out.AsOrigin = To_Utility_DispatchAsCall_as_origin(v.ValueAt(0)) + // oneOf field Call + v1 := To_OneOf_Utility_DispatchAsCall_call(v.ValueAt(1)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_Corruption{} - return out +func To_Utility_DispatchAsCall_as_origin(in any) *pbgear.Utility_AsOrigin { + v := in.(registry.Valuable) + return To_Utility_AsOrigin(v.ValueAt(0) //simple field } +func To_OneOf_Utility_DispatchAsCall_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value - func To_Utility_DispatchAsCall(in registry.DecodedFields) *pbgear.Utility_DispatchAsCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_DispatchAsCall{} - out.AsOrigin = To_Utility_AsOrigin(fields[0].Value.(registry.DecodedFields)) - - - switch { - case matchFields(fields, []int64{66}): - out.Call = &pbgear.Utility_DispatchAsCall_SystemRemark{ - SystemRemark: To_System_RemarkCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{70}): - out.Call = &pbgear.Utility_DispatchAsCall_SystemSetHeapPages{ - SystemSetHeapPages: To_System_SetHeapPagesCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{71}): - out.Call = &pbgear.Utility_DispatchAsCall_SystemSetCode{ - SystemSetCode: To_System_SetCodeCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{81}): - out.Call = &pbgear.Utility_DispatchAsCall_SystemSetCodeWithoutChecks{ - SystemSetCodeWithoutChecks: To_System_SetCodeWithoutChecksCall(fields), //Passthrough fields... - } - case matchFields(fields, []int64{93}): - out.Call = &pbgear.Utility_DispatchAsCall_SystemSetStorage{ - SystemSetStorage: To_System_SetStorageCall(fields), //Passthrough fields... + switch variantIn.VariantByte { + case 0: + return &pbgear.Utility_DispatchAsCall_System{ + System: To_SystemPallet(param), } - case matchFields(fields, []int64{98}): - out.Call = &pbgear.Utility_DispatchAsCall_SystemKillStorage{ - SystemKillStorage: To_System_KillStorageCall(fields), //Passthrough fields... + case 1: + return &pbgear.Utility_DispatchAsCall_Timestamp{ + Timestamp: To_TimestampPallet(param), } - case matchFields(fields, []int64{100}): - out.Call = &pbgear.Utility_DispatchAsCall_SystemKillPrefix{ - SystemKillPrefix: To_System_KillPrefixCall(fields), //Passthrough fields... + case 3: + return &pbgear.Utility_DispatchAsCall_Babe{ + Babe: To_BabePallet(param), } - case matchFields(fields, []int64{101}): - out.Call = &pbgear.Utility_DispatchAsCall_SystemRemarkWithEvent{ - SystemRemarkWithEvent: To_System_RemarkWithEventCall(fields), //Passthrough fields... + case 4: + return &pbgear.Utility_DispatchAsCall_Grandpa{ + Grandpa: To_GrandpaPallet(param), } - case matchFields(fields, []int64{105}): - out.Call = &pbgear.Utility_DispatchAsCall_TimestampSet{ - TimestampSet: To_Timestamp_SetCall(fields), //Passthrough fields... + case 5: + return &pbgear.Utility_DispatchAsCall_Balances{ + Balances: To_BalancesPallet(param), } - case matchFields(fields, []int64{113}): - out.Call = &pbgear.Utility_DispatchAsCall_BabeReportEquivocation{ - BabeReportEquivocation: To_Babe_ReportEquivocationCall(fields), //Passthrough fields... + case 10: + return &pbgear.Utility_DispatchAsCall_Vesting{ + Vesting: To_VestingPallet(param), } - case matchFields(fields, []int64{116}): - out.Call = &pbgear.Utility_DispatchAsCall_BabeReportEquivocationUnsigned{ - BabeReportEquivocationUnsigned: To_Babe_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 11: + return &pbgear.Utility_DispatchAsCall_BagsList{ + BagsList: To_BagsListPallet(param), } - case matchFields(fields, []int64{118}): - out.Call = &pbgear.Utility_DispatchAsCall_BabePlanConfigChange{ - BabePlanConfigChange: To_Babe_PlanConfigChangeCall(fields), //Passthrough fields... + case 12: + return &pbgear.Utility_DispatchAsCall_ImOnline{ + ImOnline: To_ImOnlinePallet(param), } - case matchFields(fields, []int64{124}): - out.Call = &pbgear.Utility_DispatchAsCall_GrandpaReportEquivocation{ - GrandpaReportEquivocation: To_Grandpa_ReportEquivocationCall(fields), //Passthrough fields... + case 13: + return &pbgear.Utility_DispatchAsCall_Staking{ + Staking: To_StakingPallet(param), } - case matchFields(fields, []int64{129}): - out.Call = &pbgear.Utility_DispatchAsCall_GrandpaReportEquivocationUnsigned{ - GrandpaReportEquivocationUnsigned: To_Grandpa_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 7: + return &pbgear.Utility_DispatchAsCall_Session{ + Session: To_SessionPallet(param), } - case matchFields(fields, []int64{132}): - out.Call = &pbgear.Utility_DispatchAsCall_GrandpaNoteStalled{ - GrandpaNoteStalled: To_Grandpa_NoteStalledCall(fields), //Passthrough fields... + case 14: + return &pbgear.Utility_DispatchAsCall_Treasury{ + Treasury: To_TreasuryPallet(param), } - case matchFields(fields, []int64{133}): - out.Call = &pbgear.Utility_DispatchAsCall_BalancesTransferAllowDeath{ - BalancesTransferAllowDeath: To_Balances_TransferAllowDeathCall(fields), //Passthrough fields... + case 8: + return &pbgear.Utility_DispatchAsCall_Utility{ + Utility: To_UtilityPallet(param), } - case matchFields(fields, []int64{134}): - out.Call = &pbgear.Utility_DispatchAsCall_BalancesForceTransfer{ - BalancesForceTransfer: To_Balances_ForceTransferCall(fields), //Passthrough fields... + case 16: + return &pbgear.Utility_DispatchAsCall_ConvictionVoting{ + ConvictionVoting: To_ConvictionVotingPallet(param), } - case matchFields(fields, []int64{135}): - out.Call = &pbgear.Utility_DispatchAsCall_BalancesTransferKeepAlive{ - BalancesTransferKeepAlive: To_Balances_TransferKeepAliveCall(fields), //Passthrough fields... + case 17: + return &pbgear.Utility_DispatchAsCall_Referenda{ + Referenda: To_ReferendaPallet(param), } - case matchFields(fields, []int64{138}): - out.Call = &pbgear.Utility_DispatchAsCall_BalancesTransferAll{ - BalancesTransferAll: To_Balances_TransferAllCall(fields), //Passthrough fields... + case 18: + return &pbgear.Utility_DispatchAsCall_FellowshipCollective{ + FellowshipCollective: To_FellowshipCollectivePallet(param), } - case matchFields(fields, []int64{140}): - out.Call = &pbgear.Utility_DispatchAsCall_BalancesForceUnreserve{ - BalancesForceUnreserve: To_Balances_ForceUnreserveCall(fields), //Passthrough fields... + case 19: + return &pbgear.Utility_DispatchAsCall_FellowshipReferenda{ + FellowshipReferenda: To_FellowshipReferendaPallet(param), } - case matchFields(fields, []int64{182}): - out.Call = &pbgear.Utility_DispatchAsCall_BalancesUpgradeAccounts{ - BalancesUpgradeAccounts: To_Balances_UpgradeAccountsCall(fields), //Passthrough fields... + case 21: + return &pbgear.Utility_DispatchAsCall_Whitelist{ + Whitelist: To_WhitelistPallet(param), } - case matchFields(fields, []int64{185}): - out.Call = &pbgear.Utility_DispatchAsCall_BalancesForceSetBalance{ - BalancesForceSetBalance: To_Balances_ForceSetBalanceCall(fields), //Passthrough fields... + case 22: + return &pbgear.Utility_DispatchAsCall_Scheduler{ + Scheduler: To_SchedulerPallet(param), } - case matchFields(fields, []int64{188}): - out.Call = &pbgear.Utility_DispatchAsCall_VestingVest{ - VestingVest: To_Vesting_VestCall(fields), //Passthrough fields... + case 23: + return &pbgear.Utility_DispatchAsCall_Preimage{ + Preimage: To_PreimagePallet(param), } - case matchFields(fields, []int64{249}): - out.Call = &pbgear.Utility_DispatchAsCall_VestingVestOther{ - VestingVestOther: To_Vesting_VestOtherCall(fields), //Passthrough fields... + case 24: + return &pbgear.Utility_DispatchAsCall_Identity{ + Identity: To_IdentityPallet(param), } - case matchFields(fields, []int64{250}): - out.Call = &pbgear.Utility_DispatchAsCall_VestingVestedTransfer{ - VestingVestedTransfer: To_Vesting_VestedTransferCall(fields), //Passthrough fields... + case 25: + return &pbgear.Utility_DispatchAsCall_Proxy{ + Proxy: To_ProxyPallet(param), } - case matchFields(fields, []int64{251}): - out.Call = &pbgear.Utility_DispatchAsCall_VestingForceVestedTransfer{ - VestingForceVestedTransfer: To_Vesting_ForceVestedTransferCall(fields), //Passthrough fields... + case 26: + return &pbgear.Utility_DispatchAsCall_Multisig{ + Multisig: To_MultisigPallet(param), } - case matchFields(fields, []int64{262}): - out.Call = &pbgear.Utility_DispatchAsCall_VestingMergeSchedules{ - VestingMergeSchedules: To_Vesting_MergeSchedulesCall(fields), //Passthrough fields... + case 27: + return &pbgear.Utility_DispatchAsCall_ElectionProviderMultiPhase{ + ElectionProviderMultiPhase: To_ElectionProviderMultiPhasePallet(param), } - case matchFields(fields, []int64{267}): - out.Call = &pbgear.Utility_DispatchAsCall_BagsListRebag{ - BagsListRebag: To_BagsList_RebagCall(fields), //Passthrough fields... + case 29: + return &pbgear.Utility_DispatchAsCall_Bounties{ + Bounties: To_BountiesPallet(param), } - case matchFields(fields, []int64{268}): - out.Call = &pbgear.Utility_DispatchAsCall_BagsListPutInFrontOf{ - BagsListPutInFrontOf: To_BagsList_PutInFrontOfCall(fields), //Passthrough fields... + case 30: + return &pbgear.Utility_DispatchAsCall_ChildBounties{ + ChildBounties: To_ChildBountiesPallet(param), } - } - return out -} - - func To_Utility_DispatchedAsEvent(in registry.DecodedFields) *pbgear.Utility_DispatchedAsEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_DispatchedAsEvent{} - out.Result = To_Utility_Result(fields[0].Value.(registry.DecodedFields)) - - return out -} - - func To_Utility_Err(in registry.DecodedFields) *pbgear.Utility_Err { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_Err{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out -} - - func To_Utility_Error(in registry.DecodedFields) *pbgear.Utility_Error { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_Error{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Utility_Error_Other{ - Other: To_Utility_Other(fields), //Passthrough fields... + case 31: + return &pbgear.Utility_DispatchAsCall_NominationPools{ + NominationPools: To_NominationPoolsPallet(param), + } + case 104: + return &pbgear.Utility_DispatchAsCall_Gear{ + Gear: To_GearPallet(param), } + case 106: + return &pbgear.Utility_DispatchAsCall_StakingRewards{ + StakingRewards: To_StakingRewardsPallet(param), + } + case 107: + return &pbgear.Utility_DispatchAsCall_GearVoucher{ + GearVoucher: To_GearVoucherPallet(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Utility_Exhausted(in registry.DecodedFields) *pbgear.Utility_Exhausted { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_Exhausted{} - return out -} - func To_Utility_ForceBatchCall(in registry.DecodedFields) *pbgear.Utility_ForceBatchCall { - - fields := []*registry.DecodedField(in) - _ = fields +func To_Utility_ForceBatchCall(in any) *pbgear.Utility_ForceBatchCall { out := &pbgear.Utility_ForceBatchCall{} - out.Calls = To_repeated_VaraRuntimeRuntimeCall(fields[0].Value.(registry.DecodedFields)) - - return out -} - - func To_Utility_ItemCompletedEvent(in registry.DecodedFields) *pbgear.Utility_ItemCompletedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_ItemCompletedEvent{} - return out -} - - func To_Utility_ItemFailedEvent(in registry.DecodedFields) *pbgear.Utility_ItemFailedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_ItemFailedEvent{} - out.Error = To_Utility_Error(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Utility_Module(in registry.DecodedFields) *pbgear.Utility_Module { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_Module{} - out.Value0 = To_SpRuntimeModuleError(fields[0].Value.(registry.DecodedFields)) - - return out -} - - func To_Utility_NoProviders(in registry.DecodedFields) *pbgear.Utility_NoProviders { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_NoProviders{} - return out -} + // repeated field Calls + out.Calls = To_Repeated_Utility_ForceBatchCall_calls(v.ValueAt(0)) - func To_Utility_Ok(in registry.DecodedFields) *pbgear.Utility_Ok { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_Ok{} - out.Value0 = To_Utility_TupleNull(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_Utility_Origins(in registry.DecodedFields) *pbgear.Utility_Origins { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_Origins{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Utility_Other(in registry.DecodedFields) *pbgear.Utility_Other { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_Other{} - return out -} +func To_Repeated_Utility_ForceBatchCall_calls(in any) []*pbgear.VaraRuntimeRuntimeCall { + items := in.([]interface{}) - func To_Utility_Result(in registry.DecodedFields) *pbgear.Utility_Result { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_Result{} - - switch { - case matchFields(fields, []int64{58}): - out.Value = &pbgear.Utility_Result_Ok{ - Ok: To_Utility_Ok(fields), //Passthrough fields... - } - case matchFields(fields, []int64{25}): - out.Value = &pbgear.Utility_Result_Err{ - Err: To_Utility_Err(fields), //Passthrough fields... - } + var out []*pbgear.VaraRuntimeRuntimeCall + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_VaraRuntimeRuntimeCall(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } - func To_Utility_RootNotAllowed(in registry.DecodedFields) *pbgear.Utility_RootNotAllowed { + +func To_Utility_Origins(in any) *pbgear.Utility_Origins { + out := &pbgear.Utility_Origins{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Utility_Origins_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_RootNotAllowed{} - return out +func To_Utility_Origins_value0(in any) *pbgear.Value0 { + v := in.(registry.Valuable) + return To_Value0(v.ValueAt(0) //simple field } - func To_Utility_System(in registry.DecodedFields) *pbgear.Utility_System { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Utility_System(in any) *pbgear.Utility_System { out := &pbgear.Utility_System{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Utility_Token(in registry.DecodedFields) *pbgear.Utility_Token { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_Token{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out -} + // field Value0 + out.Value0 = To_Utility_System_value0(v.ValueAt(0)) - func To_Utility_TooManyConsumers(in registry.DecodedFields) *pbgear.Utility_TooManyConsumers { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_TooManyConsumers{} - return out + return out //from message } - - func To_Utility_Transactional(in registry.DecodedFields) *pbgear.Utility_Transactional { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_Transactional{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Utility_System_value0(in any) *pbgear.Value0 { + v := in.(registry.Valuable) + return To_Value0(v.ValueAt(0) //simple field } - func To_Utility_TupleNull(in registry.DecodedFields) *pbgear.Utility_TupleNull { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_TupleNull{} - return out -} - func To_Utility_Unavailable(in registry.DecodedFields) *pbgear.Utility_Unavailable { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_Unavailable{} - return out -} +func To_Utility_Void(in any) *pbgear.Utility_Void { + out := &pbgear.Utility_Void{} + v := in.(registry.Valuable) + _ = v - func To_Utility_Void(in registry.DecodedFields) *pbgear.Utility_Void { + // field Value0 + out.Value0 = To_Utility_Void_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Utility_Void{} - out.Value0 = To_Value0(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Utility_Void_value0(in any) *pbgear.Value0 { + v := in.(registry.Valuable) + return To_Value0(v.ValueAt(0) //simple field } - func To_Utility_WithWeightCall(in registry.DecodedFields) *pbgear.Utility_WithWeightCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Utility_WithWeightCall(in any) *pbgear.Utility_WithWeightCall { out := &pbgear.Utility_WithWeightCall{} - - switch { - case matchFields(fields, []int64{66}): - out.Call = &pbgear.Utility_WithWeightCall_SystemRemark{ - SystemRemark: To_System_RemarkCall(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_Utility_WithWeightCall_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + // field Weight + out.Weight = To_Utility_WithWeightCall_weight(v.ValueAt(1)) + + return out //from message +} + +func To_OneOf_Utility_WithWeightCall_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Utility_WithWeightCall_System{ + System: To_SystemPallet(param), } - case matchFields(fields, []int64{70}): - out.Call = &pbgear.Utility_WithWeightCall_SystemSetHeapPages{ - SystemSetHeapPages: To_System_SetHeapPagesCall(fields), //Passthrough fields... + case 1: + return &pbgear.Utility_WithWeightCall_Timestamp{ + Timestamp: To_TimestampPallet(param), } - case matchFields(fields, []int64{71}): - out.Call = &pbgear.Utility_WithWeightCall_SystemSetCode{ - SystemSetCode: To_System_SetCodeCall(fields), //Passthrough fields... + case 3: + return &pbgear.Utility_WithWeightCall_Babe{ + Babe: To_BabePallet(param), } - case matchFields(fields, []int64{81}): - out.Call = &pbgear.Utility_WithWeightCall_SystemSetCodeWithoutChecks{ - SystemSetCodeWithoutChecks: To_System_SetCodeWithoutChecksCall(fields), //Passthrough fields... + case 4: + return &pbgear.Utility_WithWeightCall_Grandpa{ + Grandpa: To_GrandpaPallet(param), } - case matchFields(fields, []int64{93}): - out.Call = &pbgear.Utility_WithWeightCall_SystemSetStorage{ - SystemSetStorage: To_System_SetStorageCall(fields), //Passthrough fields... + case 5: + return &pbgear.Utility_WithWeightCall_Balances{ + Balances: To_BalancesPallet(param), } - case matchFields(fields, []int64{98}): - out.Call = &pbgear.Utility_WithWeightCall_SystemKillStorage{ - SystemKillStorage: To_System_KillStorageCall(fields), //Passthrough fields... + case 10: + return &pbgear.Utility_WithWeightCall_Vesting{ + Vesting: To_VestingPallet(param), } - case matchFields(fields, []int64{100}): - out.Call = &pbgear.Utility_WithWeightCall_SystemKillPrefix{ - SystemKillPrefix: To_System_KillPrefixCall(fields), //Passthrough fields... + case 11: + return &pbgear.Utility_WithWeightCall_BagsList{ + BagsList: To_BagsListPallet(param), } - case matchFields(fields, []int64{101}): - out.Call = &pbgear.Utility_WithWeightCall_SystemRemarkWithEvent{ - SystemRemarkWithEvent: To_System_RemarkWithEventCall(fields), //Passthrough fields... + case 12: + return &pbgear.Utility_WithWeightCall_ImOnline{ + ImOnline: To_ImOnlinePallet(param), } - case matchFields(fields, []int64{105}): - out.Call = &pbgear.Utility_WithWeightCall_TimestampSet{ - TimestampSet: To_Timestamp_SetCall(fields), //Passthrough fields... + case 13: + return &pbgear.Utility_WithWeightCall_Staking{ + Staking: To_StakingPallet(param), } - case matchFields(fields, []int64{113}): - out.Call = &pbgear.Utility_WithWeightCall_BabeReportEquivocation{ - BabeReportEquivocation: To_Babe_ReportEquivocationCall(fields), //Passthrough fields... + case 7: + return &pbgear.Utility_WithWeightCall_Session{ + Session: To_SessionPallet(param), } - case matchFields(fields, []int64{116}): - out.Call = &pbgear.Utility_WithWeightCall_BabeReportEquivocationUnsigned{ - BabeReportEquivocationUnsigned: To_Babe_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 14: + return &pbgear.Utility_WithWeightCall_Treasury{ + Treasury: To_TreasuryPallet(param), } - case matchFields(fields, []int64{118}): - out.Call = &pbgear.Utility_WithWeightCall_BabePlanConfigChange{ - BabePlanConfigChange: To_Babe_PlanConfigChangeCall(fields), //Passthrough fields... + case 8: + return &pbgear.Utility_WithWeightCall_Utility{ + Utility: To_UtilityPallet(param), } - case matchFields(fields, []int64{124}): - out.Call = &pbgear.Utility_WithWeightCall_GrandpaReportEquivocation{ - GrandpaReportEquivocation: To_Grandpa_ReportEquivocationCall(fields), //Passthrough fields... + case 16: + return &pbgear.Utility_WithWeightCall_ConvictionVoting{ + ConvictionVoting: To_ConvictionVotingPallet(param), } - case matchFields(fields, []int64{129}): - out.Call = &pbgear.Utility_WithWeightCall_GrandpaReportEquivocationUnsigned{ - GrandpaReportEquivocationUnsigned: To_Grandpa_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 17: + return &pbgear.Utility_WithWeightCall_Referenda{ + Referenda: To_ReferendaPallet(param), } - case matchFields(fields, []int64{132}): - out.Call = &pbgear.Utility_WithWeightCall_GrandpaNoteStalled{ - GrandpaNoteStalled: To_Grandpa_NoteStalledCall(fields), //Passthrough fields... + case 18: + return &pbgear.Utility_WithWeightCall_FellowshipCollective{ + FellowshipCollective: To_FellowshipCollectivePallet(param), } - case matchFields(fields, []int64{133}): - out.Call = &pbgear.Utility_WithWeightCall_BalancesTransferAllowDeath{ - BalancesTransferAllowDeath: To_Balances_TransferAllowDeathCall(fields), //Passthrough fields... + case 19: + return &pbgear.Utility_WithWeightCall_FellowshipReferenda{ + FellowshipReferenda: To_FellowshipReferendaPallet(param), } - case matchFields(fields, []int64{134}): - out.Call = &pbgear.Utility_WithWeightCall_BalancesForceTransfer{ - BalancesForceTransfer: To_Balances_ForceTransferCall(fields), //Passthrough fields... + case 21: + return &pbgear.Utility_WithWeightCall_Whitelist{ + Whitelist: To_WhitelistPallet(param), } - case matchFields(fields, []int64{135}): - out.Call = &pbgear.Utility_WithWeightCall_BalancesTransferKeepAlive{ - BalancesTransferKeepAlive: To_Balances_TransferKeepAliveCall(fields), //Passthrough fields... + case 22: + return &pbgear.Utility_WithWeightCall_Scheduler{ + Scheduler: To_SchedulerPallet(param), } - case matchFields(fields, []int64{138}): - out.Call = &pbgear.Utility_WithWeightCall_BalancesTransferAll{ - BalancesTransferAll: To_Balances_TransferAllCall(fields), //Passthrough fields... + case 23: + return &pbgear.Utility_WithWeightCall_Preimage{ + Preimage: To_PreimagePallet(param), } - case matchFields(fields, []int64{140}): - out.Call = &pbgear.Utility_WithWeightCall_BalancesForceUnreserve{ - BalancesForceUnreserve: To_Balances_ForceUnreserveCall(fields), //Passthrough fields... + case 24: + return &pbgear.Utility_WithWeightCall_Identity{ + Identity: To_IdentityPallet(param), } - case matchFields(fields, []int64{182}): - out.Call = &pbgear.Utility_WithWeightCall_BalancesUpgradeAccounts{ - BalancesUpgradeAccounts: To_Balances_UpgradeAccountsCall(fields), //Passthrough fields... + case 25: + return &pbgear.Utility_WithWeightCall_Proxy{ + Proxy: To_ProxyPallet(param), } - case matchFields(fields, []int64{185}): - out.Call = &pbgear.Utility_WithWeightCall_BalancesForceSetBalance{ - BalancesForceSetBalance: To_Balances_ForceSetBalanceCall(fields), //Passthrough fields... + case 26: + return &pbgear.Utility_WithWeightCall_Multisig{ + Multisig: To_MultisigPallet(param), } - case matchFields(fields, []int64{188}): - out.Call = &pbgear.Utility_WithWeightCall_VestingVest{ - VestingVest: To_Vesting_VestCall(fields), //Passthrough fields... + case 27: + return &pbgear.Utility_WithWeightCall_ElectionProviderMultiPhase{ + ElectionProviderMultiPhase: To_ElectionProviderMultiPhasePallet(param), } - case matchFields(fields, []int64{249}): - out.Call = &pbgear.Utility_WithWeightCall_VestingVestOther{ - VestingVestOther: To_Vesting_VestOtherCall(fields), //Passthrough fields... + case 29: + return &pbgear.Utility_WithWeightCall_Bounties{ + Bounties: To_BountiesPallet(param), } - case matchFields(fields, []int64{250}): - out.Call = &pbgear.Utility_WithWeightCall_VestingVestedTransfer{ - VestingVestedTransfer: To_Vesting_VestedTransferCall(fields), //Passthrough fields... + case 30: + return &pbgear.Utility_WithWeightCall_ChildBounties{ + ChildBounties: To_ChildBountiesPallet(param), } - case matchFields(fields, []int64{251}): - out.Call = &pbgear.Utility_WithWeightCall_VestingForceVestedTransfer{ - VestingForceVestedTransfer: To_Vesting_ForceVestedTransferCall(fields), //Passthrough fields... + case 31: + return &pbgear.Utility_WithWeightCall_NominationPools{ + NominationPools: To_NominationPoolsPallet(param), } - case matchFields(fields, []int64{262}): - out.Call = &pbgear.Utility_WithWeightCall_VestingMergeSchedules{ - VestingMergeSchedules: To_Vesting_MergeSchedulesCall(fields), //Passthrough fields... + case 104: + return &pbgear.Utility_WithWeightCall_Gear{ + Gear: To_GearPallet(param), } - case matchFields(fields, []int64{267}): - out.Call = &pbgear.Utility_WithWeightCall_BagsListRebag{ - BagsListRebag: To_BagsList_RebagCall(fields), //Passthrough fields... + case 106: + return &pbgear.Utility_WithWeightCall_StakingRewards{ + StakingRewards: To_StakingRewardsPallet(param), } - case matchFields(fields, []int64{268}): - out.Call = &pbgear.Utility_WithWeightCall_BagsListPutInFrontOf{ - BagsListPutInFrontOf: To_BagsList_PutInFrontOfCall(fields), //Passthrough fields... + case 107: + return &pbgear.Utility_WithWeightCall_GearVoucher{ + GearVoucher: To_GearVoucherPallet(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - out.Weight = To_SpWeightsWeightV2Weight(fields[1].Value.(registry.DecodedFields)) - - return out +} +func To_Utility_WithWeightCall_weight(in any) *pbgear.SpWeightsWeightV2Weight { + v := in.(registry.Valuable) + return To_SpWeightsWeightV2Weight(v.ValueAt(0) //simple field } - func To_Value0(in registry.DecodedFields) *pbgear.Value0 { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Value0(in any) *pbgear.Value0 { out := &pbgear.Value0{} - - switch { - case matchFields(fields, []int64{}): - out.Value = &pbgear.Value0_FundsUnavailable{ - FundsUnavailable: To_FundsUnavailable(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Value0_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Value0_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Value0_Root{ + Root: To_Root(param), + } + case 1: + return &pbgear.Value0_Signed{ + Signed: To_Signed(param), + } + case 2: + return &pbgear.Value0_None{ + None: To_None(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_VaraRuntimeNposSolution16(in registry.DecodedFields) *pbgear.VaraRuntimeNposSolution16 { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_VaraRuntimeNposSolution16(in any) *pbgear.VaraRuntimeNposSolution16 { out := &pbgear.VaraRuntimeNposSolution16{} - out.Votes1 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32CompactUint32(fields[0].Value.(registry.DecodedFields)) - - out.Votes2 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32TupleCompactUint32CompactSpArithmeticPerThingsPerU16CompactUint32(fields[1].Value.(registry.DecodedFields)) - - out.Votes3 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes3ListCompactUint32(fields[2].Value.(registry.DecodedFields)) - - out.Votes4 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes4ListCompactUint32(fields[3].Value.(registry.DecodedFields)) - - out.Votes5 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes5ListCompactUint32(fields[4].Value.(registry.DecodedFields)) - - out.Votes6 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes6ListCompactUint32(fields[5].Value.(registry.DecodedFields)) - - out.Votes7 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes7ListCompactUint32(fields[6].Value.(registry.DecodedFields)) - - out.Votes8 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes8ListCompactUint32(fields[7].Value.(registry.DecodedFields)) - - out.Votes9 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes9ListCompactUint32(fields[8].Value.(registry.DecodedFields)) - - out.Votes10 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes10ListCompactUint32(fields[9].Value.(registry.DecodedFields)) - - out.Votes11 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes11ListCompactUint32(fields[10].Value.(registry.DecodedFields)) - - out.Votes12 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes12ListCompactUint32(fields[11].Value.(registry.DecodedFields)) - - out.Votes13 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes13ListCompactUint32(fields[12].Value.(registry.DecodedFields)) - - out.Votes14 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes14ListCompactUint32(fields[13].Value.(registry.DecodedFields)) - - out.Votes15 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes15ListCompactUint32(fields[14].Value.(registry.DecodedFields)) - - out.Votes16 = To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes16ListCompactUint32(fields[15].Value.(registry.DecodedFields)) - - return out -} -func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32CompactUint32(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleCompactUint32CompactUint32 { - fields := []*registry.DecodedField(f) - _ = fields - - out := make([]*pbgear.ElectionProviderMultiPhase_TupleCompactUint32CompactUint32, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleCompactUint32CompactUint32(f.Value.([]*registry.DecodedField))) - } - return out -} -func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32TupleCompactUint32CompactSpArithmeticPerThingsPerU16CompactUint32(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleCompactUint32TupleCompactUint32CompactSpArithmeticPerThingsPerU16CompactUint32 { - fields := []*registry.DecodedField(f) - _ = fields - - out := make([]*pbgear.ElectionProviderMultiPhase_TupleCompactUint32TupleCompactUint32CompactSpArithmeticPerThingsPerU16CompactUint32, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleCompactUint32TupleCompactUint32CompactSpArithmeticPerThingsPerU16CompactUint32(f.Value.([]*registry.DecodedField))) - } - return out -} -func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes3ListCompactUint32(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes3ListCompactUint32 { - fields := []*registry.DecodedField(f) - _ = fields - - out := make([]*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes3ListCompactUint32, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes3ListCompactUint32(f.Value.([]*registry.DecodedField))) - } - return out -} -func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes4ListCompactUint32(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes4ListCompactUint32 { - fields := []*registry.DecodedField(f) - _ = fields - - out := make([]*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes4ListCompactUint32, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes4ListCompactUint32(f.Value.([]*registry.DecodedField))) - } - return out + v := in.(registry.Valuable) + _ = v + + // repeated field Votes1 + out.Votes1 = To_Repeated_VaraRuntimeNposSolution16_votes1(v.ValueAt(0)) + // repeated field Votes2 + out.Votes2 = To_Repeated_VaraRuntimeNposSolution16_votes2(v.ValueAt(1)) + // repeated field Votes3 + out.Votes3 = To_Repeated_VaraRuntimeNposSolution16_votes3(v.ValueAt(2)) + // repeated field Votes4 + out.Votes4 = To_Repeated_VaraRuntimeNposSolution16_votes4(v.ValueAt(3)) + // repeated field Votes5 + out.Votes5 = To_Repeated_VaraRuntimeNposSolution16_votes5(v.ValueAt(4)) + // repeated field Votes6 + out.Votes6 = To_Repeated_VaraRuntimeNposSolution16_votes6(v.ValueAt(5)) + // repeated field Votes7 + out.Votes7 = To_Repeated_VaraRuntimeNposSolution16_votes7(v.ValueAt(6)) + // repeated field Votes8 + out.Votes8 = To_Repeated_VaraRuntimeNposSolution16_votes8(v.ValueAt(7)) + // repeated field Votes9 + out.Votes9 = To_Repeated_VaraRuntimeNposSolution16_votes9(v.ValueAt(8)) + // repeated field Votes10 + out.Votes10 = To_Repeated_VaraRuntimeNposSolution16_votes10(v.ValueAt(9)) + // repeated field Votes11 + out.Votes11 = To_Repeated_VaraRuntimeNposSolution16_votes11(v.ValueAt(10)) + // repeated field Votes12 + out.Votes12 = To_Repeated_VaraRuntimeNposSolution16_votes12(v.ValueAt(11)) + // repeated field Votes13 + out.Votes13 = To_Repeated_VaraRuntimeNposSolution16_votes13(v.ValueAt(12)) + // repeated field Votes14 + out.Votes14 = To_Repeated_VaraRuntimeNposSolution16_votes14(v.ValueAt(13)) + // repeated field Votes15 + out.Votes15 = To_Repeated_VaraRuntimeNposSolution16_votes15(v.ValueAt(14)) + // repeated field Votes16 + out.Votes16 = To_Repeated_VaraRuntimeNposSolution16_votes16(v.ValueAt(15)) + + return out //from message +} + + +func To_Repeated_VaraRuntimeNposSolution16_votes1(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32Uint32 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32Uint32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32Uint32(w) + out = append(out, o) + } + return nil //funcForRepeatedField +} + +func To_Repeated_VaraRuntimeNposSolution16_votes2(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32TupleUint32SpArithmeticPerThingsPerU16Uint32 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32TupleUint32SpArithmeticPerThingsPerU16Uint32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32TupleUint32SpArithmeticPerThingsPerU16Uint32(w) + out = append(out, o) + } + return nil //funcForRepeatedField +} + +func To_Repeated_VaraRuntimeNposSolution16_votes3(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes3Listuint32 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes3Listuint32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes3Listuint32(w) + out = append(out, o) + } + return nil //funcForRepeatedField +} + +func To_Repeated_VaraRuntimeNposSolution16_votes4(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes4Listuint32 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes4Listuint32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes4Listuint32(w) + out = append(out, o) + } + return nil //funcForRepeatedField } -func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes5ListCompactUint32(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes5ListCompactUint32 { - fields := []*registry.DecodedField(f) - _ = fields - out := make([]*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes5ListCompactUint32, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes5ListCompactUint32(f.Value.([]*registry.DecodedField))) +func To_Repeated_VaraRuntimeNposSolution16_votes5(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes5Listuint32 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes5Listuint32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes5Listuint32(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } -func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes6ListCompactUint32(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes6ListCompactUint32 { - fields := []*registry.DecodedField(f) - _ = fields - out := make([]*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes6ListCompactUint32, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes6ListCompactUint32(f.Value.([]*registry.DecodedField))) +func To_Repeated_VaraRuntimeNposSolution16_votes6(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes6Listuint32 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes6Listuint32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes6Listuint32(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } -func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes7ListCompactUint32(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes7ListCompactUint32 { - fields := []*registry.DecodedField(f) - _ = fields - out := make([]*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes7ListCompactUint32, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes7ListCompactUint32(f.Value.([]*registry.DecodedField))) +func To_Repeated_VaraRuntimeNposSolution16_votes7(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes7Listuint32 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes7Listuint32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes7Listuint32(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } -func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes8ListCompactUint32(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes8ListCompactUint32 { - fields := []*registry.DecodedField(f) - _ = fields - out := make([]*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes8ListCompactUint32, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes8ListCompactUint32(f.Value.([]*registry.DecodedField))) +func To_Repeated_VaraRuntimeNposSolution16_votes8(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes8Listuint32 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes8Listuint32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes8Listuint32(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } -func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes9ListCompactUint32(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes9ListCompactUint32 { - fields := []*registry.DecodedField(f) - _ = fields - out := make([]*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes9ListCompactUint32, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes9ListCompactUint32(f.Value.([]*registry.DecodedField))) +func To_Repeated_VaraRuntimeNposSolution16_votes9(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes9Listuint32 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes9Listuint32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes9Listuint32(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } -func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes10ListCompactUint32(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes10ListCompactUint32 { - fields := []*registry.DecodedField(f) - _ = fields - out := make([]*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes10ListCompactUint32, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes10ListCompactUint32(f.Value.([]*registry.DecodedField))) +func To_Repeated_VaraRuntimeNposSolution16_votes10(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes10Listuint32 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes10Listuint32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes10Listuint32(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } -func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes11ListCompactUint32(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes11ListCompactUint32 { - fields := []*registry.DecodedField(f) - _ = fields - out := make([]*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes11ListCompactUint32, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes11ListCompactUint32(f.Value.([]*registry.DecodedField))) +func To_Repeated_VaraRuntimeNposSolution16_votes11(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes11Listuint32 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes11Listuint32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes11Listuint32(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } -func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes12ListCompactUint32(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes12ListCompactUint32 { - fields := []*registry.DecodedField(f) - _ = fields - out := make([]*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes12ListCompactUint32, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes12ListCompactUint32(f.Value.([]*registry.DecodedField))) +func To_Repeated_VaraRuntimeNposSolution16_votes12(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes12Listuint32 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes12Listuint32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes12Listuint32(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } -func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes13ListCompactUint32(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes13ListCompactUint32 { - fields := []*registry.DecodedField(f) - _ = fields - out := make([]*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes13ListCompactUint32, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes13ListCompactUint32(f.Value.([]*registry.DecodedField))) +func To_Repeated_VaraRuntimeNposSolution16_votes13(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes13Listuint32 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes13Listuint32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes13Listuint32(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } -func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes14ListCompactUint32(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes14ListCompactUint32 { - fields := []*registry.DecodedField(f) - _ = fields - out := make([]*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes14ListCompactUint32, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes14ListCompactUint32(f.Value.([]*registry.DecodedField))) +func To_Repeated_VaraRuntimeNposSolution16_votes14(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes14Listuint32 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes14Listuint32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes14Listuint32(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } -func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes15ListCompactUint32(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes15ListCompactUint32 { - fields := []*registry.DecodedField(f) - _ = fields - out := make([]*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes15ListCompactUint32, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes15ListCompactUint32(f.Value.([]*registry.DecodedField))) +func To_Repeated_VaraRuntimeNposSolution16_votes15(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes15Listuint32 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes15Listuint32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes15Listuint32(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } -func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes16ListCompactUint32(f registry.DecodedFields) []*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes16ListCompactUint32 { - fields := []*registry.DecodedField(f) - _ = fields - out := make([]*pbgear.ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes16ListCompactUint32, len(fields)) - for _, f := range fields { - out = append(out, To_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMultiPhaseVotes16ListCompactUint32(f.Value.([]*registry.DecodedField))) +func To_Repeated_VaraRuntimeNposSolution16_votes16(in any) []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes16Listuint32 { + items := in.([]interface{}) + + var out []*pbgear.ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes16Listuint32 + for _, item := range items { //ugly ack the will bite later + w := item + if i, ok := w.(registry.Valuable); ok { + w = &Wrap{Value: i} + } + o := To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes16Listuint32(w) + out = append(out, o) } - return out + return nil //funcForRepeatedField } - func To_VaraRuntimeRuntimeCall(in registry.DecodedFields) *pbgear.VaraRuntimeRuntimeCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_VaraRuntimeRuntimeCall(in any) *pbgear.VaraRuntimeRuntimeCall { out := &pbgear.VaraRuntimeRuntimeCall{} - - switch { - case matchFields(fields, []int64{66}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_SystemRemark{ - SystemRemark: To_System_RemarkCall(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Calls + v0 := To_OneOf_VaraRuntimeRuntimeCall_calls(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Calls").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_VaraRuntimeRuntimeCall_calls (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.VaraRuntimeRuntimeCall_System{ + System: To_SystemPallet(param), } - case matchFields(fields, []int64{70}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_SystemSetHeapPages{ - SystemSetHeapPages: To_System_SetHeapPagesCall(fields), //Passthrough fields... + case 1: + return &pbgear.VaraRuntimeRuntimeCall_Timestamp{ + Timestamp: To_TimestampPallet(param), } - case matchFields(fields, []int64{71}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_SystemSetCode{ - SystemSetCode: To_System_SetCodeCall(fields), //Passthrough fields... + case 3: + return &pbgear.VaraRuntimeRuntimeCall_Babe{ + Babe: To_BabePallet(param), } - case matchFields(fields, []int64{81}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_SystemSetCodeWithoutChecks{ - SystemSetCodeWithoutChecks: To_System_SetCodeWithoutChecksCall(fields), //Passthrough fields... + case 4: + return &pbgear.VaraRuntimeRuntimeCall_Grandpa{ + Grandpa: To_GrandpaPallet(param), } - case matchFields(fields, []int64{93}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_SystemSetStorage{ - SystemSetStorage: To_System_SetStorageCall(fields), //Passthrough fields... + case 5: + return &pbgear.VaraRuntimeRuntimeCall_Balances{ + Balances: To_BalancesPallet(param), } - case matchFields(fields, []int64{98}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_SystemKillStorage{ - SystemKillStorage: To_System_KillStorageCall(fields), //Passthrough fields... + case 10: + return &pbgear.VaraRuntimeRuntimeCall_Vesting{ + Vesting: To_VestingPallet(param), } - case matchFields(fields, []int64{100}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_SystemKillPrefix{ - SystemKillPrefix: To_System_KillPrefixCall(fields), //Passthrough fields... + case 11: + return &pbgear.VaraRuntimeRuntimeCall_BagsList{ + BagsList: To_BagsListPallet(param), } - case matchFields(fields, []int64{101}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_SystemRemarkWithEvent{ - SystemRemarkWithEvent: To_System_RemarkWithEventCall(fields), //Passthrough fields... + case 12: + return &pbgear.VaraRuntimeRuntimeCall_ImOnline{ + ImOnline: To_ImOnlinePallet(param), } - case matchFields(fields, []int64{105}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_TimestampSet{ - TimestampSet: To_Timestamp_SetCall(fields), //Passthrough fields... + case 13: + return &pbgear.VaraRuntimeRuntimeCall_Staking{ + Staking: To_StakingPallet(param), } - case matchFields(fields, []int64{113}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_BabeReportEquivocation{ - BabeReportEquivocation: To_Babe_ReportEquivocationCall(fields), //Passthrough fields... + case 7: + return &pbgear.VaraRuntimeRuntimeCall_Session{ + Session: To_SessionPallet(param), } - case matchFields(fields, []int64{116}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_BabeReportEquivocationUnsigned{ - BabeReportEquivocationUnsigned: To_Babe_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 14: + return &pbgear.VaraRuntimeRuntimeCall_Treasury{ + Treasury: To_TreasuryPallet(param), } - case matchFields(fields, []int64{118}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_BabePlanConfigChange{ - BabePlanConfigChange: To_Babe_PlanConfigChangeCall(fields), //Passthrough fields... + case 8: + return &pbgear.VaraRuntimeRuntimeCall_Utility{ + Utility: To_UtilityPallet(param), } - case matchFields(fields, []int64{124}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_GrandpaReportEquivocation{ - GrandpaReportEquivocation: To_Grandpa_ReportEquivocationCall(fields), //Passthrough fields... + case 16: + return &pbgear.VaraRuntimeRuntimeCall_ConvictionVoting{ + ConvictionVoting: To_ConvictionVotingPallet(param), } - case matchFields(fields, []int64{129}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_GrandpaReportEquivocationUnsigned{ - GrandpaReportEquivocationUnsigned: To_Grandpa_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 17: + return &pbgear.VaraRuntimeRuntimeCall_Referenda{ + Referenda: To_ReferendaPallet(param), } - case matchFields(fields, []int64{132}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_GrandpaNoteStalled{ - GrandpaNoteStalled: To_Grandpa_NoteStalledCall(fields), //Passthrough fields... + case 18: + return &pbgear.VaraRuntimeRuntimeCall_FellowshipCollective{ + FellowshipCollective: To_FellowshipCollectivePallet(param), } - case matchFields(fields, []int64{133}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_BalancesTransferAllowDeath{ - BalancesTransferAllowDeath: To_Balances_TransferAllowDeathCall(fields), //Passthrough fields... + case 19: + return &pbgear.VaraRuntimeRuntimeCall_FellowshipReferenda{ + FellowshipReferenda: To_FellowshipReferendaPallet(param), } - case matchFields(fields, []int64{134}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_BalancesForceTransfer{ - BalancesForceTransfer: To_Balances_ForceTransferCall(fields), //Passthrough fields... + case 21: + return &pbgear.VaraRuntimeRuntimeCall_Whitelist{ + Whitelist: To_WhitelistPallet(param), } - case matchFields(fields, []int64{135}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_BalancesTransferKeepAlive{ - BalancesTransferKeepAlive: To_Balances_TransferKeepAliveCall(fields), //Passthrough fields... + case 22: + return &pbgear.VaraRuntimeRuntimeCall_Scheduler{ + Scheduler: To_SchedulerPallet(param), } - case matchFields(fields, []int64{138}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_BalancesTransferAll{ - BalancesTransferAll: To_Balances_TransferAllCall(fields), //Passthrough fields... + case 23: + return &pbgear.VaraRuntimeRuntimeCall_Preimage{ + Preimage: To_PreimagePallet(param), } - case matchFields(fields, []int64{140}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_BalancesForceUnreserve{ - BalancesForceUnreserve: To_Balances_ForceUnreserveCall(fields), //Passthrough fields... + case 24: + return &pbgear.VaraRuntimeRuntimeCall_Identity{ + Identity: To_IdentityPallet(param), } - case matchFields(fields, []int64{182}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_BalancesUpgradeAccounts{ - BalancesUpgradeAccounts: To_Balances_UpgradeAccountsCall(fields), //Passthrough fields... + case 25: + return &pbgear.VaraRuntimeRuntimeCall_Proxy{ + Proxy: To_ProxyPallet(param), } - case matchFields(fields, []int64{185}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_BalancesForceSetBalance{ - BalancesForceSetBalance: To_Balances_ForceSetBalanceCall(fields), //Passthrough fields... + case 26: + return &pbgear.VaraRuntimeRuntimeCall_Multisig{ + Multisig: To_MultisigPallet(param), } - case matchFields(fields, []int64{188}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_VestingVest{ - VestingVest: To_Vesting_VestCall(fields), //Passthrough fields... + case 27: + return &pbgear.VaraRuntimeRuntimeCall_ElectionProviderMultiPhase{ + ElectionProviderMultiPhase: To_ElectionProviderMultiPhasePallet(param), } - case matchFields(fields, []int64{249}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_VestingVestOther{ - VestingVestOther: To_Vesting_VestOtherCall(fields), //Passthrough fields... + case 29: + return &pbgear.VaraRuntimeRuntimeCall_Bounties{ + Bounties: To_BountiesPallet(param), } - case matchFields(fields, []int64{250}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_VestingVestedTransfer{ - VestingVestedTransfer: To_Vesting_VestedTransferCall(fields), //Passthrough fields... + case 30: + return &pbgear.VaraRuntimeRuntimeCall_ChildBounties{ + ChildBounties: To_ChildBountiesPallet(param), } - case matchFields(fields, []int64{251}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_VestingForceVestedTransfer{ - VestingForceVestedTransfer: To_Vesting_ForceVestedTransferCall(fields), //Passthrough fields... + case 31: + return &pbgear.VaraRuntimeRuntimeCall_NominationPools{ + NominationPools: To_NominationPoolsPallet(param), } - case matchFields(fields, []int64{262}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_VestingMergeSchedules{ - VestingMergeSchedules: To_Vesting_MergeSchedulesCall(fields), //Passthrough fields... + case 104: + return &pbgear.VaraRuntimeRuntimeCall_Gear{ + Gear: To_GearPallet(param), } - case matchFields(fields, []int64{267}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_BagsListRebag{ - BagsListRebag: To_BagsList_RebagCall(fields), //Passthrough fields... + case 106: + return &pbgear.VaraRuntimeRuntimeCall_StakingRewards{ + StakingRewards: To_StakingRewardsPallet(param), } - case matchFields(fields, []int64{268}): - out.Calls = &pbgear.VaraRuntimeRuntimeCall_BagsListPutInFrontOf{ - BagsListPutInFrontOf: To_BagsList_PutInFrontOfCall(fields), //Passthrough fields... + case 107: + return &pbgear.VaraRuntimeRuntimeCall_GearVoucher{ + GearVoucher: To_GearVoucherPallet(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_VaraRuntimeSessionKeys(in registry.DecodedFields) *pbgear.VaraRuntimeSessionKeys { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_VaraRuntimeSessionKeys(in any) *pbgear.VaraRuntimeSessionKeys { out := &pbgear.VaraRuntimeSessionKeys{} - out.Babe = To_SpConsensusBabeAppPublic(fields[0].Value.(registry.DecodedFields)) - - out.Grandpa = To_SpConsensusGrandpaAppPublic(fields[1].Value.(registry.DecodedFields)) - - out.ImOnline = To_ImOnline_PalletImOnlineSr25519AppSr25519Public(fields[2].Value.(registry.DecodedFields)) - - out.AuthorityDiscovery = To_SpAuthorityDiscoveryAppPublic(fields[3].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field Babe + out.Babe = To_VaraRuntimeSessionKeys_babe(v.ValueAt(0)) + // field Grandpa + out.Grandpa = To_VaraRuntimeSessionKeys_grandpa(v.ValueAt(1)) + // field ImOnline + out.ImOnline = To_VaraRuntimeSessionKeys_im_online(v.ValueAt(2)) + // field AuthorityDiscovery + out.AuthorityDiscovery = To_VaraRuntimeSessionKeys_authority_discovery(v.ValueAt(3)) - func To_Vesting_Address20(in registry.DecodedFields) *pbgear.Vesting_Address20 { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Vesting_Address20{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out +func To_VaraRuntimeSessionKeys_babe(in any) *pbgear.SpConsensusBabeAppPublic { + v := in.(registry.Valuable) + return To_SpConsensusBabeAppPublic(v.ValueAt(0) //simple field } +func To_VaraRuntimeSessionKeys_grandpa(in any) *pbgear.SpConsensusGrandpaAppPublic { + v := in.(registry.Valuable) + return To_SpConsensusGrandpaAppPublic(v.ValueAt(0) //simple field +} +func To_VaraRuntimeSessionKeys_im_online(in any) *pbgear.ImOnline_PalletImOnlineSr25519AppSr25519Public { + v := in.(registry.Valuable) + return To_ImOnline_PalletImOnlineSr25519AppSr25519Public(v.ValueAt(0) //simple field +} +func To_VaraRuntimeSessionKeys_authority_discovery(in any) *pbgear.SpAuthorityDiscoveryAppPublic { + v := in.(registry.Valuable) + return To_SpAuthorityDiscoveryAppPublic(v.ValueAt(0) //simple field +} + - func To_Vesting_Address32(in registry.DecodedFields) *pbgear.Vesting_Address32 { +func To_VestingPallet(in any) *pbgear.VestingPallet { + out := &pbgear.VestingPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_VestingPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Vesting_Address32{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out +func To_OneOf_VestingPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.VestingPallet_VestCall{ + VestCall: To_Vesting_VestCall(param), + } + case 1: + return &pbgear.VestingPallet_VestOtherCall{ + VestOtherCall: To_Vesting_VestOtherCall(param), + } + case 2: + return &pbgear.VestingPallet_VestedTransferCall{ + VestedTransferCall: To_Vesting_VestedTransferCall(param), + } + case 3: + return &pbgear.VestingPallet_ForceVestedTransferCall{ + ForceVestedTransferCall: To_Vesting_ForceVestedTransferCall(param), + } + case 4: + return &pbgear.VestingPallet_MergeSchedulesCall{ + MergeSchedulesCall: To_Vesting_MergeSchedulesCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } } - func To_Vesting_CompactTupleNull(in types.UCompact) *pbgear.Vesting_CompactTupleNull { - - out := &pbgear.Vesting_CompactTupleNull{} - out.Value = To_TupleNull() - return out + +func To_Vesting_Address20(in any) *pbgear.Vesting_Address20 { + out := &pbgear.Vesting_Address20{} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message } + + + +func To_Vesting_Address32(in any) *pbgear.Vesting_Address32 { + out := &pbgear.Vesting_Address32{} + v := in.(registry.Valuable) + _ = v - func To_Vesting_ForceVestedTransferCall(in registry.DecodedFields) *pbgear.Vesting_ForceVestedTransferCall { + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Vesting_ForceVestedTransferCall(in any) *pbgear.Vesting_ForceVestedTransferCall { out := &pbgear.Vesting_ForceVestedTransferCall{} - out.Source = To_Vesting_Source(fields[0].Value.(registry.DecodedFields)) - - out.Target = To_Vesting_Target(fields[1].Value.(registry.DecodedFields)) - - out.Schedule = To_Vesting_PalletVestingVestingInfoVestingInfo(fields[2].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field Source + out.Source = To_Vesting_ForceVestedTransferCall_source(v.ValueAt(0)) + // field Target + out.Target = To_Vesting_ForceVestedTransferCall_target(v.ValueAt(1)) + // field Schedule + out.Schedule = To_Vesting_ForceVestedTransferCall_schedule(v.ValueAt(2)) - func To_Vesting_Id(in registry.DecodedFields) *pbgear.Vesting_Id { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Vesting_Id{} - out.Value0 = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Vesting_ForceVestedTransferCall_source(in any) *pbgear.Vesting_Source { + v := in.(registry.Valuable) + return To_Vesting_Source(v.ValueAt(0) //simple field } +func To_Vesting_ForceVestedTransferCall_target(in any) *pbgear.Vesting_Target { + v := in.(registry.Valuable) + return To_Vesting_Target(v.ValueAt(0) //simple field +} +func To_Vesting_ForceVestedTransferCall_schedule(in any) *pbgear.Vesting_PalletVestingVestingInfoVestingInfo { + v := in.(registry.Valuable) + return To_Vesting_PalletVestingVestingInfoVestingInfo(v.ValueAt(0) //simple field +} + + +func To_Vesting_Id(in any) *pbgear.Vesting_Id { + out := &pbgear.Vesting_Id{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Vesting_Id_value0(v.ValueAt(0)) - func To_Vesting_Index(in registry.DecodedFields) *pbgear.Vesting_Index { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Vesting_Index{} - out.Value0 = To_Vesting_CompactTupleNull(fields[0].Value.(types.UCompact)) - - return out +func To_Vesting_Id_value0(in any) *pbgear.SpCoreCryptoAccountId32 { + v := in.(registry.Valuable) + return To_SpCoreCryptoAccountId32(v.ValueAt(0) //simple field } - func To_Vesting_MergeSchedulesCall(in registry.DecodedFields) *pbgear.Vesting_MergeSchedulesCall { + +func To_Vesting_Index(in any) *pbgear.Vesting_Index { + out := &pbgear.Vesting_Index{} + v := in.(registry.Valuable) + _ = v + + // field Value0 + out.Value0 = To_Vesting_Index_value0(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Vesting_MergeSchedulesCall{} - out.Schedule1Index = To_uint32(fields[0].Value.(registry.DecodedFields)) - - out.Schedule2Index = To_uint32(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Vesting_Index_value0(in any) *pbgear.Vesting_TupleNull { + v := in.(registry.Valuable) + return To_Vesting_TupleNull(v.ValueAt(0) //simple field } - func To_Vesting_PalletVestingVestingInfoVestingInfo(in registry.DecodedFields) *pbgear.Vesting_PalletVestingVestingInfoVestingInfo { + +func To_Vesting_MergeSchedulesCall(in any) *pbgear.Vesting_MergeSchedulesCall { + out := &pbgear.Vesting_MergeSchedulesCall{} + v := in.(registry.Valuable) + _ = v + + // primitive field Schedule1Index + out.Schedule1Index = To_uint32(v.ValueAt(0)) + // primitive field Schedule2Index + out.Schedule2Index = To_uint32(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Vesting_PalletVestingVestingInfoVestingInfo(in any) *pbgear.Vesting_PalletVestingVestingInfoVestingInfo { out := &pbgear.Vesting_PalletVestingVestingInfoVestingInfo{} - out.Locked = To_string(fields[0].Value.(registry.DecodedFields)) - - out.PerBlock = To_string(fields[1].Value.(registry.DecodedFields)) - - out.StartingBlock = To_uint32(fields[2].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Vesting_Raw(in registry.DecodedFields) *pbgear.Vesting_Raw { + // primitive field Locked + out.Locked = To_string(v.ValueAt(0)) + // primitive field PerBlock + out.PerBlock = To_string(v.ValueAt(1)) + // primitive field StartingBlock + out.StartingBlock = To_uint32(v.ValueAt(2)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Vesting_Raw(in any) *pbgear.Vesting_Raw { out := &pbgear.Vesting_Raw{} - out.Value0 = To_bytes(fields[0].Value.([]interface{})) - return out -} + v := in.(registry.Valuable) + _ = v + + // primitive field Value0 + out.Value0 = To_bytes(v.ValueAt(0)) - func To_Vesting_Source(in registry.DecodedFields) *pbgear.Vesting_Source { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Vesting_Source(in any) *pbgear.Vesting_Source { out := &pbgear.Vesting_Source{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.Vesting_Source_Id{ - Id: To_Vesting_Id(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Vesting_Source_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Vesting_Source_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Vesting_Source_Id{ + Id: To_Vesting_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.Vesting_Source_Index{ - Index: To_Vesting_Index(fields), //Passthrough fields... + case 1: + return &pbgear.Vesting_Source_Index{ + Index: To_Vesting_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.Vesting_Source_Raw{ - Raw: To_Vesting_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.Vesting_Source_Raw{ + Raw: To_Vesting_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.Vesting_Source_Address32{ - Address32: To_Vesting_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.Vesting_Source_Address32{ + Address32: To_Vesting_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.Vesting_Source_Address20{ - Address20: To_Vesting_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.Vesting_Source_Address20{ + Address20: To_Vesting_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Vesting_Target(in registry.DecodedFields) *pbgear.Vesting_Target { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Vesting_Target(in any) *pbgear.Vesting_Target { out := &pbgear.Vesting_Target{} - - switch { - case matchFields(fields, []int64{0}): - out.Value = &pbgear.Vesting_Target_Id{ - Id: To_Vesting_Id(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Value + v0 := To_OneOf_Vesting_Target_value(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Value").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Vesting_Target_value (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Vesting_Target_Id{ + Id: To_Vesting_Id(param), } - case matchFields(fields, []int64{95}): - out.Value = &pbgear.Vesting_Target_Index{ - Index: To_Vesting_Index(fields), //Passthrough fields... + case 1: + return &pbgear.Vesting_Target_Index{ + Index: To_Vesting_Index(param), } - case matchFields(fields, []int64{13}): - out.Value = &pbgear.Vesting_Target_Raw{ - Raw: To_Vesting_Raw(fields), //Passthrough fields... + case 2: + return &pbgear.Vesting_Target_Raw{ + Raw: To_Vesting_Raw(param), } - case matchFields(fields, []int64{1}): - out.Value = &pbgear.Vesting_Target_Address32{ - Address32: To_Vesting_Address32(fields), //Passthrough fields... + case 3: + return &pbgear.Vesting_Target_Address32{ + Address32: To_Vesting_Address32(param), } - case matchFields(fields, []int64{96}): - out.Value = &pbgear.Vesting_Target_Address20{ - Address20: To_Vesting_Address20(fields), //Passthrough fields... + case 4: + return &pbgear.Vesting_Target_Address20{ + Address20: To_Vesting_Address20(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out } - func To_Vesting_VestCall(in registry.DecodedFields) *pbgear.Vesting_VestCall { + +func To_Vesting_TupleNull(in any) *pbgear.Vesting_TupleNull { + out := &pbgear.Vesting_TupleNull{} + v := in.(registry.Valuable) + _ = v + + // field Value + out.Value = To_Vesting_TupleNull_value(v.ValueAt(0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Vesting_VestCall{} - return out +func To_Vesting_TupleNull_value(in any) *pbgear.TupleNull { + v := in.(registry.Valuable) + return To_TupleNull(v.ValueAt(0) //simple field } - func To_Vesting_VestOtherCall(in registry.DecodedFields) *pbgear.Vesting_VestOtherCall { + +func To_Vesting_VestCall(in any) *pbgear.Vesting_VestCall { + out := &pbgear.Vesting_VestCall{} + v := in.(registry.Valuable) + _ = v + + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields + + +func To_Vesting_VestOtherCall(in any) *pbgear.Vesting_VestOtherCall { out := &pbgear.Vesting_VestOtherCall{} - out.Target = To_Vesting_Target(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Vesting_VestedTransferCall(in registry.DecodedFields) *pbgear.Vesting_VestedTransferCall { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Vesting_VestedTransferCall{} - out.Target = To_Vesting_Target(fields[0].Value.(registry.DecodedFields)) - - out.Schedule = To_Vesting_PalletVestingVestingInfoVestingInfo(fields[1].Value.(registry.DecodedFields)) - - return out -} + // field Target + out.Target = To_Vesting_VestOtherCall_target(v.ValueAt(0)) - func To_Vesting_VestingCompletedEvent(in registry.DecodedFields) *pbgear.Vesting_VestingCompletedEvent { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Vesting_VestingCompletedEvent{} - out.Account = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - return out +func To_Vesting_VestOtherCall_target(in any) *pbgear.Vesting_Target { + v := in.(registry.Valuable) + return To_Vesting_Target(v.ValueAt(0) //simple field } - func To_Vesting_VestingUpdatedEvent(in registry.DecodedFields) *pbgear.Vesting_VestingUpdatedEvent { + +func To_Vesting_VestedTransferCall(in any) *pbgear.Vesting_VestedTransferCall { + out := &pbgear.Vesting_VestedTransferCall{} + v := in.(registry.Valuable) + _ = v + + // field Target + out.Target = To_Vesting_VestedTransferCall_target(v.ValueAt(0)) + // field Schedule + out.Schedule = To_Vesting_VestedTransferCall_schedule(v.ValueAt(1)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Vesting_VestingUpdatedEvent{} - out.Account = To_SpCoreCryptoAccountId32(fields[0].Value.(registry.DecodedFields)) - - out.Unvested = To_string(fields[1].Value.(registry.DecodedFields)) - - return out +func To_Vesting_VestedTransferCall_target(in any) *pbgear.Vesting_Target { + v := in.(registry.Valuable) + return To_Vesting_Target(v.ValueAt(0) //simple field +} +func To_Vesting_VestedTransferCall_schedule(in any) *pbgear.Vesting_PalletVestingVestingInfoVestingInfo { + v := in.(registry.Valuable) + return To_Vesting_PalletVestingVestingInfoVestingInfo(v.ValueAt(0) //simple field } - func To_Whitelist_CallWhitelistedEvent(in registry.DecodedFields) *pbgear.Whitelist_CallWhitelistedEvent { + +func To_WhitelistPallet(in any) *pbgear.WhitelistPallet { + out := &pbgear.WhitelistPallet{} + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_WhitelistPallet_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Whitelist_CallWhitelistedEvent{} - out.CallHash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - return out +func To_OneOf_WhitelistPallet_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.WhitelistPallet_WhitelistCallCall{ + WhitelistCallCall: To_Whitelist_WhitelistCallCall(param), + } + case 1: + return &pbgear.WhitelistPallet_RemoveWhitelistedCallCall{ + RemoveWhitelistedCallCall: To_Whitelist_RemoveWhitelistedCallCall(param), + } + case 2: + return &pbgear.WhitelistPallet_DispatchWhitelistedCallCall{ + DispatchWhitelistedCallCall: To_Whitelist_DispatchWhitelistedCallCall(param), + } + case 3: + return &pbgear.WhitelistPallet_DispatchWhitelistedCallWithPreimageCall{ + DispatchWhitelistedCallWithPreimageCall: To_Whitelist_DispatchWhitelistedCallWithPreimageCall(param), + } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) + } } - func To_Whitelist_DispatchWhitelistedCallCall(in registry.DecodedFields) *pbgear.Whitelist_DispatchWhitelistedCallCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Whitelist_DispatchWhitelistedCallCall(in any) *pbgear.Whitelist_DispatchWhitelistedCallCall { out := &pbgear.Whitelist_DispatchWhitelistedCallCall{} - out.CallHash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - out.CallEncodedLen = To_uint32(fields[1].Value.(registry.DecodedFields)) - - out.CallWeightWitness = To_SpWeightsWeightV2Weight(fields[2].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field CallHash + out.CallHash = To_Whitelist_DispatchWhitelistedCallCall_call_hash(v.ValueAt(0)) + // primitive field CallEncodedLen + out.CallEncodedLen = To_uint32(v.ValueAt(1)) + // field CallWeightWitness + out.CallWeightWitness = To_Whitelist_DispatchWhitelistedCallCall_call_weight_witness(v.ValueAt(2)) - func To_Whitelist_DispatchWhitelistedCallWithPreimageCall(in registry.DecodedFields) *pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields +func To_Whitelist_DispatchWhitelistedCallCall_call_hash(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field +} +func To_Whitelist_DispatchWhitelistedCallCall_call_weight_witness(in any) *pbgear.SpWeightsWeightV2Weight { + v := in.(registry.Valuable) + return To_SpWeightsWeightV2Weight(v.ValueAt(0) //simple field +} + + +func To_Whitelist_DispatchWhitelistedCallWithPreimageCall(in any) *pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall { out := &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall{} - - switch { - case matchFields(fields, []int64{66}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_SystemRemark{ - SystemRemark: To_System_RemarkCall(fields), //Passthrough fields... + v := in.(registry.Valuable) + _ = v + + // oneOf field Call + v0 := To_OneOf_Whitelist_DispatchWhitelistedCallWithPreimageCall_call(v.ValueAt(0)) + reflect.ValueOf(out).Elem().FieldByName("Call").Set(reflect.ValueOf(v0)) + + return out //from message +} + +func To_OneOf_Whitelist_DispatchWhitelistedCallWithPreimageCall_call (in any) any { + variantIn := in.(*registry.VariantWTF) + param := variantIn.Value + + switch variantIn.VariantByte { + case 0: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_System{ + System: To_SystemPallet(param), } - case matchFields(fields, []int64{70}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_SystemSetHeapPages{ - SystemSetHeapPages: To_System_SetHeapPagesCall(fields), //Passthrough fields... + case 1: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Timestamp{ + Timestamp: To_TimestampPallet(param), } - case matchFields(fields, []int64{71}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_SystemSetCode{ - SystemSetCode: To_System_SetCodeCall(fields), //Passthrough fields... + case 3: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Babe{ + Babe: To_BabePallet(param), } - case matchFields(fields, []int64{81}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_SystemSetCodeWithoutChecks{ - SystemSetCodeWithoutChecks: To_System_SetCodeWithoutChecksCall(fields), //Passthrough fields... + case 4: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Grandpa{ + Grandpa: To_GrandpaPallet(param), } - case matchFields(fields, []int64{93}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_SystemSetStorage{ - SystemSetStorage: To_System_SetStorageCall(fields), //Passthrough fields... + case 5: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Balances{ + Balances: To_BalancesPallet(param), } - case matchFields(fields, []int64{98}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_SystemKillStorage{ - SystemKillStorage: To_System_KillStorageCall(fields), //Passthrough fields... + case 10: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Vesting{ + Vesting: To_VestingPallet(param), } - case matchFields(fields, []int64{100}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_SystemKillPrefix{ - SystemKillPrefix: To_System_KillPrefixCall(fields), //Passthrough fields... + case 11: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_BagsList{ + BagsList: To_BagsListPallet(param), } - case matchFields(fields, []int64{101}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_SystemRemarkWithEvent{ - SystemRemarkWithEvent: To_System_RemarkWithEventCall(fields), //Passthrough fields... + case 12: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_ImOnline{ + ImOnline: To_ImOnlinePallet(param), } - case matchFields(fields, []int64{105}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_TimestampSet{ - TimestampSet: To_Timestamp_SetCall(fields), //Passthrough fields... + case 13: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Staking{ + Staking: To_StakingPallet(param), } - case matchFields(fields, []int64{113}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_BabeReportEquivocation{ - BabeReportEquivocation: To_Babe_ReportEquivocationCall(fields), //Passthrough fields... + case 7: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Session{ + Session: To_SessionPallet(param), } - case matchFields(fields, []int64{116}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_BabeReportEquivocationUnsigned{ - BabeReportEquivocationUnsigned: To_Babe_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 14: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Treasury{ + Treasury: To_TreasuryPallet(param), } - case matchFields(fields, []int64{118}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_BabePlanConfigChange{ - BabePlanConfigChange: To_Babe_PlanConfigChangeCall(fields), //Passthrough fields... + case 8: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Utility{ + Utility: To_UtilityPallet(param), } - case matchFields(fields, []int64{124}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_GrandpaReportEquivocation{ - GrandpaReportEquivocation: To_Grandpa_ReportEquivocationCall(fields), //Passthrough fields... + case 16: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_ConvictionVoting{ + ConvictionVoting: To_ConvictionVotingPallet(param), } - case matchFields(fields, []int64{129}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_GrandpaReportEquivocationUnsigned{ - GrandpaReportEquivocationUnsigned: To_Grandpa_ReportEquivocationUnsignedCall(fields), //Passthrough fields... + case 17: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Referenda{ + Referenda: To_ReferendaPallet(param), } - case matchFields(fields, []int64{132}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_GrandpaNoteStalled{ - GrandpaNoteStalled: To_Grandpa_NoteStalledCall(fields), //Passthrough fields... + case 18: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_FellowshipCollective{ + FellowshipCollective: To_FellowshipCollectivePallet(param), } - case matchFields(fields, []int64{133}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_BalancesTransferAllowDeath{ - BalancesTransferAllowDeath: To_Balances_TransferAllowDeathCall(fields), //Passthrough fields... + case 19: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_FellowshipReferenda{ + FellowshipReferenda: To_FellowshipReferendaPallet(param), } - case matchFields(fields, []int64{134}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_BalancesForceTransfer{ - BalancesForceTransfer: To_Balances_ForceTransferCall(fields), //Passthrough fields... + case 21: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Whitelist{ + Whitelist: To_WhitelistPallet(param), } - case matchFields(fields, []int64{135}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_BalancesTransferKeepAlive{ - BalancesTransferKeepAlive: To_Balances_TransferKeepAliveCall(fields), //Passthrough fields... + case 22: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Scheduler{ + Scheduler: To_SchedulerPallet(param), } - case matchFields(fields, []int64{138}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_BalancesTransferAll{ - BalancesTransferAll: To_Balances_TransferAllCall(fields), //Passthrough fields... + case 23: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Preimage{ + Preimage: To_PreimagePallet(param), } - case matchFields(fields, []int64{140}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_BalancesForceUnreserve{ - BalancesForceUnreserve: To_Balances_ForceUnreserveCall(fields), //Passthrough fields... + case 24: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Identity{ + Identity: To_IdentityPallet(param), } - case matchFields(fields, []int64{182}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_BalancesUpgradeAccounts{ - BalancesUpgradeAccounts: To_Balances_UpgradeAccountsCall(fields), //Passthrough fields... + case 25: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Proxy{ + Proxy: To_ProxyPallet(param), } - case matchFields(fields, []int64{185}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_BalancesForceSetBalance{ - BalancesForceSetBalance: To_Balances_ForceSetBalanceCall(fields), //Passthrough fields... + case 26: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Multisig{ + Multisig: To_MultisigPallet(param), } - case matchFields(fields, []int64{188}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_VestingVest{ - VestingVest: To_Vesting_VestCall(fields), //Passthrough fields... + case 27: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_ElectionProviderMultiPhase{ + ElectionProviderMultiPhase: To_ElectionProviderMultiPhasePallet(param), } - case matchFields(fields, []int64{249}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_VestingVestOther{ - VestingVestOther: To_Vesting_VestOtherCall(fields), //Passthrough fields... + case 29: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Bounties{ + Bounties: To_BountiesPallet(param), } - case matchFields(fields, []int64{250}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_VestingVestedTransfer{ - VestingVestedTransfer: To_Vesting_VestedTransferCall(fields), //Passthrough fields... + case 30: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_ChildBounties{ + ChildBounties: To_ChildBountiesPallet(param), } - case matchFields(fields, []int64{251}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_VestingForceVestedTransfer{ - VestingForceVestedTransfer: To_Vesting_ForceVestedTransferCall(fields), //Passthrough fields... + case 31: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_NominationPools{ + NominationPools: To_NominationPoolsPallet(param), } - case matchFields(fields, []int64{262}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_VestingMergeSchedules{ - VestingMergeSchedules: To_Vesting_MergeSchedulesCall(fields), //Passthrough fields... + case 104: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_Gear{ + Gear: To_GearPallet(param), } - case matchFields(fields, []int64{267}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_BagsListRebag{ - BagsListRebag: To_BagsList_RebagCall(fields), //Passthrough fields... + case 106: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_StakingRewards{ + StakingRewards: To_StakingRewardsPallet(param), } - case matchFields(fields, []int64{268}): - out.Call = &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_BagsListPutInFrontOf{ - BagsListPutInFrontOf: To_BagsList_PutInFrontOfCall(fields), //Passthrough fields... + case 107: + return &pbgear.Whitelist_DispatchWhitelistedCallWithPreimageCall_GearVoucher{ + GearVoucher: To_GearVoucherPallet(param), } + default: + panic(fmt.Sprintf("Unknown variant byte: %d", variantIn.VariantByte)) } - return out -} - - func To_Whitelist_Err(in registry.DecodedFields) *pbgear.Whitelist_Err { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Whitelist_Err{} - out.Value0 = To_SpRuntimeDispatchErrorWithPostInfo(fields[0].Value.(registry.DecodedFields)) - - return out } - func To_Whitelist_Ok(in registry.DecodedFields) *pbgear.Whitelist_Ok { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Whitelist_Ok{} - out.Value0 = To_FrameSupportDispatchPostDispatchInfo(fields[0].Value.(registry.DecodedFields)) - - return out -} - func To_Whitelist_RemoveWhitelistedCallCall(in registry.DecodedFields) *pbgear.Whitelist_RemoveWhitelistedCallCall { - - fields := []*registry.DecodedField(in) - _ = fields +func To_Whitelist_RemoveWhitelistedCallCall(in any) *pbgear.Whitelist_RemoveWhitelistedCallCall { out := &pbgear.Whitelist_RemoveWhitelistedCallCall{} - out.CallHash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v + + // field CallHash + out.CallHash = To_Whitelist_RemoveWhitelistedCallCall_call_hash(v.ValueAt(0)) - func To_Whitelist_Result(in registry.DecodedFields) *pbgear.Whitelist_Result { + return out //from message +} - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Whitelist_Result{} - - switch { - case matchFields(fields, []int64{287}): - out.Value = &pbgear.Whitelist_Result_Ok{ - Ok: To_Whitelist_Ok(fields), //Passthrough fields... - } - case matchFields(fields, []int64{289}): - out.Value = &pbgear.Whitelist_Result_Err{ - Err: To_Whitelist_Err(fields), //Passthrough fields... - } - } - return out +func To_Whitelist_RemoveWhitelistedCallCall_call_hash(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field } - func To_Whitelist_WhitelistCallCall(in registry.DecodedFields) *pbgear.Whitelist_WhitelistCallCall { - - fields := []*registry.DecodedField(in) - _ = fields + +func To_Whitelist_WhitelistCallCall(in any) *pbgear.Whitelist_WhitelistCallCall { out := &pbgear.Whitelist_WhitelistCallCall{} - out.CallHash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - return out -} + v := in.(registry.Valuable) + _ = v - func To_Whitelist_WhitelistedCallDispatchedEvent(in registry.DecodedFields) *pbgear.Whitelist_WhitelistedCallDispatchedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Whitelist_WhitelistedCallDispatchedEvent{} - out.CallHash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - out.Result = To_Whitelist_Result(fields[1].Value.(registry.DecodedFields)) - - return out -} + // field CallHash + out.CallHash = To_Whitelist_WhitelistCallCall_call_hash(v.ValueAt(0)) - func To_Whitelist_WhitelistedCallRemovedEvent(in registry.DecodedFields) *pbgear.Whitelist_WhitelistedCallRemovedEvent { - - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Whitelist_WhitelistedCallRemovedEvent{} - out.CallHash = To_PrimitiveTypesH256(fields[0].Value.(registry.DecodedFields)) - - return out + return out //from message } - - func To_Yes(in registry.DecodedFields) *pbgear.Yes { - fields := []*registry.DecodedField(in) - _ = fields - out := &pbgear.Yes{} - return out +func To_Whitelist_WhitelistCallCall_call_hash(in any) *pbgear.PrimitiveTypesH256 { + v := in.(registry.Valuable) + return To_PrimitiveTypesH256(v.ValueAt(0) //simple field } @@ -12838,84 +16503,738 @@ func To_repeated_ElectionProviderMultiPhase_TupleCompactUint32ElectionProviderMu -func matchFields(f registry.DecodedFields, ids []int64) bool { - fields := []*registry.DecodedField(f) - - if len(fields) != len(ids) { - return false - } - for i, f := range fields { - if ids[i] != f.LookupIndex{ - return false - } - } - return true -} -func To_bytes(f []interface{}) []byte { - var out []byte - for _, f := range f { - u := uint8(f.(types.U8)) - out = append(out, byte(u)) - } - return out -} -func To_string(f registry.DecodedFields) string { - fields := []*registry.DecodedField(f) - return string(To_bytes(fields[0].Value.([]interface{}))) -} -func To_uint32(f registry.DecodedFields) uint32 { - fields := []*registry.DecodedField(f) - return fields[0].Value.(uint32) -} -func To_uint64(f registry.DecodedFields) uint64 { - fields := []*registry.DecodedField(f) - return fields[0].Value.(uint64) -} -func To_bool(f registry.DecodedFields) bool { - fields := []*registry.DecodedField(f) - return fields[0].Value.(bool) +type Wrap struct { + Value registry.Valuable } -func To_optional_string(f registry.DecodedFields) *string { - fields := []*registry.DecodedField(f) - - s := string(To_bytes(fields[0].Value.([]interface{}))) - return &s +func (w Wrap) ValueAt(index int) any { + return w.Value } -func To_optional_uint32(f registry.DecodedFields) *uint32 { - fields := []*registry.DecodedField(f) - - return fields[0].Value.(*uint32) +func To_bytes(a any) []byte { + var items []any + switch in := a.(type) { + case registry.DecodedFields: + fields := []*registry.DecodedField(in) + items = fields[0].Value.([]any) + case []any: + items = in + default: + panic(fmt.Sprintf("Unsupported type %T", in)) + } + var out []byte + for _, i := range items { + u := uint8(i.(types.U8)) + out = append(out, byte(u)) + } + return out +} + +func To_string(i any) string { + switch v := i.(type) { + case types.UCompact: + return fmt.Sprintf("%d", v.Int64()) + case types.Text: + return string(v) + case types.U128: + return v.String() + case types.U256: + return v.String() + case types.I128: + return v.String() + case types.I256: + return v.String() + default: + panic("Unknown type") + } } -func To_optional_uint64(f registry.DecodedFields) *uint64 { - fields := []*registry.DecodedField(f) - - return fields[0].Value.(*uint64) +func To_uint32(i any) uint32 { + switch v := i.(type) { + case types.UCompact: + return uint32(v.Int64()) + case types.U8: + return uint32(v) + case types.U16: + return uint32(v) + case types.U32: + return uint32(v) + default: + panic("Unknown type") + } } -func To_optional_bool(f registry.DecodedFields) *bool { - fields := []*registry.DecodedField(f) +func To_Optional_uint32(i any) *uint32 { + o := To_uint32(i) + return &o +} + +func To_uint64(a any) uint64 { + switch v := a.(type) { + case types.UCompact: + return uint64(v.Int64()) + case types.U8: + return uint64(v) + case types.U16: + return uint64(v) + case types.U32: + return uint64(v) + case types.U64: + return uint64(v) + case uint8: + return uint64(v) + case uint16: + return uint64(v) + case uint32: + return uint64(v) + case uint64: + return uint64(v) + default: + panic("Unknown type") + } +} - return fields[0].Value.(*bool) +func To_Optional_uint64(i any) *uint64 { + o := To_uint64(i) + return &o } -func To_repeated_uint32(f registry.DecodedFields) []uint32 { - fields := []*registry.DecodedField(f) +func To_Optional_string(a any) *string { + s := To_string(a) + return &s +} - var out []uint32 - for _, f := range fields { - out = append(out, f.Value.(uint32)) - } - return out +func To_bool(b any) bool { + return b.(bool) +} + +func To_Optional_bool(b any) *bool { + o := To_bool(b) + return &o +} + +func To_Repeated_uint32(a any) []uint32 { + panic("To_repeated_uint32") +} + +var FuncMap map[string]reflect.Value +func init(){ + FuncMap = make(map[string]reflect.Value) + FuncMap["To_AllowedSlots"] = reflect.ValueOf(To_AllowedSlots) + FuncMap["To_AuthorityDiscoveryPallet"] = reflect.ValueOf(To_AuthorityDiscoveryPallet) + FuncMap["To_AuthorshipPallet"] = reflect.ValueOf(To_AuthorshipPallet) + FuncMap["To_BTreeSet"] = reflect.ValueOf(To_BTreeSet) + FuncMap["To_BabePallet"] = reflect.ValueOf(To_BabePallet) + FuncMap["To_Babe_BabeTrieNodesList"] = reflect.ValueOf(To_Babe_BabeTrieNodesList) + FuncMap["To_Babe_Config"] = reflect.ValueOf(To_Babe_Config) + FuncMap["To_Babe_Consensus"] = reflect.ValueOf(To_Babe_Consensus) + FuncMap["To_Babe_Logs"] = reflect.ValueOf(To_Babe_Logs) + FuncMap["To_Babe_Other"] = reflect.ValueOf(To_Babe_Other) + FuncMap["To_Babe_PlanConfigChangeCall"] = reflect.ValueOf(To_Babe_PlanConfigChangeCall) + FuncMap["To_Babe_PreRuntime"] = reflect.ValueOf(To_Babe_PreRuntime) + FuncMap["To_Babe_ReportEquivocationCall"] = reflect.ValueOf(To_Babe_ReportEquivocationCall) + FuncMap["To_Babe_ReportEquivocationUnsignedCall"] = reflect.ValueOf(To_Babe_ReportEquivocationUnsignedCall) + FuncMap["To_Babe_RuntimeEnvironmentUpdated"] = reflect.ValueOf(To_Babe_RuntimeEnvironmentUpdated) + FuncMap["To_Babe_Seal"] = reflect.ValueOf(To_Babe_Seal) + FuncMap["To_Babe_TupleUint64Uint64"] = reflect.ValueOf(To_Babe_TupleUint64Uint64) + FuncMap["To_Babe_V1"] = reflect.ValueOf(To_Babe_V1) + FuncMap["To_BagsListPallet"] = reflect.ValueOf(To_BagsListPallet) + FuncMap["To_BagsList_Address20"] = reflect.ValueOf(To_BagsList_Address20) + FuncMap["To_BagsList_Address32"] = reflect.ValueOf(To_BagsList_Address32) + FuncMap["To_BagsList_Dislocated"] = reflect.ValueOf(To_BagsList_Dislocated) + FuncMap["To_BagsList_Heavier"] = reflect.ValueOf(To_BagsList_Heavier) + FuncMap["To_BagsList_Id"] = reflect.ValueOf(To_BagsList_Id) + FuncMap["To_BagsList_Index"] = reflect.ValueOf(To_BagsList_Index) + FuncMap["To_BagsList_Lighter"] = reflect.ValueOf(To_BagsList_Lighter) + FuncMap["To_BagsList_PutInFrontOfCall"] = reflect.ValueOf(To_BagsList_PutInFrontOfCall) + FuncMap["To_BagsList_PutInFrontOfOtherCall"] = reflect.ValueOf(To_BagsList_PutInFrontOfOtherCall) + FuncMap["To_BagsList_Raw"] = reflect.ValueOf(To_BagsList_Raw) + FuncMap["To_BagsList_RebagCall"] = reflect.ValueOf(To_BagsList_RebagCall) + FuncMap["To_BagsList_TupleNull"] = reflect.ValueOf(To_BagsList_TupleNull) + FuncMap["To_BalancesPallet"] = reflect.ValueOf(To_BalancesPallet) + FuncMap["To_Balances_Address20"] = reflect.ValueOf(To_Balances_Address20) + FuncMap["To_Balances_Address32"] = reflect.ValueOf(To_Balances_Address32) + FuncMap["To_Balances_Dest"] = reflect.ValueOf(To_Balances_Dest) + FuncMap["To_Balances_ForceSetBalanceCall"] = reflect.ValueOf(To_Balances_ForceSetBalanceCall) + FuncMap["To_Balances_ForceTransferCall"] = reflect.ValueOf(To_Balances_ForceTransferCall) + FuncMap["To_Balances_ForceUnreserveCall"] = reflect.ValueOf(To_Balances_ForceUnreserveCall) + FuncMap["To_Balances_Id"] = reflect.ValueOf(To_Balances_Id) + FuncMap["To_Balances_Index"] = reflect.ValueOf(To_Balances_Index) + FuncMap["To_Balances_Raw"] = reflect.ValueOf(To_Balances_Raw) + FuncMap["To_Balances_Source"] = reflect.ValueOf(To_Balances_Source) + FuncMap["To_Balances_TransferAllCall"] = reflect.ValueOf(To_Balances_TransferAllCall) + FuncMap["To_Balances_TransferAllowDeathCall"] = reflect.ValueOf(To_Balances_TransferAllowDeathCall) + FuncMap["To_Balances_TransferKeepAliveCall"] = reflect.ValueOf(To_Balances_TransferKeepAliveCall) + FuncMap["To_Balances_TupleNull"] = reflect.ValueOf(To_Balances_TupleNull) + FuncMap["To_Balances_UpgradeAccountsCall"] = reflect.ValueOf(To_Balances_UpgradeAccountsCall) + FuncMap["To_Balances_Who"] = reflect.ValueOf(To_Balances_Who) + FuncMap["To_BoundedCollectionsBoundedVecBoundedVec"] = reflect.ValueOf(To_BoundedCollectionsBoundedVecBoundedVec) + FuncMap["To_BountiesPallet"] = reflect.ValueOf(To_BountiesPallet) + FuncMap["To_Bounties_AcceptCuratorCall"] = reflect.ValueOf(To_Bounties_AcceptCuratorCall) + FuncMap["To_Bounties_Address20"] = reflect.ValueOf(To_Bounties_Address20) + FuncMap["To_Bounties_Address32"] = reflect.ValueOf(To_Bounties_Address32) + FuncMap["To_Bounties_ApproveBountyCall"] = reflect.ValueOf(To_Bounties_ApproveBountyCall) + FuncMap["To_Bounties_AwardBountyCall"] = reflect.ValueOf(To_Bounties_AwardBountyCall) + FuncMap["To_Bounties_Beneficiary"] = reflect.ValueOf(To_Bounties_Beneficiary) + FuncMap["To_Bounties_ClaimBountyCall"] = reflect.ValueOf(To_Bounties_ClaimBountyCall) + FuncMap["To_Bounties_CloseBountyCall"] = reflect.ValueOf(To_Bounties_CloseBountyCall) + FuncMap["To_Bounties_Curator"] = reflect.ValueOf(To_Bounties_Curator) + FuncMap["To_Bounties_ExtendBountyExpiryCall"] = reflect.ValueOf(To_Bounties_ExtendBountyExpiryCall) + FuncMap["To_Bounties_Id"] = reflect.ValueOf(To_Bounties_Id) + FuncMap["To_Bounties_Index"] = reflect.ValueOf(To_Bounties_Index) + FuncMap["To_Bounties_ProposeBountyCall"] = reflect.ValueOf(To_Bounties_ProposeBountyCall) + FuncMap["To_Bounties_ProposeCuratorCall"] = reflect.ValueOf(To_Bounties_ProposeCuratorCall) + FuncMap["To_Bounties_Raw"] = reflect.ValueOf(To_Bounties_Raw) + FuncMap["To_Bounties_TupleNull"] = reflect.ValueOf(To_Bounties_TupleNull) + FuncMap["To_Bounties_UnassignCuratorCall"] = reflect.ValueOf(To_Bounties_UnassignCuratorCall) + FuncMap["To_ChildBountiesPallet"] = reflect.ValueOf(To_ChildBountiesPallet) + FuncMap["To_ChildBounties_AcceptCuratorCall"] = reflect.ValueOf(To_ChildBounties_AcceptCuratorCall) + FuncMap["To_ChildBounties_AddChildBountyCall"] = reflect.ValueOf(To_ChildBounties_AddChildBountyCall) + FuncMap["To_ChildBounties_Address20"] = reflect.ValueOf(To_ChildBounties_Address20) + FuncMap["To_ChildBounties_Address32"] = reflect.ValueOf(To_ChildBounties_Address32) + FuncMap["To_ChildBounties_AwardChildBountyCall"] = reflect.ValueOf(To_ChildBounties_AwardChildBountyCall) + FuncMap["To_ChildBounties_Beneficiary"] = reflect.ValueOf(To_ChildBounties_Beneficiary) + FuncMap["To_ChildBounties_ClaimChildBountyCall"] = reflect.ValueOf(To_ChildBounties_ClaimChildBountyCall) + FuncMap["To_ChildBounties_CloseChildBountyCall"] = reflect.ValueOf(To_ChildBounties_CloseChildBountyCall) + FuncMap["To_ChildBounties_Curator"] = reflect.ValueOf(To_ChildBounties_Curator) + FuncMap["To_ChildBounties_Id"] = reflect.ValueOf(To_ChildBounties_Id) + FuncMap["To_ChildBounties_Index"] = reflect.ValueOf(To_ChildBounties_Index) + FuncMap["To_ChildBounties_ProposeCuratorCall"] = reflect.ValueOf(To_ChildBounties_ProposeCuratorCall) + FuncMap["To_ChildBounties_Raw"] = reflect.ValueOf(To_ChildBounties_Raw) + FuncMap["To_ChildBounties_TupleNull"] = reflect.ValueOf(To_ChildBounties_TupleNull) + FuncMap["To_ChildBounties_UnassignCuratorCall"] = reflect.ValueOf(To_ChildBounties_UnassignCuratorCall) + FuncMap["To_ConvictionVotingPallet"] = reflect.ValueOf(To_ConvictionVotingPallet) + FuncMap["To_ConvictionVoting_Address20"] = reflect.ValueOf(To_ConvictionVoting_Address20) + FuncMap["To_ConvictionVoting_Address32"] = reflect.ValueOf(To_ConvictionVoting_Address32) + FuncMap["To_ConvictionVoting_Conviction"] = reflect.ValueOf(To_ConvictionVoting_Conviction) + FuncMap["To_ConvictionVoting_DelegateCall"] = reflect.ValueOf(To_ConvictionVoting_DelegateCall) + FuncMap["To_ConvictionVoting_Id"] = reflect.ValueOf(To_ConvictionVoting_Id) + FuncMap["To_ConvictionVoting_Index"] = reflect.ValueOf(To_ConvictionVoting_Index) + FuncMap["To_ConvictionVoting_Locked1X"] = reflect.ValueOf(To_ConvictionVoting_Locked1X) + FuncMap["To_ConvictionVoting_Locked2X"] = reflect.ValueOf(To_ConvictionVoting_Locked2X) + FuncMap["To_ConvictionVoting_Locked3X"] = reflect.ValueOf(To_ConvictionVoting_Locked3X) + FuncMap["To_ConvictionVoting_Locked4X"] = reflect.ValueOf(To_ConvictionVoting_Locked4X) + FuncMap["To_ConvictionVoting_Locked5X"] = reflect.ValueOf(To_ConvictionVoting_Locked5X) + FuncMap["To_ConvictionVoting_Locked6X"] = reflect.ValueOf(To_ConvictionVoting_Locked6X) + FuncMap["To_ConvictionVoting_None"] = reflect.ValueOf(To_ConvictionVoting_None) + FuncMap["To_ConvictionVoting_PalletConvictionVotingVoteVote"] = reflect.ValueOf(To_ConvictionVoting_PalletConvictionVotingVoteVote) + FuncMap["To_ConvictionVoting_Raw"] = reflect.ValueOf(To_ConvictionVoting_Raw) + FuncMap["To_ConvictionVoting_RemoveOtherVoteCall"] = reflect.ValueOf(To_ConvictionVoting_RemoveOtherVoteCall) + FuncMap["To_ConvictionVoting_RemoveVoteCall"] = reflect.ValueOf(To_ConvictionVoting_RemoveVoteCall) + FuncMap["To_ConvictionVoting_Split"] = reflect.ValueOf(To_ConvictionVoting_Split) + FuncMap["To_ConvictionVoting_SplitAbstain"] = reflect.ValueOf(To_ConvictionVoting_SplitAbstain) + FuncMap["To_ConvictionVoting_Standard"] = reflect.ValueOf(To_ConvictionVoting_Standard) + FuncMap["To_ConvictionVoting_Target"] = reflect.ValueOf(To_ConvictionVoting_Target) + FuncMap["To_ConvictionVoting_To"] = reflect.ValueOf(To_ConvictionVoting_To) + FuncMap["To_ConvictionVoting_TupleNull"] = reflect.ValueOf(To_ConvictionVoting_TupleNull) + FuncMap["To_ConvictionVoting_UndelegateCall"] = reflect.ValueOf(To_ConvictionVoting_UndelegateCall) + FuncMap["To_ConvictionVoting_UnlockCall"] = reflect.ValueOf(To_ConvictionVoting_UnlockCall) + FuncMap["To_ConvictionVoting_Vote"] = reflect.ValueOf(To_ConvictionVoting_Vote) + FuncMap["To_ConvictionVoting_VoteCall"] = reflect.ValueOf(To_ConvictionVoting_VoteCall) + FuncMap["To_ElectionProviderMultiPhasePallet"] = reflect.ValueOf(To_ElectionProviderMultiPhasePallet) + FuncMap["To_ElectionProviderMultiPhase_GovernanceFallbackCall"] = reflect.ValueOf(To_ElectionProviderMultiPhase_GovernanceFallbackCall) + FuncMap["To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution"] = reflect.ValueOf(To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseRawSolution) + FuncMap["To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseSolutionOrSnapshotSize"] = reflect.ValueOf(To_ElectionProviderMultiPhase_PalletElectionProviderMultiPhaseSolutionOrSnapshotSize) + FuncMap["To_ElectionProviderMultiPhase_SetEmergencyElectionResultCall"] = reflect.ValueOf(To_ElectionProviderMultiPhase_SetEmergencyElectionResultCall) + FuncMap["To_ElectionProviderMultiPhase_SetMinimumUntrustedScoreCall"] = reflect.ValueOf(To_ElectionProviderMultiPhase_SetMinimumUntrustedScoreCall) + FuncMap["To_ElectionProviderMultiPhase_SubmitCall"] = reflect.ValueOf(To_ElectionProviderMultiPhase_SubmitCall) + FuncMap["To_ElectionProviderMultiPhase_SubmitUnsignedCall"] = reflect.ValueOf(To_ElectionProviderMultiPhase_SubmitUnsignedCall) + FuncMap["To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32SpNposElectionsSupport) + FuncMap["To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleSpCoreCryptoAccountId32String) + FuncMap["To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes10Listuint32"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes10Listuint32) + FuncMap["To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes11Listuint32"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes11Listuint32) + FuncMap["To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes12Listuint32"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes12Listuint32) + FuncMap["To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes13Listuint32"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes13Listuint32) + FuncMap["To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes14Listuint32"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes14Listuint32) + FuncMap["To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes15Listuint32"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes15Listuint32) + FuncMap["To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes16Listuint32"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes16Listuint32) + FuncMap["To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes3Listuint32"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes3Listuint32) + FuncMap["To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes4Listuint32"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes4Listuint32) + FuncMap["To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes5Listuint32"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes5Listuint32) + FuncMap["To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes6Listuint32"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes6Listuint32) + FuncMap["To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes7Listuint32"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes7Listuint32) + FuncMap["To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes8Listuint32"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes8Listuint32) + FuncMap["To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes9Listuint32"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleUint32ElectionProviderMultiPhaseVotes9Listuint32) + FuncMap["To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleUint32SpArithmeticPerThingsPerU16) + FuncMap["To_ElectionProviderMultiPhase_TupleUint32TupleUint32SpArithmeticPerThingsPerU16Uint32"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleUint32TupleUint32SpArithmeticPerThingsPerU16Uint32) + FuncMap["To_ElectionProviderMultiPhase_TupleUint32Uint32"] = reflect.ValueOf(To_ElectionProviderMultiPhase_TupleUint32Uint32) + FuncMap["To_FellowshipCollectivePallet"] = reflect.ValueOf(To_FellowshipCollectivePallet) + FuncMap["To_FellowshipCollective_AddMemberCall"] = reflect.ValueOf(To_FellowshipCollective_AddMemberCall) + FuncMap["To_FellowshipCollective_Address20"] = reflect.ValueOf(To_FellowshipCollective_Address20) + FuncMap["To_FellowshipCollective_Address32"] = reflect.ValueOf(To_FellowshipCollective_Address32) + FuncMap["To_FellowshipCollective_CleanupPollCall"] = reflect.ValueOf(To_FellowshipCollective_CleanupPollCall) + FuncMap["To_FellowshipCollective_DemoteMemberCall"] = reflect.ValueOf(To_FellowshipCollective_DemoteMemberCall) + FuncMap["To_FellowshipCollective_Id"] = reflect.ValueOf(To_FellowshipCollective_Id) + FuncMap["To_FellowshipCollective_Index"] = reflect.ValueOf(To_FellowshipCollective_Index) + FuncMap["To_FellowshipCollective_PromoteMemberCall"] = reflect.ValueOf(To_FellowshipCollective_PromoteMemberCall) + FuncMap["To_FellowshipCollective_Raw"] = reflect.ValueOf(To_FellowshipCollective_Raw) + FuncMap["To_FellowshipCollective_RemoveMemberCall"] = reflect.ValueOf(To_FellowshipCollective_RemoveMemberCall) + FuncMap["To_FellowshipCollective_TupleNull"] = reflect.ValueOf(To_FellowshipCollective_TupleNull) + FuncMap["To_FellowshipCollective_VoteCall"] = reflect.ValueOf(To_FellowshipCollective_VoteCall) + FuncMap["To_FellowshipCollective_Who"] = reflect.ValueOf(To_FellowshipCollective_Who) + FuncMap["To_FellowshipReferendaPallet"] = reflect.ValueOf(To_FellowshipReferendaPallet) + FuncMap["To_FellowshipReferenda_After"] = reflect.ValueOf(To_FellowshipReferenda_After) + FuncMap["To_FellowshipReferenda_At"] = reflect.ValueOf(To_FellowshipReferenda_At) + FuncMap["To_FellowshipReferenda_CancelCall"] = reflect.ValueOf(To_FellowshipReferenda_CancelCall) + FuncMap["To_FellowshipReferenda_EnactmentMoment"] = reflect.ValueOf(To_FellowshipReferenda_EnactmentMoment) + FuncMap["To_FellowshipReferenda_Inline"] = reflect.ValueOf(To_FellowshipReferenda_Inline) + FuncMap["To_FellowshipReferenda_KillCall"] = reflect.ValueOf(To_FellowshipReferenda_KillCall) + FuncMap["To_FellowshipReferenda_Legacy"] = reflect.ValueOf(To_FellowshipReferenda_Legacy) + FuncMap["To_FellowshipReferenda_Lookup"] = reflect.ValueOf(To_FellowshipReferenda_Lookup) + FuncMap["To_FellowshipReferenda_NudgeReferendumCall"] = reflect.ValueOf(To_FellowshipReferenda_NudgeReferendumCall) + FuncMap["To_FellowshipReferenda_OneFewerDecidingCall"] = reflect.ValueOf(To_FellowshipReferenda_OneFewerDecidingCall) + FuncMap["To_FellowshipReferenda_Origins"] = reflect.ValueOf(To_FellowshipReferenda_Origins) + FuncMap["To_FellowshipReferenda_PlaceDecisionDepositCall"] = reflect.ValueOf(To_FellowshipReferenda_PlaceDecisionDepositCall) + FuncMap["To_FellowshipReferenda_Proposal"] = reflect.ValueOf(To_FellowshipReferenda_Proposal) + FuncMap["To_FellowshipReferenda_ProposalOrigin"] = reflect.ValueOf(To_FellowshipReferenda_ProposalOrigin) + FuncMap["To_FellowshipReferenda_RefundDecisionDepositCall"] = reflect.ValueOf(To_FellowshipReferenda_RefundDecisionDepositCall) + FuncMap["To_FellowshipReferenda_RefundSubmissionDepositCall"] = reflect.ValueOf(To_FellowshipReferenda_RefundSubmissionDepositCall) + FuncMap["To_FellowshipReferenda_SetMetadataCall"] = reflect.ValueOf(To_FellowshipReferenda_SetMetadataCall) + FuncMap["To_FellowshipReferenda_SubmitCall"] = reflect.ValueOf(To_FellowshipReferenda_SubmitCall) + FuncMap["To_FellowshipReferenda_System"] = reflect.ValueOf(To_FellowshipReferenda_System) + FuncMap["To_FellowshipReferenda_Void"] = reflect.ValueOf(To_FellowshipReferenda_Void) + FuncMap["To_FinalityGrandpaEquivocation"] = reflect.ValueOf(To_FinalityGrandpaEquivocation) + FuncMap["To_FinalityGrandpaPrecommit"] = reflect.ValueOf(To_FinalityGrandpaPrecommit) + FuncMap["To_FinalityGrandpaPrevote"] = reflect.ValueOf(To_FinalityGrandpaPrevote) + FuncMap["To_GearBankPallet"] = reflect.ValueOf(To_GearBankPallet) + FuncMap["To_GearBuiltinPallet"] = reflect.ValueOf(To_GearBuiltinPallet) + FuncMap["To_GearGasPallet"] = reflect.ValueOf(To_GearGasPallet) + FuncMap["To_GearMessengerPallet"] = reflect.ValueOf(To_GearMessengerPallet) + FuncMap["To_GearPallet"] = reflect.ValueOf(To_GearPallet) + FuncMap["To_GearPaymentPallet"] = reflect.ValueOf(To_GearPaymentPallet) + FuncMap["To_GearProgramPallet"] = reflect.ValueOf(To_GearProgramPallet) + FuncMap["To_GearSchedulerPallet"] = reflect.ValueOf(To_GearSchedulerPallet) + FuncMap["To_GearVoucherPallet"] = reflect.ValueOf(To_GearVoucherPallet) + FuncMap["To_GearVoucher_AppendPrograms"] = reflect.ValueOf(To_GearVoucher_AppendPrograms) + FuncMap["To_GearVoucher_Call"] = reflect.ValueOf(To_GearVoucher_Call) + FuncMap["To_GearVoucher_CallCall"] = reflect.ValueOf(To_GearVoucher_CallCall) + FuncMap["To_GearVoucher_CallDeprecatedCall"] = reflect.ValueOf(To_GearVoucher_CallDeprecatedCall) + FuncMap["To_GearVoucher_DeclineCall"] = reflect.ValueOf(To_GearVoucher_DeclineCall) + FuncMap["To_GearVoucher_DeclineVoucher"] = reflect.ValueOf(To_GearVoucher_DeclineVoucher) + FuncMap["To_GearVoucher_IssueCall"] = reflect.ValueOf(To_GearVoucher_IssueCall) + FuncMap["To_GearVoucher_None"] = reflect.ValueOf(To_GearVoucher_None) + FuncMap["To_GearVoucher_PalletGearVoucherInternalVoucherId"] = reflect.ValueOf(To_GearVoucher_PalletGearVoucherInternalVoucherId) + FuncMap["To_GearVoucher_RevokeCall"] = reflect.ValueOf(To_GearVoucher_RevokeCall) + FuncMap["To_GearVoucher_SendMessage"] = reflect.ValueOf(To_GearVoucher_SendMessage) + FuncMap["To_GearVoucher_SendReply"] = reflect.ValueOf(To_GearVoucher_SendReply) + FuncMap["To_GearVoucher_Some"] = reflect.ValueOf(To_GearVoucher_Some) + FuncMap["To_GearVoucher_UpdateCall"] = reflect.ValueOf(To_GearVoucher_UpdateCall) + FuncMap["To_GearVoucher_UploadCode"] = reflect.ValueOf(To_GearVoucher_UploadCode) + FuncMap["To_Gear_ClaimValueCall"] = reflect.ValueOf(To_Gear_ClaimValueCall) + FuncMap["To_Gear_CreateProgramCall"] = reflect.ValueOf(To_Gear_CreateProgramCall) + FuncMap["To_Gear_RunCall"] = reflect.ValueOf(To_Gear_RunCall) + FuncMap["To_Gear_SendMessageCall"] = reflect.ValueOf(To_Gear_SendMessageCall) + FuncMap["To_Gear_SendReplyCall"] = reflect.ValueOf(To_Gear_SendReplyCall) + FuncMap["To_Gear_SetExecuteInherentCall"] = reflect.ValueOf(To_Gear_SetExecuteInherentCall) + FuncMap["To_Gear_UploadCodeCall"] = reflect.ValueOf(To_Gear_UploadCodeCall) + FuncMap["To_Gear_UploadProgramCall"] = reflect.ValueOf(To_Gear_UploadProgramCall) + FuncMap["To_GprimitivesActorId"] = reflect.ValueOf(To_GprimitivesActorId) + FuncMap["To_GprimitivesCodeId"] = reflect.ValueOf(To_GprimitivesCodeId) + FuncMap["To_GprimitivesMessageId"] = reflect.ValueOf(To_GprimitivesMessageId) + FuncMap["To_GrandpaPallet"] = reflect.ValueOf(To_GrandpaPallet) + FuncMap["To_Grandpa_Equivocation"] = reflect.ValueOf(To_Grandpa_Equivocation) + FuncMap["To_Grandpa_GrandpaTrieNodesList"] = reflect.ValueOf(To_Grandpa_GrandpaTrieNodesList) + FuncMap["To_Grandpa_NoteStalledCall"] = reflect.ValueOf(To_Grandpa_NoteStalledCall) + FuncMap["To_Grandpa_Precommit"] = reflect.ValueOf(To_Grandpa_Precommit) + FuncMap["To_Grandpa_Prevote"] = reflect.ValueOf(To_Grandpa_Prevote) + FuncMap["To_Grandpa_ReportEquivocationCall"] = reflect.ValueOf(To_Grandpa_ReportEquivocationCall) + FuncMap["To_Grandpa_ReportEquivocationUnsignedCall"] = reflect.ValueOf(To_Grandpa_ReportEquivocationUnsignedCall) + FuncMap["To_HistoricalPallet"] = reflect.ValueOf(To_HistoricalPallet) + FuncMap["To_IdentityPallet"] = reflect.ValueOf(To_IdentityPallet) + FuncMap["To_Identity_Account"] = reflect.ValueOf(To_Identity_Account) + FuncMap["To_Identity_AddRegistrarCall"] = reflect.ValueOf(To_Identity_AddRegistrarCall) + FuncMap["To_Identity_AddSubCall"] = reflect.ValueOf(To_Identity_AddSubCall) + FuncMap["To_Identity_Address20"] = reflect.ValueOf(To_Identity_Address20) + FuncMap["To_Identity_Address32"] = reflect.ValueOf(To_Identity_Address32) + FuncMap["To_Identity_BlakeTwo256"] = reflect.ValueOf(To_Identity_BlakeTwo256) + FuncMap["To_Identity_CancelRequestCall"] = reflect.ValueOf(To_Identity_CancelRequestCall) + FuncMap["To_Identity_ClearIdentityCall"] = reflect.ValueOf(To_Identity_ClearIdentityCall) + FuncMap["To_Identity_Data"] = reflect.ValueOf(To_Identity_Data) + FuncMap["To_Identity_Display"] = reflect.ValueOf(To_Identity_Display) + FuncMap["To_Identity_Email"] = reflect.ValueOf(To_Identity_Email) + FuncMap["To_Identity_Erroneous"] = reflect.ValueOf(To_Identity_Erroneous) + FuncMap["To_Identity_FeePaid"] = reflect.ValueOf(To_Identity_FeePaid) + FuncMap["To_Identity_Id"] = reflect.ValueOf(To_Identity_Id) + FuncMap["To_Identity_Image"] = reflect.ValueOf(To_Identity_Image) + FuncMap["To_Identity_Index"] = reflect.ValueOf(To_Identity_Index) + FuncMap["To_Identity_Judgement"] = reflect.ValueOf(To_Identity_Judgement) + FuncMap["To_Identity_Keccak256"] = reflect.ValueOf(To_Identity_Keccak256) + FuncMap["To_Identity_KillIdentityCall"] = reflect.ValueOf(To_Identity_KillIdentityCall) + FuncMap["To_Identity_KnownGood"] = reflect.ValueOf(To_Identity_KnownGood) + FuncMap["To_Identity_Legal"] = reflect.ValueOf(To_Identity_Legal) + FuncMap["To_Identity_LowQuality"] = reflect.ValueOf(To_Identity_LowQuality) + FuncMap["To_Identity_New"] = reflect.ValueOf(To_Identity_New) + FuncMap["To_Identity_None"] = reflect.ValueOf(To_Identity_None) + FuncMap["To_Identity_OutOfDate"] = reflect.ValueOf(To_Identity_OutOfDate) + FuncMap["To_Identity_PalletIdentitySimpleIdentityInfo"] = reflect.ValueOf(To_Identity_PalletIdentitySimpleIdentityInfo) + FuncMap["To_Identity_PalletIdentityTypesBitFlags"] = reflect.ValueOf(To_Identity_PalletIdentityTypesBitFlags) + FuncMap["To_Identity_ProvideJudgementCall"] = reflect.ValueOf(To_Identity_ProvideJudgementCall) + FuncMap["To_Identity_QuitSubCall"] = reflect.ValueOf(To_Identity_QuitSubCall) + FuncMap["To_Identity_Raw"] = reflect.ValueOf(To_Identity_Raw) + FuncMap["To_Identity_Raw0"] = reflect.ValueOf(To_Identity_Raw0) + FuncMap["To_Identity_Raw1"] = reflect.ValueOf(To_Identity_Raw1) + FuncMap["To_Identity_Raw10"] = reflect.ValueOf(To_Identity_Raw10) + FuncMap["To_Identity_Raw11"] = reflect.ValueOf(To_Identity_Raw11) + FuncMap["To_Identity_Raw12"] = reflect.ValueOf(To_Identity_Raw12) + FuncMap["To_Identity_Raw13"] = reflect.ValueOf(To_Identity_Raw13) + FuncMap["To_Identity_Raw14"] = reflect.ValueOf(To_Identity_Raw14) + FuncMap["To_Identity_Raw15"] = reflect.ValueOf(To_Identity_Raw15) + FuncMap["To_Identity_Raw16"] = reflect.ValueOf(To_Identity_Raw16) + FuncMap["To_Identity_Raw17"] = reflect.ValueOf(To_Identity_Raw17) + FuncMap["To_Identity_Raw18"] = reflect.ValueOf(To_Identity_Raw18) + FuncMap["To_Identity_Raw19"] = reflect.ValueOf(To_Identity_Raw19) + FuncMap["To_Identity_Raw2"] = reflect.ValueOf(To_Identity_Raw2) + FuncMap["To_Identity_Raw20"] = reflect.ValueOf(To_Identity_Raw20) + FuncMap["To_Identity_Raw21"] = reflect.ValueOf(To_Identity_Raw21) + FuncMap["To_Identity_Raw22"] = reflect.ValueOf(To_Identity_Raw22) + FuncMap["To_Identity_Raw23"] = reflect.ValueOf(To_Identity_Raw23) + FuncMap["To_Identity_Raw24"] = reflect.ValueOf(To_Identity_Raw24) + FuncMap["To_Identity_Raw25"] = reflect.ValueOf(To_Identity_Raw25) + FuncMap["To_Identity_Raw26"] = reflect.ValueOf(To_Identity_Raw26) + FuncMap["To_Identity_Raw27"] = reflect.ValueOf(To_Identity_Raw27) + FuncMap["To_Identity_Raw28"] = reflect.ValueOf(To_Identity_Raw28) + FuncMap["To_Identity_Raw29"] = reflect.ValueOf(To_Identity_Raw29) + FuncMap["To_Identity_Raw3"] = reflect.ValueOf(To_Identity_Raw3) + FuncMap["To_Identity_Raw30"] = reflect.ValueOf(To_Identity_Raw30) + FuncMap["To_Identity_Raw31"] = reflect.ValueOf(To_Identity_Raw31) + FuncMap["To_Identity_Raw32"] = reflect.ValueOf(To_Identity_Raw32) + FuncMap["To_Identity_Raw4"] = reflect.ValueOf(To_Identity_Raw4) + FuncMap["To_Identity_Raw5"] = reflect.ValueOf(To_Identity_Raw5) + FuncMap["To_Identity_Raw6"] = reflect.ValueOf(To_Identity_Raw6) + FuncMap["To_Identity_Raw7"] = reflect.ValueOf(To_Identity_Raw7) + FuncMap["To_Identity_Raw8"] = reflect.ValueOf(To_Identity_Raw8) + FuncMap["To_Identity_Raw9"] = reflect.ValueOf(To_Identity_Raw9) + FuncMap["To_Identity_Reasonable"] = reflect.ValueOf(To_Identity_Reasonable) + FuncMap["To_Identity_RemoveSubCall"] = reflect.ValueOf(To_Identity_RemoveSubCall) + FuncMap["To_Identity_RenameSubCall"] = reflect.ValueOf(To_Identity_RenameSubCall) + FuncMap["To_Identity_RequestJudgementCall"] = reflect.ValueOf(To_Identity_RequestJudgementCall) + FuncMap["To_Identity_Riot"] = reflect.ValueOf(To_Identity_Riot) + FuncMap["To_Identity_SetAccountIdCall"] = reflect.ValueOf(To_Identity_SetAccountIdCall) + FuncMap["To_Identity_SetFeeCall"] = reflect.ValueOf(To_Identity_SetFeeCall) + FuncMap["To_Identity_SetFieldsCall"] = reflect.ValueOf(To_Identity_SetFieldsCall) + FuncMap["To_Identity_SetIdentityCall"] = reflect.ValueOf(To_Identity_SetIdentityCall) + FuncMap["To_Identity_SetSubsCall"] = reflect.ValueOf(To_Identity_SetSubsCall) + FuncMap["To_Identity_Sha256"] = reflect.ValueOf(To_Identity_Sha256) + FuncMap["To_Identity_ShaThree256"] = reflect.ValueOf(To_Identity_ShaThree256) + FuncMap["To_Identity_Sub"] = reflect.ValueOf(To_Identity_Sub) + FuncMap["To_Identity_Target"] = reflect.ValueOf(To_Identity_Target) + FuncMap["To_Identity_TupleNull"] = reflect.ValueOf(To_Identity_TupleNull) + FuncMap["To_Identity_TuplePalletIdentityTypesDatapalletIdentityTypesData"] = reflect.ValueOf(To_Identity_TuplePalletIdentityTypesDatapalletIdentityTypesData) + FuncMap["To_Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData"] = reflect.ValueOf(To_Identity_TupleSpCoreCryptoAccountId32PalletIdentityTypesData) + FuncMap["To_Identity_Twitter"] = reflect.ValueOf(To_Identity_Twitter) + FuncMap["To_Identity_Unknown"] = reflect.ValueOf(To_Identity_Unknown) + FuncMap["To_Identity_Value0"] = reflect.ValueOf(To_Identity_Value0) + FuncMap["To_Identity_Value1"] = reflect.ValueOf(To_Identity_Value1) + FuncMap["To_Identity_Web"] = reflect.ValueOf(To_Identity_Web) + FuncMap["To_ImOnlinePallet"] = reflect.ValueOf(To_ImOnlinePallet) + FuncMap["To_ImOnline_HeartbeatCall"] = reflect.ValueOf(To_ImOnline_HeartbeatCall) + FuncMap["To_ImOnline_PalletImOnlineHeartbeat"] = reflect.ValueOf(To_ImOnline_PalletImOnlineHeartbeat) + FuncMap["To_ImOnline_PalletImOnlineSr25519AppSr25519Public"] = reflect.ValueOf(To_ImOnline_PalletImOnlineSr25519AppSr25519Public) + FuncMap["To_ImOnline_PalletImOnlineSr25519AppSr25519Signature"] = reflect.ValueOf(To_ImOnline_PalletImOnlineSr25519AppSr25519Signature) + FuncMap["To_MultisigPallet"] = reflect.ValueOf(To_MultisigPallet) + FuncMap["To_Multisig_ApproveAsMultiCall"] = reflect.ValueOf(To_Multisig_ApproveAsMultiCall) + FuncMap["To_Multisig_AsMultiCall"] = reflect.ValueOf(To_Multisig_AsMultiCall) + FuncMap["To_Multisig_AsMultiThreshold1Call"] = reflect.ValueOf(To_Multisig_AsMultiThreshold1Call) + FuncMap["To_Multisig_CancelAsMultiCall"] = reflect.ValueOf(To_Multisig_CancelAsMultiCall) + FuncMap["To_Multisig_PalletMultisigTimepoint"] = reflect.ValueOf(To_Multisig_PalletMultisigTimepoint) + FuncMap["To_NominationPoolsPallet"] = reflect.ValueOf(To_NominationPoolsPallet) + FuncMap["To_NominationPools_Address20"] = reflect.ValueOf(To_NominationPools_Address20) + FuncMap["To_NominationPools_Address32"] = reflect.ValueOf(To_NominationPools_Address32) + FuncMap["To_NominationPools_AdjustPoolDepositCall"] = reflect.ValueOf(To_NominationPools_AdjustPoolDepositCall) + FuncMap["To_NominationPools_Blocked"] = reflect.ValueOf(To_NominationPools_Blocked) + FuncMap["To_NominationPools_BondExtraCall"] = reflect.ValueOf(To_NominationPools_BondExtraCall) + FuncMap["To_NominationPools_BondExtraOtherCall"] = reflect.ValueOf(To_NominationPools_BondExtraOtherCall) + FuncMap["To_NominationPools_Bouncer"] = reflect.ValueOf(To_NominationPools_Bouncer) + FuncMap["To_NominationPools_ChillCall"] = reflect.ValueOf(To_NominationPools_ChillCall) + FuncMap["To_NominationPools_ClaimCommissionCall"] = reflect.ValueOf(To_NominationPools_ClaimCommissionCall) + FuncMap["To_NominationPools_ClaimPayoutCall"] = reflect.ValueOf(To_NominationPools_ClaimPayoutCall) + FuncMap["To_NominationPools_ClaimPayoutOtherCall"] = reflect.ValueOf(To_NominationPools_ClaimPayoutOtherCall) + FuncMap["To_NominationPools_CreateCall"] = reflect.ValueOf(To_NominationPools_CreateCall) + FuncMap["To_NominationPools_CreateWithPoolIdCall"] = reflect.ValueOf(To_NominationPools_CreateWithPoolIdCall) + FuncMap["To_NominationPools_Destroying"] = reflect.ValueOf(To_NominationPools_Destroying) + FuncMap["To_NominationPools_Extra"] = reflect.ValueOf(To_NominationPools_Extra) + FuncMap["To_NominationPools_FreeBalance"] = reflect.ValueOf(To_NominationPools_FreeBalance) + FuncMap["To_NominationPools_GlobalMaxCommission"] = reflect.ValueOf(To_NominationPools_GlobalMaxCommission) + FuncMap["To_NominationPools_Id"] = reflect.ValueOf(To_NominationPools_Id) + FuncMap["To_NominationPools_Index"] = reflect.ValueOf(To_NominationPools_Index) + FuncMap["To_NominationPools_JoinCall"] = reflect.ValueOf(To_NominationPools_JoinCall) + FuncMap["To_NominationPools_MaxMembers"] = reflect.ValueOf(To_NominationPools_MaxMembers) + FuncMap["To_NominationPools_MaxMembersPerPool"] = reflect.ValueOf(To_NominationPools_MaxMembersPerPool) + FuncMap["To_NominationPools_MaxPools"] = reflect.ValueOf(To_NominationPools_MaxPools) + FuncMap["To_NominationPools_Member"] = reflect.ValueOf(To_NominationPools_Member) + FuncMap["To_NominationPools_MemberAccount"] = reflect.ValueOf(To_NominationPools_MemberAccount) + FuncMap["To_NominationPools_MinCreateBond"] = reflect.ValueOf(To_NominationPools_MinCreateBond) + FuncMap["To_NominationPools_MinJoinBond"] = reflect.ValueOf(To_NominationPools_MinJoinBond) + FuncMap["To_NominationPools_NewBouncer"] = reflect.ValueOf(To_NominationPools_NewBouncer) + FuncMap["To_NominationPools_NewNominator"] = reflect.ValueOf(To_NominationPools_NewNominator) + FuncMap["To_NominationPools_NewRoot"] = reflect.ValueOf(To_NominationPools_NewRoot) + FuncMap["To_NominationPools_NominateCall"] = reflect.ValueOf(To_NominationPools_NominateCall) + FuncMap["To_NominationPools_Nominator"] = reflect.ValueOf(To_NominationPools_Nominator) + FuncMap["To_NominationPools_Noop"] = reflect.ValueOf(To_NominationPools_Noop) + FuncMap["To_NominationPools_Open"] = reflect.ValueOf(To_NominationPools_Open) + FuncMap["To_NominationPools_PalletNominationPoolsCommissionChangeRate"] = reflect.ValueOf(To_NominationPools_PalletNominationPoolsCommissionChangeRate) + FuncMap["To_NominationPools_Permission"] = reflect.ValueOf(To_NominationPools_Permission) + FuncMap["To_NominationPools_Permissioned"] = reflect.ValueOf(To_NominationPools_Permissioned) + FuncMap["To_NominationPools_PermissionlessAll"] = reflect.ValueOf(To_NominationPools_PermissionlessAll) + FuncMap["To_NominationPools_PermissionlessCompound"] = reflect.ValueOf(To_NominationPools_PermissionlessCompound) + FuncMap["To_NominationPools_PermissionlessWithdraw"] = reflect.ValueOf(To_NominationPools_PermissionlessWithdraw) + FuncMap["To_NominationPools_PoolWithdrawUnbondedCall"] = reflect.ValueOf(To_NominationPools_PoolWithdrawUnbondedCall) + FuncMap["To_NominationPools_Raw"] = reflect.ValueOf(To_NominationPools_Raw) + FuncMap["To_NominationPools_Remove"] = reflect.ValueOf(To_NominationPools_Remove) + FuncMap["To_NominationPools_Rewards"] = reflect.ValueOf(To_NominationPools_Rewards) + FuncMap["To_NominationPools_Root"] = reflect.ValueOf(To_NominationPools_Root) + FuncMap["To_NominationPools_Set"] = reflect.ValueOf(To_NominationPools_Set) + FuncMap["To_NominationPools_SetClaimPermissionCall"] = reflect.ValueOf(To_NominationPools_SetClaimPermissionCall) + FuncMap["To_NominationPools_SetCommissionCall"] = reflect.ValueOf(To_NominationPools_SetCommissionCall) + FuncMap["To_NominationPools_SetCommissionChangeRateCall"] = reflect.ValueOf(To_NominationPools_SetCommissionChangeRateCall) + FuncMap["To_NominationPools_SetCommissionMaxCall"] = reflect.ValueOf(To_NominationPools_SetCommissionMaxCall) + FuncMap["To_NominationPools_SetConfigsCall"] = reflect.ValueOf(To_NominationPools_SetConfigsCall) + FuncMap["To_NominationPools_SetMetadataCall"] = reflect.ValueOf(To_NominationPools_SetMetadataCall) + FuncMap["To_NominationPools_SetStateCall"] = reflect.ValueOf(To_NominationPools_SetStateCall) + FuncMap["To_NominationPools_State"] = reflect.ValueOf(To_NominationPools_State) + FuncMap["To_NominationPools_TupleNull"] = reflect.ValueOf(To_NominationPools_TupleNull) + FuncMap["To_NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32"] = reflect.ValueOf(To_NominationPools_TupleSpArithmeticPerThingsPerbillspCoreCryptoAccountId32) + FuncMap["To_NominationPools_UnbondCall"] = reflect.ValueOf(To_NominationPools_UnbondCall) + FuncMap["To_NominationPools_UpdateRolesCall"] = reflect.ValueOf(To_NominationPools_UpdateRolesCall) + FuncMap["To_NominationPools_WithdrawUnbondedCall"] = reflect.ValueOf(To_NominationPools_WithdrawUnbondedCall) + FuncMap["To_None"] = reflect.ValueOf(To_None) + FuncMap["To_OffencesPallet"] = reflect.ValueOf(To_OffencesPallet) + FuncMap["To_OriginsPallet"] = reflect.ValueOf(To_OriginsPallet) + FuncMap["To_PreimagePallet"] = reflect.ValueOf(To_PreimagePallet) + FuncMap["To_Preimage_EnsureUpdatedCall"] = reflect.ValueOf(To_Preimage_EnsureUpdatedCall) + FuncMap["To_Preimage_NotePreimageCall"] = reflect.ValueOf(To_Preimage_NotePreimageCall) + FuncMap["To_Preimage_RequestPreimageCall"] = reflect.ValueOf(To_Preimage_RequestPreimageCall) + FuncMap["To_Preimage_UnnotePreimageCall"] = reflect.ValueOf(To_Preimage_UnnotePreimageCall) + FuncMap["To_Preimage_UnrequestPreimageCall"] = reflect.ValueOf(To_Preimage_UnrequestPreimageCall) + FuncMap["To_PrimaryAndSecondaryPlainSlots"] = reflect.ValueOf(To_PrimaryAndSecondaryPlainSlots) + FuncMap["To_PrimaryAndSecondaryVrfSlots"] = reflect.ValueOf(To_PrimaryAndSecondaryVrfSlots) + FuncMap["To_PrimarySlots"] = reflect.ValueOf(To_PrimarySlots) + FuncMap["To_PrimitiveTypesH256"] = reflect.ValueOf(To_PrimitiveTypesH256) + FuncMap["To_ProxyPallet"] = reflect.ValueOf(To_ProxyPallet) + FuncMap["To_Proxy_AddProxyCall"] = reflect.ValueOf(To_Proxy_AddProxyCall) + FuncMap["To_Proxy_Address20"] = reflect.ValueOf(To_Proxy_Address20) + FuncMap["To_Proxy_Address32"] = reflect.ValueOf(To_Proxy_Address32) + FuncMap["To_Proxy_AnnounceCall"] = reflect.ValueOf(To_Proxy_AnnounceCall) + FuncMap["To_Proxy_Any"] = reflect.ValueOf(To_Proxy_Any) + FuncMap["To_Proxy_CancelProxy"] = reflect.ValueOf(To_Proxy_CancelProxy) + FuncMap["To_Proxy_CreatePureCall"] = reflect.ValueOf(To_Proxy_CreatePureCall) + FuncMap["To_Proxy_Delegate"] = reflect.ValueOf(To_Proxy_Delegate) + FuncMap["To_Proxy_ForceProxyType"] = reflect.ValueOf(To_Proxy_ForceProxyType) + FuncMap["To_Proxy_Governance"] = reflect.ValueOf(To_Proxy_Governance) + FuncMap["To_Proxy_Id"] = reflect.ValueOf(To_Proxy_Id) + FuncMap["To_Proxy_IdentityJudgement"] = reflect.ValueOf(To_Proxy_IdentityJudgement) + FuncMap["To_Proxy_Index"] = reflect.ValueOf(To_Proxy_Index) + FuncMap["To_Proxy_KillPureCall"] = reflect.ValueOf(To_Proxy_KillPureCall) + FuncMap["To_Proxy_NonTransfer"] = reflect.ValueOf(To_Proxy_NonTransfer) + FuncMap["To_Proxy_ProxyAnnouncedCall"] = reflect.ValueOf(To_Proxy_ProxyAnnouncedCall) + FuncMap["To_Proxy_ProxyCall"] = reflect.ValueOf(To_Proxy_ProxyCall) + FuncMap["To_Proxy_ProxyType"] = reflect.ValueOf(To_Proxy_ProxyType) + FuncMap["To_Proxy_Raw"] = reflect.ValueOf(To_Proxy_Raw) + FuncMap["To_Proxy_Real"] = reflect.ValueOf(To_Proxy_Real) + FuncMap["To_Proxy_RejectAnnouncementCall"] = reflect.ValueOf(To_Proxy_RejectAnnouncementCall) + FuncMap["To_Proxy_RemoveAnnouncementCall"] = reflect.ValueOf(To_Proxy_RemoveAnnouncementCall) + FuncMap["To_Proxy_RemoveProxiesCall"] = reflect.ValueOf(To_Proxy_RemoveProxiesCall) + FuncMap["To_Proxy_RemoveProxyCall"] = reflect.ValueOf(To_Proxy_RemoveProxyCall) + FuncMap["To_Proxy_Spawner"] = reflect.ValueOf(To_Proxy_Spawner) + FuncMap["To_Proxy_Staking"] = reflect.ValueOf(To_Proxy_Staking) + FuncMap["To_Proxy_TupleNull"] = reflect.ValueOf(To_Proxy_TupleNull) + FuncMap["To_ReferendaPallet"] = reflect.ValueOf(To_ReferendaPallet) + FuncMap["To_Referenda_After"] = reflect.ValueOf(To_Referenda_After) + FuncMap["To_Referenda_At"] = reflect.ValueOf(To_Referenda_At) + FuncMap["To_Referenda_CancelCall"] = reflect.ValueOf(To_Referenda_CancelCall) + FuncMap["To_Referenda_EnactmentMoment"] = reflect.ValueOf(To_Referenda_EnactmentMoment) + FuncMap["To_Referenda_Inline"] = reflect.ValueOf(To_Referenda_Inline) + FuncMap["To_Referenda_KillCall"] = reflect.ValueOf(To_Referenda_KillCall) + FuncMap["To_Referenda_Legacy"] = reflect.ValueOf(To_Referenda_Legacy) + FuncMap["To_Referenda_Lookup"] = reflect.ValueOf(To_Referenda_Lookup) + FuncMap["To_Referenda_NudgeReferendumCall"] = reflect.ValueOf(To_Referenda_NudgeReferendumCall) + FuncMap["To_Referenda_OneFewerDecidingCall"] = reflect.ValueOf(To_Referenda_OneFewerDecidingCall) + FuncMap["To_Referenda_Origins"] = reflect.ValueOf(To_Referenda_Origins) + FuncMap["To_Referenda_PlaceDecisionDepositCall"] = reflect.ValueOf(To_Referenda_PlaceDecisionDepositCall) + FuncMap["To_Referenda_Proposal"] = reflect.ValueOf(To_Referenda_Proposal) + FuncMap["To_Referenda_ProposalOrigin"] = reflect.ValueOf(To_Referenda_ProposalOrigin) + FuncMap["To_Referenda_RefundDecisionDepositCall"] = reflect.ValueOf(To_Referenda_RefundDecisionDepositCall) + FuncMap["To_Referenda_RefundSubmissionDepositCall"] = reflect.ValueOf(To_Referenda_RefundSubmissionDepositCall) + FuncMap["To_Referenda_SetMetadataCall"] = reflect.ValueOf(To_Referenda_SetMetadataCall) + FuncMap["To_Referenda_SubmitCall"] = reflect.ValueOf(To_Referenda_SubmitCall) + FuncMap["To_Referenda_System"] = reflect.ValueOf(To_Referenda_System) + FuncMap["To_Referenda_Void"] = reflect.ValueOf(To_Referenda_Void) + FuncMap["To_Root"] = reflect.ValueOf(To_Root) + FuncMap["To_SchedulerPallet"] = reflect.ValueOf(To_SchedulerPallet) + FuncMap["To_Scheduler_CancelCall"] = reflect.ValueOf(To_Scheduler_CancelCall) + FuncMap["To_Scheduler_CancelNamedCall"] = reflect.ValueOf(To_Scheduler_CancelNamedCall) + FuncMap["To_Scheduler_ScheduleAfterCall"] = reflect.ValueOf(To_Scheduler_ScheduleAfterCall) + FuncMap["To_Scheduler_ScheduleCall"] = reflect.ValueOf(To_Scheduler_ScheduleCall) + FuncMap["To_Scheduler_ScheduleNamedAfterCall"] = reflect.ValueOf(To_Scheduler_ScheduleNamedAfterCall) + FuncMap["To_Scheduler_ScheduleNamedCall"] = reflect.ValueOf(To_Scheduler_ScheduleNamedCall) + FuncMap["To_Scheduler_TupleUint32Uint32"] = reflect.ValueOf(To_Scheduler_TupleUint32Uint32) + FuncMap["To_SessionPallet"] = reflect.ValueOf(To_SessionPallet) + FuncMap["To_Session_PurgeKeysCall"] = reflect.ValueOf(To_Session_PurgeKeysCall) + FuncMap["To_Session_SetKeysCall"] = reflect.ValueOf(To_Session_SetKeysCall) + FuncMap["To_Signed"] = reflect.ValueOf(To_Signed) + FuncMap["To_SpArithmeticPerThingsPerU16"] = reflect.ValueOf(To_SpArithmeticPerThingsPerU16) + FuncMap["To_SpArithmeticPerThingsPerbill"] = reflect.ValueOf(To_SpArithmeticPerThingsPerbill) + FuncMap["To_SpArithmeticPerThingsPercent"] = reflect.ValueOf(To_SpArithmeticPerThingsPercent) + FuncMap["To_SpAuthorityDiscoveryAppPublic"] = reflect.ValueOf(To_SpAuthorityDiscoveryAppPublic) + FuncMap["To_SpConsensusBabeAppPublic"] = reflect.ValueOf(To_SpConsensusBabeAppPublic) + FuncMap["To_SpConsensusGrandpaAppPublic"] = reflect.ValueOf(To_SpConsensusGrandpaAppPublic) + FuncMap["To_SpConsensusGrandpaAppSignature"] = reflect.ValueOf(To_SpConsensusGrandpaAppSignature) + FuncMap["To_SpConsensusGrandpaEquivocationProof"] = reflect.ValueOf(To_SpConsensusGrandpaEquivocationProof) + FuncMap["To_SpConsensusSlotsEquivocationProof"] = reflect.ValueOf(To_SpConsensusSlotsEquivocationProof) + FuncMap["To_SpConsensusSlotsSlot"] = reflect.ValueOf(To_SpConsensusSlotsSlot) + FuncMap["To_SpCoreCryptoAccountId32"] = reflect.ValueOf(To_SpCoreCryptoAccountId32) + FuncMap["To_SpCoreEd25519Public"] = reflect.ValueOf(To_SpCoreEd25519Public) + FuncMap["To_SpCoreEd25519Signature"] = reflect.ValueOf(To_SpCoreEd25519Signature) + FuncMap["To_SpCoreSr25519Public"] = reflect.ValueOf(To_SpCoreSr25519Public) + FuncMap["To_SpCoreSr25519Signature"] = reflect.ValueOf(To_SpCoreSr25519Signature) + FuncMap["To_SpNposElectionsElectionScore"] = reflect.ValueOf(To_SpNposElectionsElectionScore) + FuncMap["To_SpNposElectionsSupport"] = reflect.ValueOf(To_SpNposElectionsSupport) + FuncMap["To_SpRuntimeGenericDigestDigest"] = reflect.ValueOf(To_SpRuntimeGenericDigestDigest) + FuncMap["To_SpRuntimeGenericDigestDigestItem"] = reflect.ValueOf(To_SpRuntimeGenericDigestDigestItem) + FuncMap["To_SpRuntimeGenericHeaderHeader"] = reflect.ValueOf(To_SpRuntimeGenericHeaderHeader) + FuncMap["To_SpRuntimeMultiaddressMultiAddress"] = reflect.ValueOf(To_SpRuntimeMultiaddressMultiAddress) + FuncMap["To_SpSessionMembershipProof"] = reflect.ValueOf(To_SpSessionMembershipProof) + FuncMap["To_SpWeightsWeightV2Weight"] = reflect.ValueOf(To_SpWeightsWeightV2Weight) + FuncMap["To_StakingPallet"] = reflect.ValueOf(To_StakingPallet) + FuncMap["To_StakingRewardsPallet"] = reflect.ValueOf(To_StakingRewardsPallet) + FuncMap["To_StakingRewards_Address20"] = reflect.ValueOf(To_StakingRewards_Address20) + FuncMap["To_StakingRewards_Address32"] = reflect.ValueOf(To_StakingRewards_Address32) + FuncMap["To_StakingRewards_AlignSupplyCall"] = reflect.ValueOf(To_StakingRewards_AlignSupplyCall) + FuncMap["To_StakingRewards_ForceRefillCall"] = reflect.ValueOf(To_StakingRewards_ForceRefillCall) + FuncMap["To_StakingRewards_From"] = reflect.ValueOf(To_StakingRewards_From) + FuncMap["To_StakingRewards_Id"] = reflect.ValueOf(To_StakingRewards_Id) + FuncMap["To_StakingRewards_Index"] = reflect.ValueOf(To_StakingRewards_Index) + FuncMap["To_StakingRewards_Raw"] = reflect.ValueOf(To_StakingRewards_Raw) + FuncMap["To_StakingRewards_RefillCall"] = reflect.ValueOf(To_StakingRewards_RefillCall) + FuncMap["To_StakingRewards_To"] = reflect.ValueOf(To_StakingRewards_To) + FuncMap["To_StakingRewards_TupleNull"] = reflect.ValueOf(To_StakingRewards_TupleNull) + FuncMap["To_StakingRewards_WithdrawCall"] = reflect.ValueOf(To_StakingRewards_WithdrawCall) + FuncMap["To_Staking_Account"] = reflect.ValueOf(To_Staking_Account) + FuncMap["To_Staking_Address20"] = reflect.ValueOf(To_Staking_Address20) + FuncMap["To_Staking_Address32"] = reflect.ValueOf(To_Staking_Address32) + FuncMap["To_Staking_BondCall"] = reflect.ValueOf(To_Staking_BondCall) + FuncMap["To_Staking_BondExtraCall"] = reflect.ValueOf(To_Staking_BondExtraCall) + FuncMap["To_Staking_CancelDeferredSlashCall"] = reflect.ValueOf(To_Staking_CancelDeferredSlashCall) + FuncMap["To_Staking_ChillCall"] = reflect.ValueOf(To_Staking_ChillCall) + FuncMap["To_Staking_ChillOtherCall"] = reflect.ValueOf(To_Staking_ChillOtherCall) + FuncMap["To_Staking_ChillThreshold"] = reflect.ValueOf(To_Staking_ChillThreshold) + FuncMap["To_Staking_Controller"] = reflect.ValueOf(To_Staking_Controller) + FuncMap["To_Staking_ForceApplyMinCommissionCall"] = reflect.ValueOf(To_Staking_ForceApplyMinCommissionCall) + FuncMap["To_Staking_ForceNewEraAlwaysCall"] = reflect.ValueOf(To_Staking_ForceNewEraAlwaysCall) + FuncMap["To_Staking_ForceNewEraCall"] = reflect.ValueOf(To_Staking_ForceNewEraCall) + FuncMap["To_Staking_ForceNoErasCall"] = reflect.ValueOf(To_Staking_ForceNoErasCall) + FuncMap["To_Staking_ForceUnstakeCall"] = reflect.ValueOf(To_Staking_ForceUnstakeCall) + FuncMap["To_Staking_Id"] = reflect.ValueOf(To_Staking_Id) + FuncMap["To_Staking_IncreaseValidatorCountCall"] = reflect.ValueOf(To_Staking_IncreaseValidatorCountCall) + FuncMap["To_Staking_Index"] = reflect.ValueOf(To_Staking_Index) + FuncMap["To_Staking_KickCall"] = reflect.ValueOf(To_Staking_KickCall) + FuncMap["To_Staking_MaxNominatorCount"] = reflect.ValueOf(To_Staking_MaxNominatorCount) + FuncMap["To_Staking_MaxValidatorCount"] = reflect.ValueOf(To_Staking_MaxValidatorCount) + FuncMap["To_Staking_MinCommission"] = reflect.ValueOf(To_Staking_MinCommission) + FuncMap["To_Staking_MinNominatorBond"] = reflect.ValueOf(To_Staking_MinNominatorBond) + FuncMap["To_Staking_MinValidatorBond"] = reflect.ValueOf(To_Staking_MinValidatorBond) + FuncMap["To_Staking_NominateCall"] = reflect.ValueOf(To_Staking_NominateCall) + FuncMap["To_Staking_None"] = reflect.ValueOf(To_Staking_None) + FuncMap["To_Staking_Noop"] = reflect.ValueOf(To_Staking_Noop) + FuncMap["To_Staking_PalletStakingValidatorPrefs"] = reflect.ValueOf(To_Staking_PalletStakingValidatorPrefs) + FuncMap["To_Staking_Payee"] = reflect.ValueOf(To_Staking_Payee) + FuncMap["To_Staking_PayoutStakersCall"] = reflect.ValueOf(To_Staking_PayoutStakersCall) + FuncMap["To_Staking_Raw"] = reflect.ValueOf(To_Staking_Raw) + FuncMap["To_Staking_ReapStashCall"] = reflect.ValueOf(To_Staking_ReapStashCall) + FuncMap["To_Staking_RebondCall"] = reflect.ValueOf(To_Staking_RebondCall) + FuncMap["To_Staking_Remove"] = reflect.ValueOf(To_Staking_Remove) + FuncMap["To_Staking_ScaleValidatorCountCall"] = reflect.ValueOf(To_Staking_ScaleValidatorCountCall) + FuncMap["To_Staking_Set"] = reflect.ValueOf(To_Staking_Set) + FuncMap["To_Staking_SetControllerCall"] = reflect.ValueOf(To_Staking_SetControllerCall) + FuncMap["To_Staking_SetInvulnerablesCall"] = reflect.ValueOf(To_Staking_SetInvulnerablesCall) + FuncMap["To_Staking_SetMinCommissionCall"] = reflect.ValueOf(To_Staking_SetMinCommissionCall) + FuncMap["To_Staking_SetPayeeCall"] = reflect.ValueOf(To_Staking_SetPayeeCall) + FuncMap["To_Staking_SetStakingConfigsCall"] = reflect.ValueOf(To_Staking_SetStakingConfigsCall) + FuncMap["To_Staking_SetValidatorCountCall"] = reflect.ValueOf(To_Staking_SetValidatorCountCall) + FuncMap["To_Staking_Staked"] = reflect.ValueOf(To_Staking_Staked) + FuncMap["To_Staking_Stash"] = reflect.ValueOf(To_Staking_Stash) + FuncMap["To_Staking_Targets"] = reflect.ValueOf(To_Staking_Targets) + FuncMap["To_Staking_TupleNull"] = reflect.ValueOf(To_Staking_TupleNull) + FuncMap["To_Staking_UnbondCall"] = reflect.ValueOf(To_Staking_UnbondCall) + FuncMap["To_Staking_ValidateCall"] = reflect.ValueOf(To_Staking_ValidateCall) + FuncMap["To_Staking_Who"] = reflect.ValueOf(To_Staking_Who) + FuncMap["To_Staking_WithdrawUnbondedCall"] = reflect.ValueOf(To_Staking_WithdrawUnbondedCall) + FuncMap["To_SystemPallet"] = reflect.ValueOf(To_SystemPallet) + FuncMap["To_System_KillPrefixCall"] = reflect.ValueOf(To_System_KillPrefixCall) + FuncMap["To_System_KillStorageCall"] = reflect.ValueOf(To_System_KillStorageCall) + FuncMap["To_System_RemarkCall"] = reflect.ValueOf(To_System_RemarkCall) + FuncMap["To_System_RemarkWithEventCall"] = reflect.ValueOf(To_System_RemarkWithEventCall) + FuncMap["To_System_SetCodeCall"] = reflect.ValueOf(To_System_SetCodeCall) + FuncMap["To_System_SetCodeWithoutChecksCall"] = reflect.ValueOf(To_System_SetCodeWithoutChecksCall) + FuncMap["To_System_SetHeapPagesCall"] = reflect.ValueOf(To_System_SetHeapPagesCall) + FuncMap["To_System_SetStorageCall"] = reflect.ValueOf(To_System_SetStorageCall) + FuncMap["To_System_SystemKeysList"] = reflect.ValueOf(To_System_SystemKeysList) + FuncMap["To_System_TupleSystemItemsListSystemItemsList"] = reflect.ValueOf(To_System_TupleSystemItemsListSystemItemsList) + FuncMap["To_TimestampPallet"] = reflect.ValueOf(To_TimestampPallet) + FuncMap["To_Timestamp_SetCall"] = reflect.ValueOf(To_Timestamp_SetCall) + FuncMap["To_TransactionPaymentPallet"] = reflect.ValueOf(To_TransactionPaymentPallet) + FuncMap["To_TreasuryPallet"] = reflect.ValueOf(To_TreasuryPallet) + FuncMap["To_Treasury_Address20"] = reflect.ValueOf(To_Treasury_Address20) + FuncMap["To_Treasury_Address32"] = reflect.ValueOf(To_Treasury_Address32) + FuncMap["To_Treasury_ApproveProposalCall"] = reflect.ValueOf(To_Treasury_ApproveProposalCall) + FuncMap["To_Treasury_Beneficiary"] = reflect.ValueOf(To_Treasury_Beneficiary) + FuncMap["To_Treasury_CheckStatusCall"] = reflect.ValueOf(To_Treasury_CheckStatusCall) + FuncMap["To_Treasury_Id"] = reflect.ValueOf(To_Treasury_Id) + FuncMap["To_Treasury_Index"] = reflect.ValueOf(To_Treasury_Index) + FuncMap["To_Treasury_PayoutCall"] = reflect.ValueOf(To_Treasury_PayoutCall) + FuncMap["To_Treasury_ProposeSpendCall"] = reflect.ValueOf(To_Treasury_ProposeSpendCall) + FuncMap["To_Treasury_Raw"] = reflect.ValueOf(To_Treasury_Raw) + FuncMap["To_Treasury_RejectProposalCall"] = reflect.ValueOf(To_Treasury_RejectProposalCall) + FuncMap["To_Treasury_RemoveApprovalCall"] = reflect.ValueOf(To_Treasury_RemoveApprovalCall) + FuncMap["To_Treasury_SpendCall"] = reflect.ValueOf(To_Treasury_SpendCall) + FuncMap["To_Treasury_SpendLocalCall"] = reflect.ValueOf(To_Treasury_SpendLocalCall) + FuncMap["To_Treasury_TupleNull"] = reflect.ValueOf(To_Treasury_TupleNull) + FuncMap["To_Treasury_VoidSpendCall"] = reflect.ValueOf(To_Treasury_VoidSpendCall) + FuncMap["To_TupleFinalityGrandpaPrecommitspConsensusGrandpaAppSignature"] = reflect.ValueOf(To_TupleFinalityGrandpaPrecommitspConsensusGrandpaAppSignature) + FuncMap["To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature"] = reflect.ValueOf(To_TupleFinalityGrandpaPrevotespConsensusGrandpaAppSignature) + FuncMap["To_TupleNull"] = reflect.ValueOf(To_TupleNull) + FuncMap["To_UtilityPallet"] = reflect.ValueOf(To_UtilityPallet) + FuncMap["To_Utility_AsDerivativeCall"] = reflect.ValueOf(To_Utility_AsDerivativeCall) + FuncMap["To_Utility_AsOrigin"] = reflect.ValueOf(To_Utility_AsOrigin) + FuncMap["To_Utility_BatchAllCall"] = reflect.ValueOf(To_Utility_BatchAllCall) + FuncMap["To_Utility_BatchCall"] = reflect.ValueOf(To_Utility_BatchCall) + FuncMap["To_Utility_DispatchAsCall"] = reflect.ValueOf(To_Utility_DispatchAsCall) + FuncMap["To_Utility_ForceBatchCall"] = reflect.ValueOf(To_Utility_ForceBatchCall) + FuncMap["To_Utility_Origins"] = reflect.ValueOf(To_Utility_Origins) + FuncMap["To_Utility_System"] = reflect.ValueOf(To_Utility_System) + FuncMap["To_Utility_Void"] = reflect.ValueOf(To_Utility_Void) + FuncMap["To_Utility_WithWeightCall"] = reflect.ValueOf(To_Utility_WithWeightCall) + FuncMap["To_Value0"] = reflect.ValueOf(To_Value0) + FuncMap["To_VaraRuntimeNposSolution16"] = reflect.ValueOf(To_VaraRuntimeNposSolution16) + FuncMap["To_VaraRuntimeRuntimeCall"] = reflect.ValueOf(To_VaraRuntimeRuntimeCall) + FuncMap["To_VaraRuntimeSessionKeys"] = reflect.ValueOf(To_VaraRuntimeSessionKeys) + FuncMap["To_VestingPallet"] = reflect.ValueOf(To_VestingPallet) + FuncMap["To_Vesting_Address20"] = reflect.ValueOf(To_Vesting_Address20) + FuncMap["To_Vesting_Address32"] = reflect.ValueOf(To_Vesting_Address32) + FuncMap["To_Vesting_ForceVestedTransferCall"] = reflect.ValueOf(To_Vesting_ForceVestedTransferCall) + FuncMap["To_Vesting_Id"] = reflect.ValueOf(To_Vesting_Id) + FuncMap["To_Vesting_Index"] = reflect.ValueOf(To_Vesting_Index) + FuncMap["To_Vesting_MergeSchedulesCall"] = reflect.ValueOf(To_Vesting_MergeSchedulesCall) + FuncMap["To_Vesting_PalletVestingVestingInfoVestingInfo"] = reflect.ValueOf(To_Vesting_PalletVestingVestingInfoVestingInfo) + FuncMap["To_Vesting_Raw"] = reflect.ValueOf(To_Vesting_Raw) + FuncMap["To_Vesting_Source"] = reflect.ValueOf(To_Vesting_Source) + FuncMap["To_Vesting_Target"] = reflect.ValueOf(To_Vesting_Target) + FuncMap["To_Vesting_TupleNull"] = reflect.ValueOf(To_Vesting_TupleNull) + FuncMap["To_Vesting_VestCall"] = reflect.ValueOf(To_Vesting_VestCall) + FuncMap["To_Vesting_VestOtherCall"] = reflect.ValueOf(To_Vesting_VestOtherCall) + FuncMap["To_Vesting_VestedTransferCall"] = reflect.ValueOf(To_Vesting_VestedTransferCall) + FuncMap["To_WhitelistPallet"] = reflect.ValueOf(To_WhitelistPallet) + FuncMap["To_Whitelist_DispatchWhitelistedCallCall"] = reflect.ValueOf(To_Whitelist_DispatchWhitelistedCallCall) + FuncMap["To_Whitelist_DispatchWhitelistedCallWithPreimageCall"] = reflect.ValueOf(To_Whitelist_DispatchWhitelistedCallWithPreimageCall) + FuncMap["To_Whitelist_RemoveWhitelistedCallCall"] = reflect.ValueOf(To_Whitelist_RemoveWhitelistedCallCall) + FuncMap["To_Whitelist_WhitelistCallCall"] = reflect.ValueOf(To_Whitelist_WhitelistCallCall) }