diff --git a/account-compression/programs/noop/src/lib.rs b/account-compression/programs/noop/src/lib.rs index 3b71da23ed7..700459f2ffb 100644 --- a/account-compression/programs/noop/src/lib.rs +++ b/account-compression/programs/noop/src/lib.rs @@ -9,7 +9,7 @@ declare_id!("noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV"); use solana_program::entrypoint; #[cfg(not(feature = "no-entrypoint"))] -entrypoint!(noop); +solana_program::entrypoint!(noop); pub fn noop( _program_id: &Pubkey, diff --git a/associated-token-account/program/src/entrypoint.rs b/associated-token-account/program/src/entrypoint.rs index 82641a41587..6c5cad7c474 100644 --- a/associated-token-account/program/src/entrypoint.rs +++ b/associated-token-account/program/src/entrypoint.rs @@ -6,7 +6,7 @@ use solana_program::{ account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/binary-option/program/src/entrypoint.rs b/binary-option/program/src/entrypoint.rs index 3baa990ba0d..aefb7598bcd 100644 --- a/binary-option/program/src/entrypoint.rs +++ b/binary-option/program/src/entrypoint.rs @@ -6,7 +6,7 @@ use solana_program::{ use crate::processor::Processor; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/binary-oracle-pair/program/src/entrypoint.rs b/binary-oracle-pair/program/src/entrypoint.rs index 381135f4a9b..07bb398f21f 100644 --- a/binary-oracle-pair/program/src/entrypoint.rs +++ b/binary-oracle-pair/program/src/entrypoint.rs @@ -8,7 +8,7 @@ use solana_program::{ program_error::PrintProgramError, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/examples/rust/cross-program-invocation/src/entrypoint.rs b/examples/rust/cross-program-invocation/src/entrypoint.rs index 82641a41587..490434730ef 100644 --- a/examples/rust/cross-program-invocation/src/entrypoint.rs +++ b/examples/rust/cross-program-invocation/src/entrypoint.rs @@ -3,10 +3,10 @@ #![cfg(not(feature = "no-entrypoint"))] use solana_program::{ - account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, + account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/examples/rust/custom-heap/src/entrypoint.rs b/examples/rust/custom-heap/src/entrypoint.rs index 8955e6f93bf..9f398acc114 100644 --- a/examples/rust/custom-heap/src/entrypoint.rs +++ b/examples/rust/custom-heap/src/entrypoint.rs @@ -4,7 +4,6 @@ use solana_program::{ account_info::AccountInfo, - entrypoint, entrypoint::{ProgramResult, HEAP_LENGTH, HEAP_START_ADDRESS}, pubkey::Pubkey, }; @@ -44,7 +43,7 @@ unsafe impl std::alloc::GlobalAlloc for BumpAllocator { #[global_allocator] static A: BumpAllocator = BumpAllocator; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/examples/rust/logging/src/entrypoint.rs b/examples/rust/logging/src/entrypoint.rs index 82641a41587..490434730ef 100644 --- a/examples/rust/logging/src/entrypoint.rs +++ b/examples/rust/logging/src/entrypoint.rs @@ -3,10 +3,10 @@ #![cfg(not(feature = "no-entrypoint"))] use solana_program::{ - account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, + account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/examples/rust/sysvar/src/entrypoint.rs b/examples/rust/sysvar/src/entrypoint.rs index 82641a41587..490434730ef 100644 --- a/examples/rust/sysvar/src/entrypoint.rs +++ b/examples/rust/sysvar/src/entrypoint.rs @@ -3,10 +3,10 @@ #![cfg(not(feature = "no-entrypoint"))] use solana_program::{ - account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, + account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/examples/rust/transfer-lamports/src/entrypoint.rs b/examples/rust/transfer-lamports/src/entrypoint.rs index 82641a41587..490434730ef 100644 --- a/examples/rust/transfer-lamports/src/entrypoint.rs +++ b/examples/rust/transfer-lamports/src/entrypoint.rs @@ -3,10 +3,10 @@ #![cfg(not(feature = "no-entrypoint"))] use solana_program::{ - account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, + account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/examples/rust/transfer-tokens/src/entrypoint.rs b/examples/rust/transfer-tokens/src/entrypoint.rs index 82641a41587..490434730ef 100644 --- a/examples/rust/transfer-tokens/src/entrypoint.rs +++ b/examples/rust/transfer-tokens/src/entrypoint.rs @@ -3,10 +3,10 @@ #![cfg(not(feature = "no-entrypoint"))] use solana_program::{ - account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, + account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/feature-gate/program/src/entrypoint.rs b/feature-gate/program/src/entrypoint.rs index c261a918a42..abafa1db907 100644 --- a/feature-gate/program/src/entrypoint.rs +++ b/feature-gate/program/src/entrypoint.rs @@ -3,11 +3,11 @@ use { crate::processor, solana_program::{ - account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, + account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey, }, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/feature-proposal/program/src/entrypoint.rs b/feature-proposal/program/src/entrypoint.rs index e2382fbe4e8..15ef8bf10da 100644 --- a/feature-proposal/program/src/entrypoint.rs +++ b/feature-proposal/program/src/entrypoint.rs @@ -6,7 +6,7 @@ use solana_program::{ account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/governance/addin-mock/program/src/entrypoint.rs b/governance/addin-mock/program/src/entrypoint.rs index af9e723dfd1..67caa35a590 100644 --- a/governance/addin-mock/program/src/entrypoint.rs +++ b/governance/addin-mock/program/src/entrypoint.rs @@ -7,7 +7,7 @@ use solana_program::{ program_error::PrintProgramError, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/governance/chat/program/src/entrypoint.rs b/governance/chat/program/src/entrypoint.rs index 92e0859237e..d3e29eec0db 100644 --- a/governance/chat/program/src/entrypoint.rs +++ b/governance/chat/program/src/entrypoint.rs @@ -7,7 +7,7 @@ use solana_program::{ program_error::PrintProgramError, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/governance/program/src/entrypoint.rs b/governance/program/src/entrypoint.rs index 26c75d468a8..c798d906fa1 100644 --- a/governance/program/src/entrypoint.rs +++ b/governance/program/src/entrypoint.rs @@ -7,7 +7,7 @@ use solana_program::{ program_error::PrintProgramError, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/instruction-padding/program/src/entrypoint.rs b/instruction-padding/program/src/entrypoint.rs index dd0b353e29b..475b4d67b1a 100644 --- a/instruction-padding/program/src/entrypoint.rs +++ b/instruction-padding/program/src/entrypoint.rs @@ -6,7 +6,7 @@ use solana_program::{ account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/libraries/math/src/entrypoint.rs b/libraries/math/src/entrypoint.rs index 82641a41587..6c5cad7c474 100644 --- a/libraries/math/src/entrypoint.rs +++ b/libraries/math/src/entrypoint.rs @@ -6,7 +6,7 @@ use solana_program::{ account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/memo/program/src/entrypoint.rs b/memo/program/src/entrypoint.rs index 82641a41587..6c5cad7c474 100644 --- a/memo/program/src/entrypoint.rs +++ b/memo/program/src/entrypoint.rs @@ -6,7 +6,7 @@ use solana_program::{ account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/name-service/program/src/entrypoint.rs b/name-service/program/src/entrypoint.rs index 1e70cd1ce17..d555a92f1eb 100644 --- a/name-service/program/src/entrypoint.rs +++ b/name-service/program/src/entrypoint.rs @@ -3,12 +3,12 @@ use { crate::processor::Processor, num_traits::FromPrimitive, solana_program::{ - account_info::AccountInfo, decode_error::DecodeError, entrypoint, + account_info::AccountInfo, decode_error::DecodeError, entrypoint::ProgramResult, msg, program_error::PrintProgramError, pubkey::Pubkey, }, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); pub fn process_instruction( program_id: &Pubkey, diff --git a/record/program/src/entrypoint.rs b/record/program/src/entrypoint.rs index e2382fbe4e8..15ef8bf10da 100644 --- a/record/program/src/entrypoint.rs +++ b/record/program/src/entrypoint.rs @@ -6,7 +6,7 @@ use solana_program::{ account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/token/rustfmt.toml b/rustfmt.toml similarity index 82% rename from token/rustfmt.toml rename to rustfmt.toml index 2b118804efd..1002741f257 100644 --- a/token/rustfmt.toml +++ b/rustfmt.toml @@ -3,8 +3,5 @@ edition = "2021" format_code_in_doc_comments = true format_strings = true group_imports = "One" -ignore = [ - "**/*/entrypoint.rs" -] imports_granularity = "One" wrap_comments = true diff --git a/single-pool/program/src/entrypoint.rs b/single-pool/program/src/entrypoint.rs index 518892fd1e0..bcdd0c0d5de 100644 --- a/single-pool/program/src/entrypoint.rs +++ b/single-pool/program/src/entrypoint.rs @@ -10,7 +10,7 @@ use { }, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/stake-pool/program/src/entrypoint.rs b/stake-pool/program/src/entrypoint.rs index a809d7f226e..f808c3c5eba 100644 --- a/stake-pool/program/src/entrypoint.rs +++ b/stake-pool/program/src/entrypoint.rs @@ -10,7 +10,7 @@ use { }, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/stateless-asks/program/src/entrypoint.rs b/stateless-asks/program/src/entrypoint.rs index 3baa990ba0d..aefb7598bcd 100644 --- a/stateless-asks/program/src/entrypoint.rs +++ b/stateless-asks/program/src/entrypoint.rs @@ -6,7 +6,7 @@ use solana_program::{ use crate::processor::Processor; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/token-collection/program/src/entrypoint.rs b/token-collection/program/src/entrypoint.rs index 762ec75255a..22b39dd2ce8 100644 --- a/token-collection/program/src/entrypoint.rs +++ b/token-collection/program/src/entrypoint.rs @@ -3,13 +3,13 @@ use { crate::processor, solana_program::{ - account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, + account_info::AccountInfo, entrypoint::ProgramResult, program_error::PrintProgramError, pubkey::Pubkey, }, spl_token_group_interface::error::TokenGroupError, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/token-group/example/src/entrypoint.rs b/token-group/example/src/entrypoint.rs index 762ec75255a..1ad716e9623 100644 --- a/token-group/example/src/entrypoint.rs +++ b/token-group/example/src/entrypoint.rs @@ -9,7 +9,7 @@ use { spl_token_group_interface::error::TokenGroupError, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/token-lending/flash_loan_receiver/src/entrypoint.rs b/token-lending/flash_loan_receiver/src/entrypoint.rs index 633133e1941..bf9a14c4283 100644 --- a/token-lending/flash_loan_receiver/src/entrypoint.rs +++ b/token-lending/flash_loan_receiver/src/entrypoint.rs @@ -1,8 +1,8 @@ use solana_program::{ - account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, + account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/token-lending/program/src/entrypoint.rs b/token-lending/program/src/entrypoint.rs index a1d68d8fa12..18c51568729 100644 --- a/token-lending/program/src/entrypoint.rs +++ b/token-lending/program/src/entrypoint.rs @@ -8,7 +8,7 @@ use solana_program::{ program_error::PrintProgramError, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/token-lending/program/tests/helpers/flash_loan_receiver.rs b/token-lending/program/tests/helpers/flash_loan_receiver.rs index 21d8c615ab9..47b00dd6235 100644 --- a/token-lending/program/tests/helpers/flash_loan_receiver.rs +++ b/token-lending/program/tests/helpers/flash_loan_receiver.rs @@ -1,5 +1,5 @@ use solana_program::{ - account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, msg, pubkey::Pubkey, + account_info::AccountInfo, entrypoint::ProgramResult, msg, pubkey::Pubkey, }; use crate::helpers::flash_loan_receiver::FlashLoanReceiverError::InvalidInstruction; @@ -29,7 +29,7 @@ pub enum FlashLoanReceiverInstruction { }, } -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); pub fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/token-metadata/example/src/entrypoint.rs b/token-metadata/example/src/entrypoint.rs index 9104ee3fe7c..63684e1fe6c 100644 --- a/token-metadata/example/src/entrypoint.rs +++ b/token-metadata/example/src/entrypoint.rs @@ -3,13 +3,13 @@ use { crate::processor, solana_program::{ - account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, + account_info::AccountInfo, entrypoint::ProgramResult, program_error::PrintProgramError, pubkey::Pubkey, }, spl_token_metadata_interface::error::TokenMetadataError, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/token-swap/program/src/entrypoint.rs b/token-swap/program/src/entrypoint.rs index b41aa6fc3f1..6dab0762a0c 100644 --- a/token-swap/program/src/entrypoint.rs +++ b/token-swap/program/src/entrypoint.rs @@ -6,7 +6,7 @@ use solana_program::{ program_error::PrintProgramError, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/token-upgrade/program/src/entrypoint.rs b/token-upgrade/program/src/entrypoint.rs index dd0b353e29b..475b4d67b1a 100644 --- a/token-upgrade/program/src/entrypoint.rs +++ b/token-upgrade/program/src/entrypoint.rs @@ -6,7 +6,7 @@ use solana_program::{ account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/token-wrap/program/src/entrypoint.rs b/token-wrap/program/src/entrypoint.rs index e2382fbe4e8..15ef8bf10da 100644 --- a/token-wrap/program/src/entrypoint.rs +++ b/token-wrap/program/src/entrypoint.rs @@ -6,7 +6,7 @@ use solana_program::{ account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/token/program-2022/src/entrypoint.rs b/token/program-2022/src/entrypoint.rs index 1e534c5eda9..6541ef6967e 100644 --- a/token/program-2022/src/entrypoint.rs +++ b/token/program-2022/src/entrypoint.rs @@ -8,7 +8,7 @@ use { }, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/token/program/src/entrypoint.rs b/token/program/src/entrypoint.rs index 53315751b9a..fba714d876b 100644 --- a/token/program/src/entrypoint.rs +++ b/token/program/src/entrypoint.rs @@ -6,7 +6,7 @@ use solana_program::{ program_error::PrintProgramError, pubkey::Pubkey, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/token/transfer-hook/example/src/entrypoint.rs b/token/transfer-hook/example/src/entrypoint.rs index 14a2bc5b11e..7039d249bfc 100644 --- a/token/transfer-hook/example/src/entrypoint.rs +++ b/token/transfer-hook/example/src/entrypoint.rs @@ -9,7 +9,7 @@ use { spl_transfer_hook_interface::error::TransferHookError, }; -entrypoint!(process_instruction); +solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo],