@@ -2,7 +2,7 @@ use assert_matches::assert_matches;
22use candid:: { Decode , Encode , Nat , Principal } ;
33use canister_test:: Canister ;
44use cycles_minting_canister:: {
5- AuthorizedSubnetsResponse , BAD_REQUEST_CYCLES_PENALTY , CanisterSettingsArgs ,
5+ AuthorizedSubnetsResponse , BAD_REQUEST_CYCLES_PENALTY , CanisterSettings ,
66 ChangeSubnetTypeAssignmentArgs , CreateCanister , CreateCanisterError , MEANINGFUL_MEMOS ,
77 MEMO_CREATE_CANISTER , MEMO_MINT_CYCLES , MEMO_TOP_UP_CANISTER , NotifyCreateCanister ,
88 NotifyError , NotifyErrorCode , NotifyMintCyclesArg , NotifyMintCyclesSuccess , NotifyTopUp ,
@@ -299,7 +299,7 @@ fn test_cmc_notify_create_with_settings() {
299299 //specify single controller
300300 let canister = notify_create_canister (
301301 & state_machine,
302- Some ( CanisterSettingsArgs {
302+ Some ( CanisterSettings {
303303 // TEST_USER1 creates the canister, so to check it didn't default to the caller we use TEST_USER2
304304 controllers : Some ( vec ! [ TEST_USER2_PRINCIPAL . 0 ] ) ,
305305 ..Default :: default ( )
@@ -321,7 +321,7 @@ fn test_cmc_notify_create_with_settings() {
321321 specified_controllers. sort ( ) ;
322322 let canister = notify_create_canister (
323323 & state_machine,
324- Some ( CanisterSettingsArgs {
324+ Some ( CanisterSettings {
325325 controllers : Some ( specified_controllers. iter ( ) . map ( |p| p. 0 ) . collect ( ) ) ,
326326 ..Default :: default ( )
327327 } ) ,
@@ -338,7 +338,7 @@ fn test_cmc_notify_create_with_settings() {
338338 //specify no controller
339339 let canister = notify_create_canister (
340340 & state_machine,
341- Some ( CanisterSettingsArgs {
341+ Some ( CanisterSettings {
342342 controllers : Some ( vec ! [ ] ) ,
343343 ..Default :: default ( )
344344 } ) ,
@@ -349,7 +349,7 @@ fn test_cmc_notify_create_with_settings() {
349349 //specify compute allocation
350350 let canister = notify_create_canister (
351351 & state_machine,
352- Some ( dbg ! ( CanisterSettingsArgs {
352+ Some ( dbg ! ( CanisterSettings {
353353 compute_allocation: Some ( Nat :: from( 7u64 ) ) ,
354354 ..Default :: default ( )
355355 } ) ) ,
@@ -364,7 +364,7 @@ fn test_cmc_notify_create_with_settings() {
364364 //specify freezing threshold
365365 let canister = notify_create_canister (
366366 & state_machine,
367- Some ( CanisterSettingsArgs {
367+ Some ( CanisterSettings {
368368 freezing_threshold : Some ( Nat :: from ( 7u64 ) ) ,
369369 ..Default :: default ( )
370370 } ) ,
@@ -379,7 +379,7 @@ fn test_cmc_notify_create_with_settings() {
379379 //specify memory allocation
380380 let canister = notify_create_canister (
381381 & state_machine,
382- Some ( CanisterSettingsArgs {
382+ Some ( CanisterSettings {
383383 memory_allocation : Some ( Nat :: from ( 7u64 ) ) ,
384384 ..Default :: default ( )
385385 } ) ,
@@ -398,7 +398,7 @@ fn test_cmc_notify_create_with_settings() {
398398 } ] ;
399399 let canister = notify_create_canister (
400400 & state_machine,
401- Some ( CanisterSettingsArgs {
401+ Some ( CanisterSettings {
402402 environment_variables : Some (
403403 env_vars
404404 . iter ( )
@@ -558,7 +558,7 @@ fn test_cmc_cycles_create_with_settings() {
558558 let canister = cmc_create_canister_with_cycles (
559559 & state_machine,
560560 universal_canister,
561- Some ( CanisterSettingsArgs {
561+ Some ( CanisterSettings {
562562 controllers : Some ( vec ! [ TEST_USER1_PRINCIPAL . 0 ] ) ,
563563 ..Default :: default ( )
564564 } ) ,
@@ -583,7 +583,7 @@ fn test_cmc_cycles_create_with_settings() {
583583 let canister = cmc_create_canister_with_cycles (
584584 & state_machine,
585585 universal_canister,
586- Some ( CanisterSettingsArgs {
586+ Some ( CanisterSettings {
587587 controllers : Some ( specified_controllers. iter ( ) . map ( |p| p. 0 ) . collect ( ) ) ,
588588 ..Default :: default ( )
589589 } ) ,
@@ -604,7 +604,7 @@ fn test_cmc_cycles_create_with_settings() {
604604 let canister = cmc_create_canister_with_cycles (
605605 & state_machine,
606606 universal_canister,
607- Some ( CanisterSettingsArgs {
607+ Some ( CanisterSettings {
608608 controllers : Some ( vec ! [ ] ) ,
609609 ..Default :: default ( )
610610 } ) ,
@@ -619,7 +619,7 @@ fn test_cmc_cycles_create_with_settings() {
619619 let canister = cmc_create_canister_with_cycles (
620620 & state_machine,
621621 universal_canister,
622- Some ( CanisterSettingsArgs {
622+ Some ( CanisterSettings {
623623 controllers : Some ( vec ! [ TEST_USER1_PRINCIPAL . 0 ] ) ,
624624 compute_allocation : Some ( Nat :: from ( 7u64 ) ) ,
625625 ..Default :: default ( )
@@ -639,7 +639,7 @@ fn test_cmc_cycles_create_with_settings() {
639639 let canister = cmc_create_canister_with_cycles (
640640 & state_machine,
641641 universal_canister,
642- Some ( CanisterSettingsArgs {
642+ Some ( CanisterSettings {
643643 controllers : Some ( vec ! [ TEST_USER1_PRINCIPAL . 0 ] ) ,
644644 freezing_threshold : Some ( Nat :: from ( 7u64 ) ) ,
645645 ..Default :: default ( )
@@ -659,7 +659,7 @@ fn test_cmc_cycles_create_with_settings() {
659659 let canister = cmc_create_canister_with_cycles (
660660 & state_machine,
661661 universal_canister,
662- Some ( CanisterSettingsArgs {
662+ Some ( CanisterSettings {
663663 controllers : Some ( vec ! [ TEST_USER1_PRINCIPAL . 0 ] ) ,
664664 memory_allocation : Some ( Nat :: from ( 7u64 ) ) ,
665665 ..Default :: default ( )
@@ -683,7 +683,7 @@ fn test_cmc_cycles_create_with_settings() {
683683 let canister = cmc_create_canister_with_cycles (
684684 & state_machine,
685685 universal_canister,
686- Some ( CanisterSettingsArgs {
686+ Some ( CanisterSettings {
687687 controllers : Some ( vec ! [ TEST_USER1_PRINCIPAL . 0 ] ) ,
688688 environment_variables : Some (
689689 env_vars
@@ -1007,7 +1007,7 @@ fn send_transfer(env: &StateMachine, arg: &TransferArgs) -> Result<BlockIndex, T
10071007/// subaccount of the CMC, which then tries to create a canister with the provided settings.
10081008fn notify_create_canister (
10091009 state_machine : & StateMachine ,
1010- settings : Option < CanisterSettingsArgs > ,
1010+ settings : Option < CanisterSettings > ,
10111011) -> CanisterId {
10121012 let transfer_args = TransferArgs {
10131013 memo : MEMO_CREATE_CANISTER ,
@@ -1110,7 +1110,7 @@ fn cycles_ledger_balance_of(state_machine: &StateMachine, account: Account) -> u
11101110fn cmc_create_canister_with_cycles (
11111111 state_machine : & StateMachine ,
11121112 universal_canister : CanisterId ,
1113- settings : Option < CanisterSettingsArgs > ,
1113+ settings : Option < CanisterSettings > ,
11141114 subnet_type : Option < String > ,
11151115 cycles : u128 ,
11161116) -> Result < CanisterId , CreateCanisterError > {
0 commit comments