testutil

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 73 Imported by: 0

Documentation

Overview

Package testutil contains mock deployers for interacting with the mock backend

Index

Constants

View Source
const (
	// OriginType is the type of the origin.
	OriginType contractTypeImpl = iota + 1 // Origin
	// MessageHarnessType is the type of the message harness contract.
	MessageHarnessType // MessageHarness
	// BaseMessageHarnessType is the type of the base message harness contract.
	BaseMessageHarnessType // BaseMessageHarness
	// ReceiptHarnessType is the type of the receipt harness contract.
	ReceiptHarnessType // ReceiptHarness
	// RequestHarnessType is the type of the request harness contract.
	RequestHarnessType // RequestHarness
	// OriginHarnessType is the origin harness type.
	OriginHarnessType // OriginHarness
	// StateHarnessType is the state harness type.
	StateHarnessType
	// SnapshotHarnessType is the snapshot harness type.
	SnapshotHarnessType
	// AttestationHarnessType is the type of the attestation harness.
	AttestationHarnessType
	// TipsHarnessType is the type of the tips harness.
	TipsHarnessType
	// HeaderHarnessType is the type of the header harness.
	HeaderHarnessType
	// DestinationHarnessType is the destination harness type.
	DestinationHarnessType // DestinationHarness
	// SummitHarnessType is the summit harness type.
	SummitHarnessType // SummitHarness
	// SummitType is the type of the summit.
	SummitType // Summit
	// DestinationType is the type of the destination.
	DestinationType // Destination
	// AgentsTestContractType is the type of the agents test contract.
	AgentsTestContractType // AgentsTestContract
	// TestClientType is the type of the test client.
	TestClientType // TestClient
	// PingPongClientType is the type of the test client.
	PingPongClientType // PingPongClient
	// LightManagerHarnessType is the light manager harness type.
	LightManagerHarnessType // LightManagerHarness
	// BondingManagerHarnessType is the bonding manager harness type.
	BondingManagerHarnessType // BondingManagerHarness
	// LightManagerType is the light manager type.
	LightManagerType // LightManager
	// BondingManagerType is the bonding manager type.
	BondingManagerType // BondingManager
	// GasDataHarnessType is the gasData harness type.
	GasDataHarnessType
	// GasOracleType is the gas oracle type.
	GasOracleType // GasOracle
	// InboxType is the inbox type.
	InboxType // Inbox
	// LightInboxType is the light inbox type.
	LightInboxType // LightInbox
)
View Source
const SynChainID uint = 10

SynChainID the id of the SynChain. TODO: no longer needs to be hardcoded: https://github.com/synapsecns/sanguine/pull/1280#discussion_r1320882617

View Source
const SynapseChainID = 10

SynapseChainID is the chain ID for the synapse chain.

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 NewAgentsTestContractDeployer added in v0.0.65

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

NewAgentsTestContractDeployer gets the agents test contract.

func NewAttestationHarnessDeployer

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

NewAttestationHarnessDeployer creates a new deployer for the attestation harness.

func NewBaseMessageHarnessDeployer added in v0.0.184

func NewBaseMessageHarnessDeployer(regirstry deployer.GetOnlyContractRegistry, backend backends.SimulatedTestBackend) deployer.ContractDeployer

NewBaseMessageHarnessDeployer creates a base message harness deployer.

func NewBondingManagerDeployer added in v0.0.171

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

NewBondingManagerDeployer deploys the bonding manager contract.

func NewBondingManagerHarnessDeployer added in v0.0.171

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

NewBondingManagerHarnessDeployer deploys a new bonding agent manager harness.

func NewDestinationDeployer

NewDestinationDeployer creates the deployer for the destination.

func NewDestinationHarnessDeployer

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

NewDestinationHarnessDeployer creates a new deployer for the destination harness.

func NewGasDataHarnessDeployer added in v0.0.171

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

NewGasDataHarnessDeployer creates a new deployer for the gasData harness.

