Skip to main content

modify_program_via_rpc

Function modify_program_via_rpc 

Source
pub async fn modify_program_via_rpc(
    rpc: &RpcClient,
    program_id: &str,
    elf: &[u8],
) -> Result<BTreeMap<Address, AccountData>, ProgramModError>
Expand description

Build a program-data account override, fetching the deploy slot and rent exemption from the given RPC client.

Pass any RPC client that can see the current cluster state, such as ManagedBacktestSession::rpc.

ยงErrors

ProgramModError::InvalidProgramId at once, or ProgramModError::Rpc once the retries run out.