Commit 8627e64
Fix TokenMetadataInitialize realloc: pre-allocate full mint size
Create the mint account at the full required size (base + metadata TLV)
upfront so that TokenMetadataInitialize can write TLV data without
calling account_info.realloc(). Account data direct mapping prevents
realloc within nested CPIs when the account was created in the same
transaction, so pre-allocating avoids the InvalidRealloc error.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent c756622 commit 8627e64
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
99 | | - | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
0 commit comments