diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index f6c60990df..4799a4e3c9 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -142,7 +142,7 @@ jobs: name: anchor-binary path: ~/.cargo/bin/ - run: chmod +rwx ~/.cargo/bin/anchor - - run: cd ${{ matrix.node.path }} && anchor build + - run: cd ${{ matrix.node.path }} && anchor build --skip-lint - uses: actions/upload-artifact@v2 with: name: ${{ matrix.node.name }} @@ -224,9 +224,9 @@ jobs: name: start validator - run: cd tests/bpf-upgradeable-state && yarn - run: cd tests/bpf-upgradeable-state && yarn link @project-serum/anchor - - run: cd tests/bpf-upgradeable-state && anchor build + - run: cd tests/bpf-upgradeable-state && anchor build --skip-lint - run: cd tests/bpf-upgradeable-state && solana program deploy --program-id program_with_different_programdata.json target/deploy/bpf_upgradeable_state.so - - run: cd tests/bpf-upgradeable-state && cp bpf_upgradeable_state-keypair.json target/deploy/bpf_upgradeable_state-keypair.json && anchor deploy && anchor test --skip-deploy --skip-build + - run: cd tests/bpf-upgradeable-state && cp bpf_upgradeable_state-keypair.json target/deploy/bpf_upgradeable_state-keypair.json && anchor deploy && anchor test --skip-deploy --skip-build --skip-lint test-programs: needs: setup-anchor-cli @@ -236,49 +236,49 @@ jobs: fail-fast: false matrix: node: - - cmd: cd tests/sysvars && anchor test + - cmd: cd tests/sysvars && anchor test --skip-lint path: tests/sysvars - - cmd: cd tests/composite && anchor test + - cmd: cd tests/composite && anchor test --skip-lint path: tests/composite - - cmd: cd tests/errors && anchor test + - cmd: cd tests/errors && anchor test --skip-lint path: tests/errors - - cmd: cd tests/spl/token-proxy && anchor test + - cmd: cd tests/spl/token-proxy && anchor test --skip-lint path: spl/token-proxy - - cmd: cd tests/multisig && anchor test + - cmd: cd tests/multisig && anchor test --skip-lint path: tests/multisig - - cmd: cd tests/interface && anchor test + - cmd: cd tests/interface && anchor test --skip-lint path: tests/interface - - cmd: cd tests/lockup && anchor test + - cmd: cd tests/lockup && anchor test --skip-lint path: tests/lockup - - cmd: cd tests/swap/deps/serum-dex/dex && cargo build-bpf && cd ../../../ && anchor test + - cmd: cd tests/swap/deps/serum-dex/dex && cargo build-bpf && cd ../../../ && anchor test --skip-lint path: tests/swap - - cmd: cd tests/escrow && anchor test + - cmd: cd tests/escrow && anchor test --skip-lint path: tests/escrow - - cmd: cd tests/pyth && anchor test + - cmd: cd tests/pyth && anchor test --skip-lint path: tests/pyth - - cmd: cd tests/system-accounts && anchor test + - cmd: cd tests/system-accounts && anchor test --skip-lint path: tests/system-accounts - - cmd: cd tests/misc && anchor test + - cmd: cd tests/misc && anchor test --skip-lint path: tests/misc - - cmd: cd tests/events && anchor test + - cmd: cd tests/events && anchor test --skip-lint path: tests/events - - cmd: cd tests/cashiers-check && anchor test + - cmd: cd tests/cashiers-check && anchor test --skip-lint path: tests/cashiers-check - - cmd: cd tests/declare-id && anchor test + - cmd: cd tests/declare-id && anchor test --skip-lint path: tests/declare-id - - cmd: cd tests/typescript && anchor test + - cmd: cd tests/typescript && anchor test --skip-lint path: tests/typescript - - cmd: cd tests/zero-copy && anchor test && cd programs/zero-copy && cargo test-bpf + - cmd: cd tests/zero-copy && anchor test --skip-lint && cd programs/zero-copy && cargo test-bpf path: tests/zero-copy - - cmd: cd tests/chat && anchor test + - cmd: cd tests/chat && anchor test --skip-lint path: tests/chat - - cmd: cd tests/ido-pool && anchor test + - cmd: cd tests/ido-pool && anchor test --skip-lint path: tests/ido-pool - cmd: cd tests/cfo && anchor run test-with-build path: tests/cfo - - cmd: cd tests/auction-house && yarn && anchor test + - cmd: cd tests/auction-house && yarn && anchor test --skip-lint path: tests/auction-house - - cmd: cd tests/floats && yarn && anchor test + - cmd: cd tests/floats && yarn && anchor test --skip-lint path: tests/floats - cmd: cd tests/safety-checks && ./test.sh path: tests/safety-checks diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b93a6725f..77e70e0c9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ incremented for features. * lang: add check that declared id == program id ([#1451](https://github.com/project-serum/anchor/pull/1451)) * ts: Added float types support ([#1425](https://github.com/project-serum/anchor/pull/1425)). +* cli: Add `--skip-lint` option to disable check linting introduced in ([#1452](https://github.com/project-serum/anchor/pull/1452)) for rapid prototyping ([#1482](https://github.com/project-serum/anchor/pull/1482)) ### Fixes diff --git a/cli/src/config.rs b/cli/src/config.rs index 0160f51d28..0e828ff350 100644 --- a/cli/src/config.rs +++ b/cli/src/config.rs @@ -257,26 +257,10 @@ pub struct Config { pub test: Option, } -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Default, Clone, Debug, Serialize, Deserialize)] pub struct FeaturesConfig { #[serde(default)] pub seeds: bool, - #[serde(default = "default_safety_checks")] - pub safety_checks: bool, -} - -impl Default for FeaturesConfig { - fn default() -> Self { - Self { - seeds: false, - // Anchor safety checks on by default - safety_checks: true, - } - } -} - -fn default_safety_checks() -> bool { - true } #[derive(Clone, Debug, Serialize, Deserialize)] diff --git a/cli/src/lib.rs b/cli/src/lib.rs index a126020080..a4d3d3a039 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -70,6 +70,10 @@ pub enum Command { /// Output directory for the IDL. #[clap(short, long)] idl: Option, + /// True if the build should not fail even if there are + /// no "CHECK" comments where normally required + #[clap(long)] + skip_lint: bool, /// Output directory for the TypeScript IDL. #[clap(short = 't', long)] idl_ts: Option, @@ -151,6 +155,10 @@ pub enum Command { /// programs. #[clap(long)] skip_deploy: bool, + /// True if the build should not fail even if there are + /// no "CHECK" comments where normally required + #[clap(long)] + skip_lint: bool, /// Flag to skip starting a local validator, if the configured cluster /// url is a localnet. #[clap(long)] @@ -250,6 +258,10 @@ pub enum Command { /// programs. #[clap(long)] skip_deploy: bool, + /// True if the build should not fail even if there are + /// no "CHECK" comments where normally required + #[clap(long)] + skip_lint: bool, /// Arguments to pass to the underlying `cargo build-bpf` command. #[clap( required = false, @@ -360,11 +372,13 @@ pub fn entry(opts: Opts) -> Result<()> { docker_image, bootstrap, cargo_args, + skip_lint, } => build( &opts.cfg_override, idl, idl_ts, verifiable, + skip_lint, program_name, solana_version, docker_image, @@ -407,11 +421,13 @@ pub fn entry(opts: Opts) -> Result<()> { detach, args, cargo_args, + skip_lint, } => test( &opts.cfg_override, skip_deploy, skip_local_validator, skip_build, + skip_lint, detach, args, cargo_args, @@ -430,8 +446,15 @@ pub fn entry(opts: Opts) -> Result<()> { Command::Localnet { skip_build, skip_deploy, + skip_lint, + cargo_args, + } => localnet( + &opts.cfg_override, + skip_build, + skip_deploy, + skip_lint, cargo_args, - } => localnet(&opts.cfg_override, skip_build, skip_deploy, cargo_args), + ), } } @@ -685,6 +708,7 @@ pub fn build( idl: Option, idl_ts: Option, verifiable: bool, + skip_lint: bool, program_name: Option, solana_version: Option, docker_image: Option, @@ -736,6 +760,7 @@ pub fn build( stdout, stderr, cargo_args, + skip_lint, )?, // If the Cargo.toml is at the root, build the entire workspace. Some(cargo) if cargo.path().parent() == cfg.path().parent() => build_all( @@ -747,6 +772,7 @@ pub fn build( stdout, stderr, cargo_args, + skip_lint, )?, // Cargo.toml represents a single package. Build it. Some(cargo) => build_cwd( @@ -758,6 +784,7 @@ pub fn build( stdout, stderr, cargo_args, + skip_lint, )?, } @@ -776,6 +803,7 @@ fn build_all( stdout: Option, // Used for the package registry server. stderr: Option, // Used for the package registry server. cargo_args: Vec, + skip_lint: bool, ) -> Result<()> { let cur_dir = std::env::current_dir()?; let r = match cfg_path.parent() { @@ -791,6 +819,7 @@ fn build_all( stdout.as_ref().map(|f| f.try_clone()).transpose()?, stderr.as_ref().map(|f| f.try_clone()).transpose()?, cargo_args.clone(), + skip_lint, )?; } Ok(()) @@ -811,14 +840,23 @@ fn build_cwd( stdout: Option, stderr: Option, cargo_args: Vec, + skip_lint: bool, ) -> Result<()> { match cargo_toml.parent() { None => return Err(anyhow!("Unable to find parent")), Some(p) => std::env::set_current_dir(&p)?, }; match build_config.verifiable { - false => _build_cwd(cfg, idl_out, idl_ts_out, cargo_args), - true => build_cwd_verifiable(cfg, cargo_toml, build_config, stdout, stderr, cargo_args), + false => _build_cwd(cfg, idl_out, idl_ts_out, skip_lint, cargo_args), + true => build_cwd_verifiable( + cfg, + cargo_toml, + build_config, + stdout, + stderr, + skip_lint, + cargo_args, + ), } } @@ -830,6 +868,7 @@ fn build_cwd_verifiable( build_config: &BuildConfig, stdout: Option, stderr: Option, + skip_lint: bool, cargo_args: Vec, ) -> Result<()> { // Create output dirs. @@ -861,7 +900,7 @@ fn build_cwd_verifiable( Ok(_) => { // Build the idl. println!("Extracting the IDL"); - if let Ok(Some(idl)) = extract_idl(cfg, "src/lib.rs") { + if let Ok(Some(idl)) = extract_idl(cfg, "src/lib.rs", skip_lint) { // Write out the JSON file. println!("Writing the IDL file"); let out_file = workspace_dir.join(format!("target/idl/{}.json", idl.name)); @@ -1121,6 +1160,7 @@ fn _build_cwd( cfg: &WithPath, idl_out: Option, idl_ts_out: Option, + skip_lint: bool, cargo_args: Vec, ) -> Result<()> { let exit = std::process::Command::new("cargo") @@ -1135,7 +1175,7 @@ fn _build_cwd( } // Always assume idl is located at src/lib.rs. - if let Some(idl) = extract_idl(cfg, "src/lib.rs")? { + if let Some(idl) = extract_idl(cfg, "src/lib.rs", skip_lint)? { // JSON out path. let out = match idl_out { None => PathBuf::from(".").join(&idl.name).with_extension("json"), @@ -1192,6 +1232,7 @@ fn verify( None, // idl None, // idl ts true, // verifiable + true, // skip lint None, // program name solana_version.or_else(|| cfg.solana_version.clone()), // solana version docker_image, // docker image @@ -1219,7 +1260,7 @@ fn verify( } // Verify IDL (only if it's not a buffer account). - if let Some(local_idl) = extract_idl(&cfg, "src/lib.rs")? { + if let Some(local_idl) = extract_idl(&cfg, "src/lib.rs", true)? { if bin_ver.state != BinVerificationState::Buffer { let deployed_idl = fetch_idl(cfg_override, program_id)?; if local_idl != deployed_idl { @@ -1383,17 +1424,12 @@ fn fetch_idl(cfg_override: &ConfigOverride, idl_addr: Pubkey) -> Result { serde_json::from_slice(&s[..]).map_err(Into::into) } -fn extract_idl(cfg: &WithPath, file: &str) -> Result> { +fn extract_idl(cfg: &WithPath, file: &str, skip_lint: bool) -> Result> { let file = shellexpand::tilde(file); let manifest_from_path = std::env::current_dir()?.join(PathBuf::from(&*file).parent().unwrap()); let cargo = Manifest::discover_from_path(manifest_from_path)? .ok_or_else(|| anyhow!("Cargo.toml not found"))?; - anchor_syn::idl::file::parse( - &*file, - cargo.version(), - cfg.features.seeds, - cfg.features.safety_checks, - ) + anchor_syn::idl::file::parse(&*file, cargo.version(), cfg.features.seeds, !skip_lint) } fn idl(cfg_override: &ConfigOverride, subcmd: IdlCommand) -> Result<()> { @@ -1686,7 +1722,7 @@ fn idl_parse( out_ts: Option, ) -> Result<()> { let cfg = Config::discover(cfg_override)?.expect("Not in workspace."); - let idl = extract_idl(&cfg, &file)?.ok_or_else(|| anyhow!("IDL not parsed"))?; + let idl = extract_idl(&cfg, &file, true)?.ok_or_else(|| anyhow!("IDL not parsed"))?; let out = match out { None => OutFile::Stdout, Some(out) => OutFile::File(PathBuf::from(out)), @@ -1726,11 +1762,13 @@ enum OutFile { } // Builds, deploys, and tests all workspace programs in a single command. +#[allow(clippy::too_many_arguments)] fn test( cfg_override: &ConfigOverride, skip_deploy: bool, skip_local_validator: bool, skip_build: bool, + skip_lint: bool, detach: bool, extra_args: Vec, cargo_args: Vec, @@ -1743,6 +1781,7 @@ fn test( None, None, false, + skip_lint, None, None, None, @@ -2667,6 +2706,7 @@ fn publish( None, None, true, + false, Some(program_name), None, None, @@ -2754,6 +2794,7 @@ fn localnet( cfg_override: &ConfigOverride, skip_build: bool, skip_deploy: bool, + skip_lint: bool, cargo_args: Vec, ) -> Result<()> { with_workspace(cfg_override, |cfg| { @@ -2764,6 +2805,7 @@ fn localnet( None, None, false, + skip_lint, None, None, None, diff --git a/examples/tutorial/basic-0/package.json b/examples/tutorial/basic-0/package.json index 5db74db570..0e63330fb8 100644 --- a/examples/tutorial/basic-0/package.json +++ b/examples/tutorial/basic-0/package.json @@ -14,6 +14,6 @@ "node": ">=11" }, "scripts": { - "test": "anchor test" + "test": "anchor test --skip-lint" } } diff --git a/examples/tutorial/basic-1/package.json b/examples/tutorial/basic-1/package.json index 7dbb539a68..987ef48a0c 100644 --- a/examples/tutorial/basic-1/package.json +++ b/examples/tutorial/basic-1/package.json @@ -14,6 +14,6 @@ "node": ">=11" }, "scripts": { - "test": "anchor test" + "test": "anchor test --skip-lint" } } diff --git a/examples/tutorial/basic-2/package.json b/examples/tutorial/basic-2/package.json index 8998b9f34e..46decce689 100644 --- a/examples/tutorial/basic-2/package.json +++ b/examples/tutorial/basic-2/package.json @@ -14,6 +14,6 @@ "node": ">=11" }, "scripts": { - "test": "anchor test" + "test": "anchor test --skip-lint" } } diff --git a/examples/tutorial/basic-3/package.json b/examples/tutorial/basic-3/package.json index 73d9f226d2..c88fd5d2fc 100644 --- a/examples/tutorial/basic-3/package.json +++ b/examples/tutorial/basic-3/package.json @@ -14,6 +14,6 @@ "node": ">=11" }, "scripts": { - "test": "anchor test" + "test": "anchor test --skip-lint" } } diff --git a/examples/tutorial/basic-4/package.json b/examples/tutorial/basic-4/package.json index d34c9fdfe2..d3a99c4978 100644 --- a/examples/tutorial/basic-4/package.json +++ b/examples/tutorial/basic-4/package.json @@ -14,6 +14,6 @@ "node": ">=11" }, "scripts": { - "test": "anchor test" + "test": "anchor test --skip-lint" } } diff --git a/tests/auction-house b/tests/auction-house index 52c43eb392..63e7bb81be 160000 --- a/tests/auction-house +++ b/tests/auction-house @@ -1 +1 @@ -Subproject commit 52c43eb392580bb333940c73d18971131070098e +Subproject commit 63e7bb81beb76f2722245a37c16a7b0b00d6905a diff --git a/tests/cashiers-check/Anchor.toml b/tests/cashiers-check/Anchor.toml index 6b39d2572f..5a733e1a35 100644 --- a/tests/cashiers-check/Anchor.toml +++ b/tests/cashiers-check/Anchor.toml @@ -9,4 +9,3 @@ cashiers_check = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS" test = "yarn run mocha -t 1000000 tests/" [features] -safety_checks = false diff --git a/tests/cfo/Anchor.toml b/tests/cfo/Anchor.toml index 640628a366..903bbe80dc 100644 --- a/tests/cfo/Anchor.toml +++ b/tests/cfo/Anchor.toml @@ -12,15 +12,15 @@ lockup = { address = "6ebQNeTPZ1j7k3TtkCCtEPRvG7GQsucQrZ7sSEDQi9Ks", idl = "./de # Testing. # test = "yarn run mocha -t 1000000 tests/" -test-with-build = "anchor run build && anchor test --skip-build" +test-with-build = "anchor run build && anchor test --skip-build --skip-lint" # # Build the program and all CPI dependencies. # -build = "anchor run build-deps && anchor build" +build = "anchor run build-deps && anchor build --skip-lint" build-deps = "anchor run build-dex && anchor run build-swap && anchor run build-stake" build-dex = "pushd deps/serum-dex/dex/ && cargo build-bpf && popd" -build-swap = "cd deps/swap && pwd && anchor build && cd ../../" -build-stake = "pushd deps/stake && anchor build && popd" +build-swap = "cd deps/swap && pwd && anchor build --skip-lint && cd ../../" +build-stake = "pushd deps/stake && anchor build --skip-lint && popd" # # Runs a localnet with all the programs deployed. # @@ -43,4 +43,3 @@ address = "6ebQNeTPZ1j7k3TtkCCtEPRvG7GQsucQrZ7sSEDQi9Ks" program = "./deps/stake/target/deploy/lockup.so" [features] -safety_checks = false diff --git a/tests/cfo/deps/stake b/tests/cfo/deps/stake index 571f2c2781..6a1c128e85 160000 --- a/tests/cfo/deps/stake +++ b/tests/cfo/deps/stake @@ -1 +1 @@ -Subproject commit 571f2c2781e2988da213187d92869613d1ee9c69 +Subproject commit 6a1c128e859b13b39812c0c75d202b2bf9ee1e8c diff --git a/tests/cfo/deps/swap b/tests/cfo/deps/swap index d21838f043..3da36aaae7 160000 --- a/tests/cfo/deps/swap +++ b/tests/cfo/deps/swap @@ -1 +1 @@ -Subproject commit d21838f04360502272490ff2e3a387326579aa6d +Subproject commit 3da36aaae7af6ce901d68c0280aac34817fe7fd8 diff --git a/tests/chat/Anchor.toml b/tests/chat/Anchor.toml index 1249c7228d..ec4727cba8 100644 --- a/tests/chat/Anchor.toml +++ b/tests/chat/Anchor.toml @@ -9,4 +9,3 @@ chat = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS" test = "yarn run mocha -t 1000000 tests/" [features] -safety_checks = false diff --git a/tests/custom-coder/Anchor.toml b/tests/custom-coder/Anchor.toml index ff7a52de2d..6ea244cafb 100644 --- a/tests/custom-coder/Anchor.toml +++ b/tests/custom-coder/Anchor.toml @@ -13,4 +13,3 @@ wallet = "~/.config/solana/id.json" test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" [features] -safety_checks = false diff --git a/tests/errors/Anchor.toml b/tests/errors/Anchor.toml index 52f2897d04..82be99c67c 100644 --- a/tests/errors/Anchor.toml +++ b/tests/errors/Anchor.toml @@ -9,4 +9,3 @@ errors = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS" test = "yarn run mocha -t 1000000 tests/" [features] -safety_checks = false diff --git a/tests/escrow/Anchor.toml b/tests/escrow/Anchor.toml index f5dab7ec67..6511f7c03f 100644 --- a/tests/escrow/Anchor.toml +++ b/tests/escrow/Anchor.toml @@ -9,4 +9,3 @@ escrow = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS" test = "yarn run ts-mocha -t 1000000 tests/*.ts" [features] -safety_checks = false diff --git a/tests/ido-pool/Anchor.toml b/tests/ido-pool/Anchor.toml index bb19294358..f38b98b038 100644 --- a/tests/ido-pool/Anchor.toml +++ b/tests/ido-pool/Anchor.toml @@ -9,4 +9,3 @@ ido_pool = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS" test = "yarn run mocha -t 1000000 tests/" [features] -safety_checks = false diff --git a/tests/interface/Anchor.toml b/tests/interface/Anchor.toml index f77ab31faf..3a31317489 100644 --- a/tests/interface/Anchor.toml +++ b/tests/interface/Anchor.toml @@ -10,4 +10,3 @@ counter_auth = "Aws2XRVHjNqCUbMmaU245ojT2DBJFYX58KVo2YySEeeP" test = "yarn run mocha -t 1000000 tests/" [features] -safety_checks = false diff --git a/tests/lockup/Anchor.toml b/tests/lockup/Anchor.toml index 4367e1dcc1..0e20f4ad24 100644 --- a/tests/lockup/Anchor.toml +++ b/tests/lockup/Anchor.toml @@ -10,4 +10,3 @@ registry = "HmbTLCmaGvZhKnn1Zfa1JVnp7vkMV4DYVxPLWBVoN65L" test = "yarn run mocha -t 1000000 tests/" [features] -safety_checks = false diff --git a/tests/multisig/Anchor.toml b/tests/multisig/Anchor.toml index f8bc62e0d5..ee9f941dcc 100644 --- a/tests/multisig/Anchor.toml +++ b/tests/multisig/Anchor.toml @@ -9,4 +9,3 @@ multisig = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS" test = "yarn run mocha -t 1000000 tests/" [features] -safety_checks = false diff --git a/tests/pda-derivation/Anchor.toml b/tests/pda-derivation/Anchor.toml index 2b17356f2c..7893565164 100644 --- a/tests/pda-derivation/Anchor.toml +++ b/tests/pda-derivation/Anchor.toml @@ -1,6 +1,5 @@ [features] seeds = true -safety_checks = false [provider] cluster = "localnet" diff --git a/tests/pyth/Anchor.toml b/tests/pyth/Anchor.toml index 333e47210b..680591150e 100644 --- a/tests/pyth/Anchor.toml +++ b/tests/pyth/Anchor.toml @@ -9,4 +9,3 @@ pyth = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS" test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" [features] -safety_checks = false diff --git a/tests/spl/token-proxy/Anchor.toml b/tests/spl/token-proxy/Anchor.toml index fea8211808..ac6cd695d7 100644 --- a/tests/spl/token-proxy/Anchor.toml +++ b/tests/spl/token-proxy/Anchor.toml @@ -9,4 +9,3 @@ token_proxy = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS" test = "yarn run mocha -t 1000000 tests/" [features] -safety_checks = false diff --git a/tests/swap/Anchor.toml b/tests/swap/Anchor.toml index 993c8f1a46..fa7d2b91f0 100644 --- a/tests/swap/Anchor.toml +++ b/tests/swap/Anchor.toml @@ -13,4 +13,3 @@ program = "./deps/serum-dex/dex/target/deploy/serum_dex.so" test = "yarn run mocha -t 1000000 tests/" [features] -safety_checks = false diff --git a/tests/zero-copy/Anchor.toml b/tests/zero-copy/Anchor.toml index a2c3623277..ab1af59856 100644 --- a/tests/zero-copy/Anchor.toml +++ b/tests/zero-copy/Anchor.toml @@ -13,4 +13,4 @@ zero_cpi = "ErjUjtqKE5AGWUsjseSJCVLtddM6rhaMbDqmhzraF9h6" zero_copy = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS" [features] -safety_checks = false +