parachain

package
v0.0.0-...-8201b66 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2021 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MaxWatchedExtrinsics = 20
View Source
const MortalEraPeriod = uint64(64)

Must be a power of two between 4 and 65536 (inclusive)

Variables

View Source
var IndexingPrefix = []byte("commitment")

Functions

func MakeStorageKey

func MakeStorageKey(channelID chainTypes.ChannelID, hash types.H256) ([]byte, error)

func NewMortalEra

func NewMortalEra(currentBlockNumber uint64) types.ExtrinsicEra

Types

type Config

type Config struct {
	Endpoint   string `mapstructure:"endpoint"`
	PrivateKey string `mapstructure:"private-key"`
}

type Connection

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

func NewConnection

func NewConnection(endpoint string, kp *signature.KeyringPair, log *logrus.Entry) *Connection

func (*Connection) Api

func (co *Connection) Api() *gsrpc.SubstrateAPI

func (*Connection) Close

func (co *Connection) Close()

func (*Connection) Connect

func (co *Connection) Connect(_ context.Context) error

func (*Connection) GenesisHash

func (co *Connection) GenesisHash() types.Hash

func (*Connection) GetAPI

func (co *Connection) GetAPI() *gsrpc.SubstrateAPI

func (*Connection) GetFinalizedHeader

func (co *Connection) GetFinalizedHeader() (*types.Header, error)

func (*Connection) GetKeypair

func (co *Connection) GetKeypair() *signature.KeyringPair

func (*Connection) GetLatestBlockNumber

func (co *Connection) GetLatestBlockNumber() (*types.BlockNumber, error)

func (*Connection) GetMetadata

func (co *Connection) GetMetadata() *types.Metadata

func (*Connection) Metadata

func (co *Connection) Metadata() *types.Metadata

type ExtrinsicPool

type ExtrinsicPool struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewExtrinsicPool

func NewExtrinsicPool(eg *errgroup.Group, conn *Connection, log *logrus.Entry) *ExtrinsicPool

func (*ExtrinsicPool) WaitForSubmitAndWatch

func (ep *ExtrinsicPool) WaitForSubmitAndWatch(ctx context.Context, nonce uint32, ext *types.Extrinsic, onProcessed func() error)

Jump to

Keyboard shortcuts

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