pub struct Precompile {
pub program_id: Pubkey,
pub feature: Option<Pubkey>,
pub verify_fn: Verify,
}👎Deprecated since 2.2.2: Use agave-precompiles instead
Expand description
Information on a precompiled program
Fields§
§program_id: Pubkey👎Deprecated since 2.2.2: Use agave-precompiles instead
Program id
feature: Option<Pubkey>👎Deprecated since 2.2.2: Use agave-precompiles instead
Feature to enable on, None indicates always enabled
verify_fn: Verify👎Deprecated since 2.2.2: Use agave-precompiles instead
Verification function
Implementations§
Source§impl Precompile
impl Precompile
Sourcepub fn new(
program_id: Pubkey,
feature: Option<Pubkey>,
verify_fn: Verify,
) -> Self
👎Deprecated since 2.2.2: Use agave-precompiles instead
pub fn new( program_id: Pubkey, feature: Option<Pubkey>, verify_fn: Verify, ) -> Self
Creates a new Precompile
Sourcepub fn check_id<F>(&self, program_id: &Pubkey, is_enabled: F) -> bool
👎Deprecated since 2.2.2: Use agave-precompiles instead
pub fn check_id<F>(&self, program_id: &Pubkey, is_enabled: F) -> bool
Check if a program id is this precompiled program
Sourcepub fn verify(
&self,
data: &[u8],
instruction_datas: &[&[u8]],
feature_set: &FeatureSet,
) -> Result<(), PrecompileError>
👎Deprecated since 2.2.2: Use agave-precompiles instead
pub fn verify( &self, data: &[u8], instruction_datas: &[&[u8]], feature_set: &FeatureSet, ) -> Result<(), PrecompileError>
Verify this precompiled program
Auto Trait Implementations§
impl Freeze for Precompile
impl RefUnwindSafe for Precompile
impl Send for Precompile
impl Sync for Precompile
impl Unpin for Precompile
impl UnwindSafe for Precompile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more