contract

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RExtensionSubscription

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

func (*RExtensionSubscription) OnEvent

func (es *RExtensionSubscription) OnEvent(
	handler relayExtensionFunc,
) subscription.EventSubscription

func (*RExtensionSubscription) Pipe

type RNewTipSubscription

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

func (*RNewTipSubscription) OnEvent

func (nts *RNewTipSubscription) OnEvent(
	handler relayNewTipFunc,
) subscription.EventSubscription

func (*RNewTipSubscription) Pipe

type Relay

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

func NewRelay

func NewRelay(
	contractAddress common.Address,
	chainId *big.Int,
	accountKey *keystore.Key,
	backend bind.ContractBackend,
	nonceManager *ethlike.NonceManager,
	miningWaiter *chainutil.MiningWaiter,
	blockCounter *ethlike.BlockCounter,
	transactionMutex *sync.Mutex,
) (*Relay, error)

func (*Relay) AddHeaders

func (r *Relay) AddHeaders(
	_anchor []uint8,
	_headers []uint8,

	transactionOptions ...chainutil.TransactionOptions,
) (*types.Transaction, error)

Transaction submission.

func (*Relay) AddHeadersGasEstimate

func (r *Relay) AddHeadersGasEstimate(
	_anchor []uint8,
	_headers []uint8,
) (uint64, error)

func (*Relay) AddHeadersWithRetarget

func (r *Relay) AddHeadersWithRetarget(
	_oldPeriodStartHeader []uint8,
	_oldPeriodEndHeader []uint8,
	_headers []uint8,

	transactionOptions ...chainutil.TransactionOptions,
) (*types.Transaction, error)

Transaction submission.

func (*Relay) AddHeadersWithRetargetGasEstimate

func (r *Relay) AddHeadersWithRetargetGasEstimate(
	_oldPeriodStartHeader []uint8,
	_oldPeriodEndHeader []uint8,
	_headers []uint8,
) (uint64, error)

func (*Relay) CallAddHeaders

func (r *Relay) CallAddHeaders(
	_anchor []uint8,
	_headers []uint8,
	blockNumber *big.Int,
) (bool, error)

Non-mutating call, not a transaction submission.

func (*Relay) CallAddHeadersWithRetarget

func (r *Relay) CallAddHeadersWithRetarget(
	_oldPeriodStartHeader []uint8,
	_oldPeriodEndHeader []uint8,
	_headers []uint8,
	blockNumber *big.Int,
) (bool, error)

Non-mutating call, not a transaction submission.

func (*Relay) CallMarkNewHeaviest

func (r *Relay) CallMarkNewHeaviest(
	_ancestor [32]uint8,
	_currentBest []uint8,
	_newBest []uint8,
	_limit *big.Int,
	blockNumber *big.Int,
) (bool, error)

Non-mutating call, not a transaction submission.

func (*Relay) Extension

func (r *Relay) Extension(
	opts *ethlike.SubscribeOpts,
	_firstFilter [][32]uint8,
	_lastFilter [][32]uint8,
) *RExtensionSubscription

func (*Relay) FindAncestor

func (r *Relay) FindAncestor(
	_digest [32]uint8,
	_offset *big.Int,
) ([32]uint8, error)

func (*Relay) FindAncestorAtBlock

func (r *Relay) FindAncestorAtBlock(
	_digest [32]uint8,
	_offset *big.Int,
	blockNumber *big.Int,
) ([32]uint8, error)

func (*Relay) FindHeight

func (r *Relay) FindHeight(
	_digest [32]uint8,
) (*big.Int, error)

func (*Relay) FindHeightAtBlock

func (r *Relay) FindHeightAtBlock(
	_digest [32]uint8,
	blockNumber *big.Int,
) (*big.Int, error)

func (*Relay) GetBestKnownDigest

func (r *Relay) GetBestKnownDigest() ([32]uint8, error)

func (*Relay) GetBestKnownDigestAtBlock

func (r *Relay) GetBestKnownDigestAtBlock(
	blockNumber *big.Int,
) ([32]uint8, error)

func (*Relay) GetCurrentEpochDifficulty

func (r *Relay) GetCurrentEpochDifficulty() (*big.Int, error)

func (*Relay) GetCurrentEpochDifficultyAtBlock

func (r *Relay) GetCurrentEpochDifficultyAtBlock(
	blockNumber *big.Int,
) (*big.Int, error)

func (*Relay) GetLastReorgCommonAncestor

func (r *Relay) GetLastReorgCommonAncestor() ([32]uint8, error)

func (*Relay) GetLastReorgCommonAncestorAtBlock

func (r *Relay) GetLastReorgCommonAncestorAtBlock(
	blockNumber *big.Int,
) ([32]uint8, error)

func (*Relay) GetPrevEpochDifficulty

func (r *Relay) GetPrevEpochDifficulty() (*big.Int, error)

func (*Relay) GetPrevEpochDifficultyAtBlock

func (r *Relay) GetPrevEpochDifficultyAtBlock(
	blockNumber *big.Int,
) (*big.Int, error)

func (*Relay) GetRelayGenesis

func (r *Relay) GetRelayGenesis() ([32]uint8, error)

func (*Relay) GetRelayGenesisAtBlock

func (r *Relay) GetRelayGenesisAtBlock(
	blockNumber *big.Int,
) ([32]uint8, error)

func (*Relay) HEIGHTINTERVAL

func (r *Relay) HEIGHTINTERVAL() (uint32, error)

func (*Relay) HEIGHTINTERVALAtBlock

func (r *Relay) HEIGHTINTERVALAtBlock(
	blockNumber *big.Int,
) (uint32, error)

func (*Relay) IsAncestor

func (r *Relay) IsAncestor(
	_ancestor [32]uint8,
	_descendant [32]uint8,
	_limit *big.Int,
) (bool, error)

func (*Relay) IsAncestorAtBlock

func (r *Relay) IsAncestorAtBlock(
	_ancestor [32]uint8,
	_descendant [32]uint8,
	_limit *big.Int,
	blockNumber *big.Int,
) (bool, error)

func (*Relay) MarkNewHeaviest

func (r *Relay) MarkNewHeaviest(
	_ancestor [32]uint8,
	_currentBest []uint8,
	_newBest []uint8,
	_limit *big.Int,

	transactionOptions ...chainutil.TransactionOptions,
) (*types.Transaction, error)

Transaction submission.

func (*Relay) MarkNewHeaviestGasEstimate

func (r *Relay) MarkNewHeaviestGasEstimate(
	_ancestor [32]uint8,
	_currentBest []uint8,
	_newBest []uint8,
	_limit *big.Int,
) (uint64, error)

func (*Relay) NewTip

func (r *Relay) NewTip(
	opts *ethlike.SubscribeOpts,
	_fromFilter [][32]uint8,
	_toFilter [][32]uint8,
	_gcdFilter [][32]uint8,
) *RNewTipSubscription

func (*Relay) PastExtensionEvents

func (r *Relay) PastExtensionEvents(
	startBlock uint64,
	endBlock *uint64,
	_firstFilter [][32]uint8,
	_lastFilter [][32]uint8,
) ([]*abi.RelayExtension, error)

func (*Relay) PastNewTipEvents

func (r *Relay) PastNewTipEvents(
	startBlock uint64,
	endBlock *uint64,
	_fromFilter [][32]uint8,
	_toFilter [][32]uint8,
	_gcdFilter [][32]uint8,
) ([]*abi.RelayNewTip, error)

Jump to

Keyboard shortcuts

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