writer

package
v0.0.0-...-1b15b10 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: LGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const ExecuteBlockWatchLimit = 100

Number of blocks to wait for an finalization event

View Source
const TxRetryInterval = time.Second * 2

Time between retrying a failed tx

View Source
const TxRetryLimit = 10

Time between retrying a failed tx

Variables

View Source
var BlockRetryLimit = 5
View Source
var ErrFatalQuery = errors.New("query of chain state failed")
View Source
var ErrFatalTx = errors.New("submission of transaction failed")
View Source
var ErrNonceTooLow = errors.New("nonce too low")
View Source
var ErrTxUnderpriced = errors.New("replacement transaction underpriced")
View Source
var ProposalNotPassedStatus uint8 = 1
View Source
var ProposalStatusCancelled uint8 = 4
View Source
var ProposalStatusPassed uint8 = 2
View Source
var ProposalStatusTransferred uint8 = 3

Functions

func ConstructErc20ProposalData

func ConstructErc20ProposalData(amount []byte, recipient []byte) []byte

constructErc20ProposalData returns the bytes to construct a proposal suitable for Erc20

func ConstructErc721ProposalData

func ConstructErc721ProposalData(tokenId []byte, recipient []byte, metadata []byte) []byte

ConstructErc721ProposalData returns the bytes to construct a proposal suitable for Erc721

func ConstructGenericProposalData

func ConstructGenericProposalData(metadata []byte) []byte

constructGenericProposalData returns the bytes to construct a generic proposal

func NewWriter

func NewWriter(client ContractCaller, cfg *config.CeloChainConfig, stop <-chan struct{}, sysErr chan<- error, m *metrics.ChainMetrics) *writer

NewWriter creates and returns writer

Types

type Bridger

type Bridger interface {
	GetProposal(opts *bind.CallOpts, originChainID uint8, depositNonce uint64, dataHash [32]byte) (Bridge.BridgeProposal, error)
	HasVotedOnProposal(opts *bind.CallOpts, arg0 *big.Int, arg1 [32]byte, arg2 common.Address) (bool, error)
	VoteProposal(opts *bind.TransactOpts, chainID uint8, depositNonce uint64, resourceID [32]byte, dataHash [32]byte) (*types.Transaction, error)
	ExecuteProposal(opts *bind.TransactOpts, chainID uint8, depositNonce uint64, data []byte, resourceID [32]byte, signatureHeader []byte, aggregatePublicKey []byte, hashedMessage [32]byte, rootHash [32]byte, key []byte, nodes []byte) (*types.Transaction, error)
}

type ContractCaller

type ContractCaller interface {
	client.LogFilterWithLatestBlock
	CallOpts() *bind.CallOpts
	Opts() *bind.TransactOpts
	LockAndUpdateOpts() error
	UnlockOpts()
	WaitForBlock(block *big.Int) error
}

Directories

Path Synopsis
Package mock_writer is a generated GoMock package.
Package mock_writer is a generated GoMock package.

Jump to

Keyboard shortcuts

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