testutil

package
v0.0.195 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package testutil contains mock deployers for interacting with the mock backend

Index

Constants

View Source
const (
	// TestContractType is the type of the test contract.
	TestContractType contractTypeImpl = 0 // TestContract
)

Variables

View Source
var AllContractTypes []contractTypeImpl

AllContractTypes is a list of all contract types. Since we use stringer and this is a testing library, instead of manually copying all these out we pull the names out of stringer. In order to make sure stringer is updated, we panic on any method called where the index is higher than the stringer array length.

Functions

func NewTestContractDeployer

NewTestContractDeployer creates a new test contract deployer.

Types

type DeployManager

type DeployManager struct {
	*manager.DeployerManager
}

DeployManager wraps DeployManager and allows typed contract handles to be returned.

func NewDeployManager

func NewDeployManager(t *testing.T) *DeployManager

NewDeployManager creates a deploy manager.

func (*DeployManager) GetTestContract

GetTestContract gets the test contract.

type TestContractDeployer

type TestContractDeployer struct {
	*deployer.BaseDeployer
}

TestContractDeployer deploys a test contract.

func (TestContractDeployer) Deploy

Deploy deploys the test contract.

Directories

Path Synopsis
Package testcontract contains a contract used for testing event and transaction emission.
Package testcontract contains a contract used for testing event and transaction emission.

Jump to

Keyboard shortcuts

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