Documentation
¶
Index ¶
- Constants
- Variables
- type Etherman
- func (e *Etherman) BuildTrustedVerifyBatchesTxData(lastVerifiedBatch, newVerifiedBatch uint64, proof tx.ZKP, rollupId uint32) (data []byte, err error)
- func (e *Etherman) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
- func (e *Etherman) CheckTxWasMined(ctx context.Context, txHash common.Hash) (bool, *types.Receipt, error)
- func (e *Etherman) CurrentNonce(ctx context.Context, account common.Address) (uint64, error)
- func (e *Etherman) EstimateGas(ctx context.Context, from common.Address, to *common.Address, value *big.Int, ...) (uint64, error)
- func (e *Etherman) GetLastBlock(ctx context.Context, dbTx pgx.Tx) (*state.Block, error)
- func (e *Etherman) GetRevertMessage(ctx context.Context, tx *types.Transaction) (string, error)
- func (e *Etherman) GetSequencerAddr(rollupId uint32) (common.Address, error)
- func (e *Etherman) GetTx(ctx context.Context, txHash common.Hash) (*types.Transaction, bool, error)
- func (e *Etherman) GetTxReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
- func (e *Etherman) PendingNonce(ctx context.Context, account common.Address) (uint64, error)
- func (e *Etherman) SendTx(ctx context.Context, tx *types.Transaction) error
- func (e *Etherman) SignTx(ctx context.Context, sender common.Address, tx *types.Transaction) (*types.Transaction, error)
- func (e *Etherman) SuggestedGasPrice(ctx context.Context) (*big.Int, error)
- func (e *Etherman) WaitTxToBeMined(ctx context.Context, tx *types.Transaction, timeout time.Duration) (bool, error)
- type IEthereumClient
- type Proof
Constants ¶
View Source
const ( HashLength = 32 ProofLength = 24 )
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 Etherman ¶
type Etherman struct {
// contains filtered or unexported fields
}
func New ¶
func New(ethClient IEthereumClient, auth bind.TransactOpts, cfg *config.Config) (Etherman, error)
func (*Etherman) BuildTrustedVerifyBatchesTxData ¶
func (*Etherman) CallContract ¶
func (*Etherman) CheckTxWasMined ¶
func (e *Etherman) CheckTxWasMined(ctx context.Context, txHash common.Hash) (bool, *types.Receipt, error)
CheckTxWasMined check if a tx was already mined
func (*Etherman) CurrentNonce ¶
CurrentNonce returns the current nonce for the provided account
func (*Etherman) EstimateGas ¶
func (e *Etherman) EstimateGas(ctx context.Context, from common.Address, to *common.Address, value *big.Int, data []byte) (uint64, error)
EstimateGas returns the estimated gas for the tx
func (*Etherman) GetLastBlock ¶
func (*Etherman) GetRevertMessage ¶
GetRevertMessage tries to get a revert message of a transaction
func (*Etherman) GetSequencerAddr ¶
func (*Etherman) GetTxReceipt ¶
GetTxReceipt function gets ethereum tx receipt
func (*Etherman) PendingNonce ¶ added in v0.1.0
PendingNonce returns the pending nonce for the provided account
func (*Etherman) SignTx ¶
func (e *Etherman) SignTx(ctx context.Context, sender common.Address, tx *types.Transaction) (*types.Transaction, error)
SignTx tries to sign a transaction accordingly to the provided sender
func (*Etherman) SuggestedGasPrice ¶
SuggestedGasPrice returns the suggest nonce for the network at the moment
type IEthereumClient ¶
type IEthereumClient interface { ethereum.ChainReader ethereum.ChainStateReader ethereum.ContractCaller ethereum.GasEstimator ethereum.GasPricer ethereum.LogFilterer ethereum.TransactionReader ethereum.TransactionSender bind.ContractTransactor bind.ContractFilterer bind.DeployBackend }
Click to show internal directories.
Click to hide internal directories.