Documentation ¶
Index ¶
- type AnchorTxValidator
- func (v *AnchorTxValidator) GetAnchoredSignalRoot(ctx context.Context, tx *types.Transaction) (common.Hash, error)
- func (v *AnchorTxValidator) GetAndValidateAnchorTxReceipt(ctx context.Context, tx *types.Transaction) (*types.Receipt, error)
- func (v *AnchorTxValidator) ValidateAnchorTx(ctx context.Context, tx *types.Transaction) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnchorTxValidator ¶
type AnchorTxValidator struct {
// contains filtered or unexported fields
}
AnchorTxValidator is responsible for validating the anchor transaction (MxcL2.anchor) in each L2 block, which is always the first transaction.
func New ¶
func New(mxcL2Address common.Address, chainID *big.Int, rpc *rpc.Client) (*AnchorTxValidator, error)
New creates a new AnchorTxValidator instance.
func (*AnchorTxValidator) GetAnchoredSignalRoot ¶
func (v *AnchorTxValidator) GetAnchoredSignalRoot( ctx context.Context, tx *types.Transaction, ) (common.Hash, error)
GetAnchoredSignalRoot gets the anchored signal service state root in the given `MxcL2.anchor` transaction.
func (*AnchorTxValidator) GetAndValidateAnchorTxReceipt ¶
func (v *AnchorTxValidator) GetAndValidateAnchorTxReceipt( ctx context.Context, tx *types.Transaction, ) (*types.Receipt, error)
GetAndValidateAnchorTxReceipt gets and validates the `MxcL2.anchor` transaction's receipt.
func (*AnchorTxValidator) ValidateAnchorTx ¶
func (v *AnchorTxValidator) ValidateAnchorTx(ctx context.Context, tx *types.Transaction) error
validateAnchorTx checks whether the given transaction is a valid `MxcL2.anchor` transaction.
Click to show internal directories.
Click to hide internal directories.