chainio

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxRetries                        = 100
	RetryInterval                     = 1 * time.Second
	BlockInterval              uint64 = 1000
	PollLatestBatchInterval           = 5 * time.Second
	RemoveBatchFromSetInterval        = 5 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AvsReader

type AvsReader struct {
	*sdkavsregistry.ChainReader
	AvsContractBindings *AvsServiceBindings
	// contains filtered or unexported fields
}

func NewAvsReaderFromConfig

func NewAvsReaderFromConfig(baseConfig *config.BaseConfig, ecdsaConfig *config.EcdsaConfig) (*AvsReader, error)

func (*AvsReader) GetErc20Mock

func (r *AvsReader) GetErc20Mock(tokenAddr gethcommon.Address) (*contractERC20Mock.ContractERC20Mock, error)

func (*AvsReader) IsOperatorRegistered

func (r *AvsReader) IsOperatorRegistered(address gethcommon.Address) (bool, error)

type AvsServiceBindings

type AvsServiceBindings struct {
	ServiceManager         *csservicemanager.ContractAlignedLayerServiceManager
	ServiceManagerFallback *csservicemanager.ContractAlignedLayerServiceManager
	// contains filtered or unexported fields
}

func NewAvsServiceBindings

func NewAvsServiceBindings(serviceManagerAddr, blsOperatorStateRetrieverAddr gethcommon.Address, ethClient eth.Client, ethClientFallback eth.Client, logger logging.Logger) (*AvsServiceBindings, error)

type AvsSubscriber

type AvsSubscriber struct {
	AvsContractBindings            *AvsServiceBindings
	AlignedLayerServiceManagerAddr ethcommon.Address
	// contains filtered or unexported fields
}

Subscribers use a ws connection instead of http connection like Readers kind of stupid that the geth client doesn't have a unified interface for both... it takes a single url, so the bindings, even though they have watcher functions, those can't be used with the http connection... seems very very stupid. Am I missing something?

func NewAvsSubscriberFromConfig

func NewAvsSubscriberFromConfig(baseConfig *config.BaseConfig) (*AvsSubscriber, error)

func (*AvsSubscriber) SubscribeToNewTasks

func (s *AvsSubscriber) SubscribeToNewTasks(newTaskCreatedChan chan *servicemanager.ContractAlignedLayerServiceManagerNewBatch) (chan error, error)

func (*AvsSubscriber) SubscribeToNewTasksV2 added in v0.5.0

func (s *AvsSubscriber) SubscribeToNewTasksV2(newTaskCreatedChan chan *servicemanager.ContractAlignedLayerServiceManagerNewBatchV2) (chan error, error)

func (*AvsSubscriber) WaitForOneBlock added in v0.5.0

func (s *AvsSubscriber) WaitForOneBlock(startBlock uint64) error

type AvsWriter

type AvsWriter struct {
	*avsregistry.ChainWriter
	AvsContractBindings *AvsServiceBindings

	Signer signer.Signer
	Client eth.Client
	// contains filtered or unexported fields
}

func NewAvsWriterFromConfig

func NewAvsWriterFromConfig(baseConfig *config.BaseConfig, ecdsaConfig *config.EcdsaConfig) (*AvsWriter, error)

func (*AvsWriter) SendAggregatedResponse

func (w *AvsWriter) SendAggregatedResponse(batchMerkleRoot [32]byte, nonSignerStakesAndSignature servicemanager.IBLSSignatureCheckerNonSignerStakesAndSignature) (*common.Hash, error)

func (*AvsWriter) SendAggregatedResponseV2 added in v0.5.0

func (w *AvsWriter) SendAggregatedResponseV2(batchMerkleRoot [32]byte, senderAddress [20]byte, nonSignerStakesAndSignature servicemanager.IBLSSignatureCheckerNonSignerStakesAndSignature) (*common.Hash, error)

func (*AvsWriter) SendTask

func (w *AvsWriter) SendTask(context context.Context, batchMerkleRoot [32]byte, batchDataPointer string) error

Jump to

Keyboard shortcuts

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