Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

CCIP Integration tests - wiring contracts [CCIP-2698] #1148

Merged
merged 31 commits into from
Jul 11, 2024

Conversation

asoliman92
Copy link
Contributor

@asoliman92 asoliman92 commented Jul 5, 2024

This is first phase of setting up full integration tests for the new setup.

Test is setting up 3 chains (let's call them A, B, C), each chain deploys and starts 2 ping pong contracts for the other 2.
A ---deploy+start---> (pingPongB, pingPongC)
B ---deploy+start---> (pingPongA, pingPongC)
C ---deploy+start---> (pingPongA, pingPongB)

and then checks that each ping pong contract emitted CCIPSendRequested event from the expected source to destination.

Test fails if any wiring between contracts is not correct.


Main part of helpers that's important to check is the setupInitialConfigs function. This makes sure that all configs are in place to be able to start sending between contracts.


Note: This setup is missing token pools to simplify it a little bit. It will be added in future PR when we start testing sending tokens.

https://smartcontract-it.atlassian.net/browse/CCIP-2698

* Generating NonceManager
* Add onRamp as an authorized caller to NonceManager
@asoliman92 asoliman92 changed the title PingPong test CCIP Integration test Jul 10, 2024
@asoliman92 asoliman92 changed the title CCIP Integration test CCIP Integration tests - wiring contracts Jul 10, 2024
@asoliman92 asoliman92 changed the title CCIP Integration tests - wiring contracts CCIP Integration tests - wiring contracts [CCIP-2698] Jul 10, 2024
@asoliman92 asoliman92 marked this pull request as ready for review July 10, 2024 13:48
* Test fails if any wiring between contracts is not correct.
*/
func TestPingPong(t *testing.T) {
_, universes := createUniverses(t, 4)
Copy link
Contributor

Choose a reason for hiding this comment

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

I find the naming a bit odd (universe).
Maybe better something like:

createUniverses -> setupContracts
universes -> chainContracts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO tying it to contracts can limit us. We can later add log pollers and other stuff. It also already has backend, owner that are not contracts.

Copy link
Contributor

@makramkd makramkd left a comment

Choose a reason for hiding this comment

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

Can you go over the remaining require.Equal's etc. to make sure the correct argument ordering is followed?

@asoliman92 asoliman92 merged commit 78531da into ccip-develop Jul 11, 2024
102 checks passed
@asoliman92 asoliman92 deleted the integration_test/new_contracts branch July 11, 2024 17:46
asoliman92 added a commit that referenced this pull request Jul 16, 2024
Setting up a basic test that have basic OCR3 Nodes. Each Node can access
3 EVM chains that are created and connected to each others. Check
[PR](#1148) for more
details on creating the chains and connecting them.

As JobSpecs for CCIP are not ready. The main goal of this PR is to have
the nodes and AddDon on capability registry for these nodes for each
chain. Once JobSpec is ready we'll be able to test that the nodes picks
up the changes and deploys the plugins, start sending, receiving,..etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants