Skip to content

Commit 45afaa7

Browse files
committed
Adapt test deploy_l1_messaging_contract_with_funded_account_private_key
1 parent 99c544e commit 45afaa7

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

tests/integration/common/background_anvil.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl BackgroundAnvil {
7676
}
7777

7878
/// Spawns an instance at random port. Assumes CLI args in `args` don't contain `--port` or
79-
/// mnemonic parameters. Uses the mnemonic seed defined in constants.
79+
/// mnemonic parameters. Uses the mnemonic phrase defined in constants.
8080
pub(crate) async fn spawn_with_additional_args(args: &[&str]) -> Result<Self, TestError> {
8181
Self::spawn_with_additional_args_and_custom_signer(
8282
args,

tests/integration/test_messaging.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,19 +383,31 @@ async fn setup_anvil_incorrect_eth_private_key() {
383383
}
384384

385385
#[tokio::test]
386-
async fn deploy_l1_messaging_contract_with_funded_account_private_key() {
387-
let anvil = BackgroundAnvil::spawn().await.unwrap();
386+
async fn deploy_l1_messaging_contract_with_custom_key() {
387+
let anvil = BackgroundAnvil::spawn_with_additional_args_and_custom_signer(
388+
&[],
389+
MNEMONIC_FROM_SEED_42,
390+
ACCOUNT_0_PRIVATE_KEY_WITH_SEED_42,
391+
)
392+
.await
393+
.unwrap();
388394

389395
let (devnet, _, _) = setup_devnet(&["--account-class", "cairo1"]).await;
390396

391397
let body = devnet
392-
.send_custom_rpc("devnet_postmanLoad", json!({ "network_url": anvil.url, "funded_account_private_key": DEFAULT_ETH_ACCOUNT_PRIVATE_KEY }))
398+
.send_custom_rpc(
399+
"devnet_postmanLoad",
400+
json!({
401+
"network_url": anvil.url,
402+
"funded_account_private_key": ACCOUNT_0_PRIVATE_KEY_WITH_SEED_42
403+
}),
404+
)
393405
.await
394406
.expect("deploy l1 messaging contract failed");
395407

396408
assert_eq!(
397409
body.get("messaging_contract_address").unwrap().as_str().unwrap(),
398-
MESSAGING_L1_ADDRESS
410+
"0xca945eebf408d4a73e5d330fc8f6b55cd1e419ff"
399411
);
400412
}
401413

0 commit comments

Comments
 (0)