This method returns a SolanaInstruction. Add it to a transaction and use the
Transaction Service to execute it on-chain. See Instructions &
Transactions.
Allocate
Allocates a specific number of bytes of data space to an existing account. The account must be a signer. Use this before assigning the account to a program that requires specific data storage.Request
The account to allocate space for. Must be a signer.
Number of bytes to allocate. Programs typically have fixed data layout sizes.
Response
The allocate instruction. Add this to a transaction and submit it via the Transaction Service.
Code Examples
AllocateWithSeed
Allocates space for a seed-derived account. The base key must sign the transaction — not the derived account address.Request
The seed-derived account address to allocate space for.
Base public key used to derive
account. Must be a signer.Seed string used to derive
account.Number of bytes to allocate.
Response
The allocate_with_seed instruction. Add this to a transaction and submit it via the Transaction Service.