Documentation
¶
Index ¶
- type AggSenderSQLStorage
- func (a *AggSenderSQLStorage) DeleteCertificate(ctx context.Context, certificateID common.Hash) error
- func (a *AggSenderSQLStorage) GetCertificateByHeight(height uint64) (*types.CertificateInfo, error)
- func (a *AggSenderSQLStorage) GetCertificatesByStatus(statuses []agglayertypes.CertificateStatus) ([]*types.CertificateInfo, error)
- func (a *AggSenderSQLStorage) GetLastSentCertificate() (*types.CertificateInfo, error)
- func (a *AggSenderSQLStorage) SaveLastSentCertificate(ctx context.Context, certificate types.CertificateInfo) error
- func (a *AggSenderSQLStorage) UpdateCertificate(ctx context.Context, certificate types.CertificateInfo) error
- type AggSenderSQLStorageConfig
- type AggSenderStorage
- type AggchainProofMeddler
- type RuntimeData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggSenderSQLStorage ¶
type AggSenderSQLStorage struct {
compatibility.KeyValueStorager
// contains filtered or unexported fields
}
AggSenderSQLStorage is the struct that implements the AggSenderStorage interface
func NewAggSenderSQLStorage ¶
func NewAggSenderSQLStorage(logger *log.Logger, cfg AggSenderSQLStorageConfig) (*AggSenderSQLStorage, error)
NewAggSenderSQLStorage creates a new AggSenderSQLStorage
func (*AggSenderSQLStorage) DeleteCertificate ¶
func (a *AggSenderSQLStorage) DeleteCertificate(ctx context.Context, certificateID common.Hash) error
DeleteCertificate deletes a certificate from the storage
func (*AggSenderSQLStorage) GetCertificateByHeight ¶
func (a *AggSenderSQLStorage) GetCertificateByHeight(height uint64) (*types.CertificateInfo, error)
GetCertificateByHeight returns a certificate by its height
func (*AggSenderSQLStorage) GetCertificatesByStatus ¶
func (a *AggSenderSQLStorage) GetCertificatesByStatus( statuses []agglayertypes.CertificateStatus) ([]*types.CertificateInfo, error)
func (*AggSenderSQLStorage) GetLastSentCertificate ¶
func (a *AggSenderSQLStorage) GetLastSentCertificate() (*types.CertificateInfo, error)
GetLastSentCertificate returns the last certificate sent to the aggLayer
func (*AggSenderSQLStorage) SaveLastSentCertificate ¶
func (a *AggSenderSQLStorage) SaveLastSentCertificate(ctx context.Context, certificate types.CertificateInfo) error
SaveLastSentCertificate saves the last certificate sent to the aggLayer
func (*AggSenderSQLStorage) UpdateCertificate ¶
func (a *AggSenderSQLStorage) UpdateCertificate(ctx context.Context, certificate types.CertificateInfo) error
UpdateCertificate updates a certificate
type AggSenderSQLStorageConfig ¶
AggSenderSQLStorageConfig is the configuration for the AggSenderSQLStorage
type AggSenderStorage ¶
type AggSenderStorage interface {
// GetCertificateByHeight returns a certificate by its height
GetCertificateByHeight(height uint64) (*types.CertificateInfo, error)
// GetLastSentCertificate returns the last certificate sent to the aggLayer
GetLastSentCertificate() (*types.CertificateInfo, error)
// SaveLastSentCertificate saves the last certificate sent to the aggLayer
SaveLastSentCertificate(ctx context.Context, certificate types.CertificateInfo) error
// DeleteCertificate deletes a certificate from the storage
DeleteCertificate(ctx context.Context, certificateID common.Hash) error
// GetCertificatesByStatus returns a list of certificates by their status
GetCertificatesByStatus(status []agglayertypes.CertificateStatus) ([]*types.CertificateInfo, error)
// UpdateCertificate updates certificate in db
UpdateCertificate(ctx context.Context, certificate types.CertificateInfo) error
}
AggSenderStorage is the interface that defines the methods to interact with the storage
type AggchainProofMeddler ¶ added in v0.3.0
type AggchainProofMeddler struct{}
AggchainProofMeddler is a meddler.Meddler implementation for the AggchainProof type.
func (*AggchainProofMeddler) PostRead ¶ added in v0.3.0
func (m *AggchainProofMeddler) PostRead(fieldAddr interface{}, scanTarget interface{}) error
PostRead decodes the data from the database into the field.
func (*AggchainProofMeddler) PreRead ¶ added in v0.3.0
func (m *AggchainProofMeddler) PreRead(fieldAddr interface{}) (scanTarget interface{}, err error)
PreRead prepares the field for reading from the database.
func (*AggchainProofMeddler) PreWrite ¶ added in v0.3.0
func (m *AggchainProofMeddler) PreWrite(field interface{}) (saveValue interface{}, err error)
PreWrite prepares the field for writing to the database.
type RuntimeData ¶ added in v0.2.0
type RuntimeData struct {
NetworkID uint32
}
func (RuntimeData) IsCompatible ¶ added in v0.2.0
func (r RuntimeData) IsCompatible(storage RuntimeData) error
func (RuntimeData) String ¶ added in v0.2.0
func (r RuntimeData) String() string