func NewGasOracleDeployer added in v0.0.171

NewGasOracleDeployer deploys the gas oracle contract.

func NewHeaderHarnessDeployer

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

NewHeaderHarnessDeployer gets the header harness.

func NewInboxDeployer added in v0.0.171

NewInboxDeployer deploys the inbox contract.

func NewLightInboxDeployer added in v0.0.171

NewLightInboxDeployer deploys the light inbox contract.

func NewLightManagerDeployer added in v0.0.171

NewLightManagerDeployer deploys the light manager contract.

func NewLightManagerHarnessDeployer added in v0.0.171

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

NewLightManagerHarnessDeployer deploys a new light agent manager harness.

func NewMessageHarnessDeployer

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

NewMessageHarnessDeployer creates a message harness deployer.

func NewOriginDeployer

NewOriginDeployer deploys the origin contract.

func NewOriginHarnessDeployer

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

NewOriginHarnessDeployer deploys a new origin harness.

func NewPingPongClientDeployer added in v0.0.110

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

NewPingPongClientDeployer gets the ping pong test client.

func NewReceiptHarnessDeployer added in v0.0.239

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

NewReceiptHarnessDeployer creates a request harness deployer.

func NewRequestHarnessDeployer added in v0.0.184

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

NewRequestHarnessDeployer creates a request harness deployer.

func NewSnapshotHarnessDeployer added in v0.0.130

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

NewSnapshotHarnessDeployer creates a new deployer for the snapshot harness.

func NewStateHarnessDeployer added in v0.0.130

NewStateHarnessDeployer creates a new deployer for the state harness.

func NewSummitDeployer added in v0.0.130

NewSummitDeployer creates the deployer for the summit.

func NewSummitHarnessDeployer added in v0.0.130

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

NewSummitHarnessDeployer creates a new deployer for the summit harness.

func NewTestClientDeployer added in v0.0.104

NewTestClientDeployer gets the test client.

func NewTipsHarnessDeployer

NewTipsHarnessDeployer creates a new deployer for the attestation harness.

Types

type AgentsTestContractDeployer added in v0.0.65

type AgentsTestContractDeployer struct {
	*deployer.BaseDeployer
}

AgentsTestContractDeployer deploys the agents test contract.

func (AgentsTestContractDeployer) Deploy added in v0.0.65

Deploy deploys the agents test contract.

type AttestationHarnessDeployer

type AttestationHarnessDeployer struct {
	*deployer.BaseDeployer
}

AttestationHarnessDeployer deploys the attestation harness for testing.

func (AttestationHarnessDeployer) Deploy

Deploy deploys the attestation harness.

type BaseMessageHarnessDeployer added in v0.0.184

type BaseMessageHarnessDeployer struct {
	*deployer.BaseDeployer
}

BaseMessageHarnessDeployer deploys the base message harness for testing.

func (BaseMessageHarnessDeployer) Deploy added in v0.0.184

Deploy deploys the base message harness deployer.

type BondingManagerDeployer added in v0.0.171

type BondingManagerDeployer struct {
	*deployer.BaseDeployer
}

BondingManagerDeployer deploys the bonding manager contract.

func (BondingManagerDeployer) Dependencies added in v0.0.171

func (d BondingManagerDeployer) Dependencies() []contracts.ContractType

Dependencies gets a list of dependencies used to deploy the bonding manager contract.

func (BondingManagerDeployer) Deploy added in v0.0.171

Deploy deploys the bonding manager contract. nolint:dupl,cyclop,dupword

type BondingManagerHarnessDeployer added in v0.0.171

type BondingManagerHarnessDeployer struct {
	*deployer.BaseDeployer
}

BondingManagerHarnessDeployer deploys the bonding manager for testing.

func (BondingManagerHarnessDeployer) Dependencies added in v0.0.171

Dependencies gets a list of dependencies used to deploy the bonding manager contract.

func (BondingManagerHarnessDeployer) Deploy added in v0.0.171

Deploy deploys the light manager harness. nolint:dupl,dupword

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) AddAgentsToBondingManagerContract added in v0.0.171

func (d *DeployManager) AddAgentsToBondingManagerContract(
	ctx context.Context,
	synChainBackend backends.SimulatedTestBackend,
	agents []common.Address,
	domains []uint32) ([32]byte, [][][32]byte, []bondingmanager.AgentStatus, error)

AddAgentsToBondingManagerContract handles adding the agents to the bonding manager contract on the "SYN" chain. nolint:dupl,cyclop

func (*DeployManager) AddAgentsToBondingManagerHarnessContract added in v0.0.171

func (d *DeployManager) AddAgentsToBondingManagerHarnessContract(
	ctx context.Context,
	synChainBackend backends.SimulatedTestBackend,
	agents []common.Address,
	domains []uint32) ([32]byte, [][][32]byte, []bondingmanagerharness.AgentStatus, error)

AddAgentsToBondingManagerHarnessContract handles adding the agents to the bonding manager harness contract on the "SYN" chain. nolint:dupl,cyclop

func (*DeployManager) AddAgentsToLightManagerContract added in v0.0.171

func (d *DeployManager) AddAgentsToLightManagerContract(
	ctx context.Context,
	backend backends.SimulatedTestBackend,
	agents []common.Address,
	agentProofs [][][32]byte,
	agentStatuses []bondingmanager.AgentStatus) error

AddAgentsToLightManagerContract handles adding the agents to the light manager contract on the remote chain. nolint:dupl,cyclop

func (*DeployManager) AddAgentsToLightManagerHarnessContract added in v0.0.171

func (d *DeployManager) AddAgentsToLightManagerHarnessContract(
	ctx context.Context,
	backend backends.SimulatedTestBackend,
	agents []common.Address,
	agentProofs [][][32]byte,
	agentStatuses []bondingmanagerharness.AgentStatus) error

AddAgentsToLightManagerHarnessContract handles adding the agents to the light manager harness contract on the remote chain. nolint:dupl,cyclop codebeat:disable[CYCLO]

func (*DeployManager) GetAgentsTestContract added in v0.0.65

GetAgentsTestContract gets the agents test contract. nolint:dupl

func (*DeployManager) GetAttestationHarness

GetAttestationHarness gets the attestation harness. nolint:dupl

func (*DeployManager) GetBaseMessageHarness added in v0.0.184

GetBaseMessageHarness gets the base message harness. nolint:dupl

func (*DeployManager) GetBondingManager added in v0.0.171

GetBondingManager gets the bonding manager. nolint:dupl

func (*DeployManager) GetBondingManagerHarness added in v0.0.171

GetBondingManagerHarness gets the bonding manager harness. nolint:dupl

func (*DeployManager) GetDestination

GetDestination gets the destination contract.

func (*DeployManager) GetDestinationHarness

GetDestinationHarness gets the destination harness. nolint:dupl

func (*DeployManager) GetGasDataHarness added in v0.0.171

GetGasDataHarness gets the gasData harness. nolint:dupl

func (*DeployManager) GetHeaderHarness

GetHeaderHarness gets the header harness. nolint:dupl

func (*DeployManager) GetInbox added in v0.0.171

func (d *DeployManager) GetInbox(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *inbox.InboxRef)

GetInbox gets the inbox. nolint:dupl

func (*DeployManager) GetLightInbox added in v0.0.171

GetLightInbox gets the light inbox. nolint:dupl

func (*DeployManager) GetLightManager added in v0.0.171

GetLightManager gets the light manager. nolint:dupl

func (*DeployManager) GetLightManagerHarness added in v0.0.171

GetLightManagerHarness gets the light manager harness. nolint:dupl

func (*DeployManager) GetMessageHarness

GetMessageHarness gets the message harness. nolint:dupl

