transaction

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTx

func NewTx(nonce uint64, to *common.Address, amount *big.Int, gasLimit uint64, gasPrice *big.Int, data []byte) *types.Transaction

NewTx creates a new legacy transaction

func NewTxWithClient

func NewTxWithClient(ctx context.Context, client *ethclient.Client, from common.Address, to common.Address, amount *big.Int, data []byte) (*types.Transaction, error)

NewTxWithClient makes use of the ethereum client in order to build a new transaction. This method uses types.DynamicFeeTx and not types.LegacyTx

func SignTx

func SignTx(tx *types.Transaction, privateKey *ecdsa.PrivateKey) (*types.Transaction, error)

SignTx signs a raw transaction

Types

This section is empty.

Jump to

Keyboard shortcuts

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