Function cleanUpStarbaseCargoPods

  • Clean up Starbase cargo pods

    Checks if a PlayerProfile owns more than one cargo pod at the same Starbase and if so, removes the extra cargo pods by transferring all the cargo to the main cargo pod at a Starbase.

    Returns

    InstructionReturn[]

    Parameters

    • connection: Connection

      Solana connection

    • sageProgram: SageIDLProgram

      the SAGE program

    • cargoProgram: CargoIDLProgram

      the Cargo program

    • playerProfile: PublicKey

      the player profile

    • profileFaction: PublicKey

      the player profile's faction

    • cargoStatsDefinition: PublicKey

      the cargo stats definition

    • gameId: PublicKey

      the SAGE game id

    • gameState: PublicKey

      the game state account associated with gameId

    • key: AsyncSigner<unknown>

      the key authorized to run this instruction, should have at least ADD_REMOVE_CARGO SAGE permissions

    • keyIndex: number

      the index of the key in the playerProfile permissions

    Returns Promise<InstructionReturn[]>

Generated using TypeDoc