func (*DeployManager) GetOrigin

func (d *DeployManager) GetOrigin(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *origin.OriginRef)

GetOrigin gets a typecast origin contract. nolint:dupl

func (*DeployManager) GetOriginHarness

GetOriginHarness gets the origin harness. nolint:dupl

func (*DeployManager) GetPingPongClient added in v0.0.110

GetPingPongClient gets the ping pong test client. nolint:dupl

func (*DeployManager) GetReceiptHarness added in v0.0.239

GetReceiptHarness gets the receipt harness. nolint:dupl

func (*DeployManager) GetRequestHarness added in v0.0.184

GetRequestHarness gets the request harness. nolint:dupl

func (*DeployManager) GetSnapshotHarness added in v0.0.130

GetSnapshotHarness gets the snapshot harness. nolint:dupl

func (*DeployManager) GetStateHarness added in v0.0.130

GetStateHarness gets the state harness. nolint:dupl

func (*DeployManager) GetSummit added in v0.0.130

func (d *DeployManager) GetSummit(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *summit.SummitRef)

GetSummit gets the summit contract. nolint:dupl

func (*DeployManager) GetSummitHarness added in v0.0.130

GetSummitHarness gets the summit harness. nolint:dupl

func (*DeployManager) GetTestClient added in v0.0.104

GetTestClient gets the test client. nolint:dupl

func (*DeployManager) GetTipsHarness

GetTipsHarness gets the tips harness for testing. nolint:dupl

func (*DeployManager) InitializeBondingManagerContract added in v0.0.171

func (d *DeployManager) InitializeBondingManagerContract(
	ctx context.Context,
	synChainBackend backends.SimulatedTestBackend) error

InitializeBondingManagerContract handles initializing the bonding manager contract on the "syn" chain. nolint:dupl,cyclop

func (*DeployManager) InitializeBondingManagerHarnessContract added in v0.0.171

func (d *DeployManager) InitializeBondingManagerHarnessContract(
	ctx context.Context,
	synChainBackend backends.SimulatedTestBackend) error

InitializeBondingManagerHarnessContract handles initializing the bonding manager harness contract on the "SYN" chain. nolint:dupl,cyclop

func (*DeployManager) InitializeRemoteDeployedContracts added in v0.0.171

func (d *DeployManager) InitializeRemoteDeployedContracts(
	ctx context.Context,
	backend backends.SimulatedTestBackend,
	bondingManagerAgentRoot [32]byte) error

InitializeRemoteDeployedContracts handles initializing the contracts for light manager and destination on remote chain. nolint:dupl,cyclop

func (*DeployManager) InitializeRemoteDeployedHarnessContracts added in v0.0.171

func (d *DeployManager) InitializeRemoteDeployedHarnessContracts(
	ctx context.Context,
	backend backends.SimulatedTestBackend,
	bondingManagerHarnessAgentRoot [32]byte) error

InitializeRemoteDeployedHarnessContracts handles initializing the harness contracts for light manager harness and destination harness on remote chain. nolint:dupl,cyclop

func (*DeployManager) LoadContractsOnChains added in v0.0.171

func (d *DeployManager) LoadContractsOnChains(
	ctx context.Context,
	synChainBackend backends.SimulatedTestBackend,
	backends []backends.SimulatedTestBackend,
	agents []common.Address,
	agentDomains []uint32) error

LoadContractsOnChains loads the contracts to the various chains and initializes them. nolint:dupl,cyclop

func (*DeployManager) LoadHarnessContractsOnChains added in v0.0.171

func (d *DeployManager) LoadHarnessContractsOnChains(
	ctx context.Context,
	synChainBackend backends.SimulatedTestBackend,
	backends []backends.SimulatedTestBackend,
	agents []common.Address,
	agentDomains []uint32) error

LoadHarnessContractsOnChains loads the harness contracts to the various chains and initializes them. nolint:dupl,cyclop

type DestinationDeployer

type DestinationDeployer struct {
	*deployer.BaseDeployer
}

DestinationDeployer deploys the destination.

func (DestinationDeployer) Dependencies

func (d DestinationDeployer) Dependencies() []contracts.ContractType

Dependencies gets a list of dependencies used to deploy the destination contract.

func (DestinationDeployer) Deploy

Deploy deploys the destination.

type DestinationHarnessDeployer

type DestinationHarnessDeployer struct {
	*deployer.BaseDeployer
}

DestinationHarnessDeployer deploys the destination harness.

func (DestinationHarnessDeployer) Deploy

Deploy deploys the destination harness. nolint:dupl,dupword

type GasDataHarnessDeployer added in v0.0.171

type GasDataHarnessDeployer struct {
	*deployer.BaseDeployer
}

GasDataHarnessDeployer deploys the gasData harness.

func (GasDataHarnessDeployer) Deploy added in v0.0.171

Deploy deploys the gasData harness.

type GasOracleDeployer added in v0.0.171

type GasOracleDeployer struct {
	*deployer.BaseDeployer
}

GasOracleDeployer deploys the gas oracle contract.

func (GasOracleDeployer) Dependencies added in v0.0.171

func (d GasOracleDeployer) Dependencies() []contracts.ContractType

Dependencies gets a list of dependencies used to deploy the gas oracle contract.

func (GasOracleDeployer) Deploy added in v0.0.171

Deploy deploys the gas oracle contract. nolint:dupl,cyclop,dupword

type HeaderHarnessDeployer

type HeaderHarnessDeployer struct {
	*deployer.BaseDeployer
}

HeaderHarnessDeployer deploys the header harness.

func (HeaderHarnessDeployer) Deploy

Deploy deploys the header harness.

type InboxDeployer added in v0.0.171

type InboxDeployer struct {
	*deployer.BaseDeployer
}

InboxDeployer deploys the inbox contract.

func (InboxDeployer) Dependencies added in v0.0.171

func (d InboxDeployer) Dependencies() []contracts.ContractType

Dependencies gets a list of dependencies used to deploy the inbox contract.

func (InboxDeployer) Deploy added in v0.0.171

Deploy deploys the inbox contract. nolint:dupl,cyclop,dupword

type LightInboxDeployer added in v0.0.171

type LightInboxDeployer struct {
	*deployer.BaseDeployer
}

LightInboxDeployer deploys the light inbox contract.

func (LightInboxDeployer) Dependencies added in v0.0.171

func (d LightInboxDeployer) Dependencies() []contracts.ContractType

Dependencies gets a list of dependencies used to deploy the light inbox contract.

func (LightInboxDeployer) Deploy added in v0.0.171

Deploy deploys the light manager contract.

type LightManagerDeployer added in v0.0.171

type LightManagerDeployer struct {
	*deployer.BaseDeployer
}

LightManagerDeployer deploys the light manager contract.

func (LightManagerDeployer) Dependencies added in v0.0.171

func (d LightManagerDeployer) Dependencies() []contracts.ContractType

Dependencies gets a list of dependencies used to deploy the light manager contract.

func (LightManagerDeployer) Deploy added in v0.0.171

Deploy deploys the light manager contract.

type LightManagerHarnessDeployer added in v0.0.171

type LightManagerHarnessDeployer struct {
	*deployer.BaseDeployer
}

LightManagerHarnessDeployer deploys the light agent manager for testing.

func (LightManagerHarnessDeployer) Dependencies added in v0.0.171

Dependencies gets a list of dependencies used to deploy the light agent manager contract.

func (LightManagerHarnessDeployer) Deploy added in v0.0.171

Deploy deploys the light manager harness. nolint:dupl,dupword

type MessageHarnessDeployer

type MessageHarnessDeployer struct {
	*deployer.BaseDeployer
}

MessageHarnessDeployer deploys the message harness for testing.

func (MessageHarnessDeployer) Deploy

Deploy deploys the message harness deployer.

type OriginDeployer

type OriginDeployer struct {
	*deployer.BaseDeployer
}

OriginDeployer deploys the origin contract.

func (OriginDeployer) Dependencies

func (d OriginDeployer) Dependencies() []contracts.ContractType

Dependencies gets a list of dependencies used to deploy the origin contract.

func (OriginDeployer) Deploy

Deploy deploys the origin contract. nolint:dupl,cyclop

type OriginHarnessDeployer

type OriginHarnessDeployer struct {
	*deployer.BaseDeployer
}

OriginHarnessDeployer deploys the origin harness for testing.

func (OriginHarnessDeployer) Dependencies added in v0.0.20

func (o OriginHarnessDeployer) Dependencies() []contracts.ContractType

Dependencies gets a list of dependencies used to deploy the origin contract.

func (OriginHarnessDeployer) Deploy

Deploy deploys the origin harness. nolint:dupl

type PingPongClientDeployer added in v0.0.110

type PingPongClientDeployer struct {
	*deployer.BaseDeployer
}

PingPongClientDeployer deploys the ping pong test client.

func (PingPongClientDeployer) Deploy added in v0.0.110

Deploy deploys the ping pong test client.

type ReceiptHarnessDeployer added in v0.0.239

type ReceiptHarnessDeployer struct {
	*deployer.BaseDeployer
}

ReceiptHarnessDeployer deploys the request harness for testing.

func (ReceiptHarnessDeployer) Deploy added in v0.0.239

Deploy deploys the receipt harness deployer.

type RequestHarnessDeployer added in v0.0.184

type RequestHarnessDeployer struct {
	*deployer.BaseDeployer
}

RequestHarnessDeployer deploys the request harness for testing.

func (RequestHarnessDeployer) Deploy added in v0.0.184

Deploy deploys the request harness deployer.

type SimulatedBackendsTestSuite added in v0.0.54

