Documentation ¶
Overview ¶
Package testcontracts provides a set of test contracts for use in tests.
Index ¶
- Constants
- Variables
- func NewBridgeConfigV3Deployer(registry deployer.GetOnlyContractRegistry, ...) deployer.ContractDeployer
- func NewTestCCTPDeployer(registry deployer.GetOnlyContractRegistry, ...) deployer.ContractDeployer
- func NewTestFastBridgeDeployer(registry deployer.GetOnlyContractRegistry, ...) deployer.ContractDeployer
- func NewTestMessageBusDeployer(registry deployer.GetOnlyContractRegistry, ...) deployer.ContractDeployer
- func NewTestMetaSwapDeployer(registry deployer.GetOnlyContractRegistry, ...) deployer.ContractDeployer
- func NewTestSwapFlashLoanDeployer(registry deployer.GetOnlyContractRegistry, ...) deployer.ContractDeployer
- func NewTestSynapseBridgeDeployer(registry deployer.GetOnlyContractRegistry, ...) deployer.ContractDeployer
- func NewTestSynapseBridgeV1Deployer(registry deployer.GetOnlyContractRegistry, ...) deployer.ContractDeployer
- type BridgeConfigV3Deployer
- type DeployManager
- func (d *DeployManager) GetBridgeConfigV3(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *bridgeconfig.BridgeConfigRef)
- func (d *DeployManager) GetTestCCTP(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testcctp.TestCCTPRef)
- func (d *DeployManager) GetTestMessageBusUpgradeable(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testmessagebus.TestMessageBusRef)
- func (d *DeployManager) GetTestMetaSwap(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testmetaswap.TestMetaSwapRef)
- func (d *DeployManager) GetTestRFQ(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testfastbridge.TestFastBridgeRef)
- func (d *DeployManager) GetTestSwapFlashLoan(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testswap.TestSwapRef)
- func (d *DeployManager) GetTestSynapseBridge(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testbridge.TestBridgeRef)
- func (d *DeployManager) GetTestSynapseBridgeV1(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testbridgev1.TestBridgeV1Ref)
- type TestCCTPDeployer
- type TestFastBridgeDeployer
- type TestMessageBusUpgradeableDeployer
- type TestMetaSwapDeployer
- type TestSwapFlashLoanDeployer
- type TestSynapseBridgeDeployer
- type TestSynapseBridgeV1Deployer
Constants ¶
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 ¶
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
func NewTestCCTPDeployer(registry deployer.GetOnlyContractRegistry, backend backends.SimulatedTestBackend) deployer.ContractDeployer
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
func NewTestMetaSwapDeployer(registry deployer.GetOnlyContractRegistry, backend backends.SimulatedTestBackend) deployer.ContractDeployer
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 ¶
func (n BridgeConfigV3Deployer) Deploy(ctx context.Context) (contracts.DeployedContract, error)
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
func (d *DeployManager) GetTestMetaSwap(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testmetaswap.TestMetaSwapRef)
GetTestMetaSwap gets a typecast test meta swap contract.
func (*DeployManager) GetTestRFQ ¶ added in v0.4.4
func (d *DeployManager) GetTestRFQ(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testfastbridge.TestFastBridgeRef)
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
func (n TestCCTPDeployer) Deploy(ctx context.Context) (contracts.DeployedContract, error)
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
func (n TestFastBridgeDeployer) Deploy(ctx context.Context) (contracts.DeployedContract, error)
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
func (t TestMessageBusUpgradeableDeployer) Deploy(ctx context.Context) (contracts.DeployedContract, error)
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
func (t TestMetaSwapDeployer) Deploy(ctx context.Context) (contracts.DeployedContract, error)
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 ¶
func (t TestSwapFlashLoanDeployer) Deploy(ctx context.Context) (contracts.DeployedContract, error)
Deploy deploys a test swap.
type TestSynapseBridgeDeployer ¶
type TestSynapseBridgeDeployer struct {
*deployer.BaseDeployer
}
TestSynapseBridgeDeployer is the type of the test bridge deployer.
func (TestSynapseBridgeDeployer) Deploy ¶
func (t TestSynapseBridgeDeployer) Deploy(ctx context.Context) (contracts.DeployedContract, error)
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
func (t TestSynapseBridgeV1Deployer) Deploy(ctx context.Context) (contracts.DeployedContract, error)
Deploy deploys a test bridge v1.