Skip to content

Commit 3ad6d50

Browse files
author
Bengt Lofgren
committed
american english spelling adopted
1 parent f02aa83 commit 3ad6d50

File tree

17 files changed

+112
-112
lines changed

17 files changed

+112
-112
lines changed

solana/modules/matching-engine-testing/tests/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Each test is a function that is annotated with `#[tokio::test]`.
1010

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

13-
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.
13+
The `TestingEngine` is initialized with a `TestingContext`. The `TestingContext` holds the solana program test context, the actors, the transfer direction, created vaas, as well as some constants.
1414

1515
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.
1616

@@ -19,7 +19,7 @@ The `TestingEngine` is used to execute the instruction triggers in the order the
1919
### Initialize program
2020

2121
What is expected:
22-
- Program is initialised
22+
- Program is initialized
2323
- Router endpoints are created
2424

2525

@@ -33,7 +33,7 @@ What is expected:
3333
What is expected:
3434
- Fast market order account is created
3535
- Guardian signatures account is created via Verify VAA Shim program, which are the signatures found in the fast market order VAA from the source network.
36-
- Fast market order is initialised
36+
- Fast market order is initialized
3737

3838
### Close fast market order
3939

@@ -44,7 +44,7 @@ What is expected:
4444
### Place initial offer (shim)
4545

4646
What is expected:
47-
- Fast market order is initialised
47+
- Fast market order is initialized
4848
- Initial offer is placed
4949
- Auction account is created and corresponds to a vaa and the initial offer
5050

