diff --git a/interface/README.md b/interface/README.md index c3444c69..5300eed6 100644 --- a/interface/README.md +++ b/interface/README.md @@ -22,4 +22,4 @@ This will add the `spl-token-interface` dependency to your `Cargo.toml` file. ## Documentation -Read more about the SPL Token program on the crate [documentation](https://docs.rs/spl-token-interface). \ No newline at end of file +Read more about the SPL Token interface on the crate [documentation](https://docs.rs/spl-token-interface). diff --git a/p-token/tests/amount_to_ui_amount.rs b/p-token/tests/amount_to_ui_amount.rs index 402be081..b9d70799 100644 --- a/p-token/tests/amount_to_ui_amount.rs +++ b/p-token/tests/amount_to_ui_amount.rs @@ -9,7 +9,7 @@ use solana_sdk::{pubkey::Pubkey, signature::Signer, transaction::Transaction}; #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn amount_to_ui_amount(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/approve.rs b/p-token/tests/approve.rs index f3b28e2a..b47baa71 100644 --- a/p-token/tests/approve.rs +++ b/p-token/tests/approve.rs @@ -14,7 +14,7 @@ use solana_sdk::{ #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn approve(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/approve_checked.rs b/p-token/tests/approve_checked.rs index e34fa7a1..43c48378 100644 --- a/p-token/tests/approve_checked.rs +++ b/p-token/tests/approve_checked.rs @@ -14,7 +14,7 @@ use solana_sdk::{ #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn approve_checked(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/burn.rs b/p-token/tests/burn.rs index 6e5e2e5c..df6645d7 100644 --- a/p-token/tests/burn.rs +++ b/p-token/tests/burn.rs @@ -14,7 +14,7 @@ use solana_sdk::{ #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn burn(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/burn_checked.rs b/p-token/tests/burn_checked.rs index a0082621..c2256fd9 100644 --- a/p-token/tests/burn_checked.rs +++ b/p-token/tests/burn_checked.rs @@ -14,7 +14,7 @@ use solana_sdk::{ #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn burn_checked(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/close_account.rs b/p-token/tests/close_account.rs index 8a734324..d4ece1c5 100644 --- a/p-token/tests/close_account.rs +++ b/p-token/tests/close_account.rs @@ -13,7 +13,7 @@ use solana_sdk::{ #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn close_account(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/freeze_account.rs b/p-token/tests/freeze_account.rs index d5fb3afc..2f34b18b 100644 --- a/p-token/tests/freeze_account.rs +++ b/p-token/tests/freeze_account.rs @@ -15,7 +15,7 @@ use spl_token::state::AccountState; #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn freeze_account(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/initialize_account.rs b/p-token/tests/initialize_account.rs index 4c491bb5..17a2c11c 100644 --- a/p-token/tests/initialize_account.rs +++ b/p-token/tests/initialize_account.rs @@ -15,7 +15,7 @@ use solana_sdk::{ #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn initialize_account(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/initialize_account2.rs b/p-token/tests/initialize_account2.rs index 9f250e4e..2ec08051 100644 --- a/p-token/tests/initialize_account2.rs +++ b/p-token/tests/initialize_account2.rs @@ -15,7 +15,7 @@ use solana_sdk::{ #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn initialize_account2(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/initialize_account3.rs b/p-token/tests/initialize_account3.rs index 7fee802b..c418fc04 100644 --- a/p-token/tests/initialize_account3.rs +++ b/p-token/tests/initialize_account3.rs @@ -15,7 +15,7 @@ use solana_sdk::{ #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn initialize_account3(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/initialize_mint.rs b/p-token/tests/initialize_mint.rs index e94b57fc..94406bd4 100644 --- a/p-token/tests/initialize_mint.rs +++ b/p-token/tests/initialize_mint.rs @@ -19,7 +19,7 @@ use spl_token_interface::state::mint::Mint; #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn initialize_mint(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/initialize_mint2.rs b/p-token/tests/initialize_mint2.rs index b0d7fa10..04ce4d4c 100644 --- a/p-token/tests/initialize_mint2.rs +++ b/p-token/tests/initialize_mint2.rs @@ -19,7 +19,7 @@ use spl_token_interface::state::mint::Mint; #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn initialize_mint2(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/initialize_multisig.rs b/p-token/tests/initialize_multisig.rs index 5cf9e344..13a518d7 100644 --- a/p-token/tests/initialize_multisig.rs +++ b/p-token/tests/initialize_multisig.rs @@ -16,7 +16,7 @@ use spl_token::state::Multisig; #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn initialize_multisig(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/initialize_multisig2.rs b/p-token/tests/initialize_multisig2.rs index 443a988f..40cf0849 100644 --- a/p-token/tests/initialize_multisig2.rs +++ b/p-token/tests/initialize_multisig2.rs @@ -16,7 +16,7 @@ use spl_token::state::Multisig; #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn initialize_multisig2(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/mint_to.rs b/p-token/tests/mint_to.rs index 9cafae37..75626cbd 100644 --- a/p-token/tests/mint_to.rs +++ b/p-token/tests/mint_to.rs @@ -14,7 +14,7 @@ use solana_sdk::{ #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn mint_to(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/mint_to_checked.rs b/p-token/tests/mint_to_checked.rs index 1d0cb72d..56fab40c 100644 --- a/p-token/tests/mint_to_checked.rs +++ b/p-token/tests/mint_to_checked.rs @@ -14,7 +14,7 @@ use solana_sdk::{ #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn mint_to_checked(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/revoke.rs b/p-token/tests/revoke.rs index 689c48cc..9ba9c7f6 100644 --- a/p-token/tests/revoke.rs +++ b/p-token/tests/revoke.rs @@ -14,7 +14,7 @@ use solana_sdk::{ #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn revoke(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/set_authority.rs b/p-token/tests/set_authority.rs index 977d22e6..8d3f422b 100644 --- a/p-token/tests/set_authority.rs +++ b/p-token/tests/set_authority.rs @@ -16,7 +16,7 @@ use spl_token::instruction::AuthorityType; #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn set_authority(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/thaw_account.rs b/p-token/tests/thaw_account.rs index 6fe57623..4d7f9574 100644 --- a/p-token/tests/thaw_account.rs +++ b/p-token/tests/thaw_account.rs @@ -15,7 +15,7 @@ use spl_token::state::AccountState; #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn thaw_account(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/transfer.rs b/p-token/tests/transfer.rs index 16491c24..357ccb6a 100644 --- a/p-token/tests/transfer.rs +++ b/p-token/tests/transfer.rs @@ -14,7 +14,7 @@ use solana_sdk::{ #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn transfer(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/transfer_checked.rs b/p-token/tests/transfer_checked.rs index d03c9f56..080bc77e 100644 --- a/p-token/tests/transfer_checked.rs +++ b/p-token/tests/transfer_checked.rs @@ -14,7 +14,7 @@ use solana_sdk::{ #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn transfer_checked(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/p-token/tests/ui_amount_to_amount.rs b/p-token/tests/ui_amount_to_amount.rs index 3b1a6db2..37a8788d 100644 --- a/p-token/tests/ui_amount_to_amount.rs +++ b/p-token/tests/ui_amount_to_amount.rs @@ -9,7 +9,7 @@ use solana_sdk::{pubkey::Pubkey, signature::Signer, transaction::Transaction}; #[test_case::test_case(TOKEN_PROGRAM_ID ; "p-token")] #[tokio::test] async fn ui_amount_to_amount(token_program: Pubkey) { - let mut context = ProgramTest::new("token_program", TOKEN_PROGRAM_ID, None) + let mut context = ProgramTest::new("pinocchio_token_program", TOKEN_PROGRAM_ID, None) .start_with_context() .await; diff --git a/package.json b/package.json index 07c04bfd..77a55265 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,9 @@ "rust:spellcheck": "cargo spellcheck --code 1", "rust:audit": "zx ./scripts/rust/audit.mjs", "rust:publish": "zx ./scripts/rust/publish.mjs", - "rust:semver": "cargo semver-checks" + "rust:semver": "cargo semver-checks", + "p-token:build": "zx ./scripts/rust/build-sbf.mjs p-token", + "p-token:test": "zx ./scripts/rust/test-sbf.mjs p-token" }, "devDependencies": { "@codama/renderers-js": "^1.2.7",