Skip to main content

Module injection

Module injection 

Source
Expand description

Program overrides: swap a program’s binary for your own ELF in a running session.

modify_program_via_rpc reads the deploy slot, the existing upgrade authority and the rent-exempt minimum from the session’s RPC endpoint, then returns an account override to send in a Continue. It retries failed RPC calls up to 10 times with jittered exponential backoff, at most 10 s apart. build_program_injection builds the same override offline when you already know those values.

Enums§

ProgramModError
Error returned by modify_program_via_rpc.

Functions§

build_program_injection
Build a BPF Loader Upgradeable ProgramData account override from raw ELF bytes.
build_programdata_bytes
Serialize ELF bytes into a ProgramData account data blob.
modify_program_via_rpc
Build a program-data account override, fetching the deploy slot and rent exemption from the given RPC client.