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

Function resume

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

Source from the content-addressed store, hash-verified

87}
88
89pub fn resume(client: &Client, id: String) -> Result<(), CliError> {
90 let thread_pubkey = Thread::pubkey(client.payer_pubkey(), id.into_bytes());
91 let ix = Instruction {
92 program_id: clockwork_thread_program::ID,
93 accounts: clockwork_thread_program::accounts::ThreadResume {
94 authority: client.payer_pubkey(),
95 thread: thread_pubkey
96 }.to_account_metas(Some(false)),
97 data: clockwork_thread_program::instruction::ThreadResume {}.data(),
98 };
99 client.send_and_confirm(&[ix], &[client.payer()]).unwrap();
100 get(client, thread_pubkey)?;
101 Ok(())
102}
103
104pub fn reset(client: &Client, id: String) -> Result<(), CliError> {
105 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