utils

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeout = 15 * time.Second
	TxTimeout      = 30 * time.Second
)

Variables

This section is empty.

Functions

func DeployERC20

func DeployERC20(
	auth *bind.TransactOpts,
	client *ethclient.Client,
) (*bindings.SolmateERC20, common.Address)

DeployERC20 deploys a new ERC20 contract and waits for the transaction to be mined. Upon success, it returns a binding to the contract and the address of the contract.

func ExpectFailedReceipt

func ExpectFailedReceipt(
	client *ethclient.Client,
	tx *ethtypes.Transaction,
) *ethtypes.Receipt

ExpectFailedReceipt waits for the transaction to be mined and returns the receipt. It also checks that the transaction was failed.

func ExpectMined

func ExpectMined(client *ethclient.Client, tx *ethtypes.Transaction)

ExpectedMined waits for a transaction to be mined.

func ExpectSuccessReceipt

func ExpectSuccessReceipt(
	client *ethclient.Client,
	tx *ethtypes.Transaction,
) *ethtypes.Receipt

ExpectSuccessReceipt waits for the transaction to be mined and returns the receipt. It also checks that the transaction was successful.

Types

This section is empty.

Jump to

Keyboard shortcuts

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