MCPcopy Create free account
hub / github.com/clockwork-xyz/clockwork / pause

Function pause

cli/src/processor/thread.rs:74–87  ·  view source on GitHub ↗
(client: &Client, id: String)

Source from the content-addressed store, hash-verified

72}
73
74pub fn pause(client: &Client, id: String) -> Result<(), CliError> {
75 let thread_pubkey = Thread::pubkey(client.payer_pubkey(), id.into_bytes());
76 let ix = Instruction {
77 program_id: clockwork_thread_program::ID,
78 accounts: clockwork_thread_program::accounts::ThreadPause {
79 authority: client.payer_pubkey(),
80 thread: thread_pubkey,
81 }.to_account_metas(Some(false)),
82 data: clockwork_thread_program::instruction::ThreadPause {}.data(),
83 };
84 client.send_and_confirm(&[ix], &[client.payer()]).unwrap();
85 get(client, thread_pubkey)?;
86 Ok(())
87}
88
89pub fn resume(client: &Client, id: String) -> Result<(), CliError> {
90 let thread_pubkey = Thread::pubkey(client.payer_pubkey(), id.into_bytes());

Callers 1

processFunction · 0.85

Calls 4

payer_pubkeyMethod · 0.80
send_and_confirmMethod · 0.80
payerMethod · 0.80
getFunction · 0.70

Tested by

no test coverage detected