jpcaulfi há 3 anos atrás
pai
commit
db239bf5cb

+ 0 - 3
basics/cross-program-invocation/native/cicd.sh

@@ -9,6 +9,3 @@ echo "Hand:"
 solana program deploy ./target/so/hand.so | grep "Program Id:"
 echo "Lever:"
 solana program deploy ./target/so/lever.so | grep "Program Id:"
-
-# D2E39tDWxnndmW3QvYVzmm2gU2kvr9Zv2ywBLAmq8Fw3
-# 9qprjFZKZbBeRGNT3vgPW5xpPFqXjNxKZWybUy7mYNBw

+ 2 - 2
basics/cross-program-invocation/native/programs/hand/src/lib.rs

@@ -29,8 +29,8 @@ fn pull_lever(
 
     let ix = Instruction::new_with_borsh(
         lever_program.key.clone(),                          // Our lever program's ID
-        &set_power_status_instruction,                      // Passing same instructions through
-        vec![AccountMeta::new(power.key.clone(), false)],   // Passing same accounts through
+        &set_power_status_instruction,                      // Passing instructions through
+        vec![AccountMeta::new(power.key.clone(), false)],   // Just the required account for the other program
     );
 
     invoke(&ix, &[power.clone()])