Browse Source

Update git dependency

febo 10 months ago
parent
commit
c2f1c0e78d
2 changed files with 8 additions and 4 deletions
  1. 1 1
      p-token/Cargo.toml
  2. 7 3
      p-token/src/entrypoint.rs

+ 1 - 1
p-token/Cargo.toml

@@ -11,7 +11,7 @@ publish = false
 program-id = "PToken1111111111111111111111111111111111111"
 
 [lib]
-crate-type = ["cdylib", "lib"]
+crate-type = ["cdylib"]
 
 [features]
 logging = []

+ 7 - 3
p-token/src/entrypoint.rs

@@ -1,11 +1,15 @@
 use pinocchio::{
-    account_info::AccountInfo, heapless_entrypoint, program_error::ProgramError, pubkey::Pubkey,
-    ProgramResult,
+    account_info::AccountInfo, default_panic_handler, no_allocator, program_entrypoint,
+    program_error::ProgramError, pubkey::Pubkey, ProgramResult,
 };
 
 use crate::processor::*;
 
-heapless_entrypoint!(process_instruction);
+program_entrypoint!(process_instruction);
+// Do not allocate memory.
+no_allocator!();
+// Use the default panic handler.
+default_panic_handler!();
 
 /// Process an instruction.
 ///