solana/modules/matching-engine-testing/tests/shimful/fast_market_order_shim.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ use matching_engine::fallback::close_fast_market_order::{
88
CloseFastMarketOrder as CloseFastMarketOrderFallback,
99
CloseFastMarketOrderAccounts as CloseFastMarketOrderFallbackAccounts,
1010
};
11-
use matching_engine::fallback::initialise_fast_market_order::{
12-
InitialiseFastMarketOrder as InitialiseFastMarketOrderFallback,
13-
InitialiseFastMarketOrderAccounts as InitialiseFastMarketOrderFallbackAccounts,
14-
InitialiseFastMarketOrderData as InitialiseFastMarketOrderFallbackData,
11+
use matching_engine::fallback::initialize_fast_market_order::{
12+
InitializeFastMarketOrder as InitializeFastMarketOrderFallback,
13+
InitializeFastMarketOrderAccounts as InitializeFastMarketOrderFallbackAccounts,
14+
InitializeFastMarketOrderData as InitializeFastMarketOrderFallbackData,
1515
};
1616
use utils::constants::*;
1717

@@ -21,9 +21,9 @@ use solana_sdk::{pubkey::Pubkey, signature::Keypair, signer::Signer, transaction
2121
use std::rc::Rc;
2222
use wormhole_io::TypePrefixedPayload;
2323

24-
/// Initialise the fast market order account
24+
/// Initialize the fast market order account
2525
///
26-
/// This function initialises the fast market order account
26+
/// This function initializes the fast market order account
2727
///
2828
/// # Arguments
2929
///
@@ -38,7 +38,7 @@ use wormhole_io::TypePrefixedPayload;
3838
/// # Asserts
3939
///
4040
/// * The expected error, if any, is reached when executing the instruction
41-
pub async fn initialise_fast_market_order_fallback(
41+
pub async fn initialize_fast_market_order_fallback(
4242
testing_context: &TestingContext,
4343
test_context: &mut ProgramTestContext,
4444
payer_signer: &Rc<Keypair>,
@@ -47,7 +47,7 @@ pub async fn initialise_fast_market_order_fallback(
4747
expected_error: Option<&ExpectedError>,
4848
) {
4949
let program_id = &testing_context.get_matching_engine_program_id();
50-
let initialise_fast_market_order_ix = initialise_fast_market_order_fallback_instruction(
50+
let initialize_fast_market_order_ix = initialize_fast_market_order_fallback_instruction(
5151
payer_signer,
5252
program_id,
5353
fast_market_order,
@@ -56,7 +56,7 @@ pub async fn initialise_fast_market_order_fallback(
5656
let transaction = testing_context
5757
.create_transaction(
5858
test_context,
59-
&[initialise_fast_market_order_ix],
59+
&[initialize_fast_market_order_ix],
6060
Some(&payer_signer.pubkey()),
6161
&[payer_signer],
6262
1000000000,
@@ -68,9 +68,9 @@ pub async fn initialise_fast_market_order_fallback(
6868
.await;
6969
}
7070

71-
/// Creates the initialise fast market order fallback instruction
71+
/// Creates the initialize fast market order fallback instruction
7272
///
73-
/// This function creates the initialise fast market order fallback instruction
73+
/// This function creates the initialize fast market order fallback instruction
7474
///
7575
/// # Arguments
7676
///
@@ -83,8 +83,8 @@ pub async fn initialise_fast_market_order_fallback(
8383
///
8484
/// # Returns
8585
///
86-
/// * `Instruction` - The initialise fast market order fallback instruction
87-
fn initialise_fast_market_order_fallback_instruction(
86+
/// * `Instruction` - The initialize fast market order fallback instruction
87+
fn initialize_fast_market_order_fallback_instruction(
8888
payer_signer: &Rc<Keypair>,
8989
program_id: &Pubkey,
9090
fast_market_order: FastMarketOrderState,
@@ -100,7 +100,7 @@ fn initialise_fast_market_order_fallback_instruction(
100100
)
101101
.0;
102102

103-
let create_fast_market_order_accounts = InitialiseFastMarketOrderFallbackAccounts {
103+
let create_fast_market_order_accounts = InitializeFastMarketOrderFallbackAccounts {
104104
signer: &payer_signer.pubkey(),
105105
fast_market_order_account: &fast_market_order_account,
106106
guardian_set: &guardian_signature_info.guardian_set_pubkey,
@@ -109,10 +109,10 @@ fn initialise_fast_market_order_fallback_instruction(
109109
system_program: &solana_program::system_program::ID,
110110
};
111111

112-
InitialiseFastMarketOrderFallback {
112+
InitializeFastMarketOrderFallback {
113113
program_id,
114114
accounts: create_fast_market_order_accounts,
115-
data: InitialiseFastMarketOrderFallbackData::new(
115+
data: InitializeFastMarketOrderFallbackData::new(
116116
fast_market_order,
117117
guardian_signature_info.guardian_set_bump,
118118
),

solana/modules/matching-engine-testing/tests/test_scenarios/create_and_close_fast_market_order.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
//!
77
//! ### Happy path tests
88
//!
9-
//! - `test_initialise_fast_market_order_fallback` - Test that the fast market order is initialised correctly
9+
//! - `test_initialize_fast_market_order_fallback` - Test that the fast market order is initialized correctly
1010
//! - `test_close_fast_market_order_fallback` - Test that the fast market order is closed correctly
1111
//! - `test_close_fast_market_order_fallback_with_custom_refund_recipient` - Test that the fast market order is closed correctly with a custom refund recipient
1212
//!
1313
//! ### Sad path tests
1414
//!
15-
//! - `test_fast_market_order_cannot_be_refunded_by_someone_who_did_not_initialise_it` - Test that the fast market order cannot be refunded by someone who did not initialise it
15+
//! - `test_fast_market_order_cannot_be_refunded_by_someone_who_did_not_initialize_it` - Test that the fast market order cannot be refunded by someone who did not initialize it
1616
//!
1717
//! ### Edge case tests
1818
//!
@@ -55,7 +55,7 @@ use utils::vaa::VaaArgs;
5555

5656
/// Test that the create fast market order account works correctly for the fallback instruction
5757
#[tokio::test]
58-
pub async fn test_initialise_fast_market_order_fallback() {
58+
pub async fn test_initialize_fast_market_order_fallback() {
5959
let vaa_args = vec![VaaArgs {
6060
post_vaa: false,
6161
..VaaArgs::default()
@@ -175,9 +175,9 @@ pub async fn test_close_fast_market_order_fallback_with_custom_refund_recipient(
175175
*****************
176176
*/
177177

178-
/// Test that the fast market order cannot be refunded by someone who did not initialise it
178+
/// Test that the fast market order cannot be refunded by someone who did not initialize it
179179
#[tokio::test]
180-
pub async fn test_fast_market_order_cannot_be_refunded_by_someone_who_did_not_initialise_it() {
180+
pub async fn test_fast_market_order_cannot_be_refunded_by_someone_who_did_not_initialize_it() {
181181
let transfer_direction = TransferDirection::FromArbitrumToEthereum;
182182
let vaa_args = vec![VaaArgs {
183183
post_vaa: false,

solana/modules/matching-engine-testing/tests/test_scenarios/execute_order.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ pub async fn test_execute_order_shim_emitter_chain_mismatch() {
10441044
)
10451045
.await;
10461046
let testing_engine = TestingEngine::new(testing_context).await;
1047-
let initialise_first_fast_market_order_instruction_triggers = vec![
1047+
let initialize_first_fast_market_order_instruction_triggers = vec![
10481048
InstructionTrigger::InitializeProgram(InitializeInstructionConfig::default()),
10491049
InstructionTrigger::CreateCctpRouterEndpoints(
10501050
CreateCctpRouterEndpointsInstructionConfig::default(),
@@ -1053,14 +1053,14 @@ pub async fn test_execute_order_shim_emitter_chain_mismatch() {
10531053
InitializeFastMarketOrderShimInstructionConfig::default(),
10541054
),
10551055
];
1056-
let initialise_first_fast_market_order_state = testing_engine
1056+
let initialize_first_fast_market_order_state = testing_engine
10571057
.execute(
10581058
&mut test_context,
1059-
initialise_first_fast_market_order_instruction_triggers,
1059+
initialize_first_fast_market_order_instruction_triggers,
10601060
None,
10611061
)
10621062
.await;
1063-
let initialise_second_fast_market_order_instruction_triggers = vec![
1063+
let initialize_second_fast_market_order_instruction_triggers = vec![
10641064
InstructionTrigger::PlaceInitialOfferShim(PlaceInitialOfferInstructionConfig::default()),
10651065
InstructionTrigger::InitializeFastMarketOrderShim(
10661066
InitializeFastMarketOrderShimInstructionConfig {
@@ -1070,11 +1070,11 @@ pub async fn test_execute_order_shim_emitter_chain_mismatch() {
10701070
},
10711071
),
10721072
];
1073-
let initialise_second_fast_market_order_state = testing_engine
1073+
let initialize_second_fast_market_order_state = testing_engine
10741074
.execute(
10751075
&mut test_context,
1076-
initialise_second_fast_market_order_instruction_triggers,
1077-
Some(initialise_first_fast_market_order_state),
1076+
initialize_second_fast_market_order_instruction_triggers,
1077+
Some(initialize_first_fast_market_order_state),
10781078
)
10791079
.await;
10801080
let instruction_triggers = vec![InstructionTrigger::ExecuteOrderShim(
@@ -1092,7 +1092,7 @@ pub async fn test_execute_order_shim_emitter_chain_mismatch() {
10921092
.execute(
10931093
&mut test_context,
10941094
instruction_triggers,
1095-
Some(initialise_second_fast_market_order_state),
1095+
Some(initialize_second_fast_market_order_state),
10961096
)
10971097
.await;
10981098
}

solana/modules/matching-engine-testing/tests/test_scenarios/initialise_and_misc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
//! # Initialise and misc instruction testing
1+
//! # Initialize and misc instruction testing
22
//!
3-
//! This module contains tests for the initialise and some other miscellaneous setup test scenarios.
3+
//! This module contains tests for the initialize and some other miscellaneous setup test scenarios.
44
//!
55
//! ## Test Cases
66
//!
77
//! ### Happy path tests
88
//!
9-
//! - `test_initialize_program` - Test that the program is initialised correctly
9+
//! - `test_initialize_program` - Test that the program is initialized correctly
1010
//! - `test_cctp_token_router_endpoint_creation` - Test that a CCTP token router endpoint is created for the arbitrum and ethereum chains
1111
//! - `test_local_token_router_endpoint_creation` - Test that a local token router endpoint is created for the arbitrum and ethereum chains
1212
//! - `test_setup_vaas` - Test that the vaas are setup correctly
@@ -61,7 +61,7 @@ use wormhole_svm_definitions::solana::CORE_BRIDGE_PROGRAM_ID;
6161
*****************
6262
*/
6363

64-
/// Test that the program is initialised correctly
64+
/// Test that the program is initialized correctly
6565
#[tokio::test]
6666
pub async fn test_initialize_program() {
6767
let (testing_context, mut test_context) = setup_environment(
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pub mod create_and_close_fast_market_order;
22
pub mod execute_order;
3-
pub mod initialise_and_misc;
3+
pub mod initialize_and_misc;
44
pub mod make_offer;
55
pub mod prepare_order;
66
pub mod settle_auction;

solana/modules/matching-engine-testing/tests/testing_engine/engine.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use super::setup::TestingContext;
3333
use super::{config::*, state::*};
3434
use crate::shimful;
3535
use crate::shimful::fast_market_order_shim::{
36-
create_fast_market_order_state_from_vaa_data, initialise_fast_market_order_fallback,
36+
create_fast_market_order_state_from_vaa_data, initialize_fast_market_order_fallback,
3737
};
3838
use crate::shimful::verify_shim::create_guardian_signatures;
3939
use crate::shimless;
@@ -502,7 +502,7 @@ impl TestingEngine {
502502
&self.testing_context.get_matching_engine_program_id(),
503503
);
504504

505-
initialise_fast_market_order_fallback(
505+
initialize_fast_market_order_fallback(
506506
&self.testing_context,
507507
test_context,
508508
&payer_signer,

solana/modules/matching-engine-testing/tests/testing_engine/setup.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ use crate::utils::airdrop::{airdrop, airdrop_spl_token};
1818
use crate::utils::cctp_message::CctpRemoteTokenMessenger;
1919
use crate::utils::mint::MintFixture;
2020
use crate::utils::program_fixtures::{
21-
initialise_cctp_message_transmitter, initialise_cctp_token_messenger_minter,
22-
initialise_local_token_router, initialise_post_message_shims, initialise_upgrade_manager,
23-
initialise_verify_shims, initialise_wormhole_core_bridge,
21+
initialize_cctp_message_transmitter, initialize_cctp_token_messenger_minter,
22+
initialize_local_token_router, initialize_post_message_shims, initialize_upgrade_manager,
23+
initialize_verify_shims, initialize_wormhole_core_bridge,
2424
};
2525
use crate::utils::token_account::{
2626
create_token_account, read_keypair_from_file, SplTokenEnum, TokenAccountFixture,
@@ -113,26 +113,26 @@ impl PreTestingContext {
113113
// Setup Testing Actors
114114
let testing_actors = TestingActors::new(owner_keypair_path);
115115
println!("Testing actors: {:?}", testing_actors);
116-
// Initialise Upgrade Manager
117-
let program_data_pubkey = initialise_upgrade_manager(
116+
// Initialize Upgrade Manager
117+
let program_data_pubkey = initialize_upgrade_manager(
118118
&mut program_test,
119119
&program_id,
120120
testing_actors.owner.pubkey(),
121121
);
122122

123-
// Initialise CCTP Token Messenger Minter
124-
initialise_cctp_token_messenger_minter(&mut program_test);
123+
// Initialize CCTP Token Messenger Minter
124+
initialize_cctp_token_messenger_minter(&mut program_test);
125125

126-
// Initialise Wormhole Core Bridge
127-
initialise_wormhole_core_bridge(&mut program_test);
126+
// Initialize Wormhole Core Bridge
127+
initialize_wormhole_core_bridge(&mut program_test);
128128

129-
// Initialise CCTP Message Transmitter
130-
initialise_cctp_message_transmitter(&mut program_test);
129+
// Initialize CCTP Message Transmitter
130+
initialize_cctp_message_transmitter(&mut program_test);
131131

132-
// Initialise Local Token Router
133-
initialise_local_token_router(&mut program_test);
132+
// Initialize Local Token Router
133+
initialize_local_token_router(&mut program_test);
134134

135-
// Initialise Account Fixtures
135+
// Initialize Account Fixtures
136136
let account_fixtures = FixtureAccounts::new(&mut program_test);
137137

138138
// Add lookup table accounts
@@ -148,12 +148,12 @@ impl PreTestingContext {
148148

149149
/// Adds the post message shims to the program test
150150
pub fn add_post_message_shims(&mut self) {
151-
initialise_post_message_shims(&mut self.program_test);
151+
initialize_post_message_shims(&mut self.program_test);
152152
}
153153

154154
/// Adds the verify shims to the program test
155155
pub fn add_verify_shims(&mut self) {
156-
initialise_verify_shims(&mut self.program_test);
156+
initialize_verify_shims(&mut self.program_test);
157157
}
158158
}
159159

solana/modules/matching-engine-testing/tests/utils/account_fixtures.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub struct FixtureAccounts {
3434
}
3535

3636
impl FixtureAccounts {
37-
/// Initialises all accounts in fixtures directory
37+
/// Initializes all accounts in fixtures directory
3838
///
3939
/// # Arguments
4040
///

0 commit comments

Comments
 (0)