testutil

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package testutil provides utilities for testing.

Index

Constants

View Source
const (
	// SynapseModuleType is the type of the contract being fetched.
	SynapseModuleType contractTypeImpl = iota + 1 // SynapseModule
	// InterchainDB is the type of the contract being fetched.
	InterchainDB // InterchainDB
	// GasOracleMockType is the type of the contract being fetched.
	GasOracleMockType // GasOracleMock
)

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 NewGasOracleDeployer

NewGasOracleDeployer deploys a GasOracle contract.

func NewInterchainDBDeployer

NewInterchainDBDeployer deploys a NoOpInterchain contract.

func NewSynapseModuleDeployer

func NewSynapseModuleDeployer(registry deployer.GetOnlyContractRegistry, backend backends.SimulatedTestBackend) deployer.ContractDeployer

NewSynapseModuleDeployer deploys a SynapseModule contract.

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 new DeployManager.

func (*DeployManager) GetInterchainDB

GetInterchainDB returns a deployed InterchainDB contract and a reference to the contract.

func (*DeployManager) GetSynapseModule

GetSynapseModule returns a deployed SynapseModule contract and a reference to the contract.

type GasOracleDeployer

type GasOracleDeployer struct {
	*deployer.BaseDeployer
}

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

func (GasOracleDeployer) Deploy

Deploy deploys a GasOracle contract.

type InterchainDBDeployer

type InterchainDBDeployer struct {
	*deployer.BaseDeployer
}

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

func (InterchainDBDeployer) Deploy

Deploy deploys a NoOpInterchain contract.

type SynapseModuleDeployer

type SynapseModuleDeployer struct {
	*deployer.BaseDeployer
}

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

func (SynapseModuleDeployer) Dependencies

func (s SynapseModuleDeployer) Dependencies() []contracts.ContractType

Dependencies returns the dependencies of the SynapseModuleDeployer.

func (SynapseModuleDeployer) Deploy

Deploy deploys a SynapseModule contract. this is deployed with the NoOpInterchain contract as the interchain contract. this can be overridden at any time by owner.

Jump to

Keyboard shortcuts

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