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

Function update

cli/src/processor/pool.rs:37–54  ·  view source on GitHub ↗
(client: &Client, id: u64, size: usize)

Source from the content-addressed store, hash-verified

35}
36
37pub fn update(client: &Client, id: u64, size: usize) -> Result<(), CliError> {
38 let pool_pubkey = Pool::pubkey(id);
39 let settings = PoolSettings { size };
40 let ix = Instruction {
41 program_id: clockwork_network_program::ID,
42 accounts: clockwork_network_program::accounts::PoolUpdate {
43 admin: client.payer_pubkey(),
44 config: Config::pubkey(),
45 payer: client.payer_pubkey(),
46 pool: pool_pubkey,
47 system_program: system_program::ID,
48 }.to_account_metas(Some(false)),
49 data: clockwork_network_program::instruction::PoolUpdate { settings }.data(),
50 };
51 client.send_and_confirm(&[ix], &[client.payer()]).unwrap();
52 get(client, id)?;
53 Ok(())
54}

Callers 1

processFunction · 0.70

Calls 4

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

Tested by

no test coverage detected