@@ -10,7 +10,10 @@ use light_program_test::{utils::assert::assert_rpc_error, LightProgramTest, Prog
1010use light_test_utils:: {
1111 assert_mint_action:: assert_mint_action, mint_assert:: assert_compressed_mint_account, Rpc ,
1212} ;
13- use light_token_client:: actions:: create_mint;
13+ use light_token_client:: {
14+ actions:: create_mint,
15+ instructions:: mint_action:: { MintActionType , MintToRecipient } ,
16+ } ;
1417use serial_test:: serial;
1518use solana_sdk:: {
1619 instruction:: AccountMeta , signature:: Keypair , signer:: Signer , transaction:: Transaction ,
@@ -234,17 +237,13 @@ async fn functional_and_failing_tests() {
234237 & mut rpc,
235238 compressed_mint_address,
236239 pre_compressed_mint,
237- vec ! [
238- light_compressed_token_sdk:: instructions:: mint_action:: MintActionType :: MintTo {
239- recipients: vec![
240- light_compressed_token_sdk:: instructions:: mint_action:: MintToRecipient {
241- recipient,
242- amount: 1000u64 ,
243- } ,
244- ] ,
245- token_account_version: light_ctoken_types:: state:: TokenDataVersion :: V2 as u8 ,
246- } ,
247- ] ,
240+ vec ! [ MintActionType :: MintTo {
241+ recipients: vec![ MintToRecipient {
242+ recipient,
243+ amount: 1000u64 ,
244+ } ] ,
245+ token_account_version: light_ctoken_types:: state:: TokenDataVersion :: V2 as u8 ,
246+ } ] ,
248247 )
249248 . await ;
250249 }
@@ -312,7 +311,7 @@ async fn functional_and_failing_tests() {
312311 & mut rpc,
313312 compressed_mint_address,
314313 pre_compressed_mint,
315- vec ! [ light_compressed_token_sdk :: instructions :: mint_action :: MintActionType :: UpdateMintAuthority {
314+ vec ! [ MintActionType :: UpdateMintAuthority {
316315 new_authority: Some ( new_mint_authority. pubkey( ) ) ,
317316 } ] ,
318317 )
@@ -385,7 +384,7 @@ async fn functional_and_failing_tests() {
385384 & mut rpc,
386385 compressed_mint_address,
387386 pre_compressed_mint,
388- vec ! [ light_compressed_token_sdk :: instructions :: mint_action :: MintActionType :: UpdateFreezeAuthority {
387+ vec ! [ MintActionType :: UpdateFreezeAuthority {
389388 new_authority: Some ( new_freeze_authority. pubkey( ) ) ,
390389 } ] ,
391390 )
@@ -498,7 +497,7 @@ async fn functional_and_failing_tests() {
498497 & mut rpc,
499498 compressed_mint_address,
500499 pre_compressed_mint,
501- vec ! [ light_compressed_token_sdk :: instructions :: mint_action :: MintActionType :: MintToCToken {
500+ vec ! [ MintActionType :: MintToCToken {
502501 account: recipient_ata,
503502 amount: 2000u64 ,
504503 } ] ,
@@ -515,7 +514,7 @@ async fn functional_and_failing_tests() {
515514 mint_seed : mint_seed. pubkey ( ) ,
516515 authority : invalid_metadata_authority. pubkey ( ) , // Invalid authority
517516 payer : payer. pubkey ( ) ,
518- actions : vec ! [ light_compressed_token_sdk :: instructions :: mint_action :: MintActionType :: UpdateMetadataField {
517+ actions : vec ! [ MintActionType :: UpdateMetadataField {
519518 extension_index: 0 ,
520519 field_type: 0 , // 0 = Name field
521520 key: vec![ ] , // Empty for Name field
@@ -551,7 +550,7 @@ async fn functional_and_failing_tests() {
551550 )
552551 . unwrap ( ) ;
553552
554- let actions = vec ! [ light_compressed_token_sdk :: instructions :: mint_action :: MintActionType :: UpdateMetadataField {
553+ let actions = vec ! [ MintActionType :: UpdateMetadataField {
555554 extension_index: 0 ,
556555 field_type: 0 , // 0 = Name field
557556 key: vec![ ] , // Empty for Name field
@@ -598,7 +597,7 @@ async fn functional_and_failing_tests() {
598597 mint_seed : mint_seed. pubkey ( ) ,
599598 authority : invalid_metadata_authority. pubkey ( ) , // Invalid authority
600599 payer : payer. pubkey ( ) ,
601- actions : vec ! [ light_compressed_token_sdk :: instructions :: mint_action :: MintActionType :: UpdateMetadataAuthority {
600+ actions : vec ! [ MintActionType :: UpdateMetadataAuthority {
602601 extension_index: 0 ,
603602 new_authority: Keypair :: new( ) . pubkey( ) ,
604603 } ] ,
@@ -632,7 +631,7 @@ async fn functional_and_failing_tests() {
632631 )
633632 . unwrap ( ) ;
634633
635- let actions = vec ! [ light_compressed_token_sdk :: instructions :: mint_action :: MintActionType :: UpdateMetadataAuthority {
634+ let actions = vec ! [ MintActionType :: UpdateMetadataAuthority {
636635 extension_index: 0 ,
637636 new_authority: new_metadata_authority. pubkey( ) ,
638637 } ] ;
@@ -677,10 +676,10 @@ async fn functional_and_failing_tests() {
677676 mint_seed : mint_seed. pubkey ( ) ,
678677 authority : invalid_metadata_authority. pubkey ( ) , // Invalid authority
679678 payer : payer. pubkey ( ) ,
680- actions : vec ! [ light_compressed_token_sdk :: instructions :: mint_action :: MintActionType :: RemoveMetadataKey {
679+ actions : vec ! [ MintActionType :: RemoveMetadataKey {
681680 extension_index: 0 ,
682- key: vec![ 1 , 2 , 3 , 4 ] , // The key we added in additional_metadata
683- idempotent: 0 , // 0 = false
681+ key: vec![ 1 , 2 , 3 , 4 ] , // The key we added in additional_metadata
682+ idempotent: 0 , // 0 = false
684683 } ] ,
685684 new_mint : None ,
686685 } ,
@@ -712,10 +711,10 @@ async fn functional_and_failing_tests() {
712711 )
713712 . unwrap ( ) ;
714713
715- let actions = vec ! [ light_compressed_token_sdk :: instructions :: mint_action :: MintActionType :: RemoveMetadataKey {
714+ let actions = vec ! [ MintActionType :: RemoveMetadataKey {
716715 extension_index: 0 ,
717- key: vec![ 1 , 2 , 3 , 4 ] , // The key we added in additional_metadata
718- idempotent: 0 , // 0 = false
716+ key: vec![ 1 , 2 , 3 , 4 ] , // The key we added in additional_metadata
717+ idempotent: 0 , // 0 = false
719718 } ] ;
720719
721720 let result = light_token_client:: actions:: mint_action (
@@ -765,10 +764,10 @@ async fn functional_and_failing_tests() {
765764 )
766765 . unwrap ( ) ;
767766
768- let actions = vec ! [ light_compressed_token_sdk :: instructions :: mint_action :: MintActionType :: RemoveMetadataKey {
767+ let actions = vec ! [ MintActionType :: RemoveMetadataKey {
769768 extension_index: 0 ,
770- key: vec![ 1 , 2 , 3 , 4 ] , // Same key, already removed
771- idempotent: 1 , // 1 = true (won't error if key doesn't exist)
769+ key: vec![ 1 , 2 , 3 , 4 ] , // Same key, already removed
770+ idempotent: 1 , // 1 = true (won't error if key doesn't exist)
772771 } ] ;
773772
774773 let result = light_token_client:: actions:: mint_action (
0 commit comments