bolt icon indicating copy to clipboard operation
bolt copied to clipboard

[Bug] Unable to apply system which operates on multiple entities using the ts SDK

Open GabrielePicco opened this issue 9 months ago • 0 comments

Describe the bug Unable to apply system which operates on multiple entities using the ts SDK

To Reproduce

  • The current ApplySystem function accept only one entity and derive the components PDAs from the programIds
  • Components could be owned by different entities (when the system operates on > 1 entity)
  • The SDK should change to either accept multiple entities, or directly the list of components PDAs
const applySystem = await ApplySystem({
      authority: provider.wallet.publicKey,
      system: updateFooSystem.programId,
      entities: [
          {
              entity: fooEntityPda,
              components: [fooComponentProgram.programId],
          },
          {
              entity: playerEntityPda,
              components: [playerDataComponentProgram.programId],
          }
      ],

  })

GabrielePicco avatar Apr 30 '24 07:04 GabrielePicco