zkclient

package
v0.0.0-...-81db2af Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL string

	PaymasterFeeZero bool
	PaymasterAddress string
	PaymasterToken   string
	// contains filtered or unexported fields
}

func NewZkClient

func NewZkClient(rpc string, paymentFeeZero bool, paymentMasterAddress string, paymentMasterToken string) *Client

func (*Client) BlockByNumber

func (c *Client) BlockByNumber(ctx context.Context, blockNumber uint64) (*zktypes.Block, error)

func (*Client) CheckTxPendingByHash

func (c *Client) CheckTxPendingByHash(txHash common.Hash) (*configs.RPCResponse, bool, error)

func (*Client) ExecuteETHTransact

func (c *Client) ExecuteETHTransact(prkHex string, from common.Address, to common.Address, value *big.Int, input []byte) (*types.Receipt, error)

func (*Client) GetChainID

func (c *Client) GetChainID() (uint64, error)

func (*Client) GetETHClient

func (c *Client) GetETHClient() (*ethclient.Client, error)

func (*Client) GetGasPrice

func (c *Client) GetGasPrice() (*big.Int, error)

func (*Client) GetPaymasterParams

func (c *Client) GetPaymasterParams() (*zktypes.PaymasterParams, error)

func (*Client) GetPaymasterParamsWithFee

func (c *Client) GetPaymasterParamsWithFee(fee *big.Int) (*zktypes.PaymasterParams, error)

func (*Client) GetZkClient

func (c *Client) GetZkClient() (clients.Client, error)

func (*Client) PaymasterParams

func (c *Client) PaymasterParams() *zktypes.PaymasterParams

func (*Client) PopulateTransaction

func (c *Client) PopulateTransaction(ctx context.Context, address common.Address, tx accounts.Transaction) (*zktypes.Transaction712, error)

func (*Client) SendETHTransact

func (c *Client) SendETHTransact(client *ethclient.Client, prkHex string, from common.Address, to common.Address, value *big.Int, input []byte) (common.Hash, error)

Copy from the function `(c *BoundContract) createDynamicTx` in the `eth` package.

func (*Client) SendETHTransactWithLock

func (c *Client) SendETHTransactWithLock(client *ethclient.Client, prkHex string, from common.Address, to common.Address, value *big.Int, input []byte) (common.Hash, error)

func (*Client) SetPaymasterParams

func (c *Client) SetPaymasterParams(tx *accounts.Transaction) error

func (*Client) SignTransaction

func (c *Client) SignTransaction(signer accounts.Signer, tx *zktypes.Transaction712) ([]byte, error)

func (*Client) Transact

func (c *Client) Transact(prkHex string, from common.Address, to common.Address, value *big.Int, input []byte) (*zktypes.Receipt, error)

func (*Client) WaitMined

func (c *Client) WaitMined(ctx context.Context, txHash common.Hash) (*zktypes.Receipt, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL