-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor queue kickoff out into its own instruction
- Loading branch information
Nick Garfield
committed
Oct 13, 2022
1 parent
eaf3339
commit 9da51af
Showing
14 changed files
with
265 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
mod queue_crank; | ||
mod queue_create; | ||
mod queue_delete; | ||
mod queue_kickoff; | ||
mod queue_update; | ||
|
||
pub use queue_crank::*; | ||
pub use queue_create::*; | ||
pub use queue_delete::*; | ||
pub use queue_kickoff::*; | ||
pub use queue_update::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use anchor_lang::{ | ||
solana_program::{ | ||
instruction::{AccountMeta, Instruction}, | ||
pubkey::Pubkey, | ||
}, | ||
InstructionData, | ||
}; | ||
|
||
pub fn queue_kickoff( | ||
data_hash: Option<u64>, | ||
queue: Pubkey, | ||
signatory: Pubkey, | ||
worker: Pubkey, | ||
) -> Instruction { | ||
Instruction { | ||
program_id: clockwork_queue_program::ID, | ||
accounts: vec![ | ||
AccountMeta::new(queue, false), | ||
AccountMeta::new(signatory, true), | ||
AccountMeta::new_readonly(worker, false), | ||
], | ||
data: clockwork_queue_program::instruction::QueueKickoff { data_hash }.data(), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.