complete merge
This commit is contained in:
parent
288005882d
commit
68ba3004f4
|
@ -194,7 +194,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anchor-common"
|
name = "anchor-common"
|
||||||
version = "0.21.0"
|
version = "0.22.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayref",
|
"arrayref",
|
||||||
"solana-program",
|
"solana-program",
|
||||||
|
|
|
@ -1429,13 +1429,7 @@ fn extract_idl(cfg: &WithPath<Config>, file: &str, skip_lint: bool) -> Result<Op
|
||||||
let manifest_from_path = std::env::current_dir()?.join(PathBuf::from(&*file).parent().unwrap());
|
let manifest_from_path = std::env::current_dir()?.join(PathBuf::from(&*file).parent().unwrap());
|
||||||
let cargo = Manifest::discover_from_path(manifest_from_path)?
|
let cargo = Manifest::discover_from_path(manifest_from_path)?
|
||||||
.ok_or_else(|| anyhow!("Cargo.toml not found"))?;
|
.ok_or_else(|| anyhow!("Cargo.toml not found"))?;
|
||||||
anchor_syn::idl::file::parse(
|
anchor_syn::idl::file::parse(&*cargo, &*file, cfg.features.seeds, !skip_lint)
|
||||||
&*cargo,
|
|
||||||
&*file,
|
|
||||||
cfg.features.seeds,
|
|
||||||
cfg.features.safety_checks,
|
|
||||||
!skip_lint,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn idl(cfg_override: &ConfigOverride, subcmd: IdlCommand) -> Result<()> {
|
fn idl(cfg_override: &ConfigOverride, subcmd: IdlCommand) -> Result<()> {
|
||||||
|
|
|
@ -20,6 +20,6 @@ quote = "1.0"
|
||||||
syn = { version = "1.0.60", features = ["full"] }
|
syn = { version = "1.0.60", features = ["full"] }
|
||||||
anyhow = "1.0.32"
|
anyhow = "1.0.32"
|
||||||
anchor-syn = { path = "../../syn", version = "0.22.0", features = ["hash"] }
|
anchor-syn = { path = "../../syn", version = "0.22.0", features = ["hash"] }
|
||||||
anchor-common = { path = "../../common", version = "0.21.0" }
|
anchor-common = { path = "../../common", version = "0.22.0" }
|
||||||
rustversion = "1.0.3"
|
rustversion = "1.0.3"
|
||||||
bs58 = "0.4.0"
|
bs58 = "0.4.0"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "anchor-common"
|
name = "anchor-common"
|
||||||
version = "0.21.0"
|
version = "0.22.0"
|
||||||
authors = ["Serum Foundation <foundation@projectserum.com>"]
|
authors = ["Serum Foundation <foundation@projectserum.com>"]
|
||||||
repository = "https://github.com/project-serum/anchor"
|
repository = "https://github.com/project-serum/anchor"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
use crate::accounts::header;
|
use crate::accounts::header;
|
||||||
use crate::error::ErrorCode;
|
use crate::error::ErrorCode;
|
||||||
use crate::*;
|
use crate::*;
|
||||||
use arrayref::array_ref;
|
|
||||||
use solana_program::account_info::AccountInfo;
|
use solana_program::account_info::AccountInfo;
|
||||||
use solana_program::instruction::AccountMeta;
|
use solana_program::instruction::AccountMeta;
|
||||||
use solana_program::pubkey::Pubkey;
|
use solana_program::pubkey::Pubkey;
|
||||||
|
@ -188,7 +187,7 @@ impl<'info, T: ZeroCopy + Owner> Accounts<'info> for AccountLoader<'info, T> {
|
||||||
|
|
||||||
impl<'info, T: ZeroCopy + Owner> AccountsExit<'info> for AccountLoader<'info, T> {
|
impl<'info, T: ZeroCopy + Owner> AccountsExit<'info> for AccountLoader<'info, T> {
|
||||||
// The account *cannot* be loaded when this is called.
|
// The account *cannot* be loaded when this is called.
|
||||||
fn exit(&self, _program_id: &Pubkey) -> ProgramResult {
|
fn exit(&self, _program_id: &Pubkey) -> Result<()> {
|
||||||
// No-op.
|
// No-op.
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
use crate::accounts::header;
|
use crate::accounts::header;
|
||||||
use crate::error::ErrorCode;
|
use crate::error::ErrorCode;
|
||||||
use crate::*;
|
use crate::*;
|
||||||
use arrayref::array_ref;
|
|
||||||
use solana_program::account_info::AccountInfo;
|
use solana_program::account_info::AccountInfo;
|
||||||
use solana_program::instruction::AccountMeta;
|
use solana_program::instruction::AccountMeta;
|
||||||
use solana_program::pubkey::Pubkey;
|
use solana_program::pubkey::Pubkey;
|
||||||
|
@ -134,7 +133,7 @@ impl<'info, T: ZeroCopy> Accounts<'info> for Loader<'info, T> {
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
impl<'info, T: ZeroCopy> AccountsExit<'info> for Loader<'info, T> {
|
impl<'info, T: ZeroCopy> AccountsExit<'info> for Loader<'info, T> {
|
||||||
// The account *cannot* be loaded when this is called.
|
// The account *cannot* be loaded when this is called.
|
||||||
fn exit(&self, _program_id: &Pubkey) -> ProgramResult {
|
fn exit(&self, _program_id: &Pubkey) -> Result<()> {
|
||||||
// No-op.
|
// No-op.
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,7 @@ where
|
||||||
pub trait AccountSerialize {
|
pub trait AccountSerialize {
|
||||||
/// Serializes the account into the data buffer. Does not modify the
|
/// Serializes the account into the data buffer. Does not modify the
|
||||||
/// account header.
|
/// account header.
|
||||||
fn try_serialize(&self, _data: &mut [u8]) -> Result<(), ProgramError> {
|
fn try_serialize(&self, _data: &mut [u8]) -> Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue