Documentation ¶
Index ¶
- Variables
- type Client
- func (etherMan *Client) BuildTrustedVerifyBatchesTxData(lastVerifiedBatch, newVerifiedBatch uint64, ...) (to *common.Address, data []byte, err error)
- func (etherman *Client) GetBatchAccInputHash(ctx context.Context, batchNumber uint64) (common.Hash, error)
- func (etherMan *Client) GetL2ChainID() (uint64, error)
- func (etherMan *Client) GetLatestBlockHeader(ctx context.Context) (*types.Header, error)
- func (etherMan *Client) GetLatestVerifiedBatchNum() (uint64, error)
- type Config
- type L1Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrGasRequiredExceedsAllowance gas required exceeds the allowance ErrGasRequiredExceedsAllowance = errors.New("gas required exceeds allowance") // ErrContentLengthTooLarge content length is too large ErrContentLengthTooLarge = errors.New("content length too large") //ErrTimestampMustBeInsideRange Timestamp must be inside range ErrTimestampMustBeInsideRange = errors.New("timestamp must be inside range") //ErrInsufficientAllowance insufficient allowance ErrInsufficientAllowance = errors.New("insufficient allowance") // ErrBothGasPriceAndMaxFeeGasAreSpecified both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified ErrBothGasPriceAndMaxFeeGasAreSpecified = errors.New("both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified") // ErrMaxFeeGasAreSpecifiedButLondonNotActive maxFeePerGas or maxPriorityFeePerGas specified but london is not active yet ErrMaxFeeGasAreSpecifiedButLondonNotActive = errors.New("maxFeePerGas or maxPriorityFeePerGas specified but london is not active yet") // ErrNoSigner no signer to authorize the transaction with ErrNoSigner = errors.New("no signer to authorize the transaction with") // ErrMissingTrieNode means that a node is missing on the trie ErrMissingTrieNode = errors.New("missing trie node") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { EthClient ethereumClient OldZkEVM *oldpolygonzkevm.Oldpolygonzkevm RollupManager *polygonrollupmanager.Polygonrollupmanager SCAddresses []common.Address RollupID uint32 // contains filtered or unexported fields }
Client is a simple implementation of EtherMan.
func (*Client) BuildTrustedVerifyBatchesTxData ¶
func (etherMan *Client) BuildTrustedVerifyBatchesTxData(lastVerifiedBatch, newVerifiedBatch uint64, inputs *ethmanTypes.FinalProofInputs, beneficiary common.Address) (to *common.Address, data []byte, err error)
BuildTrustedVerifyBatchesTxData builds a []bytes to be sent to the PoE SC method TrustedVerifyBatches.
func (*Client) GetBatchAccInputHash ¶
func (etherman *Client) GetBatchAccInputHash(ctx context.Context, batchNumber uint64) (common.Hash, error)
GetBatchAccInputHash gets the batch accumulated input hash from the ethereum
func (*Client) GetL2ChainID ¶
GetL2ChainID returns L2 Chain ID
func (*Client) GetLatestBlockHeader ¶
GetLatestBlockHeader gets the latest block header from the ethereum
func (*Client) GetLatestVerifiedBatchNum ¶
GetLatestVerifiedBatchNum gets latest verified batch from ethereum
type Config ¶
type Config struct { // URL is the URL of the Ethereum node for L1 URL string `mapstructure:"URL"` }
Config represents the configuration of the etherman
type L1Config ¶
type L1Config struct { // Chain ID of the L1 network L1ChainID uint64 `json:"chainId"` // ZkEVMAddr Address of the L1 contract polygonZkEVMAddress ZkEVMAddr common.Address `json:"polygonZkEVMAddress"` // RollupManagerAddr Address of the L1 contract RollupManagerAddr common.Address `json:"polygonRollupManagerAddress"` // GER Manager ADdress of the L1 contract GlobalExitRootManagerAddr common.Address `json:"polygonZkEVMGlobalExitRootAddress"` }
L1Config represents the configuration of the network used in L1
Click to show internal directories.
Click to hide internal directories.