client

package module
v0.0.0-...-46ca400 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2021 License: LGPL-3.0 Imports: 12 Imported by: 1

README

Chainbridge substrate module

discord

Chainbridge substrate module is the part of Chainbrige-core framework. This module brings support of substrate V2 compatible client module.

Usage

Module should be used along with core framework.

Example

ChainSafe Security Policy

Reporting a Security Bug

We take all security issues seriously, if you believe you have found a security issue within a ChainSafe project please notify us immediately. If an issue is confirmed, we will take all necessary precautions to ensure a statement and patch release is made in a timely manner.

Please email us a description of the flaw and any related information (e.g. reproduction steps, version) to security at chainsafe dot io.

License

GNU Lesser General Public License v3.0

Documentation

Index

Constants

View Source
const BridgePalletName = "ChainBridge"
View Source
const BridgeStoragePrefix = "ChainBridge"

Variables

This section is empty.

Functions

This section is empty.

Types

type Sender

type Sender interface {
	PrivateKey() *ecdsa.PrivateKey
	Address() string
}

type SubstrateClient

type SubstrateClient struct {
	// contains filtered or unexported fields
}

func NewSubstrateClient

func NewSubstrateClient(stop <-chan struct{}) *SubstrateClient

func (*SubstrateClient) Configurate

func (c *SubstrateClient) Configurate(path string, name string) error

func (*SubstrateClient) GetBlockEvents

func (c *SubstrateClient) GetBlockEvents(hash types.Hash, target interface{}) error

func (*SubstrateClient) GetBlockHash

func (c *SubstrateClient) GetBlockHash(blockNumber uint64) (types.Hash, error)

func (*SubstrateClient) GetConfig

func (c *SubstrateClient) GetConfig() *config.SubstrateConfig

func (*SubstrateClient) GetHeaderLatest

func (c *SubstrateClient) GetHeaderLatest() (*types.Header, error)

func (*SubstrateClient) GetMetadata

func (c *SubstrateClient) GetMetadata() (meta types.Metadata)

func (*SubstrateClient) GetProposalStatus

func (c *SubstrateClient) GetProposalStatus(sourceID []byte, proposalBytes []byte) (bool, *substrate.VoteState, error)

func (*SubstrateClient) GetVoterAccountID

func (c *SubstrateClient) GetVoterAccountID() types.AccountID

func (*SubstrateClient) QueryStorage

func (c *SubstrateClient) QueryStorage(prefix, method string, arg1, arg2 []byte, result interface{}) (bool, error)

queryStorage performs a storage lookup. Arguments may be nil, result must be a pointer.

func (*SubstrateClient) ResolveResourceId

func (c *SubstrateClient) ResolveResourceId(id [32]byte) (string, error)

func (*SubstrateClient) SubmitTx

func (c *SubstrateClient) SubmitTx(method string, args ...interface{}) error

SubmitTx constructs and submits an extrinsic to call the method with the given arguments. All args are passed directly into GSRPC. GSRPC types are recommended to avoid serialization inconsistencies.

func (*SubstrateClient) UpdateMetatdata

func (c *SubstrateClient) UpdateMetatdata() error

type VoteState

type VoteState struct {
	VotesFor     []types.AccountID
	VotesAgainst []types.AccountID
	Status       struct {
		IsActive   bool
		IsApproved bool
		IsRejected bool
	}
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL