From 22753a94bd48edbe693bf8e2a724ae1de2418278 Mon Sep 17 00:00:00 2001 From: Iamsohungrynow <261225237+Iamsohungrynow@users.noreply.github.com> Date: Wed, 11 Nov 2026 13:36:10 +0800 Subject: [PATCH] Pass --format json in the README buffer examples --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5cee166..3d3af03 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,8 @@ Using a buffer account you can split the metadata update into the uploading of t - List all buffer accounts for an authority: `npx @solana-program/program-metadata@latest list-buffers [authority]` - Update a metadata account with a buffer: - `npx @solana-program/program-metadata@latest write --buffer ` + `npx @solana-program/program-metadata@latest write --buffer --format json` + A buffer does not record the format of its data, so without `--format` the metadata account is written with format `none` and `fetchAndParseMetadataContent` returns a string instead of the parsed content. ### Options @@ -143,19 +144,19 @@ npx @solana-program/program-metadata@latest set-buffer-authority --buffer --export --export-encoding base58 --close-buffer +npx @solana-program/program-metadata@latest write idl --buffer --format json --export --export-encoding base58 --close-buffer ``` Squads v3 only accepts legacy transactions. If your multisig is on Squads v3, add `--tx-version legacy` so the exported transaction is a legacy transaction instead of a version 0 transaction: ```bash -npx @solana-program/program-metadata@latest write idl --buffer --export --export-encoding base58 --close-buffer --tx-version legacy +npx @solana-program/program-metadata@latest write idl --buffer --format json --export --export-encoding base58 --close-buffer --tx-version legacy ``` If the metadata account needs to grow by more than 10KB — because it is being created with more than 10KB of data, or updated with more than 10KB of additional data — add `--single-extend-per-tx`. Multisigs execute exported transactions through a CPI and the Solana runtime caps the growth of an account at 10KB per top-level instruction. Therefore, an exported transaction cannot resize an account by more than 10KB. This option spreads the growth over several transactions accordingly, so expect more than one transaction to import: ```bash -npx @solana-program/program-metadata@latest write idl --buffer --export --export-encoding base58 --close-buffer --single-extend-per-tx +npx @solana-program/program-metadata@latest write idl --buffer --format json --export --export-encoding base58 --close-buffer --single-extend-per-tx ``` 4. Sign the transaction(s) in your multisig and send them in order