Skip to content

Commit

Permalink
chore: update cargo_near_build dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
virajbhartiya committed Nov 23, 2024
1 parent 7cc5a4b commit 9c10e9c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
9 changes: 3 additions & 6 deletions examples/factory-contract/high-level/build.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
use near_workspaces::cargo_near_build;
use std::str::FromStr;

use cargo_near_build::BuildOpts;
use cargo_near_build::{bon, camino, extended};

fn main() -> Result<(), Box<dyn std::error::Error + 'static>> {
// directory of target `status-message` sub-contract's crate
let workdir = "../../status-message";
// unix path to target `status-message` sub-contract's crate from root of the repo
let nep330_contract_path = "examples/status-message";

let manifest = camino::Utf8PathBuf::from_str(workdir)
.expect("pathbuf from str")
.join("Cargo.toml");
let manifest =
camino::Utf8PathBuf::from_str(workdir).expect("pathbuf from str").join("Cargo.toml");

let build_opts = BuildOpts::builder()
.manifest_path(manifest)
Expand Down
3 changes: 1 addition & 2 deletions examples/factory-contract/low-level/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::str::FromStr;

use cargo_near_build::BuildOpts;
use cargo_near_build::{bon, camino, extended};
use near_workspaces::cargo_near_build;

fn main() -> Result<(), Box<dyn std::error::Error + 'static>> {
// directory of target `status-message` sub-contract's crate
Expand Down
1 change: 1 addition & 0 deletions examples/fungible-token/tests/workspaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use near_workspaces::operations::Function;
use near_workspaces::result::ValueOrReceiptId;
use near_workspaces::{types::NearToken, Account, AccountId, Contract};
use rstest::{fixture, rstest};
use near_workspaces::cargo_near_build;

const ONE_YOCTO: NearToken = NearToken::from_yoctonear(1);

Expand Down
1 change: 1 addition & 0 deletions examples/lockable-fungible-token/tests/workspaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::str::FromStr;
use near_sdk::json_types::U128;
use near_workspaces::{types::NearToken, Account, Contract};
use rstest::{fixture, rstest};
use near_workspaces::cargo_near_build;

#[fixture]
fn initial_balance() -> U128 {
Expand Down
2 changes: 1 addition & 1 deletion examples/non-fungible-token/tests/workspaces/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use near_contract_standards::non_fungible_token::TokenId;
use near_workspaces::types::NearToken;
use near_workspaces::{Account, Contract};
use rstest::fixture;

use near_workspaces::cargo_near_build;
pub const TOKEN_ID: &str = "0";

pub async fn helper_mint(
Expand Down

0 comments on commit 9c10e9c

Please sign in to comment.