Documentation
¶
Overview ¶
Package chain provides a wrapper around the Anvil blockchain used for on-chain operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
func (*Chain) InternalRPCURL ¶
func (*Chain) InternalWsURL ¶
type ChainOptions ¶
type ChainOptions struct {
Image string
}
type Contracts ¶
type Contracts struct {
// contains filtered or unexported fields
}
Contracts provides read-only access to on-chain contract state for E2E tests. It wraps an ethclient connection and ABI bindings for the PayerReportManager contract deployed on the Anvil chain.
func NewContracts ¶
NewContracts creates a Contracts reader connected to the given RPC URL. Contract addresses are loaded from the embedded Anvil configuration.
func (*Contracts) GetPayerReport ¶
func (c *Contracts) GetPayerReport( ctx context.Context, originatorNodeID uint32, index uint64, ) (*OnChainPayerReport, error)
GetPayerReport reads a single payer report from the chain by originator node ID and report index.
func (*Contracts) WaitForSettledReport ¶
func (c *Contracts) WaitForSettledReport( ctx context.Context, originatorNodeID uint32, index uint64, checkFn func(*OnChainPayerReport) bool, description string, ) error
WaitForSettledReport polls the chain until checkFn returns true for a payer report at the given originator node ID and index, or the context is cancelled. Use this to wait for settlement to complete on-chain.
type OnChainPayerReport ¶
type OnChainPayerReport struct {
StartSequenceID uint64
EndSequenceID uint64
EndMinuteSinceEpoch uint32
IsSettled bool
FeesSettled *big.Int
Offset uint32
PayersMerkleRoot [32]byte
NodeIDs []uint32
}
OnChainPayerReport is a simplified view of on-chain payer report state for use in E2E test assertions.