| 206 | #[derive(Accounts)] |
| 207 | #[instruction(entity_id:u64, components: BTreeMap<Pubkey, SerializedComponent>)] |
| 208 | pub struct InitEntity<'info> { |
| 209 | #[account(mut)] |
| 210 | pub payer: Signer<'info>, |
| 211 | pub system_program: Program<'info, System>, |
| 212 | |
| 213 | /// CHECK: Used to Sign Tx for the CPI |
| 214 | #[account( |
| 215 | seeds=[b"registry_signer"], |
| 216 | bump, |
| 217 | )] |
| 218 | pub registry_config: Account<'info, RegistryConfig>, |
| 219 | |
| 220 | /// CHECK: Initalized via CPI |
| 221 | #[account(mut)] |
| 222 | pub entity: AccountInfo<'info>, |
| 223 | |
| 224 | #[account( |
| 225 | constraint = registry_instance.registry.key() == program_id.key() && action_bundle_registration.instances.contains(®istry_instance.instance) |
| 226 | )] |
| 227 | pub registry_instance: Account<'info, RegistryInstance>, |
| 228 | pub action_bundle: Signer<'info>, |
| 229 | // All action_bundles can make any entities they want |
| 230 | #[account( |
| 231 | constraint = action_bundle_registration.action_bundle.key() == action_bundle.key() && check_sys_registry(&components.keys().cloned().collect(), &action_bundle_registration.components) |
| 232 | )] |
| 233 | pub action_bundle_registration: Account<'info, ActionBundleRegistration>, |
| 234 | pub core_ds: Program<'info, CoreDs>, |
| 235 | } |
| 236 | |
| 237 | #[derive(Accounts)] |
| 238 | pub struct MintARCNFT<'info> { |
nothing calls this directly
no outgoing calls
no test coverage detected