testingtools

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package testingtools provides common utilities and constants for Ethereum contract interactions.

Package testingtools provides common utilities and constants for Ethereum contract interactions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeployEmptyContract

func DeployEmptyContract(auth *bind.TransactOpts, backend *simulated.Backend) (*common.Address, error)

DeployEmptyContract deploys an empty contract for testing purposes

func FloatTo18z

func FloatTo18z(amount float64) *big.Int

FloatTo18z converts a float64 to an 18-decimal big.Int representation

func SetupBlockchain

func SetupBlockchain(
	t *testing.T,
	contractABI string,
	byteCode string,
	params ...interface{},
) (
	*simulated.Backend,
	*bind.TransactOpts,
	*common.Address,
	*ecdsa.PrivateKey,
	error,
)

SetupBlockchain sets up a test blockchain environment with a deployed contract

Types

This section is empty.

Jump to

Keyboard shortcuts

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