(ctx:Context<InitEntity>, entity_id: u64, components: BTreeMap<Pubkey, SerializedComponent>)
| 96 | } |
| 97 | |
| 98 | pub fn init_entity(ctx:Context<InitEntity>, entity_id: u64, components: BTreeMap<Pubkey, SerializedComponent>) -> Result<()> { |
| 99 | let accounts = core_ds::cpi::accounts::InitEntity { |
| 100 | entity: ctx.accounts.entity.to_account_info(), |
| 101 | payer: ctx.accounts.payer.to_account_info(), |
| 102 | system_program: ctx.accounts.system_program.to_account_info(), |
| 103 | registry_instance: ctx.accounts.registry_instance.to_account_info(), |
| 104 | registry_signer: ctx.accounts.registry_config.to_account_info(), |
| 105 | }; |
| 106 | let registry_signer_seeds:&[&[u8]] = &[ |
| 107 | b"registry_signer", |
| 108 | &[*ctx.bumps.get("registry_config").unwrap()] |
| 109 | ]; |
| 110 | let signer_seeds = &[registry_signer_seeds]; |
| 111 | |
| 112 | core_ds::cpi::init_entity(CpiContext::new_with_signer( |
| 113 | ctx.accounts.core_ds.to_account_info(), |
| 114 | accounts, |
| 115 | signer_seeds |
| 116 | ), entity_id, components)?; |
| 117 | |
| 118 | Ok(()) |
| 119 | } |
| 120 | |
| 121 | pub fn mint_arcnft(ctx:Context<MintARCNFT>) -> Result<()> { |
| 122 | let accounts = core_ds::cpi::accounts::MintARCNFT { |
nothing calls this directly
no outgoing calls
no test coverage detected