cpi.rs 293 B

12345678910
  1. use crate::prelude::*;
  2. use crate::BoltError;
  3. #[inline(always)]
  4. pub fn checker<'info>(cpi_auth: &AccountInfo<'info>) -> Result<()> {
  5. if !cpi_auth.is_signer || cpi_auth.key != crate::world::World::cpi_auth_address() {
  6. return Err(BoltError::InvalidCaller.into());
  7. }
  8. Ok(())
  9. }