Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable auto-generation of wallet contract by default #10436

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions runtime/near-wallet-contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ near-primitives-core.workspace = true
anyhow.workspace = true

[features]
build_wallet_contract = []
nightly_protocol = [
"near-vm-runner/nightly_protocol",
]
Expand Down
1 change: 1 addition & 0 deletions runtime/near-wallet-contract/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ See https://github.com/near/NEPs/issues/518.
Must not use in production!

Currently, the contract can only be used in nightly build.
Temporarily, we also require `build_wallet_contract` feature flag for `cargo build`.
The `build.rs` generates WASM file and saves it to the `./res` directory.

If you want to use the contract from nearcore, add this crate as a dependency
Expand Down
4 changes: 3 additions & 1 deletion runtime/near-wallet-contract/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ use std::path::{Path, PathBuf};
use std::process::Command;

fn main() -> Result<()> {
if cfg!(not(feature = "nightly")) {
// TODO(eth-implicit) Remove the `build_wallet_contract` flag once we have a proper way
// to generate the Wallet Contract WASM file.
if cfg!(not(feature = "nightly")) || cfg!(not(feature = "build_wallet_contract")) {
return Ok(());
}
build_contract("./wallet-contract", &[], "wallet_contract")
Expand Down
Loading