Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Teleporter test cases - part 1 #104

Merged
merged 17 commits into from
Nov 7, 2023
Merged

Conversation

cam-schultz
Copy link
Contributor

@cam-schultz cam-schultz commented Nov 2, 2023

Why this should be merged

Implements the following test cases from #94

  • Deliver message destined for contract that doesn't exist, should fail. Then deploy the contract to the intended address and retry message execution, should succeed.
  • Try delivering message to a different chain than it was meant for, should fail.

Also implements the ExampleCrossChainMessenger integration test in Ginkgo. This is already implemented in bash, but all bash tests will eventually be ported to Ginkgo. This partially addresses #27

Ports a handful of E2E utility changes from #40

How this works

See above

How this was tested

New E2E test cases

How is this documented

N/A

@cam-schultz cam-schultz changed the title Teleporter test cases Teleporter test cases - part 1 Nov 2, 2023
//

optsA := utils.CreateTransactorOpts(ctx, subnetAInfo, fundedAddress, fundedKey)
_, tx, subnetAExampleMessenger, err := examplecrosschainmessenger.DeployExampleCrossChainMessenger(optsA, subnetAInfo.ChainRPCClient, subnetAInfo.TeleporterRegistryAddress)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to move contract deployment to utils? so that it can be re-used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. We use this contract frequently to test Teleporter edge cases, so it makes sense to have this a widely available utility. I've added this in.

fundedKey,
teleporterContractAddress,
)
utils.SendTransactionAndWaitForAcceptance(ctx, subnetBInfo.ChainWSClient, subnetBInfo.ChainRPCClient, signedTx, true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to use abi binding to call RetryMessageExecution directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, fixed now

@cam-schultz cam-schultz requested a review from gwen917 November 7, 2023 20:31
@cam-schultz cam-schultz merged commit 891133e into general-e2e Nov 7, 2023
@cam-schultz cam-schultz deleted the teleporter-test-cases branch November 7, 2023 21:39
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants