Documentation ¶
Index ¶
- Constants
- Variables
- func OpenKeystore(dir string) *keystore.KeyStore
- func StoredContracts() map[string]StoredContract
- type Client
- func (c Client) BalanceAt(ctx context.Context, address common.Address, blockHeight uint64) (*big.Int, error)
- func (c Client) BlockByHash(ctx context.Context, blockHash common.Hash) (*ethtypes.Block, error)
- func (c Client) DeployContract(ctx context.Context, chainID *big.Int, contractAbi abi.ABI, ...) (contractAddr common.Address, tx *ethtypes.Transaction, err error)
- func (c Client) ExecuteSmartContract(ctx context.Context, chainID *big.Int, contractAbi abi.ABI, ...) (*etherumtypes.Transaction, error)
- func (c Client) FilterLogs(ctx context.Context, fq etherum.FilterQuery, currBlockHeight *big.Int, ...) (bool, error)
- func (c Client) FindBlockNearestToTime(ctx context.Context, startingHeight uint64, when time.Time) (uint64, error)
- func (c Client) TransactionByHash(ctx context.Context, txHash common.Hash) (*ethtypes.Transaction, bool, error)
- type CompassConsensus
- type CompassValset
- type Factory
- type PalomaClienter
- type Processor
- func (p Processor) ExternalAccount() chain.ExternalAccount
- func (p Processor) IsRightChain(ctx context.Context) error
- func (p Processor) ProcessMessages(ctx context.Context, queueTypeName string, msgs []chain.MessageWithSignatures) error
- func (p Processor) ProvideEvidence(ctx context.Context, queueTypeName string, msgs []chain.MessageWithSignatures) error
- func (p Processor) SignMessages(ctx context.Context, queueTypeName string, messages ...chain.QueuedMessage) ([]chain.SignedQueuedMessage, error)
- func (p Processor) SupportedQueues() []string
- type StoredContract
Constants ¶
View Source
const ( ErrSmartContractNotFound = whoops.Errorf("smart contract %s was not found") ErrInvalidAddress = whoops.Errorf("provided address: '%s' is not valid") ErrAddressNotFoundInKeyStore = whoops.Errorf("address: '%s' not found in keystore: %s") ErrUnsupportedMessageType = whoops.Errorf("unsupported message type: %T") ErrABINotInitialized = whoops.String("ABI is not initialized") ErrEvm = whoops.String("EVM related error") ErrNoConsensus = whoops.String("no consensus reached") ErrCouldntFindBlockWithTime = whoops.String("couldn't find block") )
View Source
const ( FieldMessageID whoops.Field[uint64] = "message id" FieldMessageType whoops.Field[any] = "message type" )
View Source
const (
SignedMessagePrefix = "\x19Ethereum Signed Message:\n32"
)
Variables ¶
View Source
var ( ErrStartingBlockIsInTheFuture = ErrCouldntFindBlockWithTime.WrapS("starting height's block time is set in future") ErrBlockNotYetGenerated = ErrCouldntFindBlockWithTime.WrapS("block has not yet been generated") )
Functions ¶
func OpenKeystore ¶
func StoredContracts ¶
func StoredContracts() map[string]StoredContract
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (Client) BlockByHash ¶
func (Client) DeployContract ¶
func (Client) ExecuteSmartContract ¶
func (Client) FilterLogs ¶
func (c Client) FilterLogs(ctx context.Context, fq etherum.FilterQuery, currBlockHeight *big.Int, fn func(logs []ethtypes.Log) bool) (bool, error)
FilterLogs will gather all logs given a FilterQuery. If it encounters an error saying that there are too many results in the provided block window, then it's going to try to do this using a "binary search" approach while splitting the possible set in two, recursively.
func (Client) FindBlockNearestToTime ¶ added in v0.5.0
type CompassConsensus ¶ added in v0.4.0
type CompassConsensus struct { Valset CompassValset Signatures []*big.Int // contains filtered or unexported fields }
func BuildCompassConsensus ¶ added in v0.4.0
func BuildCompassConsensus( ctx context.Context, v *types.Valset, signatures []chain.ValidatorSignature, ) CompassConsensus
func (CompassConsensus) OriginalSignatures ¶ added in v0.4.0
func (c CompassConsensus) OriginalSignatures() [][]byte
type CompassValset ¶ added in v0.4.0
func TransformValsetToCompassValset ¶ added in v0.4.0
func TransformValsetToCompassValset(val *types.Valset) CompassValset
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
func NewFactory ¶
func NewFactory(pc PalomaClienter) *Factory
type PalomaClienter ¶
type PalomaClienter interface { AddMessageEvidence(ctx context.Context, queueTypeName string, messageID uint64, proof proto.Message) error SetPublicAccessData(ctx context.Context, queueTypeName string, messageID uint64, data []byte) error QueryGetEVMValsetByID(ctx context.Context, id uint64, chainID string) (*types.Valset, error) }
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
func (Processor) ExternalAccount ¶
func (p Processor) ExternalAccount() chain.ExternalAccount
func (Processor) ProcessMessages ¶
func (Processor) ProvideEvidence ¶ added in v0.4.0
func (Processor) SignMessages ¶
func (p Processor) SignMessages(ctx context.Context, queueTypeName string, messages ...chain.QueuedMessage) ([]chain.SignedQueuedMessage, error)
func (Processor) SupportedQueues ¶
type StoredContract ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.