manager

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: MIT Imports: 7 Imported by: 8

Documentation

Overview

Package manager manages deployers to make them as simple as possible

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeployerFunc

DeployerFunc defines a deployer we can use.

type DeployerManager

type DeployerManager struct {
	// contains filtered or unexported fields
}

DeployerManager is responsible for wrapping contract registry with easy to use getters that correctly cast the handles. since ContractRegistry is meant to be kept pure and go does not support generics, the sole function is to provide handler wrappers around the registry. This will no longer be required when go supports generics: https://blog.golang.org/generics-proposal TODO: go 1.19 supports generics, this can be improved.

func NewDeployerManager

func NewDeployerManager(t *testing.T, deployers ...DeployerFunc) (d *DeployerManager)

NewDeployerManager creates a new deployment helper.

func (*DeployerManager) BulkDeploy

func (d *DeployerManager) BulkDeploy(ctx context.Context, testBackends []backends.SimulatedTestBackend, contracts ...contracts.ContractType)

BulkDeploy synchronously deploys a bunch of contracts as quickly as possible to speed up tests. in a future version this will utilize dependency trees. Returns nothing when complete.

func (*DeployerManager) Get

Get gets the contract from the registry.

func (*DeployerManager) GetContractRegistry

func (d *DeployerManager) GetContractRegistry(backend backends.SimulatedTestBackend) deployer.ContractRegistry

GetContractRegistry gets a contract registry for a backend and creates it if it does not exist.

func (*DeployerManager) SetT

func (d *DeployerManager) SetT(t *testing.T)

SetT sets the testing object.

func (*DeployerManager) T

func (d *DeployerManager) T() *testing.T

T is the testing object.

Jump to

Keyboard shortcuts

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