Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 701 Bytes

File metadata and controls

9 lines (5 loc) · 701 Bytes

Realloc

Resize a Solana account after it has been created - grow or shrink the data it can hold.

A note on realloc vs resize

The runtime method AccountInfo::realloc has been deprecated in favor of AccountInfo::resize (anchor#4526). New code should call AccountInfo::resize.

The Anchor account-constraint macros (#[account(realloc = ..., realloc::payer = ..., realloc::zero = ...)]) are not yet renamed and still use the realloc spelling. That is the correct form to use today; track the issue above for any future change.