zksync2

package
v0.0.0-...-d7b061b Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Overview

Package zksync2 implements transfer operation on ZkSync Era (Zksync 2) network.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Payer

type Payer struct {
	// contains filtered or unexported fields
}

func NewPayer

func NewPayer(
	contractAddress common.Address,
	url string,
	key *ecdsa.PrivateKey,
	chainID int,
	paymasterAddress *common.Address,
	paymasterPayload []byte,
	maxFee *big.Int) (*Payer, error)

func (*Payer) CheckNonceGroup

func (p *Payer) CheckNonceGroup(ctx context.Context, log *zap.Logger, nonceGroup *pipelinedb.NonceGroup, checkOnly bool) (pipelinedb.TxState, []*pipelinedb.TxStatus, error)

func (*Payer) CheckPreconditions

func (p *Payer) CheckPreconditions(ctx context.Context) ([]string, error)

func (*Payer) CreateRawTransaction

func (p *Payer) CreateRawTransaction(ctx context.Context, log *zap.Logger, payouts []*pipelinedb.Payout, nonce uint64, storjPrice decimal.Decimal) (tx payer.Transaction, from common.Address, err error)

func (*Payer) GetTokenBalance

func (p *Payer) GetTokenBalance(ctx context.Context) (*big.Int, error)

func (*Payer) GetTokenDecimals

func (p *Payer) GetTokenDecimals(ctx context.Context) (int32, error)

func (*Payer) NextNonce

func (p *Payer) NextNonce(ctx context.Context) (uint64, error)

func (*Payer) PrintEstimate

func (p *Payer) PrintEstimate(ctx context.Context, remaining int64) error

func (*Payer) SendTransaction

func (p *Payer) SendTransaction(ctx context.Context, log *zap.Logger, tx payer.Transaction) error

Jump to

Keyboard shortcuts

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