ソースを参照

spl: Update to newest token-2022 binary on mainnet (#5628)

#### Problem

The spl-token-2022 binary bundled with the tools is out of date with
what's actually deployed to mainnet-beta.

This means that testing environments through solana-program-test,
solana-test-validator, and test clusters are all using a program that no
longer exists.

#### Summary of changes

Update the binary and version from 5.0.2 to 8.0.0.

As part of this, since the programs are hosted at new repos under the
solana-program organization, download the binaries from those new repos.

To bring dev-tools up to date with mainnet-beta, this PR should be
backported to v2.2 at least.
Jon C 7 ヶ月 前
コミット
597947830a

+ 2 - 2
fetch-spl.sh

@@ -21,13 +21,13 @@ add_spl_program_to_fetch() {
   declare loader=$4
 
   so_name="${PREFIX}_${name//-/_}.so"
-  download_url="https://github.com/solana-labs/solana-program-library/releases/download/$name-v$version/$so_name"
+  download_url="https://github.com/solana-program/$name/releases/download/program@v$version/$so_name"
 
   programs+=("$name $version $address $loader $download_url")
 }
 
 add_spl_program_to_fetch token 3.5.0 TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA BPFLoader2111111111111111111111111111111111
-add_spl_program_to_fetch token-2022 5.0.2 TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb BPFLoaderUpgradeab1e11111111111111111111111
+add_spl_program_to_fetch token-2022 8.0.0 TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb BPFLoaderUpgradeab1e11111111111111111111111
 add_spl_program_to_fetch memo  1.0.0 Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo BPFLoader1111111111111111111111111111111111
 add_spl_program_to_fetch memo  3.0.0 MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr BPFLoader2111111111111111111111111111111111
 add_spl_program_to_fetch associated-token-account 1.1.2 ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL BPFLoader2111111111111111111111111111111111

+ 1 - 1
program-test/src/programs.rs

@@ -25,7 +25,7 @@ static SPL_PROGRAMS: &[(Pubkey, Pubkey, &[u8])] = &[
     (
         solana_inline_spl::token_2022::ID,
         solana_sdk_ids::bpf_loader_upgradeable::ID,
-        include_bytes!("programs/spl_token_2022-5.0.2.so"),
+        include_bytes!("programs/spl_token_2022-8.0.0.so"),
     ),
     (
         spl_memo_1_0::ID,

BIN
program-test/src/programs/spl_token_2022-5.0.2.so


BIN
program-test/src/programs/spl_token_2022-8.0.0.so