type SimulatedBackendsTestSuite struct {
	*testsuite.TestSuite
	LightInboxOnOrigin                  *lightinbox.LightInboxRef
	LightInboxMetadataOnOrigin          contracts.DeployedContract
	LightManagerOnOrigin                *lightmanagerharness.LightManagerHarnessRef
	LightManagerMetadataOnOrigin        contracts.DeployedContract
	OriginContract                      *originharness.OriginHarnessRef
	OriginContractMetadata              contracts.DeployedContract
	DestinationContractOnOrigin         *destinationharness.DestinationHarnessRef
	DestinationContractMetadataOnOrigin contracts.DeployedContract
	TestContractOnOrigin                *agentstestcontract.AgentsTestContractRef
	TestContractMetadataOnOrigin        contracts.DeployedContract
	TestContractOnSummit                *agentstestcontract.AgentsTestContractRef
	TestContractMetadataOnSummit        contracts.DeployedContract
	DestinationContractOnSummit         *destinationharness.DestinationHarnessRef
	DestinationContractMetadataOnSummit contracts.DeployedContract
	TestContractOnDestination           *agentstestcontract.AgentsTestContractRef
	TestContractMetadataOnDestination   contracts.DeployedContract
	TestClientOnOrigin                  *testclient.TestClientRef
	TestClientMetadataOnOrigin          contracts.DeployedContract
	PingPongClientOnOrigin              *pingpongclient.PingPongClientRef
	PingPongClientMetadataOnOrigin      contracts.DeployedContract
	DestinationContract                 *destinationharness.DestinationHarnessRef
	DestinationContractMetadata         contracts.DeployedContract
	LightInboxOnDestination             *lightinbox.LightInboxRef
	LightInboxMetadataOnDestination     contracts.DeployedContract
	LightManagerOnDestination           *lightmanagerharness.LightManagerHarnessRef
	LightManagerMetadataOnDestination   contracts.DeployedContract
	OriginContractOnDestination         *originharness.OriginHarnessRef
	OriginContractMetadataOnDestination contracts.DeployedContract
	TestClientOnDestination             *testclient.TestClientRef
	TestClientMetadataOnDestination     contracts.DeployedContract
	PingPongClientOnDestination         *pingpongclient.PingPongClientRef
	PingPongClientMetadataOnDestination contracts.DeployedContract
	InboxOnSummit                       *inbox.InboxRef
	InboxMetadataOnSummit               contracts.DeployedContract
	BondingManagerOnSummit              *bondingmanagerharness.BondingManagerHarnessRef
	BondingManagerMetadataOnSummit      contracts.DeployedContract
	SummitContract                      *summitharness.SummitHarnessRef
	SummitMetadata                      contracts.DeployedContract
	TestBackendOrigin                   backends.SimulatedTestBackend
	TestBackendDestination              backends.SimulatedTestBackend
	TestBackendSummit                   backends.SimulatedTestBackend
	NotaryBondedWallet                  wallet.Wallet
	NotaryOnOriginBondedWallet          wallet.Wallet
	NotaryOnDestinationBondedWallet     wallet.Wallet
	GuardBondedWallet                   wallet.Wallet
	NotaryBondedSigner                  signer.Signer
	NotaryOnOriginBondedSigner          signer.Signer
	NotaryOnDestinationBondedSigner     signer.Signer
	GuardBondedSigner                   signer.Signer
	NotaryUnbondedWallet                wallet.Wallet
	NotaryUnbondedSigner                signer.Signer
	NotaryOnOriginUnbondedWallet        wallet.Wallet
	NotaryOnOriginUnbondedSigner        signer.Signer
	NotaryOnDestinationUnbondedWallet   wallet.Wallet
	NotaryOnDestinationUnbondedSigner   signer.Signer
	GuardUnbondedWallet                 wallet.Wallet
	GuardUnbondedSigner                 signer.Signer
	ExecutorUnbondedWallet              wallet.Wallet
	ExecutorUnbondedSigner              signer.Signer
	OriginDomainClient                  domains.DomainClient
	SummitDomainClient                  domains.DomainClient
	DestinationDomainClient             domains.DomainClient
	TestDeployManager                   *DeployManager
	ScribeTestDB                        scribedb.EventDB
	DBPath                              string
	ExecutorTestDB                      db.ExecutorDB
	NotaryTestDB                        notarydb.NotaryDB
	GuardTestDB                         guarddb.GuardDB
	ScribeMetrics                       metrics.Handler
	ExecutorMetrics                     metrics.Handler
	NotaryMetrics                       metrics.Handler
	GuardMetrics                        metrics.Handler
	ContractMetrics                     metrics.Handler
	TestOmniRPC                         string
}

SimulatedBackendsTestSuite can be used as the base for any test needing simulated backends that have an origin, destination and attestation collector and a guard and notary added to each. TODO (joe): For tests that do not need all 3 simulated backends, allow them to pass in flags indicating the subset of backends desired. Some tests might only want an attestation collector, others might only want an origin and an attestation collector, others might want just a destination, etc.

func NewSimulatedBackendsTestSuite added in v0.0.54

func NewSimulatedBackendsTestSuite(tb testing.TB) *SimulatedBackendsTestSuite

NewSimulatedBackendsTestSuite creates an end-to-end test suite with simulated backends set up.

func (*SimulatedBackendsTestSuite) BumpBackend added in v0.0.233

BumpBackend is a helper to get the test backend to emit expected events. TODO: Look into using anvil EvmMine() instead of this.

func (*SimulatedBackendsTestSuite) SetupBackends added in v0.0.259

func (a *SimulatedBackendsTestSuite) SetupBackends()

SetupBackends sets up the simulated backends.

func (*SimulatedBackendsTestSuite) SetupDestination added in v0.0.54

func (a *SimulatedBackendsTestSuite) SetupDestination(deployManager *DeployManager)

SetupDestination sets up the backend that will have the destination contract deployed on it.

func (*SimulatedBackendsTestSuite) SetupExecutor added in v0.0.79

func (a *SimulatedBackendsTestSuite) SetupExecutor()

SetupExecutor sets up the Executor agent.

func (*SimulatedBackendsTestSuite) SetupGuard added in v0.0.60

func (a *SimulatedBackendsTestSuite) SetupGuard()

SetupGuard sets up the Guard agent.

func (*SimulatedBackendsTestSuite) SetupNotary added in v0.0.60

func (a *SimulatedBackendsTestSuite) SetupNotary()

SetupNotary sets up the Notary agent.

func (*SimulatedBackendsTestSuite) SetupNotaryOnDestination added in v0.0.239

func (a *SimulatedBackendsTestSuite) SetupNotaryOnDestination()

SetupNotaryOnDestination sets up the Notary agent on the origin chain.

func (*SimulatedBackendsTestSuite) SetupNotaryOnOrigin added in v0.0.104

func (a *SimulatedBackendsTestSuite) SetupNotaryOnOrigin()

SetupNotaryOnOrigin sets up the Notary agent on the origin chain.

func (*SimulatedBackendsTestSuite) SetupOrigin added in v0.0.54

func (a *SimulatedBackendsTestSuite) SetupOrigin(deployManager *DeployManager)

SetupOrigin sets up the backend that will have the origin contract deployed on it.

func (*SimulatedBackendsTestSuite) SetupSuite added in v0.0.141

func (a *SimulatedBackendsTestSuite) SetupSuite()

SetupSuite sets up the test suite.

func (*SimulatedBackendsTestSuite) SetupSummit added in v0.0.130

func (a *SimulatedBackendsTestSuite) SetupSummit(deployManager *DeployManager)

SetupSummit sets up the backend that will have the summit contract deployed on it.

func (*SimulatedBackendsTestSuite) SetupTest added in v0.0.54

func (a *SimulatedBackendsTestSuite) SetupTest()

SetupTest sets up the test.

type SnapshotHarnessDeployer added in v0.0.130

type SnapshotHarnessDeployer struct {
	*deployer.BaseDeployer
}

SnapshotHarnessDeployer deploys the snapshot harness.

func (SnapshotHarnessDeployer) Deploy added in v0.0.130

Deploy deploys the snapshot harness.

type StateHarnessDeployer added in v0.0.130

type StateHarnessDeployer struct {
	*deployer.BaseDeployer
}

StateHarnessDeployer deploys the state harness.

func (StateHarnessDeployer) Deploy added in v0.0.130

Deploy deploys the state harness.

type SummitDeployer added in v0.0.130

type SummitDeployer struct {
	*deployer.BaseDeployer
}

SummitDeployer deploys the summit.

func (SummitDeployer) Deploy added in v0.0.130

Deploy deploys the summit.

type SummitHarnessDeployer added in v0.0.130

type SummitHarnessDeployer struct {
	*deployer.BaseDeployer
}

SummitHarnessDeployer deploys the summit harness.

func (SummitHarnessDeployer) Deploy added in v0.0.130

Deploy deploys the summit harness. nolint:dupl

type TestClientDeployer added in v0.0.104

type TestClientDeployer struct {
	*deployer.BaseDeployer
}

TestClientDeployer deploys the test client.

func (TestClientDeployer) Deploy added in v0.0.104

Deploy deploys the test client.

type TipsHarnessDeployer

type TipsHarnessDeployer struct {
	*deployer.BaseDeployer
}

TipsHarnessDeployer deploys the tip harness for tester.

func (TipsHarnessDeployer) Deploy

Deploy deploys the attestation harness.

Directories

Path Synopsis
Code generated by synapse abigen DO NOT EDIT.
Code generated by synapse abigen DO NOT EDIT.

Jump to

Keyboard shortcuts

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