Update base64 dependency (#2686)
This commit is contained in:
parent
5a655b0f65
commit
7e5bdce710
|
@ -182,7 +182,7 @@ dependencies = [
|
|||
"anchor-lang",
|
||||
"anchor-syn",
|
||||
"anyhow",
|
||||
"base64 0.13.1",
|
||||
"base64 0.21.4",
|
||||
"bincode",
|
||||
"cargo_toml",
|
||||
"chrono",
|
||||
|
@ -271,7 +271,7 @@ dependencies = [
|
|||
"anchor-derive-space",
|
||||
"anchor-syn",
|
||||
"arrayref",
|
||||
"base64 0.13.1",
|
||||
"base64 0.21.4",
|
||||
"bincode",
|
||||
"borsh 0.10.3",
|
||||
"bytemuck",
|
||||
|
|
|
@ -20,7 +20,7 @@ anchor-client = { path = "../client", version = "0.29.0" }
|
|||
anchor-lang = { path = "../lang", version = "0.29.0" }
|
||||
anchor-syn = { path = "../lang/syn", features = ["event-cpi", "idl-parse", "init-if-needed"], version = "0.29.0" }
|
||||
anyhow = "1.0.32"
|
||||
base64 = "0.13.1"
|
||||
base64 = "0.21"
|
||||
bincode = "1.3.3"
|
||||
cargo_toml = "0.15.3"
|
||||
chrono = "0.4.19"
|
||||
|
|
|
@ -2659,6 +2659,9 @@ fn write_idl(idl: &Idl, out: OutFile) -> Result<()> {
|
|||
|
||||
/// Print `base64+borsh` encoded IDL instruction.
|
||||
fn print_idl_instruction(ix_name: &str, ix: &Instruction, idl_address: &Pubkey) -> Result<()> {
|
||||
use base64::engine::general_purpose::STANDARD;
|
||||
use base64::Engine;
|
||||
|
||||
println!("Print only mode. No execution!");
|
||||
println!("Instruction: {ix_name}");
|
||||
println!("IDL address: {idl_address}");
|
||||
|
@ -2680,7 +2683,7 @@ fn print_idl_instruction(ix_name: &str, ix: &Instruction, idl_address: &Pubkey)
|
|||
|
||||
println!(
|
||||
"Base64 encoded instruction: {}",
|
||||
base64::encode(serialized_ix)
|
||||
STANDARD.encode(serialized_ix)
|
||||
);
|
||||
|
||||
Ok(())
|
||||
|
|
|
@ -324,12 +324,16 @@ fn handle_program_log<T: anchor_lang::Event + anchor_lang::AnchorDeserialize>(
|
|||
self_program_str: &str,
|
||||
l: &str,
|
||||
) -> Result<(Option<T>, Option<String>, bool), ClientError> {
|
||||
use anchor_lang::__private::base64;
|
||||
use base64::engine::general_purpose::STANDARD;
|
||||
use base64::Engine;
|
||||
|
||||
// Log emitted from the current program.
|
||||
if let Some(log) = l
|
||||
.strip_prefix(PROGRAM_LOG)
|
||||
.or_else(|| l.strip_prefix(PROGRAM_DATA))
|
||||
{
|
||||
let borsh_bytes = match anchor_lang::__private::base64::decode(log) {
|
||||
let borsh_bytes = match STANDARD.decode(log) {
|
||||
Ok(borsh_bytes) => borsh_bytes,
|
||||
_ => {
|
||||
#[cfg(feature = "debug")]
|
||||
|
|
|
@ -48,7 +48,7 @@ anchor-derive-space = { path = "./derive/space", version = "0.29.0" }
|
|||
anchor-syn = { path = "./syn", version = "0.29.0", optional = true }
|
||||
|
||||
arrayref = "0.3"
|
||||
base64 = "0.13"
|
||||
base64 = "0.21"
|
||||
bincode = "1"
|
||||
borsh = ">=0.9, <0.11"
|
||||
bytemuck = "1"
|
||||
|
|
Loading…
Reference in New Issue