From e8d4ae35661a949326c5c5a3d5cc6a79cb5c1166 Mon Sep 17 00:00:00 2001 From: rjman Date: Fri, 19 Nov 2021 02:43:30 +0800 Subject: [PATCH 1/6] :construction: Support MetadataV14 --- client/client.go | 12 +- expand/base/types.go | 4 +- expand/bifrost/types.go | 4 +- expand/bridge/bridge_event.go | 3 +- expand/bridge/bridge_types.go | 2 +- expand/call.go | 17 +- expand/chainx/pallets/swap.go | 56 ++--- expand/chainx/types.go | 2 +- expand/chainx/xbtc_events.go | 2 +- expand/chainx/xevents/xassets.go | 2 +- expand/chainx/xevents/xgateway/xbitcoin.go | 2 +- expand/chainx/xevents/xgateway/xcommon.go | 2 +- expand/chainx/xevents/xgateway/xrecords.go | 2 +- expand/chainx/xevents/xmining.go | 2 +- expand/chainx/xevents/xsystem.go | 2 +- expand/chainx_types.go | 4 +- expand/event_records.go | 3 +- expand/extra/crowdloan.go | 4 +- expand/extra/election.go | 16 +- expand/extra/extra.go | 11 +- expand/extra/extra_types.go | 2 +- expand/extra/origin.go | 247 +++++++++++---------- expand/extra/xcm.go | 4 +- expand/extrinsic.go | 8 +- expand/extrinsic_decode.go | 6 +- expand/metadata.go | 29 ++- expand/polkadot/types.go | 2 +- expand/types.go | 8 +- go.mod | 3 +- go.sum | 24 +- test/rpc_test.go | 10 +- tx/tx.go | 4 +- utils/util.go | 2 +- 33 files changed, 268 insertions(+), 233 deletions(-) diff --git a/client/client.go b/client/client.go index 35b4354..72081fc 100644 --- a/client/client.go +++ b/client/client.go @@ -6,18 +6,18 @@ import ( "encoding/json" "errors" "fmt" - "github.com/rjman-ljm/go-substrate-crypto/ss58" + gsrc "github.com/JFJun/go-substrate-rpc-client/v3" + gsClient "github.com/JFJun/go-substrate-rpc-client/v3/client" + "github.com/JFJun/go-substrate-rpc-client/v3/rpc" + "github.com/JFJun/go-substrate-rpc-client/v3/scale" + "github.com/JFJun/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/expand" "github.com/Platdot-Network/substrate-go/expand/base" "github.com/Platdot-Network/substrate-go/expand/chainx/xevents" "github.com/Platdot-Network/substrate-go/models" "github.com/Platdot-Network/substrate-go/utils" - gsrc "github.com/centrifuge/go-substrate-rpc-client/v3" - gsClient "github.com/centrifuge/go-substrate-rpc-client/v3/client" - "github.com/centrifuge/go-substrate-rpc-client/v3/rpc" - "github.com/centrifuge/go-substrate-rpc-client/v3/scale" - "github.com/centrifuge/go-substrate-rpc-client/v3/types" log2 "github.com/ethereum/go-ethereum/log" + "github.com/rjman-ljm/go-substrate-crypto/ss58" "golang.org/x/crypto/blake2b" "log" "strconv" diff --git a/expand/base/types.go b/expand/base/types.go index 8945937..27af70e 100644 --- a/expand/base/types.go +++ b/expand/base/types.go @@ -4,9 +4,9 @@ import ( "encoding/hex" "fmt" + "github.com/JFJun/go-substrate-rpc-client/v3/scale" + "github.com/JFJun/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/expand/extra" - "github.com/centrifuge/go-substrate-rpc-client/v3/scale" - "github.com/centrifuge/go-substrate-rpc-client/v3/types" ) /// Polkadot MultiSignExtrinsic Type diff --git a/expand/bifrost/types.go b/expand/bifrost/types.go index a407243..1ffe47d 100644 --- a/expand/bifrost/types.go +++ b/expand/bifrost/types.go @@ -2,10 +2,10 @@ package bifrost import ( "fmt" + "github.com/JFJun/go-substrate-rpc-client/v3/scale" + "github.com/JFJun/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/expand/base" "github.com/Platdot-Network/substrate-go/expand/bridge" - "github.com/centrifuge/go-substrate-rpc-client/v3/scale" - "github.com/centrifuge/go-substrate-rpc-client/v3/types" ) type BifrostEventRecords struct { diff --git a/expand/bridge/bridge_event.go b/expand/bridge/bridge_event.go index d26133c..8d2016f 100644 --- a/expand/bridge/bridge_event.go +++ b/expand/bridge/bridge_event.go @@ -1,7 +1,7 @@ package bridge import ( - "github.com/centrifuge/go-substrate-rpc-client/v3/types" + "github.com/JFJun/go-substrate-rpc-client/v3/types" events "github.com/hacpy/chainbridge-substrate-events" ) @@ -39,4 +39,3 @@ type AssetEvents struct { Registry_RegistryCreated []EventRegistryRegistryCreated //nolint:stylecheck,golint Registry_RegistryTmp []EventRegistryTmp //nolint:stylecheck,golint } - diff --git a/expand/bridge/bridge_types.go b/expand/bridge/bridge_types.go index e148be5..7040eca 100644 --- a/expand/bridge/bridge_types.go +++ b/expand/bridge/bridge_types.go @@ -1,7 +1,7 @@ package bridge import ( - "github.com/centrifuge/go-substrate-rpc-client/v3/types" + "github.com/JFJun/go-substrate-rpc-client/v3/types" ) type Erc721Token struct { diff --git a/expand/call.go b/expand/call.go index 8e09890..6fdf268 100644 --- a/expand/call.go +++ b/expand/call.go @@ -3,25 +3,26 @@ package expand import ( "encoding/hex" "fmt" - "github.com/centrifuge/go-substrate-rpc-client/v3/types" + + "github.com/JFJun/go-substrate-rpc-client/v3/types" ) /* 扩展: 创建一个新的Call方法 */ -func NewCall(callIdx string,args ...interface{})(types.Call,error){ - if len(callIdx)!=4 { - return types.Call{},fmt.Errorf("callIdx length is not equal 4,len=%d",len(callIdx)) +func NewCall(callIdx string, args ...interface{}) (types.Call, error) { + if len(callIdx) != 4 { + return types.Call{}, fmt.Errorf("callIdx length is not equal 4,len=%d", len(callIdx)) } - m,err:=hex.DecodeString(callIdx[:2]) + m, err := hex.DecodeString(callIdx[:2]) if err != nil { return types.Call{}, err } - n,err:=hex.DecodeString(callIdx[2:]) + n, err := hex.DecodeString(callIdx[2:]) if err != nil { - return types.Call{},err + return types.Call{}, err } - c:=types.CallIndex{SectionIndex: m[0],MethodIndex: n[0]} + c := types.CallIndex{SectionIndex: m[0], MethodIndex: n[0]} var a []byte for _, arg := range args { e, err := types.EncodeToBytes(arg) diff --git a/expand/chainx/pallets/swap.go b/expand/chainx/pallets/swap.go index 48d199d..a7a61b4 100644 --- a/expand/chainx/pallets/swap.go +++ b/expand/chainx/pallets/swap.go @@ -1,52 +1,52 @@ package pallets -import "github.com/centrifuge/go-substrate-rpc-client/v3/types" +import "github.com/JFJun/go-substrate-rpc-client/v3/types" type AssetId types.U32 type Balance types.U128 /// XAssets Type type Swap struct { - Swap_PairCreated []EventPairCreated - Swap_LiquidityAdded []EventLiquidityAdded - Swap_LiquidityRemoved []EventLiquidityRemoved - Swap_TokenSwap []EventTokenSwap + Swap_PairCreated []EventPairCreated + Swap_LiquidityAdded []EventLiquidityAdded + Swap_LiquidityRemoved []EventLiquidityRemoved + Swap_TokenSwap []EventTokenSwap } /// Create a trading pair. \[creator, asset_id, asset_id\] type EventPairCreated struct { - Phase types.Phase - Creator types.AccountID - AssetA AssetId - AssetB AssetId - Topics []types.Hash + Phase types.Phase + Creator types.AccountID + AssetA AssetId + AssetB AssetId + Topics []types.Hash } /// Add liquidity. \[owner, asset_id, asset_id\] type EventLiquidityAdded struct { - Phase types.Phase - Owner types.AccountID - AssetA AssetId - AssetB AssetId - Topics []types.Hash + Phase types.Phase + Owner types.AccountID + AssetA AssetId + AssetB AssetId + Topics []types.Hash } /// Remove liquidity. \[owner, recipient, asset_id, asset_id, amount\] type EventLiquidityRemoved struct { - Phase types.Phase - Owner types.AccountID - Recipient types.AccountID - AssetA AssetId - AssetB AssetId - Amount Balance - Topics []types.Hash + Phase types.Phase + Owner types.AccountID + Recipient types.AccountID + AssetA AssetId + AssetB AssetId + Amount Balance + Topics []types.Hash } /// Transact in trading \[owner, recipient, swap_path\] type EventTokenSwap struct { - Phase types.Phase - Owner types.AccountID - Recipient types.AccountID - SwapPath []AssetId - Topics []types.Hash -} \ No newline at end of file + Phase types.Phase + Owner types.AccountID + Recipient types.AccountID + SwapPath []AssetId + Topics []types.Hash +} diff --git a/expand/chainx/types.go b/expand/chainx/types.go index b050ccd..17d1e0d 100644 --- a/expand/chainx/types.go +++ b/expand/chainx/types.go @@ -1,11 +1,11 @@ package chainx import ( + "github.com/JFJun/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/expand/base" "github.com/Platdot-Network/substrate-go/expand/bridge" "github.com/Platdot-Network/substrate-go/expand/chainx/pallets" "github.com/Platdot-Network/substrate-go/expand/extra" - "github.com/centrifuge/go-substrate-rpc-client/v3/types" ) type ChainXEventRecords struct { diff --git a/expand/chainx/xbtc_events.go b/expand/chainx/xbtc_events.go index 42df295..736a10c 100644 --- a/expand/chainx/xbtc_events.go +++ b/expand/chainx/xbtc_events.go @@ -1,9 +1,9 @@ package chainx import ( + "github.com/JFJun/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/expand/chainx/xevents" "github.com/Platdot-Network/substrate-go/expand/chainx/xevents/xgateway" - "github.com/centrifuge/go-substrate-rpc-client/v3/types" ) type XPallets struct { diff --git a/expand/chainx/xevents/xassets.go b/expand/chainx/xevents/xassets.go index d150b85..476312f 100644 --- a/expand/chainx/xevents/xassets.go +++ b/expand/chainx/xevents/xassets.go @@ -1,7 +1,7 @@ package xevents import ( - "github.com/centrifuge/go-substrate-rpc-client/v3/types" + "github.com/JFJun/go-substrate-rpc-client/v3/types" ) /// XAssets Type diff --git a/expand/chainx/xevents/xgateway/xbitcoin.go b/expand/chainx/xevents/xgateway/xbitcoin.go index 5f75007..2390daf 100644 --- a/expand/chainx/xevents/xgateway/xbitcoin.go +++ b/expand/chainx/xevents/xgateway/xbitcoin.go @@ -1,7 +1,7 @@ package xgateway import ( - "github.com/centrifuge/go-substrate-rpc-client/v3/types" + "github.com/JFJun/go-substrate-rpc-client/v3/types" ) /// XGatewayBitcoin Type diff --git a/expand/chainx/xevents/xgateway/xcommon.go b/expand/chainx/xevents/xgateway/xcommon.go index 8ff0a6a..7f3b846 100644 --- a/expand/chainx/xevents/xgateway/xcommon.go +++ b/expand/chainx/xevents/xgateway/xcommon.go @@ -1,7 +1,7 @@ package xgateway import ( - "github.com/centrifuge/go-substrate-rpc-client/v3/types" + "github.com/JFJun/go-substrate-rpc-client/v3/types" ) /// XGatewayCommon Type diff --git a/expand/chainx/xevents/xgateway/xrecords.go b/expand/chainx/xevents/xgateway/xrecords.go index 3dfaa38..386142a 100644 --- a/expand/chainx/xevents/xgateway/xrecords.go +++ b/expand/chainx/xevents/xgateway/xrecords.go @@ -1,7 +1,7 @@ package xgateway import ( - "github.com/centrifuge/go-substrate-rpc-client/v3/types" + "github.com/JFJun/go-substrate-rpc-client/v3/types" ) /// XGatewayRecords Type diff --git a/expand/chainx/xevents/xmining.go b/expand/chainx/xevents/xmining.go index 68c9251..de9707b 100644 --- a/expand/chainx/xevents/xmining.go +++ b/expand/chainx/xevents/xmining.go @@ -1,7 +1,7 @@ package xevents import ( - "github.com/centrifuge/go-substrate-rpc-client/v3/types" + "github.com/JFJun/go-substrate-rpc-client/v3/types" ) ///XMining Type diff --git a/expand/chainx/xevents/xsystem.go b/expand/chainx/xevents/xsystem.go index b969d89..d8fa495 100644 --- a/expand/chainx/xevents/xsystem.go +++ b/expand/chainx/xevents/xsystem.go @@ -1,7 +1,7 @@ package xevents import ( - "github.com/centrifuge/go-substrate-rpc-client/v3/types" + "github.com/JFJun/go-substrate-rpc-client/v3/types" ) /// XSystem Type diff --git a/expand/chainx_types.go b/expand/chainx_types.go index 2e81893..0058943 100644 --- a/expand/chainx_types.go +++ b/expand/chainx_types.go @@ -3,10 +3,10 @@ package expand import ( "fmt" + "github.com/JFJun/go-substrate-rpc-client/v3/scale" + "github.com/JFJun/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/expand/chainx/xevents" "github.com/Platdot-Network/substrate-go/utils" - "github.com/centrifuge/go-substrate-rpc-client/v3/scale" - "github.com/centrifuge/go-substrate-rpc-client/v3/types" "github.com/huandu/xstrings" ) diff --git a/expand/event_records.go b/expand/event_records.go index 3635a4d..e80b1a3 100644 --- a/expand/event_records.go +++ b/expand/event_records.go @@ -3,11 +3,11 @@ package expand import ( "strings" + "github.com/JFJun/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/expand/bifrost" "github.com/Platdot-Network/substrate-go/expand/chainx" "github.com/Platdot-Network/substrate-go/expand/extra" "github.com/Platdot-Network/substrate-go/expand/polkadot" - "github.com/centrifuge/go-substrate-rpc-client/v3/types" ) type IEventRecords interface { @@ -80,4 +80,3 @@ func DecodeEventRecords(meta *types.Metadata, rawData string, chainName string) return ier, nil } - diff --git a/expand/extra/crowdloan.go b/expand/extra/crowdloan.go index ea36d8f..4f0b5dd 100644 --- a/expand/extra/crowdloan.go +++ b/expand/extra/crowdloan.go @@ -1,8 +1,8 @@ package extra import ( - "github.com/centrifuge/go-substrate-rpc-client/v3/scale" - gsrpcTypes "github.com/centrifuge/go-substrate-rpc-client/v3/types" + "github.com/JFJun/go-substrate-rpc-client/v3/scale" + gsrpcTypes "github.com/JFJun/go-substrate-rpc-client/v3/types" ) /// Crowdloan diff --git a/expand/extra/election.go b/expand/extra/election.go index 6462afd..56f212c 100644 --- a/expand/extra/election.go +++ b/expand/extra/election.go @@ -1,18 +1,18 @@ package extra import ( - "github.com/centrifuge/go-substrate-rpc-client/v3/types" + "github.com/JFJun/go-substrate-rpc-client/v3/types" ) type ElectionsPhragmen struct { - Claims_Claimed []EventClaimsClaimed - ElectionsPhragmen_VoterReported []EventElectionsPhragmenVoterReported - ElectionsPhragmen_MemberRenounced []EventElectionsPhragmenMemberRenounced - ElectionsPhragmen_MemberKicked []EventElectionsPhragmenMemberKicked - ElectionsPhragmen_ElectionError []EventElectionsPhragmenElectionError - ElectionsPhragmen_EmptyTerm []EventElectionsPhragmenEmptyTerm + Claims_Claimed []EventClaimsClaimed + ElectionsPhragmen_VoterReported []EventElectionsPhragmenVoterReported + ElectionsPhragmen_MemberRenounced []EventElectionsPhragmenMemberRenounced + ElectionsPhragmen_MemberKicked []EventElectionsPhragmenMemberKicked + ElectionsPhragmen_ElectionError []EventElectionsPhragmenElectionError + ElectionsPhragmen_EmptyTerm []EventElectionsPhragmenEmptyTerm //ElectionsPhragmen_NewTerm []EventElectionsPhragmenNewTerm 暂不支持解析 - Democracy_Blacklisted []EventDemocracyBlacklisted + Democracy_Blacklisted []EventDemocracyBlacklisted } type EventDemocracyBlacklisted struct { diff --git a/expand/extra/extra.go b/expand/extra/extra.go index 2f59ff6..3d70dc6 100644 --- a/expand/extra/extra.go +++ b/expand/extra/extra.go @@ -1,6 +1,9 @@ package extra -import gsrpcTypes "github.com/centrifuge/go-substrate-rpc-client/v3/types" +import ( + gsrpcTypes "github.com/JFJun/go-substrate-rpc-client/v3/types" + types2 "github.com/centrifuge/go-substrate-rpc-client/v3/types" +) type ExtraEvents struct { ExtraEventRecord @@ -62,9 +65,9 @@ type ExtraEventRecord struct { PhragmenElection_EmptyTerm []gsrpcTypes.EventElectionsEmptyTerm PhragmenElection_ElectionError []gsrpcTypes.EventElectionsElectionError PhragmenElection_MemberKicked []gsrpcTypes.EventElectionsMemberKicked - PhragmenElection_Renounced []gsrpcTypes.EventElectionsRenounced - PhragmenElection_CandidateSlashed []gsrpcTypes.EventElectionsCandidateSlashed - PhragmenElection_SeatHolderSlashed []gsrpcTypes.EventElectionsSeatHolderSlashed + PhragmenElection_Renounced []types2.EventElectionsRenounced + PhragmenElection_CandidateSlashed []types2.EventElectionsCandidateSlashed + PhragmenElection_SeatHolderSlashed []types2.EventElectionsSeatHolderSlashed Gilt_BidPlaced []BidPlaced Gilt_BidRetracted []BidRetracted diff --git a/expand/extra/extra_types.go b/expand/extra/extra_types.go index d3710ab..3327f52 100644 --- a/expand/extra/extra_types.go +++ b/expand/extra/extra_types.go @@ -1,6 +1,6 @@ package extra -import gsrpcTypes "github.com/centrifuge/go-substrate-rpc-client/v3/types" +import gsrpcTypes "github.com/JFJun/go-substrate-rpc-client/v3/types" ///centrifuge/v3/types/events.go expand from https://github.com/Phala-Network/go-substrate-rpc-client/blob/master/types/events.go diff --git a/expand/extra/origin.go b/expand/extra/origin.go index 1b0aaea..5758ccc 100644 --- a/expand/extra/origin.go +++ b/expand/extra/origin.go @@ -1,7 +1,8 @@ package extra import ( - gsrpcTypes "github.com/centrifuge/go-substrate-rpc-client/v3/types" + gsrpcTypes "github.com/JFJun/go-substrate-rpc-client/v3/types" + types2 "github.com/centrifuge/go-substrate-rpc-client/v3/types" ) type TempMemo struct { @@ -44,115 +45,115 @@ type OriginEventRecord struct { Staking_Bonded []gsrpcTypes.EventStakingBonded //nolint:stylecheck,golint Staking_Unbonded []gsrpcTypes.EventStakingUnbonded //nolint:stylecheck,golint Staking_Withdrawn []gsrpcTypes.EventStakingWithdrawn //nolint:stylecheck,golint - Staking_Kicked []gsrpcTypes.EventStakingKicked //nolint:stylecheck,golint + Staking_Kicked []types2.EventStakingKicked //nolint:stylecheck,golint System_ExtrinsicSuccess []gsrpcTypes.EventSystemExtrinsicSuccess //nolint:stylecheck,golint //System_ExtrinsicFailed []gsrpcTypes.EventSystemExtrinsicFailed //nolint:stylecheck,golint - System_CodeUpdated []gsrpcTypes.EventSystemCodeUpdated //nolint:stylecheck,golint - System_NewAccount []gsrpcTypes.EventSystemNewAccount //nolint:stylecheck,golint - System_KilledAccount []gsrpcTypes.EventSystemKilledAccount //nolint:stylecheck,golint - Assets_Created []gsrpcTypes.EventAssetCreated //nolint:stylecheck,golint - Assets_Issued []gsrpcTypes.EventAssetIssued //nolint:stylecheck,golint - Assets_Transferred []gsrpcTypes.EventAssetTransferred //nolint:stylecheck,golint - Assets_Burned []gsrpcTypes.EventAssetBurned //nolint:stylecheck,golint - Assets_TeamChanged []gsrpcTypes.EventAssetTeamChanged //nolint:stylecheck,golint - Assets_OwnerChanged []gsrpcTypes.EventAssetOwnerChanged //nolint:stylecheck,golint - Assets_Frozen []gsrpcTypes.EventAssetFrozen //nolint:stylecheck,golint - Assets_Thawed []gsrpcTypes.EventAssetThawed //nolint:stylecheck,golint - Assets_AssetFrozen []gsrpcTypes.EventAssetAssetFrozen //nolint:stylecheck,golint - Assets_AssetThawed []gsrpcTypes.EventAssetAssetThawed //nolint:stylecheck,golint - Assets_Destroyed []gsrpcTypes.EventAssetDestroyed //nolint:stylecheck,golint - Assets_ForceCreated []gsrpcTypes.EventAssetForceCreated //nolint:stylecheck,golint - Assets_MetadataSet []gsrpcTypes.EventAssetMetadataSet //nolint:stylecheck,golint - Assets_MetadataCleared []gsrpcTypes.EventAssetMetadataCleared //nolint:stylecheck,golint - Assets_ApprovedTransfer []gsrpcTypes.EventAssetApprovedTransfer //nolint:stylecheck,golint - Assets_ApprovalCancelled []gsrpcTypes.EventAssetApprovalCancelled //nolint:stylecheck,golint - Assets_TransferredApproved []gsrpcTypes.EventAssetTransferredApproved //nolint:stylecheck,golint - Assets_AssetStatusChanged []gsrpcTypes.EventAssetAssetStatusChanged //nolint:stylecheck,golint - Democracy_Proposed []gsrpcTypes.EventDemocracyProposed //nolint:stylecheck,golint - Democracy_Tabled []gsrpcTypes.EventDemocracyTabled //nolint:stylecheck,golint - Democracy_ExternalTabled []gsrpcTypes.EventDemocracyExternalTabled //nolint:stylecheck,golint - Democracy_Started []gsrpcTypes.EventDemocracyStarted //nolint:stylecheck,golint - Democracy_Passed []gsrpcTypes.EventDemocracyPassed //nolint:stylecheck,golint - Democracy_NotPassed []gsrpcTypes.EventDemocracyNotPassed //nolint:stylecheck,golint - Democracy_Cancelled []gsrpcTypes.EventDemocracyCancelled //nolint:stylecheck,golint - Democracy_Executed []gsrpcTypes.EventDemocracyExecuted //nolint:stylecheck,golint - Democracy_Delegated []gsrpcTypes.EventDemocracyDelegated //nolint:stylecheck,golint - Democracy_Undelegated []gsrpcTypes.EventDemocracyUndelegated //nolint:stylecheck,golint - Democracy_Vetoed []gsrpcTypes.EventDemocracyVetoed //nolint:stylecheck,golint - Democracy_PreimageNoted []gsrpcTypes.EventDemocracyPreimageNoted //nolint:stylecheck,golint - Democracy_PreimageUsed []gsrpcTypes.EventDemocracyPreimageUsed //nolint:stylecheck,golint - Democracy_PreimageInvalid []gsrpcTypes.EventDemocracyPreimageInvalid //nolint:stylecheck,golint - Democracy_PreimageMissing []gsrpcTypes.EventDemocracyPreimageMissing //nolint:stylecheck,golint - Democracy_PreimageReaped []gsrpcTypes.EventDemocracyPreimageReaped //nolint:stylecheck,golint - Democracy_Unlocked []gsrpcTypes.EventDemocracyUnlocked //nolint:stylecheck,golint - Democracy_Blacklisted []gsrpcTypes.EventDemocracyBlacklisted //nolint:stylecheck,golint - Council_Proposed []gsrpcTypes.EventCollectiveProposed //nolint:stylecheck,golint - Council_Voted []gsrpcTypes.EventCollectiveVoted //nolint:stylecheck,golint - Council_Approved []gsrpcTypes.EventCollectiveApproved //nolint:stylecheck,golint - Council_Disapproved []gsrpcTypes.EventCollectiveDisapproved //nolint:stylecheck,golint - Council_Executed []gsrpcTypes.EventCollectiveExecuted //nolint:stylecheck,golint - Council_MemberExecuted []gsrpcTypes.EventCollectiveMemberExecuted //nolint:stylecheck,golint - Council_Closed []gsrpcTypes.EventCollectiveClosed //nolint:stylecheck,golint - TechnicalCommittee_Proposed []gsrpcTypes.EventTechnicalCommitteeProposed //nolint:stylecheck,golint - TechnicalCommittee_Voted []gsrpcTypes.EventTechnicalCommitteeVoted //nolint:stylecheck,golint - TechnicalCommittee_Approved []gsrpcTypes.EventTechnicalCommitteeApproved //nolint:stylecheck,golint - TechnicalCommittee_Disapproved []gsrpcTypes.EventTechnicalCommitteeDisapproved //nolint:stylecheck,golint - TechnicalCommittee_Executed []gsrpcTypes.EventTechnicalCommitteeExecuted //nolint:stylecheck,golint - TechnicalCommittee_MemberExecuted []gsrpcTypes.EventTechnicalCommitteeMemberExecuted //nolint:stylecheck,golint - TechnicalCommittee_Closed []gsrpcTypes.EventTechnicalCommitteeClosed //nolint:stylecheck,golint - TechnicalMembership_MemberAdded []gsrpcTypes.EventTechnicalMembershipMemberAdded //nolint:stylecheck,golint - TechnicalMembership_MemberRemoved []gsrpcTypes.EventTechnicalMembershipMemberRemoved //nolint:stylecheck,golint - TechnicalMembership_MembersSwapped []gsrpcTypes.EventTechnicalMembershipMembersSwapped //nolint:stylecheck,golint - TechnicalMembership_MembersReset []gsrpcTypes.EventTechnicalMembershipMembersReset //nolint:stylecheck,golint - TechnicalMembership_KeyChanged []gsrpcTypes.EventTechnicalMembershipKeyChanged //nolint:stylecheck,golint - TechnicalMembership_Dummy []gsrpcTypes.EventTechnicalMembershipDummy //nolint:stylecheck,golint - ElectionProviderMultiPhase_SolutionStored []gsrpcTypes.EventElectionMultiPhaseSolutionStored //nolint:stylecheck,golint - ElectionProviderMultiPhase_ElectionFinalized []gsrpcTypes.EventElectionMultiPhaseElectionFinalized //nolint:stylecheck,golint - ElectionProviderMultiPhase_Rewarded []gsrpcTypes.EventElectionMultiPhaseRewarded //nolint:stylecheck,golint - ElectionProviderMultiPhase_Slashed []gsrpcTypes.EventElectionMultiPhaseSlashed //nolint:stylecheck,golint - ElectionProviderMultiPhase_SignedPhaseStarted []gsrpcTypes.EventElectionMultiPhaseSignedPhaseStarted //nolint:stylecheck,golint - ElectionProviderMultiPhase_UnsignedPhaseStarted []gsrpcTypes.EventElectionMultiPhaseUnsignedPhaseStarted //nolint:stylecheck,golint - Elections_NewTerm []gsrpcTypes.EventElectionsNewTerm //nolint:stylecheck,golint - Elections_EmptyTerm []gsrpcTypes.EventElectionsEmptyTerm //nolint:stylecheck,golint - Elections_ElectionError []gsrpcTypes.EventElectionsElectionError //nolint:stylecheck,golint - Elections_MemberKicked []gsrpcTypes.EventElectionsMemberKicked //nolint:stylecheck,golint - Elections_Renounced []gsrpcTypes.EventElectionsRenounced //nolint:stylecheck,golint - Elections_CandidateSlashed []gsrpcTypes.EventElectionsCandidateSlashed //nolint:stylecheck,golint - Elections_SeatHolderSlashed []gsrpcTypes.EventElectionsSeatHolderSlashed //nolint:stylecheck,golint - Identity_IdentitySet []gsrpcTypes.EventIdentitySet //nolint:stylecheck,golint - Identity_IdentityCleared []gsrpcTypes.EventIdentityCleared //nolint:stylecheck,golint - Identity_IdentityKilled []gsrpcTypes.EventIdentityKilled //nolint:stylecheck,golint - Identity_JudgementRequested []gsrpcTypes.EventIdentityJudgementRequested //nolint:stylecheck,golint - Identity_JudgementUnrequested []gsrpcTypes.EventIdentityJudgementUnrequested //nolint:stylecheck,golint - Identity_JudgementGiven []gsrpcTypes.EventIdentityJudgementGiven //nolint:stylecheck,golint - Identity_RegistrarAdded []gsrpcTypes.EventIdentityRegistrarAdded //nolint:stylecheck,golint - Identity_SubIdentityAdded []gsrpcTypes.EventIdentitySubIdentityAdded //nolint:stylecheck,golint - Identity_SubIdentityRemoved []gsrpcTypes.EventIdentitySubIdentityRemoved //nolint:stylecheck,golint - Identity_SubIdentityRevoked []gsrpcTypes.EventIdentitySubIdentityRevoked //nolint:stylecheck,golint - Society_Founded []gsrpcTypes.EventSocietyFounded //nolint:stylecheck,golint - Society_Bid []gsrpcTypes.EventSocietyBid //nolint:stylecheck,golint - Society_Vouch []gsrpcTypes.EventSocietyVouch //nolint:stylecheck,golint - Society_AutoUnbid []gsrpcTypes.EventSocietyAutoUnbid //nolint:stylecheck,golint - Society_Unbid []gsrpcTypes.EventSocietyUnbid //nolint:stylecheck,golint - Society_Unvouch []gsrpcTypes.EventSocietyUnvouch //nolint:stylecheck,golint - Society_Inducted []gsrpcTypes.EventSocietyInducted //nolint:stylecheck,golint - Society_SuspendedMemberJudgement []gsrpcTypes.EventSocietySuspendedMemberJudgement //nolint:stylecheck,golint - Society_CandidateSuspended []gsrpcTypes.EventSocietyCandidateSuspended //nolint:stylecheck,golint - Society_MemberSuspended []gsrpcTypes.EventSocietyMemberSuspended //nolint:stylecheck,golint - Society_Challenged []gsrpcTypes.EventSocietyChallenged //nolint:stylecheck,golint - Society_Vote []gsrpcTypes.EventSocietyVote //nolint:stylecheck,golint - Society_DefenderVote []gsrpcTypes.EventSocietyDefenderVote //nolint:stylecheck,golint - Society_NewMaxMembers []gsrpcTypes.EventSocietyNewMaxMembers //nolint:stylecheck,golint - Society_Unfounded []gsrpcTypes.EventSocietyUnfounded //nolint:stylecheck,golint - Society_Deposit []gsrpcTypes.EventSocietyDeposit //nolint:stylecheck,golint - Recovery_RecoveryCreated []gsrpcTypes.EventRecoveryCreated //nolint:stylecheck,golint - Recovery_RecoveryInitiated []gsrpcTypes.EventRecoveryInitiated //nolint:stylecheck,golint - Recovery_RecoveryVouched []gsrpcTypes.EventRecoveryVouched //nolint:stylecheck,golint - Recovery_RecoveryClosed []gsrpcTypes.EventRecoveryClosed //nolint:stylecheck,golint - Recovery_AccountRecovered []gsrpcTypes.EventRecoveryAccountRecovered //nolint:stylecheck,golint - Recovery_RecoveryRemoved []gsrpcTypes.EventRecoveryRemoved //nolint:stylecheck,golint - Vesting_VestingUpdated []gsrpcTypes.EventVestingVestingUpdated //nolint:stylecheck,golint - Vesting_VestingCompleted []gsrpcTypes.EventVestingVestingCompleted //nolint:stylecheck,golint + System_CodeUpdated []gsrpcTypes.EventSystemCodeUpdated //nolint:stylecheck,golint + System_NewAccount []gsrpcTypes.EventSystemNewAccount //nolint:stylecheck,golint + System_KilledAccount []gsrpcTypes.EventSystemKilledAccount //nolint:stylecheck,golint + Assets_Created []types2.EventAssetCreated //nolint:stylecheck,golint + Assets_Issued []gsrpcTypes.EventAssetIssued //nolint:stylecheck,golint + Assets_Transferred []gsrpcTypes.EventAssetTransferred //nolint:stylecheck,golint + Assets_Burned []types2.EventAssetBurned //nolint:stylecheck,golint + Assets_TeamChanged []types2.EventAssetTeamChanged //nolint:stylecheck,golint + Assets_OwnerChanged []types2.EventAssetOwnerChanged //nolint:stylecheck,golint + Assets_Frozen []types2.EventAssetFrozen //nolint:stylecheck,golint + Assets_Thawed []types2.EventAssetThawed //nolint:stylecheck,golint + Assets_AssetFrozen []types2.EventAssetAssetFrozen //nolint:stylecheck,golint + Assets_AssetThawed []types2.EventAssetAssetThawed //nolint:stylecheck,golint + Assets_Destroyed []gsrpcTypes.EventAssetDestroyed //nolint:stylecheck,golint + Assets_ForceCreated []types2.EventAssetForceCreated //nolint:stylecheck,golint + Assets_MetadataSet []types2.EventAssetMetadataSet //nolint:stylecheck,golint + Assets_MetadataCleared []types2.EventAssetMetadataCleared //nolint:stylecheck,golint + Assets_ApprovedTransfer []types2.EventAssetApprovedTransfer //nolint:stylecheck,golint + Assets_ApprovalCancelled []types2.EventAssetApprovalCancelled //nolint:stylecheck,golint + Assets_TransferredApproved []types2.EventAssetTransferredApproved //nolint:stylecheck,golint + Assets_AssetStatusChanged []types2.EventAssetAssetStatusChanged //nolint:stylecheck,golint + Democracy_Proposed []gsrpcTypes.EventDemocracyProposed //nolint:stylecheck,golint + Democracy_Tabled []gsrpcTypes.EventDemocracyTabled //nolint:stylecheck,golint + Democracy_ExternalTabled []gsrpcTypes.EventDemocracyExternalTabled //nolint:stylecheck,golint + Democracy_Started []gsrpcTypes.EventDemocracyStarted //nolint:stylecheck,golint + Democracy_Passed []gsrpcTypes.EventDemocracyPassed //nolint:stylecheck,golint + Democracy_NotPassed []gsrpcTypes.EventDemocracyNotPassed //nolint:stylecheck,golint + Democracy_Cancelled []gsrpcTypes.EventDemocracyCancelled //nolint:stylecheck,golint + Democracy_Executed []gsrpcTypes.EventDemocracyExecuted //nolint:stylecheck,golint + Democracy_Delegated []gsrpcTypes.EventDemocracyDelegated //nolint:stylecheck,golint + Democracy_Undelegated []gsrpcTypes.EventDemocracyUndelegated //nolint:stylecheck,golint + Democracy_Vetoed []gsrpcTypes.EventDemocracyVetoed //nolint:stylecheck,golint + Democracy_PreimageNoted []gsrpcTypes.EventDemocracyPreimageNoted //nolint:stylecheck,golint + Democracy_PreimageUsed []gsrpcTypes.EventDemocracyPreimageUsed //nolint:stylecheck,golint + Democracy_PreimageInvalid []gsrpcTypes.EventDemocracyPreimageInvalid //nolint:stylecheck,golint + Democracy_PreimageMissing []gsrpcTypes.EventDemocracyPreimageMissing //nolint:stylecheck,golint + Democracy_PreimageReaped []gsrpcTypes.EventDemocracyPreimageReaped //nolint:stylecheck,golint + Democracy_Unlocked []gsrpcTypes.EventDemocracyUnlocked //nolint:stylecheck,golint + Democracy_Blacklisted []gsrpcTypes.EventDemocracyBlacklisted //nolint:stylecheck,golint + Council_Proposed []gsrpcTypes.EventCollectiveProposed //nolint:stylecheck,golint + Council_Voted []gsrpcTypes.EventCollectiveVoted //nolint:stylecheck,golint + Council_Approved []gsrpcTypes.EventCollectiveApproved //nolint:stylecheck,golint + Council_Disapproved []gsrpcTypes.EventCollectiveDisapproved //nolint:stylecheck,golint + Council_Executed []gsrpcTypes.EventCollectiveExecuted //nolint:stylecheck,golint + Council_MemberExecuted []gsrpcTypes.EventCollectiveMemberExecuted //nolint:stylecheck,golint + Council_Closed []gsrpcTypes.EventCollectiveClosed //nolint:stylecheck,golint + TechnicalCommittee_Proposed []gsrpcTypes.EventTechnicalCommitteeProposed //nolint:stylecheck,golint + TechnicalCommittee_Voted []gsrpcTypes.EventTechnicalCommitteeVoted //nolint:stylecheck,golint + TechnicalCommittee_Approved []gsrpcTypes.EventTechnicalCommitteeApproved //nolint:stylecheck,golint + TechnicalCommittee_Disapproved []gsrpcTypes.EventTechnicalCommitteeDisapproved //nolint:stylecheck,golint + TechnicalCommittee_Executed []gsrpcTypes.EventTechnicalCommitteeExecuted //nolint:stylecheck,golint + TechnicalCommittee_MemberExecuted []gsrpcTypes.EventTechnicalCommitteeMemberExecuted //nolint:stylecheck,golint + TechnicalCommittee_Closed []gsrpcTypes.EventTechnicalCommitteeClosed //nolint:stylecheck,golint + TechnicalMembership_MemberAdded []gsrpcTypes.EventTechnicalMembershipMemberAdded //nolint:stylecheck,golint + TechnicalMembership_MemberRemoved []gsrpcTypes.EventTechnicalMembershipMemberRemoved //nolint:stylecheck,golint + TechnicalMembership_MembersSwapped []gsrpcTypes.EventTechnicalMembershipMembersSwapped //nolint:stylecheck,golint + TechnicalMembership_MembersReset []gsrpcTypes.EventTechnicalMembershipMembersReset //nolint:stylecheck,golint + TechnicalMembership_KeyChanged []gsrpcTypes.EventTechnicalMembershipKeyChanged //nolint:stylecheck,golint + TechnicalMembership_Dummy []gsrpcTypes.EventTechnicalMembershipDummy //nolint:stylecheck,golint + ElectionProviderMultiPhase_SolutionStored []types2.EventElectionMultiPhaseSolutionStored //nolint:stylecheck,golint + ElectionProviderMultiPhase_ElectionFinalized []types2.EventElectionMultiPhaseElectionFinalized //nolint:stylecheck,golint + ElectionProviderMultiPhase_Rewarded []types2.EventElectionMultiPhaseRewarded //nolint:stylecheck,golint + ElectionProviderMultiPhase_Slashed []types2.EventElectionMultiPhaseSlashed //nolint:stylecheck,golint + ElectionProviderMultiPhase_SignedPhaseStarted []types2.EventElectionMultiPhaseSignedPhaseStarted //nolint:stylecheck,golint + ElectionProviderMultiPhase_UnsignedPhaseStarted []types2.EventElectionMultiPhaseUnsignedPhaseStarted //nolint:stylecheck,golint + Elections_NewTerm []gsrpcTypes.EventElectionsNewTerm //nolint:stylecheck,golint + Elections_EmptyTerm []gsrpcTypes.EventElectionsEmptyTerm //nolint:stylecheck,golint + Elections_ElectionError []gsrpcTypes.EventElectionsElectionError //nolint:stylecheck,golint + Elections_MemberKicked []gsrpcTypes.EventElectionsMemberKicked //nolint:stylecheck,golint + Elections_Renounced []types2.EventElectionsRenounced //nolint:stylecheck,golint + Elections_CandidateSlashed []types2.EventElectionsCandidateSlashed //nolint:stylecheck,golint + Elections_SeatHolderSlashed []types2.EventElectionsSeatHolderSlashed //nolint:stylecheck,golint + Identity_IdentitySet []gsrpcTypes.EventIdentitySet //nolint:stylecheck,golint + Identity_IdentityCleared []gsrpcTypes.EventIdentityCleared //nolint:stylecheck,golint + Identity_IdentityKilled []gsrpcTypes.EventIdentityKilled //nolint:stylecheck,golint + Identity_JudgementRequested []gsrpcTypes.EventIdentityJudgementRequested //nolint:stylecheck,golint + Identity_JudgementUnrequested []gsrpcTypes.EventIdentityJudgementUnrequested //nolint:stylecheck,golint + Identity_JudgementGiven []gsrpcTypes.EventIdentityJudgementGiven //nolint:stylecheck,golint + Identity_RegistrarAdded []gsrpcTypes.EventIdentityRegistrarAdded //nolint:stylecheck,golint + Identity_SubIdentityAdded []gsrpcTypes.EventIdentitySubIdentityAdded //nolint:stylecheck,golint + Identity_SubIdentityRemoved []gsrpcTypes.EventIdentitySubIdentityRemoved //nolint:stylecheck,golint + Identity_SubIdentityRevoked []gsrpcTypes.EventIdentitySubIdentityRevoked //nolint:stylecheck,golint + Society_Founded []gsrpcTypes.EventSocietyFounded //nolint:stylecheck,golint + Society_Bid []gsrpcTypes.EventSocietyBid //nolint:stylecheck,golint + Society_Vouch []gsrpcTypes.EventSocietyVouch //nolint:stylecheck,golint + Society_AutoUnbid []gsrpcTypes.EventSocietyAutoUnbid //nolint:stylecheck,golint + Society_Unbid []gsrpcTypes.EventSocietyUnbid //nolint:stylecheck,golint + Society_Unvouch []gsrpcTypes.EventSocietyUnvouch //nolint:stylecheck,golint + Society_Inducted []gsrpcTypes.EventSocietyInducted //nolint:stylecheck,golint + Society_SuspendedMemberJudgement []gsrpcTypes.EventSocietySuspendedMemberJudgement //nolint:stylecheck,golint + Society_CandidateSuspended []gsrpcTypes.EventSocietyCandidateSuspended //nolint:stylecheck,golint + Society_MemberSuspended []gsrpcTypes.EventSocietyMemberSuspended //nolint:stylecheck,golint + Society_Challenged []gsrpcTypes.EventSocietyChallenged //nolint:stylecheck,golint + Society_Vote []gsrpcTypes.EventSocietyVote //nolint:stylecheck,golint + Society_DefenderVote []gsrpcTypes.EventSocietyDefenderVote //nolint:stylecheck,golint + Society_NewMaxMembers []gsrpcTypes.EventSocietyNewMaxMembers //nolint:stylecheck,golint + Society_Unfounded []gsrpcTypes.EventSocietyUnfounded //nolint:stylecheck,golint + Society_Deposit []gsrpcTypes.EventSocietyDeposit //nolint:stylecheck,golint + Recovery_RecoveryCreated []gsrpcTypes.EventRecoveryCreated //nolint:stylecheck,golint + Recovery_RecoveryInitiated []gsrpcTypes.EventRecoveryInitiated //nolint:stylecheck,golint + Recovery_RecoveryVouched []gsrpcTypes.EventRecoveryVouched //nolint:stylecheck,golint + Recovery_RecoveryClosed []gsrpcTypes.EventRecoveryClosed //nolint:stylecheck,golint + Recovery_AccountRecovered []gsrpcTypes.EventRecoveryAccountRecovered //nolint:stylecheck,golint + Recovery_RecoveryRemoved []gsrpcTypes.EventRecoveryRemoved //nolint:stylecheck,golint + Vesting_VestingUpdated []gsrpcTypes.EventVestingVestingUpdated //nolint:stylecheck,golint + Vesting_VestingCompleted []gsrpcTypes.EventVestingVestingCompleted //nolint:stylecheck,golint // gsrpcTypes.BlockNum is incorrect //Scheduler_Scheduled []gsrpcTypes.EventSchedulerScheduled //nolint:stylecheck,golint //Scheduler_Canceled []gsrpcTypes.EventSchedulerCanceled //nolint:stylecheck,golint @@ -171,26 +172,26 @@ type OriginEventRecord struct { Treasury_Burnt []gsrpcTypes.EventTreasuryBurnt //nolint:stylecheck,golint Treasury_Rollover []gsrpcTypes.EventTreasuryRollover //nolint:stylecheck,golint Treasury_Deposit []gsrpcTypes.EventTreasuryDeposit //nolint:stylecheck,golint - Tips_NewTip []gsrpcTypes.EventTipsNewTip //nolint:stylecheck,golint - Tips_TipClosing []gsrpcTypes.EventTipsTipClosing //nolint:stylecheck,golint - Tips_TipClosed []gsrpcTypes.EventTipsTipClosed //nolint:stylecheck,golint - Tips_TipRetracted []gsrpcTypes.EventTipsTipRetracted //nolint:stylecheck,golint - Tips_TipSlashed []gsrpcTypes.EventTipsTipSlashed //nolint:stylecheck,golint - Bounties_BountyProposed []gsrpcTypes.EventBountyBountyProposed //nolint:stylecheck,golint - Bounties_BountyRejected []gsrpcTypes.EventBountyBountyRejected //nolint:stylecheck,golint - Bounties_BountyBecameActive []gsrpcTypes.EventBountyBountyBecameActive //nolint:stylecheck,golint - Bounties_BountyAwarded []gsrpcTypes.EventBountyBountyAwarded //nolint:stylecheck,golint - Bounties_BountyClaimed []gsrpcTypes.EventBountyBountyClaimed //nolint:stylecheck,golint - Bounties_BountyCanceled []gsrpcTypes.EventBountyBountyCanceled //nolint:stylecheck,golint - Bounties_BountyExtended []gsrpcTypes.EventBountyBountyExtended //nolint:stylecheck,golint + Tips_NewTip []types2.EventTipsNewTip //nolint:stylecheck,golint + Tips_TipClosing []types2.EventTipsTipClosing //nolint:stylecheck,golint + Tips_TipClosed []types2.EventTipsTipClosed //nolint:stylecheck,golint + Tips_TipRetracted []types2.EventTipsTipRetracted //nolint:stylecheck,golint + Tips_TipSlashed []types2.EventTipsTipSlashed //nolint:stylecheck,golint + Bounties_BountyProposed []types2.EventBountyBountyProposed //nolint:stylecheck,golint + Bounties_BountyRejected []types2.EventBountyBountyRejected //nolint:stylecheck,golint + Bounties_BountyBecameActive []types2.EventBountyBountyBecameActive //nolint:stylecheck,golint + Bounties_BountyAwarded []types2.EventBountyBountyAwarded //nolint:stylecheck,golint + Bounties_BountyClaimed []types2.EventBountyBountyClaimed //nolint:stylecheck,golint + Bounties_BountyCanceled []types2.EventBountyBountyCanceled //nolint:stylecheck,golint + Bounties_BountyExtended []types2.EventBountyBountyExtended //nolint:stylecheck,golint Contracts_Instantiated []gsrpcTypes.EventContractsInstantiated //nolint:stylecheck,golint Contracts_Evicted []gsrpcTypes.EventContractsEvicted //nolint:stylecheck,golint - Contracts_Terminated []gsrpcTypes.EventContractsTerminated //nolint:stylecheck,golint + Contracts_Terminated []types2.EventContractsTerminated //nolint:stylecheck,golint Contracts_Restored []gsrpcTypes.EventContractsRestored //nolint:stylecheck,golint Contracts_CodeStored []gsrpcTypes.EventContractsCodeStored //nolint:stylecheck,golint Contracts_ScheduleUpdated []gsrpcTypes.EventContractsScheduleUpdated //nolint:stylecheck,golint - Contracts_ContractEmitted []gsrpcTypes.EventContractsContractEmitted //nolint:stylecheck,golint - Contracts_CodeRemoved []gsrpcTypes.EventContractsCodeRemoved //nolint:stylecheck,golint + Contracts_ContractEmitted []types2.EventContractsContractEmitted //nolint:stylecheck,golint + Contracts_CodeRemoved []types2.EventContractsCodeRemoved //nolint:stylecheck,golint Utility_BatchInterrupted []gsrpcTypes.EventUtilityBatchInterrupted //nolint:stylecheck,golint Utility_BatchCompleted []gsrpcTypes.EventUtilityBatchCompleted //nolint:stylecheck,golint Multisig_NewMultisig []gsrpcTypes.EventMultisigNewMultisig //nolint:stylecheck,golint diff --git a/expand/extra/xcm.go b/expand/extra/xcm.go index b3a5d68..e305c7d 100644 --- a/expand/extra/xcm.go +++ b/expand/extra/xcm.go @@ -1,8 +1,8 @@ package extra import ( - "github.com/centrifuge/go-substrate-rpc-client/v3/scale" - gsrpcTypes "github.com/centrifuge/go-substrate-rpc-client/v3/types" + "github.com/JFJun/go-substrate-rpc-client/v3/scale" + gsrpcTypes "github.com/JFJun/go-substrate-rpc-client/v3/types" ) // https://github.com/paritytech/polkadot/blob/master/xcm/src/v0/traits.rs#L25 diff --git a/expand/extrinsic.go b/expand/extrinsic.go index 8d262bf..712516d 100644 --- a/expand/extrinsic.go +++ b/expand/extrinsic.go @@ -20,13 +20,14 @@ import ( "bytes" "encoding/json" "fmt" - "github.com/centrifuge/go-substrate-rpc-client/v3/types" "io" "math/big" "strings" - "github.com/centrifuge/go-substrate-rpc-client/v3/scale" - "github.com/centrifuge/go-substrate-rpc-client/v3/signature" + "github.com/JFJun/go-substrate-rpc-client/v3/types" + + "github.com/JFJun/go-substrate-rpc-client/v3/scale" + "github.com/JFJun/go-substrate-rpc-client/v3/signature" ) const ( @@ -152,7 +153,6 @@ func (e *Extrinsic) Sign(signer signature.KeyringPair, o types.SignatureOptions) signerPubKey.SetTypes(0) signerPubKey.AccountId = types.NewAccountID(signer.PublicKey) - sig, err := payload.Sign(signer) if err != nil { return err diff --git a/expand/extrinsic_decode.go b/expand/extrinsic_decode.go index 9675953..41cc055 100644 --- a/expand/extrinsic_decode.go +++ b/expand/extrinsic_decode.go @@ -8,9 +8,9 @@ package expand import ( "fmt" + "github.com/JFJun/go-substrate-rpc-client/v3/scale" + "github.com/JFJun/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/utils" - "github.com/centrifuge/go-substrate-rpc-client/v3/scale" - "github.com/centrifuge/go-substrate-rpc-client/v3/types" "github.com/ethereum/go-ethereum/log" "github.com/huandu/xstrings" ) @@ -770,7 +770,7 @@ func (ed *ExtrinsicDecoder) checkChainX(chainName string) bool { if err == nil { isChainX = true } - if isChainX || chainName == ClientNameChainX || chainName == ClientNameChainXAsset { + if isChainX || chainName == ClientNameChainX || chainName == ClientNameChainXAsset { return true } else { return false diff --git a/expand/metadata.go b/expand/metadata.go index 6b41451..0aa9316 100644 --- a/expand/metadata.go +++ b/expand/metadata.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" + "github.com/JFJun/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/utils" - "github.com/centrifuge/go-substrate-rpc-client/v3/types" "github.com/huandu/xstrings" ) @@ -28,6 +28,10 @@ type iMetaVersion interface { func NewMetadataExpand(meta *types.Metadata) (*MetadataExpand, error) { me := new(MetadataExpand) me.meta = meta + if meta.Version >= 14 { + me.MV = newV14UpGrade(meta) + return me, nil + } if meta.IsMetadataV11 { me.MV = newV11(meta.AsMetadataV11.Modules) } else if meta.IsMetadataV12 { @@ -206,7 +210,6 @@ func (v v12) GetConstants(modName, constantsName string) (constantsType string, "constantsName=%s", modName, constantsName) } - type v13 struct { module []types.ModuleMetadataV13 } @@ -288,6 +291,28 @@ func (v v13) GetConstants(modName, constantsName string) (constantsType string, "constantsName=%s", modName, constantsName) } +type v14Upgrade struct { + meta *types.Metadata +} + +func newV14UpGrade(meta *types.Metadata) *v14Upgrade { + v := new(v14Upgrade) + v.meta = meta + return v +} + +func (v v14Upgrade) GetCallIndex(moduleName, fn string) (callIdx string, err error) { + return v.meta.GetCallIndex(moduleName, fn) +} + +func (v v14Upgrade) FindNameByCallIndex(callIdx string) (moduleName, fn string, err error) { + return v.meta.FindNameByCallIndex(callIdx) +} + +func (v v14Upgrade) GetConstants(modName, constantsName string) (constantsType string, constantsValue []byte, err error) { + return v.meta.GetConstants(modName, constantsName) +} + /* Balances.transfer */ diff --git a/expand/polkadot/types.go b/expand/polkadot/types.go index 8fc2d45..24495d3 100644 --- a/expand/polkadot/types.go +++ b/expand/polkadot/types.go @@ -1,10 +1,10 @@ package polkadot import ( + "github.com/JFJun/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/expand/base" "github.com/Platdot-Network/substrate-go/expand/bridge" "github.com/Platdot-Network/substrate-go/expand/extra" - "github.com/centrifuge/go-substrate-rpc-client/v3/types" ) type PolkadotEventRecords struct { diff --git a/expand/types.go b/expand/types.go index 5472fe1..e493c0d 100644 --- a/expand/types.go +++ b/expand/types.go @@ -8,17 +8,17 @@ import ( "io" "reflect" + "github.com/JFJun/go-substrate-rpc-client/v3/scale" + "github.com/JFJun/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/uint128" "github.com/Platdot-Network/substrate-go/utils" - "github.com/centrifuge/go-substrate-rpc-client/v3/scale" - "github.com/centrifuge/go-substrate-rpc-client/v3/types" "github.com/huandu/xstrings" "github.com/shopspring/decimal" ) -const( +const ( ClientNameChainXAsset = "chainx_asset" - ClientNameChainX = "chainx" + ClientNameChainX = "chainx" ) const OriginAssetId = 0 diff --git a/go.mod b/go.mod index 8375af8..b3cd927 100644 --- a/go.mod +++ b/go.mod @@ -5,8 +5,9 @@ go 1.15 replace github.com/centrifuge/go-substrate-rpc-client/v3 v3.0.2 => github.com/chainx-org/go-substrate-rpc-client/v3 v3.1.1 require ( + github.com/JFJun/go-substrate-rpc-client/v3 v3.0.5 github.com/centrifuge/go-substrate-rpc-client/v3 v3.0.2 - github.com/ethereum/go-ethereum v1.10.4 + github.com/ethereum/go-ethereum v1.10.12 github.com/hacpy/chainbridge-substrate-events v1.0.0 github.com/huandu/xstrings v1.3.2 github.com/rjman-ljm/go-substrate-crypto v1.0.0 diff --git a/go.sum b/go.sum index 88c2989..8c9a3ae 100644 --- a/go.sum +++ b/go.sum @@ -39,6 +39,8 @@ github.com/ChainSafe/go-schnorrkel v0.0.0-20201021020641-d3c6d3118d10/go.mod h1: github.com/ChainSafe/go-schnorrkel v0.0.0-20210318173838-ccb5cd955283 h1:bCAjrlKrO8Y9biIFMx2ejhXpG1x75mwKqbsL8dx5EOk= github.com/ChainSafe/go-schnorrkel v0.0.0-20210318173838-ccb5cd955283/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/JFJun/go-substrate-rpc-client/v3 v3.0.5 h1:sbaGzxbzycliY/gFzUKTTGzRo9TNQcc2zMUCNLk/uIQ= +github.com/JFJun/go-substrate-rpc-client/v3 v3.0.5/go.mod h1:CUUIx2uEemdrgfiGnedC9F2n1ZZ4Gp3SkcPoBXKPpLM= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= @@ -132,8 +134,11 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= +github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= +github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= @@ -144,10 +149,8 @@ github.com/ethereum/go-ethereum v1.9.21/go.mod h1:RXAVzbGrSGmDkDnHymruTAIEjUR3E4 github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= github.com/ethereum/go-ethereum v1.10.2/go.mod h1:YmSRTZNqAvVUg3BIG8uhT/BOkFk9+R2iCbxw5zOlnWY= github.com/ethereum/go-ethereum v1.10.3/go.mod h1:99onQmSd1GRGOziyGldI41YQb7EESX3Q4H41IfJgIQQ= -github.com/ethereum/go-ethereum v1.10.4 h1:JPZPL2MHbegfFStcaOrrggMVIcf57OQHQ0J3UhjQ+xQ= -github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg= -github.com/ethereum/go-ethereum v1.10.8 h1:0UP5WUR8hh46ffbjJV7PK499+uGEyasRIfffS0vy06o= -github.com/ethereum/go-ethereum v1.10.8/go.mod h1:pJNuIUYfX5+JKzSD/BTdNsvJSZ1TJqmz0dVyXMAbf6M= +github.com/ethereum/go-ethereum v1.10.12 h1:el/KddB3gLEsnNgGQ3SQuZuiZjwnFTYHe5TwUet5Om4= +github.com/ethereum/go-ethereum v1.10.12/go.mod h1:W3yfrFyL9C1pHcwY5hmRHVDaorTiQxhYBkKyu5mEDHw= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= @@ -172,6 +175,7 @@ github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dT github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -203,6 +207,7 @@ github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -242,6 +247,7 @@ github.com/hacpy/chainbridge-substrate-events v1.0.0/go.mod h1:g7dBztTtT766hz38e github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= @@ -303,6 +309,7 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/karalabe/usb v0.0.0-20211005121534-4c5740d64559/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kilic/bls12-381 v0.0.0-20201226121925-69dacb279461/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= @@ -361,6 +368,8 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= @@ -451,8 +460,6 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stafiprotocol/go-substrate-rpc-client v1.0.5 h1:cUIj1+B5xxko9XN4c/bmSv8YXf//YCEtT5CrkA5r1dY= github.com/stafiprotocol/go-substrate-rpc-client v1.0.5/go.mod h1:P3xucNyw6UjKvCvGg0eiQJhcRyZsUv5a9akxDTLMHFk= -github.com/stafiprotocol/go-substrate-rpc-client v1.1.0 h1:WpO3qD2syhFFgLldPy77jDqrz7cbilKsyap9PW8mP4g= -github.com/stafiprotocol/go-substrate-rpc-client v1.1.0/go.mod h1:P3xucNyw6UjKvCvGg0eiQJhcRyZsUv5a9akxDTLMHFk= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= @@ -469,6 +476,7 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tklauser/go-sysconf v0.3.5 h1:uu3Xl4nkLzQfXNsWn15rPc/HQCJKObbt1dKJeWp3vU4= github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= @@ -514,8 +522,6 @@ golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a h1:kr2P4QFmQr29mSLA43kwrOcgcReGTfbE9N577tCTuBc= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -629,10 +635,8 @@ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210415045647-66c3f260301c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988 h1:EjgCl+fVlIaPJSori0ikSz3uV0DOHKWOJFpv1sAAhBM= golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 h1:uCLL3g5wH2xjxVREVuAbP9JM5PPKjRbXKRa6IBjkzmU= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= diff --git a/test/rpc_test.go b/test/rpc_test.go index eff64f7..5a74b93 100644 --- a/test/rpc_test.go +++ b/test/rpc_test.go @@ -14,9 +14,10 @@ import ( //const url = "ws://127.0.0.1:7087" // const url = "wss://kusama.elara.patract.io" -const url = "wss://kusama.api.onfinality.io/public-ws" +// const url = "wss://kusama.api.onfinality.io/public-ws" // const url = "wss://polkadot.elara.patract.io" +const url = "wss://rpc.polkadot.io" // const url = "wss://polkadot.api.onfinality.io/public-ws" @@ -24,12 +25,13 @@ const url = "wss://kusama.api.onfinality.io/public-ws" //const url = "wss://dot.supercube.pro/ws" //const url = "wss://chainx.supercube.pro/ws" -//const url = "ws://localhost:9977" +// const url = "ws://localhost:9944" + //const url = "wss://supercube.pro/ws" //const startBlock = 5715297 /* polkadot.event.proxy_executed */ -const startBlock = 9421750 -const endBlock = 9421750 +const startBlock = 7467638 +const endBlock = 7467638 func Test_GetBlockByNumber(t *testing.T) { c, err := client.New(url) diff --git a/tx/tx.go b/tx/tx.go index bc8c013..36d911d 100644 --- a/tx/tx.go +++ b/tx/tx.go @@ -3,10 +3,10 @@ package tx import ( "encoding/hex" "fmt" - "github.com/rjman-ljm/go-substrate-crypto/crypto" + "github.com/JFJun/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/expand" "github.com/Platdot-Network/substrate-go/utils" - "github.com/centrifuge/go-substrate-rpc-client/v3/types" + "github.com/rjman-ljm/go-substrate-crypto/crypto" "golang.org/x/crypto/blake2b" "strings" ) diff --git a/utils/util.go b/utils/util.go index 5901016..f8cc8c6 100644 --- a/utils/util.go +++ b/utils/util.go @@ -4,8 +4,8 @@ import ( "encoding/hex" "encoding/json" "fmt" + "github.com/JFJun/go-substrate-rpc-client/v3/types" "github.com/rjman-ljm/go-substrate-crypto/ss58" - "github.com/centrifuge/go-substrate-rpc-client/v3/types" "math/big" "strings" ) From f626322f77a5955157d26260f857ad0f56ddd9e6 Mon Sep 17 00:00:00 2001 From: hacpy Date: Mon, 22 Nov 2021 14:32:12 +0800 Subject: [PATCH 2/6] Remove extra nil parameter --- client/client.go | 26 +++++----- expand/extrinsic_decode.go | 3 +- go.mod | 2 + go.sum | 4 +- test/rpc_test.go | 101 +++++++++++++++++++------------------ 5 files changed, 72 insertions(+), 64 deletions(-) diff --git a/client/client.go b/client/client.go index 72081fc..0977dcc 100644 --- a/client/client.go +++ b/client/client.go @@ -6,26 +6,28 @@ import ( "encoding/json" "errors" "fmt" - gsrc "github.com/JFJun/go-substrate-rpc-client/v3" + "log" + "strconv" + "strings" + + gsrpc "github.com/JFJun/go-substrate-rpc-client/v3" gsClient "github.com/JFJun/go-substrate-rpc-client/v3/client" "github.com/JFJun/go-substrate-rpc-client/v3/rpc" "github.com/JFJun/go-substrate-rpc-client/v3/scale" "github.com/JFJun/go-substrate-rpc-client/v3/types" + log2 "github.com/ethereum/go-ethereum/log" + "github.com/rjman-ljm/go-substrate-crypto/ss58" + "golang.org/x/crypto/blake2b" + "github.com/Platdot-Network/substrate-go/expand" "github.com/Platdot-Network/substrate-go/expand/base" "github.com/Platdot-Network/substrate-go/expand/chainx/xevents" "github.com/Platdot-Network/substrate-go/models" "github.com/Platdot-Network/substrate-go/utils" - log2 "github.com/ethereum/go-ethereum/log" - "github.com/rjman-ljm/go-substrate-crypto/ss58" - "golang.org/x/crypto/blake2b" - "log" - "strconv" - "strings" ) type Client struct { - Api *gsrc.SubstrateAPI + Api *gsrpc.SubstrateAPI Meta *types.Metadata Prefix []byte //币种的前缀 Name string //链名字 @@ -41,7 +43,7 @@ func New(url string) (*Client, error) { var err error // 初始化rpc客户端 - c.Api, err = gsrc.NewSubstrateAPI(url) + c.Api, err = gsrpc.NewSubstrateAPI(url) //Api, err := gsrpc.NewSubstrateAPI(config.Default().RPCURL) if err != nil { return nil, err @@ -55,7 +57,7 @@ func New(url string) (*Client, error) { return c, nil } -func (c *Client) reConnectWs() (*gsrc.SubstrateAPI, error) { +func (c *Client) reConnectWs() (*gsrpc.SubstrateAPI, error) { cl, err := gsClient.Connect(c.Url) if err != nil { return nil, err @@ -64,7 +66,7 @@ func (c *Client) reConnectWs() (*gsrc.SubstrateAPI, error) { if err != nil { return nil, err } - return &gsrc.SubstrateAPI{ + return &gsrpc.SubstrateAPI{ RPC: newRPC, Client: cl, }, nil @@ -943,7 +945,7 @@ func (c *Client) GetAccountInfo(address string) (*types.AccountInfo, error) { if err != nil { return nil, fmt.Errorf("ss58 decode address error: %v\n", err) } - storage, err = types.CreateStorageKey(c.Meta, "System", "Account", pub, nil) + storage, err = types.CreateStorageKey(c.Meta, "System", "Account", pub) if err != nil { return nil, fmt.Errorf("create System.Account storage error: %v\n", err) } diff --git a/expand/extrinsic_decode.go b/expand/extrinsic_decode.go index 41cc055..8c212f2 100644 --- a/expand/extrinsic_decode.go +++ b/expand/extrinsic_decode.go @@ -10,9 +10,10 @@ import ( "github.com/JFJun/go-substrate-rpc-client/v3/scale" "github.com/JFJun/go-substrate-rpc-client/v3/types" - "github.com/Platdot-Network/substrate-go/utils" "github.com/ethereum/go-ethereum/log" "github.com/huandu/xstrings" + + "github.com/Platdot-Network/substrate-go/utils" ) type ExtrinsicDecoder struct { diff --git a/go.mod b/go.mod index b3cd927..ad495e7 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,8 @@ go 1.15 replace github.com/centrifuge/go-substrate-rpc-client/v3 v3.0.2 => github.com/chainx-org/go-substrate-rpc-client/v3 v3.1.1 +replace github.com/JFJun/go-substrate-rpc-client/v3 v3.0.5 => github.com/Platdot-network/go-substrate-rpc-client/v3 v3.0.6 + require ( github.com/JFJun/go-substrate-rpc-client/v3 v3.0.5 github.com/centrifuge/go-substrate-rpc-client/v3 v3.0.2 diff --git a/go.sum b/go.sum index 8c9a3ae..7cb60d0 100644 --- a/go.sum +++ b/go.sum @@ -39,9 +39,9 @@ github.com/ChainSafe/go-schnorrkel v0.0.0-20201021020641-d3c6d3118d10/go.mod h1: github.com/ChainSafe/go-schnorrkel v0.0.0-20210318173838-ccb5cd955283 h1:bCAjrlKrO8Y9biIFMx2ejhXpG1x75mwKqbsL8dx5EOk= github.com/ChainSafe/go-schnorrkel v0.0.0-20210318173838-ccb5cd955283/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/JFJun/go-substrate-rpc-client/v3 v3.0.5 h1:sbaGzxbzycliY/gFzUKTTGzRo9TNQcc2zMUCNLk/uIQ= -github.com/JFJun/go-substrate-rpc-client/v3 v3.0.5/go.mod h1:CUUIx2uEemdrgfiGnedC9F2n1ZZ4Gp3SkcPoBXKPpLM= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/Platdot-network/go-substrate-rpc-client/v3 v3.0.6 h1:UMWPwIIOiU/1B1y7CFZJbgZ6xfxk3N8EAARH1P5CrE8= +github.com/Platdot-network/go-substrate-rpc-client/v3 v3.0.6/go.mod h1:CUUIx2uEemdrgfiGnedC9F2n1ZZ4Gp3SkcPoBXKPpLM= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= diff --git a/test/rpc_test.go b/test/rpc_test.go index 5a74b93..394a76d 100644 --- a/test/rpc_test.go +++ b/test/rpc_test.go @@ -5,9 +5,9 @@ import ( "fmt" "testing" - "github.com/Platdot-Network/substrate-go/client" - "github.com/ethereum/go-ethereum/log" "github.com/rjman-ljm/go-substrate-crypto/ss58" + + "github.com/Platdot-Network/substrate-go/client" ) //const url = "wss://chainx.elara.patract.io" @@ -16,10 +16,12 @@ import ( // const url = "wss://kusama.api.onfinality.io/public-ws" -// const url = "wss://polkadot.elara.patract.io" -const url = "wss://rpc.polkadot.io" +//const url = "wss://polkadot.elara.patract.io" +//const url = "wss://rpc.polkadot.io" + +// const url = "wss://kusama-rpc.polkadot.io" -// const url = "wss://polkadot.api.onfinality.io/public-ws" +const url = "wss://polkadot.api.onfinality.io/public-ws" // const url = "wss://pub.elara.patract.io/polkadot" @@ -31,7 +33,8 @@ const url = "wss://rpc.polkadot.io" //const startBlock = 5715297 /* polkadot.event.proxy_executed */ const startBlock = 7467638 -const endBlock = 7467638 + +// const endBlock = 7467638 func Test_GetBlockByNumber(t *testing.T) { c, err := client.New(url) @@ -40,49 +43,49 @@ func Test_GetBlockByNumber(t *testing.T) { } c.SetPrefix(ss58.PolkadotPrefix) //c.Name = expand.ClientNameChainX - for i := startBlock; i <= endBlock; i++ { - //fmt.Printf("poll block#%v\n", i) - //expand.SetSerDeOptions(false) - resp, err := c.GetBlockByNumber(int64(i)) - if err != nil { - fmt.Printf("meet err: %v\n", err) - //t.Fatal(err) - } - - hash, err := c.Api.RPC.Chain.GetBlockHash(uint64(i)) - if err != nil { - fmt.Printf("GetBlockHash err\n") - } - - block, err := c.Api.RPC.Chain.GetBlock(hash) - if err != nil { - fmt.Printf("GetBlock err\n") - //api, _ := gsrpc.NewSubstrateAPI(url) - // - //hash, err := api.RPC.Chain.GetBlockHash(4744169) - //if err != nil { - // fmt.Printf("GetBlockHash err\n") - //} - // - //block, err := api.RPC.Chain.GetBlock(hash) - //if err != nil { - // fmt.Printf("Get Block err\n") - //} - // - //if block != nil { - // currentBlock := int64(block.Block.Header.Number) - // fmt.Printf("block is %v\n", currentBlock) - //} - } - - if block != nil { - currentBlock := int64(block.Block.Header.Number) - log.Debug("block is %v\n", currentBlock) - } - - d, _ := json.Marshal(resp) - fmt.Println(string(d)) + // for i := startBlock; i <= endBlock; i++ { + //fmt.Printf("poll block#%v\n", i) + //expand.SetSerDeOptions(false) + resp, err := c.GetBlockByNumber(int64(startBlock)) + if err != nil { + fmt.Printf("meet err: %v\n", err) + //t.Fatal(err) } + + //hash, err := c.Api.RPC.Chain.GetBlockHash(uint64(startBlock)) + //if err != nil { + // fmt.Printf("GetBlockHash err\n") + //} + + //block, err := c.Api.RPC.Chain.GetBlock(hash) + //if err != nil { + // fmt.Printf("GetBlock err\n") + //api, _ := gsrpc.NewSubstrateAPI(url) + // + //hash, err := api.RPC.Chain.GetBlockHash(4744169) + //if err != nil { + // fmt.Printf("GetBlockHash err\n") + //} + // + //block, err := api.RPC.Chain.GetBlock(hash) + //if err != nil { + // fmt.Printf("Get Block err\n") + //} + // + //if block != nil { + // currentBlock := int64(block.Block.Header.Number) + // fmt.Printf("block is %v\n", currentBlock) + //} + //} + // + //if block != nil { + // currentBlock := int64(block.Block.Header.Number) + // log.Debug("block is %v\n", currentBlock) + //} + + d, _ := json.Marshal(resp) + fmt.Println(string(d)) + // } } func Test_GetAccountInfo(t *testing.T) { @@ -91,7 +94,7 @@ func Test_GetAccountInfo(t *testing.T) { t.Fatal(err) } c.SetPrefix(ss58.PolkadotPrefix) - ai, err := c.GetAccountInfo("15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5") + ai, err := c.GetAccountInfo("1BzS3MjX9RXS2wz4tzHixasQqje5mMJcfTPPTyGQAEao3jU") if err != nil { t.Fatal(err) } From fb901d1e959a637309f3c7723d98a93bf9f79fb1 Mon Sep 17 00:00:00 2001 From: hacpy Date: Tue, 23 Nov 2021 10:44:47 +0800 Subject: [PATCH 3/6] Remove centrifuge/go-substrate-rpc-client Platdot has a direct dependency on v4, so I'm not sure if this will have any other impact, but in any case, first JFJun's event resolution can be used before proceeding to the next step. --- expand/extra/extra.go | 7 ++-- expand/extra/origin.go | 81 +++++++++++++++++++++--------------------- go.mod | 3 -- go.sum | 3 +- 4 files changed, 44 insertions(+), 50 deletions(-) diff --git a/expand/extra/extra.go b/expand/extra/extra.go index 3d70dc6..f3ed5d4 100644 --- a/expand/extra/extra.go +++ b/expand/extra/extra.go @@ -2,7 +2,6 @@ package extra import ( gsrpcTypes "github.com/JFJun/go-substrate-rpc-client/v3/types" - types2 "github.com/centrifuge/go-substrate-rpc-client/v3/types" ) type ExtraEvents struct { @@ -65,9 +64,9 @@ type ExtraEventRecord struct { PhragmenElection_EmptyTerm []gsrpcTypes.EventElectionsEmptyTerm PhragmenElection_ElectionError []gsrpcTypes.EventElectionsElectionError PhragmenElection_MemberKicked []gsrpcTypes.EventElectionsMemberKicked - PhragmenElection_Renounced []types2.EventElectionsRenounced - PhragmenElection_CandidateSlashed []types2.EventElectionsCandidateSlashed - PhragmenElection_SeatHolderSlashed []types2.EventElectionsSeatHolderSlashed + //PhragmenElection_Renounced []types2.EventElectionsRenounced + //PhragmenElection_CandidateSlashed []types2.EventElectionsCandidateSlashed + //PhragmenElection_SeatHolderSlashed []types2.EventElectionsSeatHolderSlashed Gilt_BidPlaced []BidPlaced Gilt_BidRetracted []BidRetracted diff --git a/expand/extra/origin.go b/expand/extra/origin.go index 5758ccc..210a094 100644 --- a/expand/extra/origin.go +++ b/expand/extra/origin.go @@ -2,7 +2,6 @@ package extra import ( gsrpcTypes "github.com/JFJun/go-substrate-rpc-client/v3/types" - types2 "github.com/centrifuge/go-substrate-rpc-client/v3/types" ) type TempMemo struct { @@ -45,30 +44,30 @@ type OriginEventRecord struct { Staking_Bonded []gsrpcTypes.EventStakingBonded //nolint:stylecheck,golint Staking_Unbonded []gsrpcTypes.EventStakingUnbonded //nolint:stylecheck,golint Staking_Withdrawn []gsrpcTypes.EventStakingWithdrawn //nolint:stylecheck,golint - Staking_Kicked []types2.EventStakingKicked //nolint:stylecheck,golint + //Staking_Kicked []types2.EventStakingKicked //nolint:stylecheck,golint System_ExtrinsicSuccess []gsrpcTypes.EventSystemExtrinsicSuccess //nolint:stylecheck,golint //System_ExtrinsicFailed []gsrpcTypes.EventSystemExtrinsicFailed //nolint:stylecheck,golint System_CodeUpdated []gsrpcTypes.EventSystemCodeUpdated //nolint:stylecheck,golint System_NewAccount []gsrpcTypes.EventSystemNewAccount //nolint:stylecheck,golint System_KilledAccount []gsrpcTypes.EventSystemKilledAccount //nolint:stylecheck,golint - Assets_Created []types2.EventAssetCreated //nolint:stylecheck,golint + //Assets_Created []types2.EventAssetCreated //nolint:stylecheck,golint Assets_Issued []gsrpcTypes.EventAssetIssued //nolint:stylecheck,golint Assets_Transferred []gsrpcTypes.EventAssetTransferred //nolint:stylecheck,golint - Assets_Burned []types2.EventAssetBurned //nolint:stylecheck,golint - Assets_TeamChanged []types2.EventAssetTeamChanged //nolint:stylecheck,golint - Assets_OwnerChanged []types2.EventAssetOwnerChanged //nolint:stylecheck,golint - Assets_Frozen []types2.EventAssetFrozen //nolint:stylecheck,golint - Assets_Thawed []types2.EventAssetThawed //nolint:stylecheck,golint - Assets_AssetFrozen []types2.EventAssetAssetFrozen //nolint:stylecheck,golint - Assets_AssetThawed []types2.EventAssetAssetThawed //nolint:stylecheck,golint + //Assets_Burned []types2.EventAssetBurned //nolint:stylecheck,golint + //Assets_TeamChanged []types2.EventAssetTeamChanged //nolint:stylecheck,golint + //Assets_OwnerChanged []types2.EventAssetOwnerChanged //nolint:stylecheck,golint + //Assets_Frozen []types2.EventAssetFrozen //nolint:stylecheck,golint + //Assets_Thawed []types2.EventAssetThawed //nolint:stylecheck,golint + //Assets_AssetFrozen []types2.EventAssetAssetFrozen //nolint:stylecheck,golint + //Assets_AssetThawed []types2.EventAssetAssetThawed //nolint:stylecheck,golint Assets_Destroyed []gsrpcTypes.EventAssetDestroyed //nolint:stylecheck,golint - Assets_ForceCreated []types2.EventAssetForceCreated //nolint:stylecheck,golint - Assets_MetadataSet []types2.EventAssetMetadataSet //nolint:stylecheck,golint - Assets_MetadataCleared []types2.EventAssetMetadataCleared //nolint:stylecheck,golint - Assets_ApprovedTransfer []types2.EventAssetApprovedTransfer //nolint:stylecheck,golint - Assets_ApprovalCancelled []types2.EventAssetApprovalCancelled //nolint:stylecheck,golint - Assets_TransferredApproved []types2.EventAssetTransferredApproved //nolint:stylecheck,golint - Assets_AssetStatusChanged []types2.EventAssetAssetStatusChanged //nolint:stylecheck,golint + //Assets_ForceCreated []types2.EventAssetForceCreated //nolint:stylecheck,golint + //Assets_MetadataSet []types2.EventAssetMetadataSet //nolint:stylecheck,golint + //Assets_MetadataCleared []types2.EventAssetMetadataCleared //nolint:stylecheck,golint + //Assets_ApprovedTransfer []types2.EventAssetApprovedTransfer //nolint:stylecheck,golint + //Assets_ApprovalCancelled []types2.EventAssetApprovalCancelled //nolint:stylecheck,golint + //Assets_TransferredApproved []types2.EventAssetTransferredApproved //nolint:stylecheck,golint + //Assets_AssetStatusChanged []types2.EventAssetAssetStatusChanged //nolint:stylecheck,golint Democracy_Proposed []gsrpcTypes.EventDemocracyProposed //nolint:stylecheck,golint Democracy_Tabled []gsrpcTypes.EventDemocracyTabled //nolint:stylecheck,golint Democracy_ExternalTabled []gsrpcTypes.EventDemocracyExternalTabled //nolint:stylecheck,golint @@ -107,19 +106,19 @@ type OriginEventRecord struct { TechnicalMembership_MembersReset []gsrpcTypes.EventTechnicalMembershipMembersReset //nolint:stylecheck,golint TechnicalMembership_KeyChanged []gsrpcTypes.EventTechnicalMembershipKeyChanged //nolint:stylecheck,golint TechnicalMembership_Dummy []gsrpcTypes.EventTechnicalMembershipDummy //nolint:stylecheck,golint - ElectionProviderMultiPhase_SolutionStored []types2.EventElectionMultiPhaseSolutionStored //nolint:stylecheck,golint - ElectionProviderMultiPhase_ElectionFinalized []types2.EventElectionMultiPhaseElectionFinalized //nolint:stylecheck,golint - ElectionProviderMultiPhase_Rewarded []types2.EventElectionMultiPhaseRewarded //nolint:stylecheck,golint - ElectionProviderMultiPhase_Slashed []types2.EventElectionMultiPhaseSlashed //nolint:stylecheck,golint - ElectionProviderMultiPhase_SignedPhaseStarted []types2.EventElectionMultiPhaseSignedPhaseStarted //nolint:stylecheck,golint - ElectionProviderMultiPhase_UnsignedPhaseStarted []types2.EventElectionMultiPhaseUnsignedPhaseStarted //nolint:stylecheck,golint + //ElectionProviderMultiPhase_SolutionStored []types2.EventElectionMultiPhaseSolutionStored //nolint:stylecheck,golint + //ElectionProviderMultiPhase_ElectionFinalized []types2.EventElectionMultiPhaseElectionFinalized //nolint:stylecheck,golint + //ElectionProviderMultiPhase_Rewarded []types2.EventElectionMultiPhaseRewarded //nolint:stylecheck,golint + //ElectionProviderMultiPhase_Slashed []types2.EventElectionMultiPhaseSlashed //nolint:stylecheck,golint + //ElectionProviderMultiPhase_SignedPhaseStarted []types2.EventElectionMultiPhaseSignedPhaseStarted //nolint:stylecheck,golint + //ElectionProviderMultiPhase_UnsignedPhaseStarted []types2.EventElectionMultiPhaseUnsignedPhaseStarted //nolint:stylecheck,golint Elections_NewTerm []gsrpcTypes.EventElectionsNewTerm //nolint:stylecheck,golint Elections_EmptyTerm []gsrpcTypes.EventElectionsEmptyTerm //nolint:stylecheck,golint Elections_ElectionError []gsrpcTypes.EventElectionsElectionError //nolint:stylecheck,golint Elections_MemberKicked []gsrpcTypes.EventElectionsMemberKicked //nolint:stylecheck,golint - Elections_Renounced []types2.EventElectionsRenounced //nolint:stylecheck,golint - Elections_CandidateSlashed []types2.EventElectionsCandidateSlashed //nolint:stylecheck,golint - Elections_SeatHolderSlashed []types2.EventElectionsSeatHolderSlashed //nolint:stylecheck,golint + //Elections_Renounced []types2.EventElectionsRenounced //nolint:stylecheck,golint + //Elections_CandidateSlashed []types2.EventElectionsCandidateSlashed //nolint:stylecheck,golint + //Elections_SeatHolderSlashed []types2.EventElectionsSeatHolderSlashed //nolint:stylecheck,golint Identity_IdentitySet []gsrpcTypes.EventIdentitySet //nolint:stylecheck,golint Identity_IdentityCleared []gsrpcTypes.EventIdentityCleared //nolint:stylecheck,golint Identity_IdentityKilled []gsrpcTypes.EventIdentityKilled //nolint:stylecheck,golint @@ -172,26 +171,26 @@ type OriginEventRecord struct { Treasury_Burnt []gsrpcTypes.EventTreasuryBurnt //nolint:stylecheck,golint Treasury_Rollover []gsrpcTypes.EventTreasuryRollover //nolint:stylecheck,golint Treasury_Deposit []gsrpcTypes.EventTreasuryDeposit //nolint:stylecheck,golint - Tips_NewTip []types2.EventTipsNewTip //nolint:stylecheck,golint - Tips_TipClosing []types2.EventTipsTipClosing //nolint:stylecheck,golint - Tips_TipClosed []types2.EventTipsTipClosed //nolint:stylecheck,golint - Tips_TipRetracted []types2.EventTipsTipRetracted //nolint:stylecheck,golint - Tips_TipSlashed []types2.EventTipsTipSlashed //nolint:stylecheck,golint - Bounties_BountyProposed []types2.EventBountyBountyProposed //nolint:stylecheck,golint - Bounties_BountyRejected []types2.EventBountyBountyRejected //nolint:stylecheck,golint - Bounties_BountyBecameActive []types2.EventBountyBountyBecameActive //nolint:stylecheck,golint - Bounties_BountyAwarded []types2.EventBountyBountyAwarded //nolint:stylecheck,golint - Bounties_BountyClaimed []types2.EventBountyBountyClaimed //nolint:stylecheck,golint - Bounties_BountyCanceled []types2.EventBountyBountyCanceled //nolint:stylecheck,golint - Bounties_BountyExtended []types2.EventBountyBountyExtended //nolint:stylecheck,golint + //Tips_NewTip []types2.EventTipsNewTip //nolint:stylecheck,golint + //Tips_TipClosing []types2.EventTipsTipClosing //nolint:stylecheck,golint + //Tips_TipClosed []types2.EventTipsTipClosed //nolint:stylecheck,golint + //Tips_TipRetracted []types2.EventTipsTipRetracted //nolint:stylecheck,golint + //Tips_TipSlashed []types2.EventTipsTipSlashed //nolint:stylecheck,golint + //Bounties_BountyProposed []types2.EventBountyBountyProposed //nolint:stylecheck,golint + //Bounties_BountyRejected []types2.EventBountyBountyRejected //nolint:stylecheck,golint + //Bounties_BountyBecameActive []types2.EventBountyBountyBecameActive //nolint:stylecheck,golint + //Bounties_BountyAwarded []types2.EventBountyBountyAwarded //nolint:stylecheck,golint + //Bounties_BountyClaimed []types2.EventBountyBountyClaimed //nolint:stylecheck,golint + //Bounties_BountyCanceled []types2.EventBountyBountyCanceled //nolint:stylecheck,golint + //Bounties_BountyExtended []types2.EventBountyBountyExtended //nolint:stylecheck,golint Contracts_Instantiated []gsrpcTypes.EventContractsInstantiated //nolint:stylecheck,golint Contracts_Evicted []gsrpcTypes.EventContractsEvicted //nolint:stylecheck,golint - Contracts_Terminated []types2.EventContractsTerminated //nolint:stylecheck,golint + //Contracts_Terminated []types2.EventContractsTerminated //nolint:stylecheck,golint Contracts_Restored []gsrpcTypes.EventContractsRestored //nolint:stylecheck,golint Contracts_CodeStored []gsrpcTypes.EventContractsCodeStored //nolint:stylecheck,golint Contracts_ScheduleUpdated []gsrpcTypes.EventContractsScheduleUpdated //nolint:stylecheck,golint - Contracts_ContractEmitted []types2.EventContractsContractEmitted //nolint:stylecheck,golint - Contracts_CodeRemoved []types2.EventContractsCodeRemoved //nolint:stylecheck,golint + //Contracts_ContractEmitted []types2.EventContractsContractEmitted //nolint:stylecheck,golint + //Contracts_CodeRemoved []types2.EventContractsCodeRemoved //nolint:stylecheck,golint Utility_BatchInterrupted []gsrpcTypes.EventUtilityBatchInterrupted //nolint:stylecheck,golint Utility_BatchCompleted []gsrpcTypes.EventUtilityBatchCompleted //nolint:stylecheck,golint Multisig_NewMultisig []gsrpcTypes.EventMultisigNewMultisig //nolint:stylecheck,golint diff --git a/go.mod b/go.mod index ad495e7..2f6af4d 100644 --- a/go.mod +++ b/go.mod @@ -2,13 +2,10 @@ module github.com/Platdot-Network/substrate-go go 1.15 -replace github.com/centrifuge/go-substrate-rpc-client/v3 v3.0.2 => github.com/chainx-org/go-substrate-rpc-client/v3 v3.1.1 - replace github.com/JFJun/go-substrate-rpc-client/v3 v3.0.5 => github.com/Platdot-network/go-substrate-rpc-client/v3 v3.0.6 require ( github.com/JFJun/go-substrate-rpc-client/v3 v3.0.5 - github.com/centrifuge/go-substrate-rpc-client/v3 v3.0.2 github.com/ethereum/go-ethereum v1.10.12 github.com/hacpy/chainbridge-substrate-events v1.0.0 github.com/huandu/xstrings v1.3.2 diff --git a/go.sum b/go.sum index 7cb60d0..d0bede9 100644 --- a/go.sum +++ b/go.sum @@ -87,12 +87,11 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtE github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/centrifuge/go-substrate-rpc-client/v3 v3.0.0 h1:nwmK0bGIN67YBkqW/nAhgyhkCOv1nrFS3otY0qoQFeE= github.com/centrifuge/go-substrate-rpc-client/v3 v3.0.0/go.mod h1:AwGxOMdXSKLXN+Ks7/nwyfNcOgnXufaP7TV8QZmEyS4= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chainx-org/go-substrate-rpc-client/v3 v3.1.1 h1:K56fDXX/JY/rndi/khxnhV83SLg5jwyPFvCF0oJnwMk= -github.com/chainx-org/go-substrate-rpc-client/v3 v3.1.1/go.mod h1:NYY4kQxOVEaPKWT+0dKaWwVMOj1fBD27zpp/lP0JrL4= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= From b72e73b063fad5843a2503879950c6aebf787bfd Mon Sep 17 00:00:00 2001 From: hacpy Date: Tue, 23 Nov 2021 15:42:23 +0800 Subject: [PATCH 4/6] Use go-substrate-rpc-client v3.0.8 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 2f6af4d..3bd31c6 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/Platdot-Network/substrate-go go 1.15 -replace github.com/JFJun/go-substrate-rpc-client/v3 v3.0.5 => github.com/Platdot-network/go-substrate-rpc-client/v3 v3.0.6 +replace github.com/JFJun/go-substrate-rpc-client/v3 v3.0.5 => github.com/Platdot-Network/go-substrate-rpc-client/v3 v3.0.8 require ( github.com/JFJun/go-substrate-rpc-client/v3 v3.0.5 diff --git a/go.sum b/go.sum index d0bede9..cff0583 100644 --- a/go.sum +++ b/go.sum @@ -40,8 +40,8 @@ github.com/ChainSafe/go-schnorrkel v0.0.0-20210318173838-ccb5cd955283 h1:bCAjrlK github.com/ChainSafe/go-schnorrkel v0.0.0-20210318173838-ccb5cd955283/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Platdot-network/go-substrate-rpc-client/v3 v3.0.6 h1:UMWPwIIOiU/1B1y7CFZJbgZ6xfxk3N8EAARH1P5CrE8= -github.com/Platdot-network/go-substrate-rpc-client/v3 v3.0.6/go.mod h1:CUUIx2uEemdrgfiGnedC9F2n1ZZ4Gp3SkcPoBXKPpLM= +github.com/Platdot-Network/go-substrate-rpc-client/v3 v3.0.8 h1:r+0R0pSsbaMR7TCea3o73GXBOxQpBYibV+7ubQOMVxE= +github.com/Platdot-Network/go-substrate-rpc-client/v3 v3.0.8/go.mod h1:Ck391947i+bTMqbYW6c6q9fhDKHoJ9/hKCNeDpwUkds= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= From f9c746deb9ca61cb38a86cb4f3a61d2dcff68fba Mon Sep 17 00:00:00 2001 From: hacpy Date: Tue, 23 Nov 2021 17:12:20 +0800 Subject: [PATCH 5/6] Add default hash for v14 plain type --- client/client.go | 10 +- expand/base/types.go | 4 +- expand/bifrost/types.go | 4 +- expand/bridge/bridge_event.go | 2 +- expand/bridge/bridge_types.go | 2 +- expand/call.go | 2 +- expand/chainx/pallets/swap.go | 2 +- expand/chainx/types.go | 2 +- expand/chainx/xbtc_events.go | 2 +- expand/chainx/xevents/xassets.go | 2 +- expand/chainx/xevents/xgateway/xbitcoin.go | 2 +- expand/chainx/xevents/xgateway/xcommon.go | 2 +- expand/chainx/xevents/xgateway/xrecords.go | 2 +- expand/chainx/xevents/xmining.go | 2 +- expand/chainx/xevents/xsystem.go | 2 +- expand/chainx_types.go | 4 +- expand/event_records.go | 2 +- expand/extra/crowdloan.go | 4 +- expand/extra/election.go | 2 +- expand/extra/extra.go | 10 +- expand/extra/extra_types.go | 2 +- expand/extra/origin.go | 214 ++++++++++----------- expand/extra/xcm.go | 4 +- expand/extrinsic.go | 6 +- expand/extrinsic_decode.go | 4 +- expand/metadata.go | 2 +- expand/polkadot/types.go | 2 +- expand/types.go | 4 +- go.mod | 4 +- go.sum | 2 - tx/tx.go | 5 +- utils/util.go | 2 +- 32 files changed, 156 insertions(+), 159 deletions(-) diff --git a/client/client.go b/client/client.go index 0977dcc..2b6d95a 100644 --- a/client/client.go +++ b/client/client.go @@ -10,11 +10,11 @@ import ( "strconv" "strings" - gsrpc "github.com/JFJun/go-substrate-rpc-client/v3" - gsClient "github.com/JFJun/go-substrate-rpc-client/v3/client" - "github.com/JFJun/go-substrate-rpc-client/v3/rpc" - "github.com/JFJun/go-substrate-rpc-client/v3/scale" - "github.com/JFJun/go-substrate-rpc-client/v3/types" + gsrpc "github.com/Platdot-Network/go-substrate-rpc-client/v3" + gsClient "github.com/Platdot-Network/go-substrate-rpc-client/v3/client" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/rpc" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/scale" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" log2 "github.com/ethereum/go-ethereum/log" "github.com/rjman-ljm/go-substrate-crypto/ss58" "golang.org/x/crypto/blake2b" diff --git a/expand/base/types.go b/expand/base/types.go index 27af70e..8b37e93 100644 --- a/expand/base/types.go +++ b/expand/base/types.go @@ -4,8 +4,8 @@ import ( "encoding/hex" "fmt" - "github.com/JFJun/go-substrate-rpc-client/v3/scale" - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/scale" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/expand/extra" ) diff --git a/expand/bifrost/types.go b/expand/bifrost/types.go index 1ffe47d..4d29feb 100644 --- a/expand/bifrost/types.go +++ b/expand/bifrost/types.go @@ -2,8 +2,8 @@ package bifrost import ( "fmt" - "github.com/JFJun/go-substrate-rpc-client/v3/scale" - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/scale" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/expand/base" "github.com/Platdot-Network/substrate-go/expand/bridge" ) diff --git a/expand/bridge/bridge_event.go b/expand/bridge/bridge_event.go index 8d2016f..7c1b791 100644 --- a/expand/bridge/bridge_event.go +++ b/expand/bridge/bridge_event.go @@ -1,7 +1,7 @@ package bridge import ( - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" events "github.com/hacpy/chainbridge-substrate-events" ) diff --git a/expand/bridge/bridge_types.go b/expand/bridge/bridge_types.go index 7040eca..0e80247 100644 --- a/expand/bridge/bridge_types.go +++ b/expand/bridge/bridge_types.go @@ -1,7 +1,7 @@ package bridge import ( - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" ) type Erc721Token struct { diff --git a/expand/call.go b/expand/call.go index 6fdf268..c463c8a 100644 --- a/expand/call.go +++ b/expand/call.go @@ -4,7 +4,7 @@ import ( "encoding/hex" "fmt" - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" ) /* diff --git a/expand/chainx/pallets/swap.go b/expand/chainx/pallets/swap.go index a7a61b4..cb292d2 100644 --- a/expand/chainx/pallets/swap.go +++ b/expand/chainx/pallets/swap.go @@ -1,6 +1,6 @@ package pallets -import "github.com/JFJun/go-substrate-rpc-client/v3/types" +import "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" type AssetId types.U32 type Balance types.U128 diff --git a/expand/chainx/types.go b/expand/chainx/types.go index 17d1e0d..298099b 100644 --- a/expand/chainx/types.go +++ b/expand/chainx/types.go @@ -1,7 +1,7 @@ package chainx import ( - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/expand/base" "github.com/Platdot-Network/substrate-go/expand/bridge" "github.com/Platdot-Network/substrate-go/expand/chainx/pallets" diff --git a/expand/chainx/xbtc_events.go b/expand/chainx/xbtc_events.go index 736a10c..f7136fd 100644 --- a/expand/chainx/xbtc_events.go +++ b/expand/chainx/xbtc_events.go @@ -1,7 +1,7 @@ package chainx import ( - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/expand/chainx/xevents" "github.com/Platdot-Network/substrate-go/expand/chainx/xevents/xgateway" ) diff --git a/expand/chainx/xevents/xassets.go b/expand/chainx/xevents/xassets.go index 476312f..b4f46b4 100644 --- a/expand/chainx/xevents/xassets.go +++ b/expand/chainx/xevents/xassets.go @@ -1,7 +1,7 @@ package xevents import ( - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" ) /// XAssets Type diff --git a/expand/chainx/xevents/xgateway/xbitcoin.go b/expand/chainx/xevents/xgateway/xbitcoin.go index 2390daf..85c2be9 100644 --- a/expand/chainx/xevents/xgateway/xbitcoin.go +++ b/expand/chainx/xevents/xgateway/xbitcoin.go @@ -1,7 +1,7 @@ package xgateway import ( - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" ) /// XGatewayBitcoin Type diff --git a/expand/chainx/xevents/xgateway/xcommon.go b/expand/chainx/xevents/xgateway/xcommon.go index 7f3b846..333f4ea 100644 --- a/expand/chainx/xevents/xgateway/xcommon.go +++ b/expand/chainx/xevents/xgateway/xcommon.go @@ -1,7 +1,7 @@ package xgateway import ( - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" ) /// XGatewayCommon Type diff --git a/expand/chainx/xevents/xgateway/xrecords.go b/expand/chainx/xevents/xgateway/xrecords.go index 386142a..e7be7dc 100644 --- a/expand/chainx/xevents/xgateway/xrecords.go +++ b/expand/chainx/xevents/xgateway/xrecords.go @@ -1,7 +1,7 @@ package xgateway import ( - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" ) /// XGatewayRecords Type diff --git a/expand/chainx/xevents/xmining.go b/expand/chainx/xevents/xmining.go index de9707b..be2388e 100644 --- a/expand/chainx/xevents/xmining.go +++ b/expand/chainx/xevents/xmining.go @@ -1,7 +1,7 @@ package xevents import ( - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" ) ///XMining Type diff --git a/expand/chainx/xevents/xsystem.go b/expand/chainx/xevents/xsystem.go index d8fa495..07e427f 100644 --- a/expand/chainx/xevents/xsystem.go +++ b/expand/chainx/xevents/xsystem.go @@ -1,7 +1,7 @@ package xevents import ( - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" ) /// XSystem Type diff --git a/expand/chainx_types.go b/expand/chainx_types.go index 0058943..eed1568 100644 --- a/expand/chainx_types.go +++ b/expand/chainx_types.go @@ -3,8 +3,8 @@ package expand import ( "fmt" - "github.com/JFJun/go-substrate-rpc-client/v3/scale" - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/scale" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/expand/chainx/xevents" "github.com/Platdot-Network/substrate-go/utils" "github.com/huandu/xstrings" diff --git a/expand/event_records.go b/expand/event_records.go index e80b1a3..4227770 100644 --- a/expand/event_records.go +++ b/expand/event_records.go @@ -3,7 +3,7 @@ package expand import ( "strings" - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/expand/bifrost" "github.com/Platdot-Network/substrate-go/expand/chainx" "github.com/Platdot-Network/substrate-go/expand/extra" diff --git a/expand/extra/crowdloan.go b/expand/extra/crowdloan.go index 4f0b5dd..5a160e5 100644 --- a/expand/extra/crowdloan.go +++ b/expand/extra/crowdloan.go @@ -1,8 +1,8 @@ package extra import ( - "github.com/JFJun/go-substrate-rpc-client/v3/scale" - gsrpcTypes "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/scale" + gsrpcTypes "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" ) /// Crowdloan diff --git a/expand/extra/election.go b/expand/extra/election.go index 56f212c..7929c14 100644 --- a/expand/extra/election.go +++ b/expand/extra/election.go @@ -1,7 +1,7 @@ package extra import ( - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" ) type ElectionsPhragmen struct { diff --git a/expand/extra/extra.go b/expand/extra/extra.go index f3ed5d4..6d2fea4 100644 --- a/expand/extra/extra.go +++ b/expand/extra/extra.go @@ -1,7 +1,7 @@ package extra import ( - gsrpcTypes "github.com/JFJun/go-substrate-rpc-client/v3/types" + gsrpcTypes "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" ) type ExtraEvents struct { @@ -60,10 +60,10 @@ type ExtraEventRecord struct { RandomnessCollectiveFlip_MemberExecuted []MemberExecuted RandomnessCollectiveFlip_Closed []Closed - PhragmenElection_NewTerm []gsrpcTypes.EventElectionsNewTerm - PhragmenElection_EmptyTerm []gsrpcTypes.EventElectionsEmptyTerm - PhragmenElection_ElectionError []gsrpcTypes.EventElectionsElectionError - PhragmenElection_MemberKicked []gsrpcTypes.EventElectionsMemberKicked + PhragmenElection_NewTerm []gsrpcTypes.EventElectionsNewTerm + PhragmenElection_EmptyTerm []gsrpcTypes.EventElectionsEmptyTerm + PhragmenElection_ElectionError []gsrpcTypes.EventElectionsElectionError + PhragmenElection_MemberKicked []gsrpcTypes.EventElectionsMemberKicked //PhragmenElection_Renounced []types2.EventElectionsRenounced //PhragmenElection_CandidateSlashed []types2.EventElectionsCandidateSlashed //PhragmenElection_SeatHolderSlashed []types2.EventElectionsSeatHolderSlashed diff --git a/expand/extra/extra_types.go b/expand/extra/extra_types.go index 3327f52..48628e8 100644 --- a/expand/extra/extra_types.go +++ b/expand/extra/extra_types.go @@ -1,6 +1,6 @@ package extra -import gsrpcTypes "github.com/JFJun/go-substrate-rpc-client/v3/types" +import gsrpcTypes "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" ///centrifuge/v3/types/events.go expand from https://github.com/Phala-Network/go-substrate-rpc-client/blob/master/types/events.go diff --git a/expand/extra/origin.go b/expand/extra/origin.go index 210a094..21112a1 100644 --- a/expand/extra/origin.go +++ b/expand/extra/origin.go @@ -1,7 +1,7 @@ package extra import ( - gsrpcTypes "github.com/JFJun/go-substrate-rpc-client/v3/types" + gsrpcTypes "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" ) type TempMemo struct { @@ -45,14 +45,14 @@ type OriginEventRecord struct { Staking_Unbonded []gsrpcTypes.EventStakingUnbonded //nolint:stylecheck,golint Staking_Withdrawn []gsrpcTypes.EventStakingWithdrawn //nolint:stylecheck,golint //Staking_Kicked []types2.EventStakingKicked //nolint:stylecheck,golint - System_ExtrinsicSuccess []gsrpcTypes.EventSystemExtrinsicSuccess //nolint:stylecheck,golint + System_ExtrinsicSuccess []gsrpcTypes.EventSystemExtrinsicSuccess //nolint:stylecheck,golint //System_ExtrinsicFailed []gsrpcTypes.EventSystemExtrinsicFailed //nolint:stylecheck,golint - System_CodeUpdated []gsrpcTypes.EventSystemCodeUpdated //nolint:stylecheck,golint - System_NewAccount []gsrpcTypes.EventSystemNewAccount //nolint:stylecheck,golint - System_KilledAccount []gsrpcTypes.EventSystemKilledAccount //nolint:stylecheck,golint + System_CodeUpdated []gsrpcTypes.EventSystemCodeUpdated //nolint:stylecheck,golint + System_NewAccount []gsrpcTypes.EventSystemNewAccount //nolint:stylecheck,golint + System_KilledAccount []gsrpcTypes.EventSystemKilledAccount //nolint:stylecheck,golint //Assets_Created []types2.EventAssetCreated //nolint:stylecheck,golint - Assets_Issued []gsrpcTypes.EventAssetIssued //nolint:stylecheck,golint - Assets_Transferred []gsrpcTypes.EventAssetTransferred //nolint:stylecheck,golint + Assets_Issued []gsrpcTypes.EventAssetIssued //nolint:stylecheck,golint + Assets_Transferred []gsrpcTypes.EventAssetTransferred //nolint:stylecheck,golint //Assets_Burned []types2.EventAssetBurned //nolint:stylecheck,golint //Assets_TeamChanged []types2.EventAssetTeamChanged //nolint:stylecheck,golint //Assets_OwnerChanged []types2.EventAssetOwnerChanged //nolint:stylecheck,golint @@ -60,7 +60,7 @@ type OriginEventRecord struct { //Assets_Thawed []types2.EventAssetThawed //nolint:stylecheck,golint //Assets_AssetFrozen []types2.EventAssetAssetFrozen //nolint:stylecheck,golint //Assets_AssetThawed []types2.EventAssetAssetThawed //nolint:stylecheck,golint - Assets_Destroyed []gsrpcTypes.EventAssetDestroyed //nolint:stylecheck,golint + Assets_Destroyed []gsrpcTypes.EventAssetDestroyed //nolint:stylecheck,golint //Assets_ForceCreated []types2.EventAssetForceCreated //nolint:stylecheck,golint //Assets_MetadataSet []types2.EventAssetMetadataSet //nolint:stylecheck,golint //Assets_MetadataCleared []types2.EventAssetMetadataCleared //nolint:stylecheck,golint @@ -68,109 +68,109 @@ type OriginEventRecord struct { //Assets_ApprovalCancelled []types2.EventAssetApprovalCancelled //nolint:stylecheck,golint //Assets_TransferredApproved []types2.EventAssetTransferredApproved //nolint:stylecheck,golint //Assets_AssetStatusChanged []types2.EventAssetAssetStatusChanged //nolint:stylecheck,golint - Democracy_Proposed []gsrpcTypes.EventDemocracyProposed //nolint:stylecheck,golint - Democracy_Tabled []gsrpcTypes.EventDemocracyTabled //nolint:stylecheck,golint - Democracy_ExternalTabled []gsrpcTypes.EventDemocracyExternalTabled //nolint:stylecheck,golint - Democracy_Started []gsrpcTypes.EventDemocracyStarted //nolint:stylecheck,golint - Democracy_Passed []gsrpcTypes.EventDemocracyPassed //nolint:stylecheck,golint - Democracy_NotPassed []gsrpcTypes.EventDemocracyNotPassed //nolint:stylecheck,golint - Democracy_Cancelled []gsrpcTypes.EventDemocracyCancelled //nolint:stylecheck,golint - Democracy_Executed []gsrpcTypes.EventDemocracyExecuted //nolint:stylecheck,golint - Democracy_Delegated []gsrpcTypes.EventDemocracyDelegated //nolint:stylecheck,golint - Democracy_Undelegated []gsrpcTypes.EventDemocracyUndelegated //nolint:stylecheck,golint - Democracy_Vetoed []gsrpcTypes.EventDemocracyVetoed //nolint:stylecheck,golint - Democracy_PreimageNoted []gsrpcTypes.EventDemocracyPreimageNoted //nolint:stylecheck,golint - Democracy_PreimageUsed []gsrpcTypes.EventDemocracyPreimageUsed //nolint:stylecheck,golint - Democracy_PreimageInvalid []gsrpcTypes.EventDemocracyPreimageInvalid //nolint:stylecheck,golint - Democracy_PreimageMissing []gsrpcTypes.EventDemocracyPreimageMissing //nolint:stylecheck,golint - Democracy_PreimageReaped []gsrpcTypes.EventDemocracyPreimageReaped //nolint:stylecheck,golint - Democracy_Unlocked []gsrpcTypes.EventDemocracyUnlocked //nolint:stylecheck,golint - Democracy_Blacklisted []gsrpcTypes.EventDemocracyBlacklisted //nolint:stylecheck,golint - Council_Proposed []gsrpcTypes.EventCollectiveProposed //nolint:stylecheck,golint - Council_Voted []gsrpcTypes.EventCollectiveVoted //nolint:stylecheck,golint - Council_Approved []gsrpcTypes.EventCollectiveApproved //nolint:stylecheck,golint - Council_Disapproved []gsrpcTypes.EventCollectiveDisapproved //nolint:stylecheck,golint - Council_Executed []gsrpcTypes.EventCollectiveExecuted //nolint:stylecheck,golint - Council_MemberExecuted []gsrpcTypes.EventCollectiveMemberExecuted //nolint:stylecheck,golint - Council_Closed []gsrpcTypes.EventCollectiveClosed //nolint:stylecheck,golint - TechnicalCommittee_Proposed []gsrpcTypes.EventTechnicalCommitteeProposed //nolint:stylecheck,golint - TechnicalCommittee_Voted []gsrpcTypes.EventTechnicalCommitteeVoted //nolint:stylecheck,golint - TechnicalCommittee_Approved []gsrpcTypes.EventTechnicalCommitteeApproved //nolint:stylecheck,golint - TechnicalCommittee_Disapproved []gsrpcTypes.EventTechnicalCommitteeDisapproved //nolint:stylecheck,golint - TechnicalCommittee_Executed []gsrpcTypes.EventTechnicalCommitteeExecuted //nolint:stylecheck,golint - TechnicalCommittee_MemberExecuted []gsrpcTypes.EventTechnicalCommitteeMemberExecuted //nolint:stylecheck,golint - TechnicalCommittee_Closed []gsrpcTypes.EventTechnicalCommitteeClosed //nolint:stylecheck,golint - TechnicalMembership_MemberAdded []gsrpcTypes.EventTechnicalMembershipMemberAdded //nolint:stylecheck,golint - TechnicalMembership_MemberRemoved []gsrpcTypes.EventTechnicalMembershipMemberRemoved //nolint:stylecheck,golint - TechnicalMembership_MembersSwapped []gsrpcTypes.EventTechnicalMembershipMembersSwapped //nolint:stylecheck,golint - TechnicalMembership_MembersReset []gsrpcTypes.EventTechnicalMembershipMembersReset //nolint:stylecheck,golint - TechnicalMembership_KeyChanged []gsrpcTypes.EventTechnicalMembershipKeyChanged //nolint:stylecheck,golint - TechnicalMembership_Dummy []gsrpcTypes.EventTechnicalMembershipDummy //nolint:stylecheck,golint + Democracy_Proposed []gsrpcTypes.EventDemocracyProposed //nolint:stylecheck,golint + Democracy_Tabled []gsrpcTypes.EventDemocracyTabled //nolint:stylecheck,golint + Democracy_ExternalTabled []gsrpcTypes.EventDemocracyExternalTabled //nolint:stylecheck,golint + Democracy_Started []gsrpcTypes.EventDemocracyStarted //nolint:stylecheck,golint + Democracy_Passed []gsrpcTypes.EventDemocracyPassed //nolint:stylecheck,golint + Democracy_NotPassed []gsrpcTypes.EventDemocracyNotPassed //nolint:stylecheck,golint + Democracy_Cancelled []gsrpcTypes.EventDemocracyCancelled //nolint:stylecheck,golint + Democracy_Executed []gsrpcTypes.EventDemocracyExecuted //nolint:stylecheck,golint + Democracy_Delegated []gsrpcTypes.EventDemocracyDelegated //nolint:stylecheck,golint + Democracy_Undelegated []gsrpcTypes.EventDemocracyUndelegated //nolint:stylecheck,golint + Democracy_Vetoed []gsrpcTypes.EventDemocracyVetoed //nolint:stylecheck,golint + Democracy_PreimageNoted []gsrpcTypes.EventDemocracyPreimageNoted //nolint:stylecheck,golint + Democracy_PreimageUsed []gsrpcTypes.EventDemocracyPreimageUsed //nolint:stylecheck,golint + Democracy_PreimageInvalid []gsrpcTypes.EventDemocracyPreimageInvalid //nolint:stylecheck,golint + Democracy_PreimageMissing []gsrpcTypes.EventDemocracyPreimageMissing //nolint:stylecheck,golint + Democracy_PreimageReaped []gsrpcTypes.EventDemocracyPreimageReaped //nolint:stylecheck,golint + Democracy_Unlocked []gsrpcTypes.EventDemocracyUnlocked //nolint:stylecheck,golint + Democracy_Blacklisted []gsrpcTypes.EventDemocracyBlacklisted //nolint:stylecheck,golint + Council_Proposed []gsrpcTypes.EventCollectiveProposed //nolint:stylecheck,golint + Council_Voted []gsrpcTypes.EventCollectiveVoted //nolint:stylecheck,golint + Council_Approved []gsrpcTypes.EventCollectiveApproved //nolint:stylecheck,golint + Council_Disapproved []gsrpcTypes.EventCollectiveDisapproved //nolint:stylecheck,golint + Council_Executed []gsrpcTypes.EventCollectiveExecuted //nolint:stylecheck,golint + Council_MemberExecuted []gsrpcTypes.EventCollectiveMemberExecuted //nolint:stylecheck,golint + Council_Closed []gsrpcTypes.EventCollectiveClosed //nolint:stylecheck,golint + TechnicalCommittee_Proposed []gsrpcTypes.EventTechnicalCommitteeProposed //nolint:stylecheck,golint + TechnicalCommittee_Voted []gsrpcTypes.EventTechnicalCommitteeVoted //nolint:stylecheck,golint + TechnicalCommittee_Approved []gsrpcTypes.EventTechnicalCommitteeApproved //nolint:stylecheck,golint + TechnicalCommittee_Disapproved []gsrpcTypes.EventTechnicalCommitteeDisapproved //nolint:stylecheck,golint + TechnicalCommittee_Executed []gsrpcTypes.EventTechnicalCommitteeExecuted //nolint:stylecheck,golint + TechnicalCommittee_MemberExecuted []gsrpcTypes.EventTechnicalCommitteeMemberExecuted //nolint:stylecheck,golint + TechnicalCommittee_Closed []gsrpcTypes.EventTechnicalCommitteeClosed //nolint:stylecheck,golint + TechnicalMembership_MemberAdded []gsrpcTypes.EventTechnicalMembershipMemberAdded //nolint:stylecheck,golint + TechnicalMembership_MemberRemoved []gsrpcTypes.EventTechnicalMembershipMemberRemoved //nolint:stylecheck,golint + TechnicalMembership_MembersSwapped []gsrpcTypes.EventTechnicalMembershipMembersSwapped //nolint:stylecheck,golint + TechnicalMembership_MembersReset []gsrpcTypes.EventTechnicalMembershipMembersReset //nolint:stylecheck,golint + TechnicalMembership_KeyChanged []gsrpcTypes.EventTechnicalMembershipKeyChanged //nolint:stylecheck,golint + TechnicalMembership_Dummy []gsrpcTypes.EventTechnicalMembershipDummy //nolint:stylecheck,golint //ElectionProviderMultiPhase_SolutionStored []types2.EventElectionMultiPhaseSolutionStored //nolint:stylecheck,golint //ElectionProviderMultiPhase_ElectionFinalized []types2.EventElectionMultiPhaseElectionFinalized //nolint:stylecheck,golint //ElectionProviderMultiPhase_Rewarded []types2.EventElectionMultiPhaseRewarded //nolint:stylecheck,golint //ElectionProviderMultiPhase_Slashed []types2.EventElectionMultiPhaseSlashed //nolint:stylecheck,golint //ElectionProviderMultiPhase_SignedPhaseStarted []types2.EventElectionMultiPhaseSignedPhaseStarted //nolint:stylecheck,golint //ElectionProviderMultiPhase_UnsignedPhaseStarted []types2.EventElectionMultiPhaseUnsignedPhaseStarted //nolint:stylecheck,golint - Elections_NewTerm []gsrpcTypes.EventElectionsNewTerm //nolint:stylecheck,golint - Elections_EmptyTerm []gsrpcTypes.EventElectionsEmptyTerm //nolint:stylecheck,golint - Elections_ElectionError []gsrpcTypes.EventElectionsElectionError //nolint:stylecheck,golint - Elections_MemberKicked []gsrpcTypes.EventElectionsMemberKicked //nolint:stylecheck,golint + Elections_NewTerm []gsrpcTypes.EventElectionsNewTerm //nolint:stylecheck,golint + Elections_EmptyTerm []gsrpcTypes.EventElectionsEmptyTerm //nolint:stylecheck,golint + Elections_ElectionError []gsrpcTypes.EventElectionsElectionError //nolint:stylecheck,golint + Elections_MemberKicked []gsrpcTypes.EventElectionsMemberKicked //nolint:stylecheck,golint //Elections_Renounced []types2.EventElectionsRenounced //nolint:stylecheck,golint //Elections_CandidateSlashed []types2.EventElectionsCandidateSlashed //nolint:stylecheck,golint //Elections_SeatHolderSlashed []types2.EventElectionsSeatHolderSlashed //nolint:stylecheck,golint - Identity_IdentitySet []gsrpcTypes.EventIdentitySet //nolint:stylecheck,golint - Identity_IdentityCleared []gsrpcTypes.EventIdentityCleared //nolint:stylecheck,golint - Identity_IdentityKilled []gsrpcTypes.EventIdentityKilled //nolint:stylecheck,golint - Identity_JudgementRequested []gsrpcTypes.EventIdentityJudgementRequested //nolint:stylecheck,golint - Identity_JudgementUnrequested []gsrpcTypes.EventIdentityJudgementUnrequested //nolint:stylecheck,golint - Identity_JudgementGiven []gsrpcTypes.EventIdentityJudgementGiven //nolint:stylecheck,golint - Identity_RegistrarAdded []gsrpcTypes.EventIdentityRegistrarAdded //nolint:stylecheck,golint - Identity_SubIdentityAdded []gsrpcTypes.EventIdentitySubIdentityAdded //nolint:stylecheck,golint - Identity_SubIdentityRemoved []gsrpcTypes.EventIdentitySubIdentityRemoved //nolint:stylecheck,golint - Identity_SubIdentityRevoked []gsrpcTypes.EventIdentitySubIdentityRevoked //nolint:stylecheck,golint - Society_Founded []gsrpcTypes.EventSocietyFounded //nolint:stylecheck,golint - Society_Bid []gsrpcTypes.EventSocietyBid //nolint:stylecheck,golint - Society_Vouch []gsrpcTypes.EventSocietyVouch //nolint:stylecheck,golint - Society_AutoUnbid []gsrpcTypes.EventSocietyAutoUnbid //nolint:stylecheck,golint - Society_Unbid []gsrpcTypes.EventSocietyUnbid //nolint:stylecheck,golint - Society_Unvouch []gsrpcTypes.EventSocietyUnvouch //nolint:stylecheck,golint - Society_Inducted []gsrpcTypes.EventSocietyInducted //nolint:stylecheck,golint - Society_SuspendedMemberJudgement []gsrpcTypes.EventSocietySuspendedMemberJudgement //nolint:stylecheck,golint - Society_CandidateSuspended []gsrpcTypes.EventSocietyCandidateSuspended //nolint:stylecheck,golint - Society_MemberSuspended []gsrpcTypes.EventSocietyMemberSuspended //nolint:stylecheck,golint - Society_Challenged []gsrpcTypes.EventSocietyChallenged //nolint:stylecheck,golint - Society_Vote []gsrpcTypes.EventSocietyVote //nolint:stylecheck,golint - Society_DefenderVote []gsrpcTypes.EventSocietyDefenderVote //nolint:stylecheck,golint - Society_NewMaxMembers []gsrpcTypes.EventSocietyNewMaxMembers //nolint:stylecheck,golint - Society_Unfounded []gsrpcTypes.EventSocietyUnfounded //nolint:stylecheck,golint - Society_Deposit []gsrpcTypes.EventSocietyDeposit //nolint:stylecheck,golint - Recovery_RecoveryCreated []gsrpcTypes.EventRecoveryCreated //nolint:stylecheck,golint - Recovery_RecoveryInitiated []gsrpcTypes.EventRecoveryInitiated //nolint:stylecheck,golint - Recovery_RecoveryVouched []gsrpcTypes.EventRecoveryVouched //nolint:stylecheck,golint - Recovery_RecoveryClosed []gsrpcTypes.EventRecoveryClosed //nolint:stylecheck,golint - Recovery_AccountRecovered []gsrpcTypes.EventRecoveryAccountRecovered //nolint:stylecheck,golint - Recovery_RecoveryRemoved []gsrpcTypes.EventRecoveryRemoved //nolint:stylecheck,golint - Vesting_VestingUpdated []gsrpcTypes.EventVestingVestingUpdated //nolint:stylecheck,golint - Vesting_VestingCompleted []gsrpcTypes.EventVestingVestingCompleted //nolint:stylecheck,golint + Identity_IdentitySet []gsrpcTypes.EventIdentitySet //nolint:stylecheck,golint + Identity_IdentityCleared []gsrpcTypes.EventIdentityCleared //nolint:stylecheck,golint + Identity_IdentityKilled []gsrpcTypes.EventIdentityKilled //nolint:stylecheck,golint + Identity_JudgementRequested []gsrpcTypes.EventIdentityJudgementRequested //nolint:stylecheck,golint + Identity_JudgementUnrequested []gsrpcTypes.EventIdentityJudgementUnrequested //nolint:stylecheck,golint + Identity_JudgementGiven []gsrpcTypes.EventIdentityJudgementGiven //nolint:stylecheck,golint + Identity_RegistrarAdded []gsrpcTypes.EventIdentityRegistrarAdded //nolint:stylecheck,golint + Identity_SubIdentityAdded []gsrpcTypes.EventIdentitySubIdentityAdded //nolint:stylecheck,golint + Identity_SubIdentityRemoved []gsrpcTypes.EventIdentitySubIdentityRemoved //nolint:stylecheck,golint + Identity_SubIdentityRevoked []gsrpcTypes.EventIdentitySubIdentityRevoked //nolint:stylecheck,golint + Society_Founded []gsrpcTypes.EventSocietyFounded //nolint:stylecheck,golint + Society_Bid []gsrpcTypes.EventSocietyBid //nolint:stylecheck,golint + Society_Vouch []gsrpcTypes.EventSocietyVouch //nolint:stylecheck,golint + Society_AutoUnbid []gsrpcTypes.EventSocietyAutoUnbid //nolint:stylecheck,golint + Society_Unbid []gsrpcTypes.EventSocietyUnbid //nolint:stylecheck,golint + Society_Unvouch []gsrpcTypes.EventSocietyUnvouch //nolint:stylecheck,golint + Society_Inducted []gsrpcTypes.EventSocietyInducted //nolint:stylecheck,golint + Society_SuspendedMemberJudgement []gsrpcTypes.EventSocietySuspendedMemberJudgement //nolint:stylecheck,golint + Society_CandidateSuspended []gsrpcTypes.EventSocietyCandidateSuspended //nolint:stylecheck,golint + Society_MemberSuspended []gsrpcTypes.EventSocietyMemberSuspended //nolint:stylecheck,golint + Society_Challenged []gsrpcTypes.EventSocietyChallenged //nolint:stylecheck,golint + Society_Vote []gsrpcTypes.EventSocietyVote //nolint:stylecheck,golint + Society_DefenderVote []gsrpcTypes.EventSocietyDefenderVote //nolint:stylecheck,golint + Society_NewMaxMembers []gsrpcTypes.EventSocietyNewMaxMembers //nolint:stylecheck,golint + Society_Unfounded []gsrpcTypes.EventSocietyUnfounded //nolint:stylecheck,golint + Society_Deposit []gsrpcTypes.EventSocietyDeposit //nolint:stylecheck,golint + Recovery_RecoveryCreated []gsrpcTypes.EventRecoveryCreated //nolint:stylecheck,golint + Recovery_RecoveryInitiated []gsrpcTypes.EventRecoveryInitiated //nolint:stylecheck,golint + Recovery_RecoveryVouched []gsrpcTypes.EventRecoveryVouched //nolint:stylecheck,golint + Recovery_RecoveryClosed []gsrpcTypes.EventRecoveryClosed //nolint:stylecheck,golint + Recovery_AccountRecovered []gsrpcTypes.EventRecoveryAccountRecovered //nolint:stylecheck,golint + Recovery_RecoveryRemoved []gsrpcTypes.EventRecoveryRemoved //nolint:stylecheck,golint + Vesting_VestingUpdated []gsrpcTypes.EventVestingVestingUpdated //nolint:stylecheck,golint + Vesting_VestingCompleted []gsrpcTypes.EventVestingVestingCompleted //nolint:stylecheck,golint // gsrpcTypes.BlockNum is incorrect //Scheduler_Scheduled []gsrpcTypes.EventSchedulerScheduled //nolint:stylecheck,golint //Scheduler_Canceled []gsrpcTypes.EventSchedulerCanceled //nolint:stylecheck,golint //Scheduler_Dispatched []gsrpcTypes.EventSchedulerDispatched //nolint:stylecheck,golint //Proxy_ProxyExecuted []gsrpcTypes.EventProxyProxyExecuted //nolint:stylecheck,golint - Proxy_AnonymousCreated []gsrpcTypes.EventProxyAnonymousCreated //nolint:stylecheck,golint - Proxy_Announced []gsrpcTypes.EventProxyAnnounced //nolint:stylecheck,golint - Sudo_Sudid []gsrpcTypes.EventSudoSudid //nolint:stylecheck,golint - Sudo_KeyChanged []gsrpcTypes.EventSudoKeyChanged //nolint:stylecheck,golint - Sudo_SudoAsDone []gsrpcTypes.EventSudoAsDone //nolint:stylecheck,golint - Treasury_Proposed []gsrpcTypes.EventTreasuryProposed //nolint:stylecheck,golint - Treasury_Spending []gsrpcTypes.EventTreasurySpending //nolint:stylecheck,golint - Treasury_Awarded []gsrpcTypes.EventTreasuryAwarded //nolint:stylecheck,golint - Treasury_Rejected []gsrpcTypes.EventTreasuryRejected //nolint:stylecheck,golint - Treasury_Burnt []gsrpcTypes.EventTreasuryBurnt //nolint:stylecheck,golint - Treasury_Rollover []gsrpcTypes.EventTreasuryRollover //nolint:stylecheck,golint - Treasury_Deposit []gsrpcTypes.EventTreasuryDeposit //nolint:stylecheck,golint + Proxy_AnonymousCreated []gsrpcTypes.EventProxyAnonymousCreated //nolint:stylecheck,golint + Proxy_Announced []gsrpcTypes.EventProxyAnnounced //nolint:stylecheck,golint + Sudo_Sudid []gsrpcTypes.EventSudoSudid //nolint:stylecheck,golint + Sudo_KeyChanged []gsrpcTypes.EventSudoKeyChanged //nolint:stylecheck,golint + Sudo_SudoAsDone []gsrpcTypes.EventSudoAsDone //nolint:stylecheck,golint + Treasury_Proposed []gsrpcTypes.EventTreasuryProposed //nolint:stylecheck,golint + Treasury_Spending []gsrpcTypes.EventTreasurySpending //nolint:stylecheck,golint + Treasury_Awarded []gsrpcTypes.EventTreasuryAwarded //nolint:stylecheck,golint + Treasury_Rejected []gsrpcTypes.EventTreasuryRejected //nolint:stylecheck,golint + Treasury_Burnt []gsrpcTypes.EventTreasuryBurnt //nolint:stylecheck,golint + Treasury_Rollover []gsrpcTypes.EventTreasuryRollover //nolint:stylecheck,golint + Treasury_Deposit []gsrpcTypes.EventTreasuryDeposit //nolint:stylecheck,golint //Tips_NewTip []types2.EventTipsNewTip //nolint:stylecheck,golint //Tips_TipClosing []types2.EventTipsTipClosing //nolint:stylecheck,golint //Tips_TipClosed []types2.EventTipsTipClosed //nolint:stylecheck,golint @@ -183,18 +183,18 @@ type OriginEventRecord struct { //Bounties_BountyClaimed []types2.EventBountyBountyClaimed //nolint:stylecheck,golint //Bounties_BountyCanceled []types2.EventBountyBountyCanceled //nolint:stylecheck,golint //Bounties_BountyExtended []types2.EventBountyBountyExtended //nolint:stylecheck,golint - Contracts_Instantiated []gsrpcTypes.EventContractsInstantiated //nolint:stylecheck,golint - Contracts_Evicted []gsrpcTypes.EventContractsEvicted //nolint:stylecheck,golint + Contracts_Instantiated []gsrpcTypes.EventContractsInstantiated //nolint:stylecheck,golint + Contracts_Evicted []gsrpcTypes.EventContractsEvicted //nolint:stylecheck,golint //Contracts_Terminated []types2.EventContractsTerminated //nolint:stylecheck,golint - Contracts_Restored []gsrpcTypes.EventContractsRestored //nolint:stylecheck,golint - Contracts_CodeStored []gsrpcTypes.EventContractsCodeStored //nolint:stylecheck,golint - Contracts_ScheduleUpdated []gsrpcTypes.EventContractsScheduleUpdated //nolint:stylecheck,golint + Contracts_Restored []gsrpcTypes.EventContractsRestored //nolint:stylecheck,golint + Contracts_CodeStored []gsrpcTypes.EventContractsCodeStored //nolint:stylecheck,golint + Contracts_ScheduleUpdated []gsrpcTypes.EventContractsScheduleUpdated //nolint:stylecheck,golint //Contracts_ContractEmitted []types2.EventContractsContractEmitted //nolint:stylecheck,golint //Contracts_CodeRemoved []types2.EventContractsCodeRemoved //nolint:stylecheck,golint - Utility_BatchInterrupted []gsrpcTypes.EventUtilityBatchInterrupted //nolint:stylecheck,golint - Utility_BatchCompleted []gsrpcTypes.EventUtilityBatchCompleted //nolint:stylecheck,golint - Multisig_NewMultisig []gsrpcTypes.EventMultisigNewMultisig //nolint:stylecheck,golint - Multisig_MultisigApproval []gsrpcTypes.EventMultisigApproval //nolint:stylecheck,golint - Multisig_MultisigExecuted []gsrpcTypes.EventMultisigExecuted //nolint:stylecheck,golint - Multisig_MultisigCancelled []gsrpcTypes.EventMultisigCancelled + Utility_BatchInterrupted []gsrpcTypes.EventUtilityBatchInterrupted //nolint:stylecheck,golint + Utility_BatchCompleted []gsrpcTypes.EventUtilityBatchCompleted //nolint:stylecheck,golint + Multisig_NewMultisig []gsrpcTypes.EventMultisigNewMultisig //nolint:stylecheck,golint + Multisig_MultisigApproval []gsrpcTypes.EventMultisigApproval //nolint:stylecheck,golint + Multisig_MultisigExecuted []gsrpcTypes.EventMultisigExecuted //nolint:stylecheck,golint + Multisig_MultisigCancelled []gsrpcTypes.EventMultisigCancelled } diff --git a/expand/extra/xcm.go b/expand/extra/xcm.go index e305c7d..2a72168 100644 --- a/expand/extra/xcm.go +++ b/expand/extra/xcm.go @@ -1,8 +1,8 @@ package extra import ( - "github.com/JFJun/go-substrate-rpc-client/v3/scale" - gsrpcTypes "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/scale" + gsrpcTypes "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" ) // https://github.com/paritytech/polkadot/blob/master/xcm/src/v0/traits.rs#L25 diff --git a/expand/extrinsic.go b/expand/extrinsic.go index 712516d..4fcdb03 100644 --- a/expand/extrinsic.go +++ b/expand/extrinsic.go @@ -24,10 +24,10 @@ import ( "math/big" "strings" - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" - "github.com/JFJun/go-substrate-rpc-client/v3/scale" - "github.com/JFJun/go-substrate-rpc-client/v3/signature" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/scale" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/signature" ) const ( diff --git a/expand/extrinsic_decode.go b/expand/extrinsic_decode.go index 8c212f2..f77cc4a 100644 --- a/expand/extrinsic_decode.go +++ b/expand/extrinsic_decode.go @@ -8,8 +8,8 @@ package expand import ( "fmt" - "github.com/JFJun/go-substrate-rpc-client/v3/scale" - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/scale" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" "github.com/ethereum/go-ethereum/log" "github.com/huandu/xstrings" diff --git a/expand/metadata.go b/expand/metadata.go index 0aa9316..78f2e90 100644 --- a/expand/metadata.go +++ b/expand/metadata.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/utils" "github.com/huandu/xstrings" ) diff --git a/expand/polkadot/types.go b/expand/polkadot/types.go index 24495d3..4097533 100644 --- a/expand/polkadot/types.go +++ b/expand/polkadot/types.go @@ -1,7 +1,7 @@ package polkadot import ( - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/expand/base" "github.com/Platdot-Network/substrate-go/expand/bridge" "github.com/Platdot-Network/substrate-go/expand/extra" diff --git a/expand/types.go b/expand/types.go index e493c0d..43dd42b 100644 --- a/expand/types.go +++ b/expand/types.go @@ -8,8 +8,8 @@ import ( "io" "reflect" - "github.com/JFJun/go-substrate-rpc-client/v3/scale" - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/scale" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/uint128" "github.com/Platdot-Network/substrate-go/utils" "github.com/huandu/xstrings" diff --git a/go.mod b/go.mod index 3bd31c6..12d998c 100644 --- a/go.mod +++ b/go.mod @@ -2,10 +2,8 @@ module github.com/Platdot-Network/substrate-go go 1.15 -replace github.com/JFJun/go-substrate-rpc-client/v3 v3.0.5 => github.com/Platdot-Network/go-substrate-rpc-client/v3 v3.0.8 - require ( - github.com/JFJun/go-substrate-rpc-client/v3 v3.0.5 + github.com/Platdot-Network/go-substrate-rpc-client/v3 v3.0.9 github.com/ethereum/go-ethereum v1.10.12 github.com/hacpy/chainbridge-substrate-events v1.0.0 github.com/huandu/xstrings v1.3.2 diff --git a/go.sum b/go.sum index cff0583..bb45f43 100644 --- a/go.sum +++ b/go.sum @@ -40,8 +40,6 @@ github.com/ChainSafe/go-schnorrkel v0.0.0-20210318173838-ccb5cd955283 h1:bCAjrlK github.com/ChainSafe/go-schnorrkel v0.0.0-20210318173838-ccb5cd955283/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Platdot-Network/go-substrate-rpc-client/v3 v3.0.8 h1:r+0R0pSsbaMR7TCea3o73GXBOxQpBYibV+7ubQOMVxE= -github.com/Platdot-Network/go-substrate-rpc-client/v3 v3.0.8/go.mod h1:Ck391947i+bTMqbYW6c6q9fhDKHoJ9/hKCNeDpwUkds= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= diff --git a/tx/tx.go b/tx/tx.go index 36d911d..897aec7 100644 --- a/tx/tx.go +++ b/tx/tx.go @@ -3,12 +3,13 @@ package tx import ( "encoding/hex" "fmt" - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "strings" + + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" "github.com/Platdot-Network/substrate-go/expand" "github.com/Platdot-Network/substrate-go/utils" "github.com/rjman-ljm/go-substrate-crypto/crypto" "golang.org/x/crypto/blake2b" - "strings" ) /* diff --git a/utils/util.go b/utils/util.go index f8cc8c6..dc9c00f 100644 --- a/utils/util.go +++ b/utils/util.go @@ -4,7 +4,7 @@ import ( "encoding/hex" "encoding/json" "fmt" - "github.com/JFJun/go-substrate-rpc-client/v3/types" + "github.com/Platdot-Network/go-substrate-rpc-client/v3/types" "github.com/rjman-ljm/go-substrate-crypto/ss58" "math/big" "strings" From e45de8bad28609b75f28821629add3f21f440f88 Mon Sep 17 00:00:00 2001 From: hacpy Date: Tue, 23 Nov 2021 17:49:03 +0800 Subject: [PATCH 6/6] Add new balances events --- expand/extra/extra.go | 1 - expand/extra/origin.go | 19 +++++++++++-------- go.mod | 2 +- go.sum | 2 ++ 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/expand/extra/extra.go b/expand/extra/extra.go index 6d2fea4..57d0325 100644 --- a/expand/extra/extra.go +++ b/expand/extra/extra.go @@ -11,7 +11,6 @@ type ExtraEvents struct { type ExtraEventRecord struct { // Fix some events - Balances_ReserveRepatriated []gsrpcTypes.EventBalancesReserveRepatriated System_Remarked []Remarked Scheduler_Dispatched []SchedulerDispatched Scheduler_Scheduled []SchedulerScheduled diff --git a/expand/extra/origin.go b/expand/extra/origin.go index 21112a1..54fe83a 100644 --- a/expand/extra/origin.go +++ b/expand/extra/origin.go @@ -16,14 +16,17 @@ type OriginEvents struct { type OriginEventRecord struct { // refer origin - Claims_Claimed []gsrpcTypes.EventClaimsClaimed //nolint:stylecheck,golint - Balances_Endowed []gsrpcTypes.EventBalancesEndowed //nolint:stylecheck,golint - Balances_DustLost []gsrpcTypes.EventBalancesDustLost //nolint:stylecheck,golint - Balances_Transfer []gsrpcTypes.EventBalancesTransfer //nolint:stylecheck,golint - Balances_BalanceSet []gsrpcTypes.EventBalancesBalanceSet //nolint:stylecheck,golint - Balances_Deposit []gsrpcTypes.EventBalancesDeposit //nolint:stylecheck,golint - Balances_Reserved []gsrpcTypes.EventBalancesReserved //nolint:stylecheck,golint - Balances_Unreserved []gsrpcTypes.EventBalancesUnreserved //nolint:stylecheck,golint + Claims_Claimed []gsrpcTypes.EventClaimsClaimed //nolint:stylecheck,golint + Balances_Endowed []gsrpcTypes.EventBalancesEndowed //nolint:stylecheck,golint + Balances_DustLost []gsrpcTypes.EventBalancesDustLost //nolint:stylecheck,golint + Balances_Transfer []gsrpcTypes.EventBalancesTransfer //nolint:stylecheck,golint + Balances_BalanceSet []gsrpcTypes.EventBalancesBalanceSet //nolint:stylecheck,golint + Balances_Reserved []gsrpcTypes.EventBalancesReserved //nolint:stylecheck,golint + Balances_Unreserved []gsrpcTypes.EventBalancesUnreserved //nolint:stylecheck,golint + Balances_ReserveRepatriated []gsrpcTypes.EventBalancesReserveRepatriated + Balances_Deposit []gsrpcTypes.EventBalancesDeposit //nolint:stylecheck,golint + Balances_Withdraw []gsrpcTypes.EventBalancesWithdraw + Balances_Slashed []gsrpcTypes.EventBalancesSlashed //Balances_ReservedRepatriated []gsrpcTypes.EventBalancesReserveRepatriated //nolint:stylecheck,golint Grandpa_NewAuthorities []gsrpcTypes.EventGrandpaNewAuthorities //nolint:stylecheck,golint Grandpa_Paused []gsrpcTypes.EventGrandpaPaused //nolint:stylecheck,golint diff --git a/go.mod b/go.mod index 12d998c..639b9df 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/Platdot-Network/substrate-go go 1.15 require ( - github.com/Platdot-Network/go-substrate-rpc-client/v3 v3.0.9 + github.com/Platdot-Network/go-substrate-rpc-client/v3 v3.0.10 github.com/ethereum/go-ethereum v1.10.12 github.com/hacpy/chainbridge-substrate-events v1.0.0 github.com/huandu/xstrings v1.3.2 diff --git a/go.sum b/go.sum index bb45f43..c3f0300 100644 --- a/go.sum +++ b/go.sum @@ -40,6 +40,8 @@ github.com/ChainSafe/go-schnorrkel v0.0.0-20210318173838-ccb5cd955283 h1:bCAjrlK github.com/ChainSafe/go-schnorrkel v0.0.0-20210318173838-ccb5cd955283/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/Platdot-Network/go-substrate-rpc-client/v3 v3.0.10 h1:QP1DjI/sGt05qcdE56pClRdYR2FIM/2JsAkZeR24b50= +github.com/Platdot-Network/go-substrate-rpc-client/v3 v3.0.10/go.mod h1:R1XC66btlxDwmmtIiqIv9UZuw9xGwznsKfuauLQZV80= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8=