diff --git a/Cargo.toml b/Cargo.toml index fc2e73c..9a61797 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "2" members = ["program"] [workspace.metadata.cli] -solana = "2.1.0" +solana = "2.1.9" # Specify Rust toolchains for rustfmt, clippy, and build. # Any unprovided toolchains default to stable. diff --git a/clients/js/src/utils.ts b/clients/js/src/utils.ts index 4548c7a..cb6175f 100644 --- a/clients/js/src/utils.ts +++ b/clients/js/src/utils.ts @@ -118,6 +118,13 @@ async function getProgramAuthorityForLoaderV3( const programDataAccount = await fetchEncodedAccount(rpc, programData); assertAccountExists(programDataAccount); + // Ensure the program data account is not executable. + if (programDataAccount.executable) { + throw Error( + 'The data account associated with the program account must not be executable' + ); + } + // Decode the program and program data accounts. const [programDecoder, programDataDecoder] = getLoaderV3Decoders(); const programAccountData = programDecoder.decode(programAccount.data);