Skip to content

Conversation

bengtlofgren
Copy link

Background reading

To get a better understanding of the testing engine, please read the docstring in tests/testing_engine/engine.rs. The readme file under tests/README.md is reproduced below.

How to read the tests

Each test is found in the integration_tests.rs file.

Each test is a function that is annotated with #[tokio::test].

Each test is a test for a specific scenario, and uses the TestingEngine to execute a series of instruction triggers.

The TestingEngine is initialised with a TestingContext. The TestingContext holds the solana program test context, the actors, the transfer direction, created vaas, as well as some constants.

The TestingEngine is used to execute the instruction triggers in the order they are provided. See the testing_engine/engine.rs file for more details.

Integration Tests

Initialize program

What is expected:

  • Program is initialised
  • Router endpoints are created

Create CCTP router endpoints

What is expected:

  • CCTP router endpoints are created

Create fast market order

What is expected:

  • Fast market order account is created
  • Guardian set is created
  • Fast market order is initialised

Close fast market order

What is expected:

  • Fast market order account is closed
  • Guardian set is closed
  • Close account refund recipient is sent usdc

@a5-pickle a5-pickle force-pushed the main branch 2 times, most recently from 1b4b80b to c50bfdb Compare March 26, 2025 13:54
@bengtlofgren bengtlofgren force-pushed the create_and_close_fast_market_order branch from 004946e to 230f2d5 Compare March 26, 2025 14:23
@a5-pickle a5-pickle changed the base branch from main to shim/integration March 26, 2025 14:24
@bengtlofgren bengtlofgren force-pushed the create_and_close_fast_market_order branch 8 times, most recently from 331a3ac to 110de70 Compare March 26, 2025 21:44
Copy link

@a5-pickle a5-pickle left a comment

Choose a reason for hiding this comment

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

I need to do another round after this because this PR is so huge.

Some other things to consider:

  • Consider removing the to_account_metas method and just create those account metas directly, unless there is a benefit to just creating the account metas separately from building the instruction.
  • Use American English (e.g. "intialize" instead of "initialise") to be consistent with the existing naming conventions of the matching engine.

@bengtlofgren bengtlofgren force-pushed the create_and_close_fast_market_order branch from 7b566c5 to 52def68 Compare April 28, 2025 16:20
@a5-pickle a5-pickle changed the title Create and close fast market order solana: add shim integration instructions May 15, 2025
@a5-pickle a5-pickle dismissed their stale review May 15, 2025 15:51

Paired with @bengtlofgren to address requested changes

@a5-pickle a5-pickle force-pushed the create_and_close_fast_market_order branch from 36e7882 to 2af2c6b Compare May 15, 2025 16:04
@a5-pickle a5-pickle merged commit 2af2c6b into shim/integration May 15, 2025
12 checks passed
@a5-pickle a5-pickle deleted the create_and_close_fast_market_order branch May 15, 2025 16:08
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.

3 participants