testcontracts

package
v0.15.10 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package testcontracts provides a set of test contracts for use in tests.

Index

Constants

View Source
const (
	// TestBridgeConfigTypeV3 is the bridge config contract type.
	TestBridgeConfigTypeV3 contractTypeImpl = iota
	// TestSynapseBridgeType is the bridge contract type.
	TestSynapseBridgeType
	// TestSwapFlashLoanType is the swap contract type.
	TestSwapFlashLoanType
	// TestSynapseBridgeV1Type is the bridge contract type for V1.
	TestSynapseBridgeV1Type
	// TestMessageBusType is the message bus type.
	TestMessageBusType
	// TestMetaSwapType is the meta swap type.
	TestMetaSwapType
	// TestCCTPType is cctp contract type.
	TestCCTPType
	// TestFastBridgeType is rfq (fastbridge) contract type.
	TestFastBridgeType
)

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 NewBridgeConfigV3Deployer

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

NewBridgeConfigV3Deployer creates a new bridge config v2 client.

func NewTestCCTPDeployer added in v0.0.138

NewTestCCTPDeployer creates a new test cctp client.

func NewTestFastBridgeDeployer added in v0.4.4

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

NewTestFastBridgeDeployer creates a new test rfq (fastbridge) client.

func NewTestMessageBusDeployer added in v0.0.19

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

NewTestMessageBusDeployer creates a new test message bus deployer.

func NewTestMetaSwapDeployer added in v0.0.81

NewTestMetaSwapDeployer creates a new test meta swap deployer.

func NewTestSwapFlashLoanDeployer

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

NewTestSwapFlashLoanDeployer creates a new test swap deployer.

func NewTestSynapseBridgeDeployer

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

NewTestSynapseBridgeDeployer creates a new test bridge deployer.

func NewTestSynapseBridgeV1Deployer added in v0.0.15

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

NewTestSynapseBridgeV1Deployer creates a new test bridge v1 deployer.

Types

type BridgeConfigV3Deployer

type BridgeConfigV3Deployer struct {
	*deployer.BaseDeployer
}

BridgeConfigV3Deployer is the type of the bridge config v3 deployer.

func (BridgeConfigV3Deployer) Deploy

Deploy deploys bridge config v3

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) GetBridgeConfigV3

func (d *DeployManager) GetBridgeConfigV3(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *bridgeconfig.BridgeConfigRef)

GetBridgeConfigV3 gets a typecast bridgeconfig contract.

func (*DeployManager) GetTestCCTP added in v0.0.138

func (d *DeployManager) GetTestCCTP(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testcctp.TestCCTPRef)

GetTestCCTP gets a typecast test cctp contract.

func (*DeployManager) GetTestMessageBusUpgradeable added in v0.0.19

func (d *DeployManager) GetTestMessageBusUpgradeable(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testmessagebus.TestMessageBusRef)

GetTestMessageBusUpgradeable gets a typecast test message bus contract.

func (*DeployManager) GetTestMetaSwap added in v0.0.81

GetTestMetaSwap gets a typecast test meta swap contract.

func (*DeployManager) GetTestRFQ added in v0.4.4

GetTestRFQ gets a typecast test rfq contract.

func (*DeployManager) GetTestSwapFlashLoan

func (d *DeployManager) GetTestSwapFlashLoan(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testswap.TestSwapRef)

GetTestSwapFlashLoan gets a typecast test swap contract.

func (*DeployManager) GetTestSynapseBridge

func (d *DeployManager) GetTestSynapseBridge(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testbridge.TestBridgeRef)

GetTestSynapseBridge gets a typecast test bridge contract.

func (*DeployManager) GetTestSynapseBridgeV1 added in v0.0.15

func (d *DeployManager) GetTestSynapseBridgeV1(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testbridgev1.TestBridgeV1Ref)

GetTestSynapseBridgeV1 gets a typecast test bridge contract v1.

type TestCCTPDeployer added in v0.0.138

type TestCCTPDeployer struct {
	*deployer.BaseDeployer
}

TestCCTPDeployer is the type of the test cctp deployer.

func (TestCCTPDeployer) Deploy added in v0.0.138

Deploy deploys CCTP contract

type TestFastBridgeDeployer added in v0.4.4

type TestFastBridgeDeployer struct {
	*deployer.BaseDeployer
}

TestFastBridgeDeployer is the type of the test rfq (fastbridge) deployer.

func (TestFastBridgeDeployer) Deploy added in v0.4.4

Deploy deploys FastBridge contract

type TestMessageBusUpgradeableDeployer added in v0.0.19

type TestMessageBusUpgradeableDeployer struct {
	*deployer.BaseDeployer
}

TestMessageBusUpgradeableDeployer is the type of the test message bus upgradeable deployer.

func (TestMessageBusUpgradeableDeployer) Deploy added in v0.0.19

Deploy deploys a test message bus contract.

type TestMetaSwapDeployer added in v0.0.81

type TestMetaSwapDeployer struct {
	*deployer.BaseDeployer
}

TestMetaSwapDeployer is the type of the test meta swap deployer.

func (TestMetaSwapDeployer) Deploy added in v0.0.81

Deploy deploys a test meta swap contract.

type TestSwapFlashLoanDeployer

type TestSwapFlashLoanDeployer struct {
	*deployer.BaseDeployer
}

TestSwapFlashLoanDeployer is the type of the test swap deployer.

func (TestSwapFlashLoanDeployer) Deploy

Deploy deploys a test swap.

type TestSynapseBridgeDeployer

type TestSynapseBridgeDeployer struct {
	*deployer.BaseDeployer
}

TestSynapseBridgeDeployer is the type of the test bridge deployer.

func (TestSynapseBridgeDeployer) Deploy

Deploy deploys a test bridge.

type TestSynapseBridgeV1Deployer added in v0.0.15

type TestSynapseBridgeV1Deployer struct {
	*deployer.BaseDeployer
}

TestSynapseBridgeV1Deployer is the type of the test bridge deployer.

func (TestSynapseBridgeV1Deployer) Deploy added in v0.0.15

Deploy deploys a test bridge v1.

Jump to

Keyboard shortcuts

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