From 0b3045fffc86e5e469e1a7b34ad3d9a9c11471a5 Mon Sep 17 00:00:00 2001 From: Yasir Shariff Date: Mon, 27 Nov 2023 11:41:14 +0300 Subject: [PATCH] fix typos --- README.md | 4 ++-- examples/manually-spawned-sandbox.md | 2 +- examples/src/croncat.rs | 4 ++-- examples/src/nft.rs | 2 +- examples/src/ref_finance.rs | 4 ++-- examples/src/spooning.rs | 6 +++--- examples/src/various_queries.rs | 6 +++--- workspaces/src/network/mainnet.rs | 2 +- workspaces/tests/deploy.rs | 2 +- workspaces/tests/optional_args.rs | 6 +++--- workspaces/tests/parallel_transactions.rs | 2 +- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 3dc2c5d2..7a364c7e 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ Afterwards, let's mint an NFT via `nft_mint`. This showcases some extra argument "token_owner_id": contract.id(), "token_metadata": { "title": "Olympus Mons", - "dscription": "Tallest mountain in charted solar system", + "description": "Tallest mountain in charted solar system", "copies": 1, }, })) @@ -137,7 +137,7 @@ More standalone examples can be found in `examples/src/*.rs`. To run the above NFT example, execute: -``` +```sh cargo run --example nft ``` diff --git a/examples/manually-spawned-sandbox.md b/examples/manually-spawned-sandbox.md index 791873d6..e473c89e 100644 --- a/examples/manually-spawned-sandbox.md +++ b/examples/manually-spawned-sandbox.md @@ -1,6 +1,6 @@ # Utilizing custom sandbox node -This example will show us how to spin up a sandbox node of our own choosing. Follow the guide in https://github.com/near/sandbox to download it. This is mainly needed if a user wants to manage their own node and/or not require each test to spin up a new node each time. +This example will show us how to spin up a sandbox node of our own choosing. Follow the guide in to download it. This is mainly needed if a user wants to manage their own node and/or not require each test to spin up a new node each time. Then initialize the chain via `init` and run it: diff --git a/examples/src/croncat.rs b/examples/src/croncat.rs index aaff0683..bad80694 100644 --- a/examples/src/croncat.rs +++ b/examples/src/croncat.rs @@ -186,9 +186,9 @@ pub async fn run_scheduled_tasks( NearToken::from_yoctonear(2260000000000000000000u128) ); - // This shows how much the agent has profitted from executing the task: + // This shows how much the agent has profited from executing the task: println!( - "Agent profitted {} yN and has been transferred to the agent's account", + "Agent profited {} yN and has been transferred to the agent's account", before_withdraw.as_yoctonear() - agent_details.balance.as_yoctonear() ); diff --git a/examples/src/nft.rs b/examples/src/nft.rs index 8058e621..9de7fd20 100644 --- a/examples/src/nft.rs +++ b/examples/src/nft.rs @@ -27,7 +27,7 @@ async fn main() -> anyhow::Result<()> { "token_owner_id": contract.id(), "token_metadata": { "title": "Olympus Mons", - "dscription": "Tallest mountain in charted solar system", + "description": "Tallest mountain in charted solar system", "copies": 1, }, })) diff --git a/examples/src/ref_finance.rs b/examples/src/ref_finance.rs index 81254a8a..337a49aa 100644 --- a/examples/src/ref_finance.rs +++ b/examples/src/ref_finance.rs @@ -32,7 +32,7 @@ async fn create_ref(owner: &Account, worker: &Worker) -> anyhow::Result .transact() .await?; - // NOTE: We are not pulling down the contract's data here, so we'll need to initalize + // NOTE: We are not pulling down the contract's data here, so we'll need to initialize // our own set of metadata. This is because the contract's data is too big for the rpc // service to pull down (i.e. greater than 50kb). @@ -58,7 +58,7 @@ async fn create_ref(owner: &Account, worker: &Worker) -> anyhow::Result Ok(ref_finance) } -/// Pull down the WNear contract from mainnet and initilize it with our own metadata. +/// Pull down the WNear contract from mainnet and initialize it with our own metadata. async fn create_wnear(owner: &Account, worker: &Worker) -> anyhow::Result { let mainnet = near_workspaces::mainnet_archival().await?; let wnear_id: AccountId = "wrap.near".to_string().try_into()?; diff --git a/examples/src/spooning.rs b/examples/src/spooning.rs index 0c38346d..fe9143eb 100644 --- a/examples/src/spooning.rs +++ b/examples/src/spooning.rs @@ -13,9 +13,9 @@ const STATUS_MSG_WASM_FILEPATH: &str = "./examples/res/status_message.wasm"; /// overload testnet and have to go through a couple more cycles than we have to, to showcase spooning. /// /// If you'd like a different account to deploy it to, run the following: -/// ```norun +/// ```rust, norun /// async fn deploy_testnet() -> anyhow::Result<()> { -/// let worker = worspaces::testnet().await?; +/// let worker = near_workspaces::testnet().await?; /// /// let contract = deploy_status_contract(worker, "hello from testnet").await?; /// println!("{}", contract.id()); @@ -114,7 +114,7 @@ async fn main() -> anyhow::Result<()> { info!(target: "spooning", "New status patched: {:?}", status); assert_eq!(&status, "hello from testnet"); - // See that sandbox state was overriden. Grabbing get_status(sandbox_contract_id) should yield Null + // See that sandbox state was overridden. Grabbing get_status(sandbox_contract_id) should yield Null let result: Option = sandbox_contract .view("get_status") .args_json(json!({ diff --git a/examples/src/various_queries.rs b/examples/src/various_queries.rs index c5550013..cd84fc26 100644 --- a/examples/src/various_queries.rs +++ b/examples/src/various_queries.rs @@ -17,7 +17,7 @@ async fn main() -> anyhow::Result<()> { .block_height(0) // can instead use .block_hash(CryptoHash) as well .await?; - println!("Sandbox Geneis Block: {genesis_block:#?}"); + println!("Sandbox Genesis Block: {genesis_block:#?}"); // Reference the chunk via the block hash we queried for earlier: let shard_id = 0; @@ -48,7 +48,7 @@ async fn main() -> anyhow::Result<()> { .await? .into_result()?; println!( - "Bob burnt {} gas callling into `set_status('Hello')`", + "Bob burnt {} gas calling into `set_status('Hello')`", outcome.total_gas_burnt ); @@ -66,7 +66,7 @@ async fn main() -> anyhow::Result<()> { .await? .into_result()?; println!( - "Bob burnt {} gas callling into `set_status('World')`", + "Bob burnt {} gas calling into `set_status('World')`", outcome.total_gas_burnt ); diff --git a/workspaces/src/network/mainnet.rs b/workspaces/src/network/mainnet.rs index a4d8b949..07b419b2 100644 --- a/workspaces/src/network/mainnet.rs +++ b/workspaces/src/network/mainnet.rs @@ -39,7 +39,7 @@ impl FromNetworkBuilder for Mainnet { name: build.name.into(), root_id: "near".parse().unwrap(), keystore_path: PathBuf::from(".near-credentials/mainnet/"), - rpc_url: url::Url::parse(&rpc_url).expect("url is hardcodeed"), + rpc_url: url::Url::parse(&rpc_url).expect("url is hardcoded"), }, }) } diff --git a/workspaces/tests/deploy.rs b/workspaces/tests/deploy.rs index 2088c061..bf5806f5 100644 --- a/workspaces/tests/deploy.rs +++ b/workspaces/tests/deploy.rs @@ -64,7 +64,7 @@ async fn test_manually_spawned_deploy() -> anyhow::Result<()> { let mut home_dir = std::env::temp_dir(); home_dir.push(format!("test-sandbox-{}", rpc_port)); - // intialize chain data with supplied home dir + // initialize chain data with supplied home dir let output = near_sandbox_utils::init(&home_dir)? .wait_with_output() .await diff --git a/workspaces/tests/optional_args.rs b/workspaces/tests/optional_args.rs index 49de1707..bc0efc72 100644 --- a/workspaces/tests/optional_args.rs +++ b/workspaces/tests/optional_args.rs @@ -35,10 +35,10 @@ async fn test_empty_args_error() -> anyhow::Result<()> { .await? .into_result(); - if let Some(exeuction_err) = res.err() { - assert!(format!("{}", exeuction_err).contains("Failed to deserialize input from JSON")); + if let Some(execution_err) = res.err() { + assert!(format!("{}", execution_err).contains("Failed to deserialize input from JSON")); assert!( - exeuction_err.total_gas_burnt > NearGas::from_gas(0), + execution_err.total_gas_burnt > NearGas::from_gas(0), "Gas is still burnt for transaction although inputs are incorrect" ); } else { diff --git a/workspaces/tests/parallel_transactions.rs b/workspaces/tests/parallel_transactions.rs index 13957a8d..b275f0ad 100644 --- a/workspaces/tests/parallel_transactions.rs +++ b/workspaces/tests/parallel_transactions.rs @@ -48,7 +48,7 @@ async fn test_parallel_async() -> anyhow::Result<()> { let contract = worker.dev_deploy(STATUS_MSG_CONTRACT).await?; let account = worker.dev_create_account().await?; - // nonce of access key before any transactions occured. + // nonce of access key before any transactions occurred. let nonce_start = worker .view_access_key(account.id(), &account.secret_key().public_key()) .await?