Versions in this module Expand all Collapse all v1 v1.1.3 Jan 20, 2025 v1.1.2 Jan 20, 2025 Changes in this version + var ErrBothGasPriceAndMaxFeeGasAreSpecified = errors.New("both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified") + var ErrContentLengthTooLarge = errors.New("content length too large") + var ErrGasRequiredExceedsAllowance = errors.New("gas required exceeds allowance") + var ErrInsufficientAllowance = errors.New("insufficient allowance") + var ErrIsReadOnlyMode = errors.New(...) + var ErrMaxFeeGasAreSpecifiedButLondonNotActive = errors.New("maxFeePerGas or maxPriorityFeePerGas specified but london is not active yet") + var ErrMissingTrieNode = errors.New("missing trie node") + var ErrNoSigner = errors.New("no signer to authorize the transaction with") + var ErrNotFound = errors.New("not found") + var ErrPrivateKeyNotFound = errors.New("can't find sender private key to sign tx") + var ErrTimestampMustBeInsideRange = errors.New("timestamp must be inside range") + func SequencedBatchesSigHash() common.Hash + func TrustedVerifyBatchesSigHash() common.Hash + type Block struct + BlockHash common.Hash + BlockNumber uint64 + ForcedBatches []ForcedBatch + ForkIDs []ForkID + GlobalExitRoots []GlobalExitRoot + L1InfoTree []GlobalExitRoot + ParentHash common.Hash + ReceivedAt time.Time + SequencedBatches [][]SequencedBatch + SequencedForceBatches [][]SequencedForceBatch + UpdateEtrogSequence UpdateEtrogSequence + VerifiedBatches []VerifiedBatch + type Client struct + EthClient ethereumClient + EtrogZKEVM *etrogpolygonzkevm.Etrogpolygonzkevm + GasProviders externalGasProviders + GlobalExitRootManager *polygonzkevmglobalexitroot.Polygonzkevmglobalexitroot + OldGlobalExitRootManager *oldpolygonzkevmglobalexitroot.Oldpolygonzkevmglobalexitroot + OldZkEVM *oldpolygonzkevm.Oldpolygonzkevm + Pol *pol.Pol + RollupID uint32 + RollupManager *polygonrollupmanager.Polygonrollupmanager + SCAddresses []common.Address + ZkEVM *polygonzkevm.Polygonzkevm + func NewClient(cfg Config, l1Config L1Config) (*Client, error) + func NewSimulatedEtherman(cfg Config, auth *bind.TransactOpts) (*Client, *simulated.Backend, common.Address, ...) + func (etherMan *Client) AddOrReplaceAuth(auth bind.TransactOpts) error + func (etherMan *Client) ApprovePol(ctx context.Context, account common.Address, polAmount *big.Int, ...) (*types.Transaction, error) + func (etherMan *Client) BuildSequenceBatchesTxData(sender common.Address, sequences []ethmanTypes.Sequence, ...) (to *common.Address, data []byte, err error) + func (etherMan *Client) BuildTrustedVerifyBatchesTxData(lastVerifiedBatch, newVerifiedBatch uint64, ...) (to *common.Address, data []byte, err error) + func (etherMan *Client) CheckTxWasMined(ctx context.Context, txHash common.Hash) (bool, *types.Receipt, error) + func (etherMan *Client) CurrentNonce(ctx context.Context, account common.Address) (uint64, error) + func (etherMan *Client) EstimateGas(ctx context.Context, from common.Address, to *common.Address, value *big.Int, ...) (uint64, error) + func (etherMan *Client) EstimateGasSequenceBatches(sender common.Address, sequences []ethmanTypes.Sequence, ...) (*types.Transaction, error) + func (etherMan *Client) EthBlockByNumber(ctx context.Context, blockNumber uint64) (*types.Block, error) + func (etherMan *Client) GetFinalizedBlockNumber(ctx context.Context) (uint64, error) + func (etherMan *Client) GetForks(ctx context.Context, genBlockNumber uint64, lastL1BlockSynced uint64) ([]state.ForkIDInterval, error) + func (etherMan *Client) GetL1GasPrice(ctx context.Context) *big.Int + func (etherMan *Client) GetL2ChainID() (uint64, error) + func (etherMan *Client) GetLatestBatchNumber() (uint64, error) + func (etherMan *Client) GetLatestBlockHeader(ctx context.Context) (*types.Header, error) + func (etherMan *Client) GetLatestBlockNumber(ctx context.Context) (uint64, error) + func (etherMan *Client) GetLatestBlockTimestamp(ctx context.Context) (uint64, error) + func (etherMan *Client) GetLatestVerifiedBatchNum() (uint64, error) + func (etherMan *Client) GetRevertMessage(ctx context.Context, tx *types.Transaction) (string, error) + func (etherMan *Client) GetRollupInfoByBlockRange(ctx context.Context, fromBlock uint64, toBlock *uint64) ([]Block, map[common.Hash][]Order, error) + func (etherMan *Client) GetSafeBlockNumber(ctx context.Context) (uint64, error) + func (etherMan *Client) GetSendSequenceFee(numBatches uint64) (*big.Int, error) + func (etherMan *Client) GetTrustedSequencerURL() (string, error) + func (etherMan *Client) GetTx(ctx context.Context, txHash common.Hash) (*types.Transaction, bool, error) + func (etherMan *Client) GetTxReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) + func (etherMan *Client) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error) + func (etherMan *Client) LoadAuthFromKeyStore(path, password string) (*bind.TransactOpts, error) + func (etherMan *Client) SendTx(ctx context.Context, tx *types.Transaction) error + func (etherMan *Client) SignTx(ctx context.Context, sender common.Address, tx *types.Transaction) (*types.Transaction, error) + func (etherMan *Client) SuggestedGasPrice(ctx context.Context) (*big.Int, error) + func (etherMan *Client) TrustedSequencer() (common.Address, error) + func (etherMan *Client) VerifyGenBlockNumber(ctx context.Context, genBlockNumber uint64) (bool, error) + func (etherMan *Client) WaitTxToBeMined(ctx context.Context, tx *types.Transaction, timeout time.Duration) (bool, error) + func (etherman *Client) DepositCount(ctx context.Context, blockNumber *uint64) (*big.Int, error) + type Config struct + Etherscan etherscan.Config + ForkIDChunkSize uint64 + MultiGasProvider bool + URL string + type EventOrder string + const ForcedBatchesOrder + const ForkIDsOrder + const GlobalExitRootsOrder + const InitialSequenceBatchesOrder + const L1InfoTreeOrder + const SequenceBatchesOrder + const SequenceForceBatchesOrder + const TrustedVerifyBatchOrder + const UpdateEtrogSequenceOrder + const VerifyBatchOrder + type ForcedBatch struct + BlockNumber uint64 + ForcedAt time.Time + ForcedBatchNumber uint64 + GlobalExitRoot common.Hash + RawTxsData []byte + Sequencer common.Address + type ForkID struct + BatchNumber uint64 + ForkID uint64 + Version string + type GlobalExitRoot struct + BlockNumber uint64 + GlobalExitRoot common.Hash + MainnetExitRoot common.Hash + PreviousBlockHash common.Hash + RollupExitRoot common.Hash + Timestamp time.Time + type L1Config struct + GlobalExitRootManagerAddr common.Address + L1ChainID uint64 + PolAddr common.Address + RollupManagerAddr common.Address + ZkEVMAddr common.Address + type Order struct + Name EventOrder + Pos int + type SequencedBatch struct + BatchNumber uint64 + Coinbase common.Address + L1InfoRoot *common.Hash + Nonce uint64 + SequencerAddr common.Address + TxHash common.Hash + type SequencedBatchElderberryData struct + InitSequencedBatchNumber uint64 + MaxSequenceTimestamp uint64 + type SequencedForceBatch struct + BatchNumber uint64 + Coinbase common.Address + Nonce uint64 + Timestamp time.Time + TxHash common.Hash + type UpdateEtrogSequence struct + BatchNumber uint64 + Nonce uint64 + SequencerAddr common.Address + TxHash common.Hash + type VerifiedBatch struct + Aggregator common.Address + BatchNumber uint64 + BlockNumber uint64 + StateRoot common.Hash + TxHash common.Hash