Documentation
¶
Index ¶
- Variables
- func CheckBalance[S signerP.Signer](signer S, threshold float64, logger *junoUtils.ZapLogger, ...)
- func CorrectEpochSwitch(prevEpoch *types.EpochInfo, newEpoch *types.EpochInfo) bool
- func FetchEpochAndAttestInfoWithRetry[Signer signerP.Signer](signer Signer, logger *utils.ZapLogger, prevEpoch *types.EpochInfo, ...) (types.EpochInfo, types.AttestInfo, error)
- func MockRPCServer(t *testing.T, operationalAddress *felt.Felt, serverInternalError string) *httptest.Server
- func NewProvider[Logger utils.Logger](providerUrl string, logger Logger) (*rpc.Provider, error)
- func ProcessBlockHeaders[Account signerP.Signer](ctx context.Context, headersFeed chan *rpc.BlockHeader, account Account, ...) error
- func RunBlockHeaderWatcher[S signerP.Signer](ctx context.Context, wsProviderURL string, logger *utils.ZapLogger, signer S, ...) error
- func SepoliaValidationContracts(t *testing.T) *types.ValidationContracts
- func SetTargetBlockHashIfExists[Account signerP.Signer](account Account, logger *utils.ZapLogger, attestInfo *types.AttestInfo)
- func SubscribeToBlockHeaders[Logger utils.Logger](ctx context.Context, wsProviderUrl string, logger Logger) (*rpc.WsProvider, chan *rpc.BlockHeader, *client.ClientSubscription, error)
- type AttestStatus
- type AttestTracker
- type AttestTransaction
- func (t *AttestTransaction) Build(signer signerP.Signer, blockHash *types.BlockHash) error
- func (t *AttestTransaction) Invoke(signer signerP.Signer) (*rpc.AddInvokeTransactionResponse, error)
- func (t *AttestTransaction) UpdateNonce(signer signerP.Signer) error
- func (t *AttestTransaction) Valid() bool
- type EnvVariable
- type EventDispatcher
- type Method
- type Validator
Constants ¶
This section is empty.
Variables ¶
View Source
var ChainID string
View Source
var ErrTxnHashNotFound = rpc.RPCError{Code: 29, Message: "Transaction hash not found"}
View Source
var Sleep = time.Sleep
Created a function variable for mocking purposes in tests
View Source
var Version string = "dev"
The current version of the validator tool. This is set at build time
Functions ¶
func CheckBalance ¶ added in v0.2.7
func CorrectEpochSwitch ¶ added in v0.2.0
func FetchEpochAndAttestInfoWithRetry ¶
func FetchEpochAndAttestInfoWithRetry[Signer signerP.Signer]( signer Signer, logger *utils.ZapLogger, prevEpoch *types.EpochInfo, isEpochSwitchCorrect func(prevEpoch *types.EpochInfo, newEpoch *types.EpochInfo) bool, maxRetries types.Retries, newEpochId string, ) (types.EpochInfo, types.AttestInfo, error)
func MockRPCServer ¶ added in v0.2.0
func NewProvider ¶
Returns a new Starknet.Go RPC Provider
func ProcessBlockHeaders ¶
func RunBlockHeaderWatcher ¶ added in v0.1.2
func SepoliaValidationContracts ¶ added in v0.2.0
func SepoliaValidationContracts(t *testing.T) *types.ValidationContracts
func SubscribeToBlockHeaders ¶ added in v0.1.2
func SubscribeToBlockHeaders[Logger utils.Logger](ctx context.Context, wsProviderUrl string, logger Logger) ( *rpc.WsProvider, chan *rpc.BlockHeader, *client.ClientSubscription, error, )
Returns a Go channel where BlockHeaders are received
Types ¶
type AttestStatus ¶
type AttestStatus uint8
const ( Iddle AttestStatus = iota Ongoing Successful Failed )
func TrackAttest ¶
type AttestTracker ¶ added in v0.1.1
type AttestTracker struct {
Transaction AttestTransaction
Hash felt.Felt
Status AttestStatus
}
func NewAttestTracker ¶ added in v0.1.1
func NewAttestTracker() AttestTracker
func (*AttestTracker) UpdateStatus ¶ added in v0.2.4
func (a *AttestTracker) UpdateStatus( signer signerP.Signer, logger *junoUtils.ZapLogger, )
type AttestTransaction ¶ added in v0.2.4
type AttestTransaction struct {
// contains filtered or unexported fields
}
func (*AttestTransaction) Invoke ¶ added in v0.2.4
func (t *AttestTransaction) Invoke(signer signerP.Signer) ( *rpc.AddInvokeTransactionResponse, error, )
func (*AttestTransaction) UpdateNonce ¶ added in v0.2.4
func (t *AttestTransaction) UpdateNonce(signer signerP.Signer) error
func (*AttestTransaction) Valid ¶ added in v0.2.4
func (t *AttestTransaction) Valid() bool
I want to name this built or smth like that
type EnvVariable ¶ added in v0.2.0
type EventDispatcher ¶
type EventDispatcher[S signerP.Signer] struct { // Current epoch attest-related fields CurrentAttest AttestTracker // Event channels DoAttest chan types.DoAttest PrepareAttest chan types.PrepareAttest EndOfWindow chan struct{} }
func NewEventDispatcher ¶
func NewEventDispatcher[S signerP.Signer]() EventDispatcher[S]
type Validator ¶ added in v0.2.0
type Validator struct {
// contains filtered or unexported fields
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.