spc

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestGasLimit             = 21000      // 21 Kwei
	TestMaxPriorityFeePerGas = 2000000000 // 2 Gwei
	TestMaxFeePerGas         = 2000000000 // 20 Gwei
)

Variables

View Source
var (
	Wei      = big.NewInt(1)                   //nolint:nolintlint,gochecknoglobals,gomnd
	Kwei     = big.NewInt(1000)                //nolint:nolintlint,gochecknoglobals,gomnd
	Mwei     = big.NewInt(1000000)             //nolint:nolintlint,gochecknoglobals,gomnd
	Gwei     = big.NewInt(1000000000)          //nolint:nolintlint,gochecknoglobals,gomnd
	Microeth = big.NewInt(1000000000000)       //nolint:nolintlint,gochecknoglobals,gomnd
	Millieth = big.NewInt(1000000000000000)    //nolint:nolintlint,gochecknoglobals,gomnd
	Eth      = big.NewInt(1000000000000000000) //nolint:nolintlint,gochecknoglobals,gomnd
	Eth_1K   = Eth.Mul(Kwei, Eth)              //nolint:nolintlint,gochecknoglobals,gomnd
)

Functions

func CheckBalance

func CheckBalance(client *ethclient.Client, address common.Address) (*big.Int, error)

func NewTransaction

func NewTransaction(
	client *ethclient.Client,
	privateKeyHex string,
	value *big.Int,
	toAddress common.Address,
) (*types.Transaction, error)

func PrivateKeyHexToAccountAddress

func PrivateKeyHexToAccountAddress(privateKeyHex string) (common.Address, error)

func SendTransaction

func SendTransaction(client *ethclient.Client, signedTx *types.Transaction) (*types.Transaction, error)

Types

This section is empty.

Directories

Path Synopsis
handlers
up
infra

Jump to

Keyboard shortcuts

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