diff --git a/README.md b/README.md index 06b51f84..08c6e741 100644 --- a/README.md +++ b/README.md @@ -341,7 +341,7 @@ Other features can be directly found in the `examples/` folder, with some docume These environment variables will be useful if there was ever a snag hit: -- `NEAR_RPC_TIMEOUT_SECS`: The default is 10 seconds, but this is the amount of time beforing timing out waiting for a RPC service when talking to the sandbox or any other network such as testnet. +- `NEAR_RPC_TIMEOUT_SECS`: The default is 10 seconds, but this is the amount of time before timing out waiting for a RPC service when talking to the sandbox or any other network such as testnet. - `NEAR_SANDBOX_BIN_PATH`: Set this to our own prebuilt `neard-sandbox` bin path if we want to use a non-default version of the sandbox or configure nearcore with our own custom features that we want to test in workspaces. - `NEAR_SANDBOX_MAX_PAYLOAD_SIZE`: Sets the max payload size for sending transaction commits to sandbox. The default is 1gb and is necessary for patching large states. -- `NEAR_SANDBOX_MAX_FILES`: Set the max amount of files that can be opened at a time in the sandbox. If none is specified, the default size of 4096 will be used. The actual near chain will use over 10,000 in pratice, but for testing this should be much lower since we do not have a constantly running blockchain unless our tests take up that much time. +- `NEAR_SANDBOX_MAX_FILES`: Set the max amount of files that can be opened at a time in the sandbox. If none is specified, the default size of 4096 will be used. The actual near chain will use over 10,000 in practice, but for testing this should be much lower since we do not have a constantly running blockchain unless our tests take up that much time. diff --git a/workspaces/src/network/betanet.rs b/workspaces/src/network/betanet.rs index a54cbd82..d47cba28 100644 --- a/workspaces/src/network/betanet.rs +++ b/workspaces/src/network/betanet.rs @@ -13,7 +13,7 @@ pub const RPC_URL: &str = "https://rpc.betanet.near.org"; /// is not currently supported, and these calls into creating a betanet /// worker is meant for retrieving data and/or making queries only. /// Also, note that betanet can be unstable and does not provide an -/// archival endpoint similiar to that of mainnet. +/// archival endpoint similar to that of mainnet. /// /// [`workspaces::betanet`]: crate::betanet /// [`workspaces::betanet_archival`]: crate::betanet_archival diff --git a/workspaces/src/network/builder.rs b/workspaces/src/network/builder.rs index c0c69ca5..3e281e22 100644 --- a/workspaces/src/network/builder.rs +++ b/workspaces/src/network/builder.rs @@ -75,7 +75,7 @@ impl<'a, T> NetworkBuilder<'a, T> { impl NetworkBuilder<'_, Sandbox> { /// Specify how to fetch the validator key of the manually spawned sandbox node. /// We are expected to init our own sandbox before running this builder. To learn more - /// about initalizing and starting our own sandbox, go to [near-sandbox](https://github.com/near/sandbox). + /// about initializing and starting our own sandbox, go to [near-sandbox](https://github.com/near/sandbox). /// This can be either set to a known key value or to the home directory where all the chain data lives. /// This is the `my_home_folder` we passed into `near-sandbox --home {my_home_folder} init`. pub fn validator_key(mut self, validator_key: ValidatorKey) -> Self { diff --git a/workspaces/src/network/sandbox.rs b/workspaces/src/network/sandbox.rs index f6215402..bfe5865f 100644 --- a/workspaces/src/network/sandbox.rs +++ b/workspaces/src/network/sandbox.rs @@ -72,7 +72,7 @@ impl FromNetworkBuilder for Sandbox { // Spawn a new sandbox since rpc_url and home_dir weren't specified: (None, None) => SandboxServer::run_new().await?, - // Missing inputted paramters for sandbox: + // Missing inputted parameters for sandbox: (Some(rpc_url), None) => { return Err(SandboxErrorCode::InitFailure.message(format!( "Custom rpc_url={rpc_url} requires validator_key set." diff --git a/workspaces/src/network/server.rs b/workspaces/src/network/server.rs index 44bb2a0a..afff0bbd 100644 --- a/workspaces/src/network/server.rs +++ b/workspaces/src/network/server.rs @@ -102,8 +102,8 @@ impl SandboxServer { /// Run a new SandboxServer, spawning the sandbox node in the process. pub(crate) async fn run_new() -> Result { - // Supress logs for the sandbox binary by default: - supress_sandbox_logs_if_required(); + // Suppress logs for the sandbox binary by default: + suppress_sandbox_logs_if_required(); let home_dir = init_home_dir().await?.into_path(); // Configure `$home_dir/config.json` to our liking. Sandbox requires extra settings @@ -215,18 +215,18 @@ impl Drop for SandboxServer { } /// Turn off neard-sandbox logs by default. Users can turn them back on with -/// NEAR_ENABLE_SANDBOX_LOG=1 and specify further paramters with the custom +/// NEAR_ENABLE_SANDBOX_LOG=1 and specify further parameters with the custom /// NEAR_SANDBOX_LOG for higher levels of specificity. NEAR_SANDBOX_LOG args /// will be forward into RUST_LOG environment variable as to not conflict /// with similar named log targets. -fn supress_sandbox_logs_if_required() { +fn suppress_sandbox_logs_if_required() { if let Ok(val) = std::env::var("NEAR_ENABLE_SANDBOX_LOG") { if val != "0" { return; } } - // non-exhaustive list of targets to supress, since choosing a default LogLevel + // non-exhaustive list of targets to suppress, since choosing a default LogLevel // does nothing in this case, since nearcore seems to be overriding it somehow: std::env::set_var("NEAR_SANDBOX_LOG", "near=error,stats=error,network=error"); } diff --git a/workspaces/src/operations.rs b/workspaces/src/operations.rs index 31b5da45..d0fb24c6 100644 --- a/workspaces/src/operations.rs +++ b/workspaces/src/operations.rs @@ -62,7 +62,7 @@ impl Function { self } - /// Similiar to `args`, specify an argument that is JSON serializable and can be + /// Similar to `args`, specify an argument that is JSON serializable and can be /// accepted by the equivalent contract. Recommend to use something like /// `serde_json::json!` macro to easily serialize the arguments. pub fn args_json(mut self, args: U) -> Self { @@ -73,7 +73,7 @@ impl Function { self } - /// Similiar to `args`, specify an argument that is borsh serializable and can be + /// Similar to `args`, specify an argument that is borsh serializable and can be /// accepted by the equivalent contract. pub fn args_borsh(mut self, args: U) -> Self { match args.try_to_vec() { @@ -264,7 +264,7 @@ impl Transaction { } } -/// Similiar to a [`Transaction`], but more specific to making a call into a contract. +/// Similar to a [`Transaction`], but more specific to making a call into a contract. /// Note, only one call can be made per `CallTransaction`. pub struct CallTransaction { worker: Worker, @@ -296,7 +296,7 @@ impl CallTransaction { self } - /// Similiar to `args`, specify an argument that is JSON serializable and can be + /// Similar to `args`, specify an argument that is JSON serializable and can be /// accepted by the equivalent contract. Recommend to use something like /// `serde_json::json!` macro to easily serialize the arguments. pub fn args_json(mut self, args: U) -> Self { @@ -304,7 +304,7 @@ impl CallTransaction { self } - /// Similiar to `args`, specify an argument that is borsh serializable and can be + /// Similar to `args`, specify an argument that is borsh serializable and can be /// accepted by the equivalent contract. pub fn args_borsh(mut self, args: U) -> Self { self.function = self.function.args_borsh(args); @@ -384,7 +384,7 @@ impl CallTransaction { } } -/// Similiar to a [`Transaction`], but more specific to creating an account. +/// Similar to a [`Transaction`], but more specific to creating an account. /// This transaction will create a new account with the specified `receiver_id` pub struct CreateAccountTransaction<'a, 'b> { worker: &'a Worker, diff --git a/workspaces/src/rpc/query.rs b/workspaces/src/rpc/query.rs index ec206399..f8710b04 100644 --- a/workspaces/src/rpc/query.rs +++ b/workspaces/src/rpc/query.rs @@ -216,7 +216,7 @@ impl Query<'_, ViewFunction> { self } - /// Similiar to `args`, specify an argument that is JSON serializable and can be + /// Similar to `args`, specify an argument that is JSON serializable and can be /// accepted by the equivalent contract. Recommend to use something like /// `serde_json::json!` macro to easily serialize the arguments. pub fn args_json(mut self, args: U) -> Self { @@ -224,7 +224,7 @@ impl Query<'_, ViewFunction> { self } - /// Similiar to `args`, specify an argument that is borsh serializable and can be + /// Similar to `args`, specify an argument that is borsh serializable and can be /// accepted by the equivalent contract. pub fn args_borsh(mut self, args: U) -> Self { self.method.function = self.method.function.args_borsh(args); @@ -404,7 +404,7 @@ impl ProcessQuery for GasPrice { /// and either block [`CryptoHash`] or [`BlockHeight`]). /// /// The default behavior where a `ChunkReference` is not supplied will use a `BlockShardId` -/// referencing the lastest block `CryptoHash` with `ShardId` of 0. +/// referencing the latest block `CryptoHash` with `ShardId` of 0. pub struct QueryChunk<'a> { client: &'a Client, chunk_ref: Option, diff --git a/workspaces/src/types/account.rs b/workspaces/src/types/account.rs index a84ae4ae..175a111f 100644 --- a/workspaces/src/types/account.rs +++ b/workspaces/src/types/account.rs @@ -304,7 +304,7 @@ impl Contract { } /// Deletes the current contract, and returns the execution details of this - /// transaction. The beneciary will receive the funds of the account deleted + /// transaction. The beneficiary will receive the funds of the account deleted pub async fn delete_contract(self, beneficiary_id: &AccountId) -> Result { self.account.delete_account(beneficiary_id).await } @@ -337,7 +337,7 @@ impl AccountDetails { AccountView { amount: self.balance, locked: self.locked, - // unwrap guranteed to succeed unless CryptoHash impls have changed in near_primitives. + // unwrap guaranteed to succeed unless CryptoHash impls have changed in near_primitives. code_hash: near_primitives::hash::CryptoHash(self.code_hash.0), storage_usage: self.storage_usage, storage_paid_at: self.storage_paid_at, diff --git a/workspaces/src/types/mod.rs b/workspaces/src/types/mod.rs index 701b5426..27d13559 100644 --- a/workspaces/src/types/mod.rs +++ b/workspaces/src/types/mod.rs @@ -382,7 +382,7 @@ pub struct FunctionCallPermission { // This isn't an AccountId because already existing records in testnet genesis have invalid // values for this field (see: https://github.com/near/nearcore/pull/4621#issuecomment-892099860) - // we accomodate those by using a string, allowing us to read and parse genesis. + // we accommodate those by using a string, allowing us to read and parse genesis. /// The access key only allows transactions with the given receiver's account id. pub receiver_id: String, @@ -444,7 +444,7 @@ pub enum Finality { /// Optimistic finality. The latest block recorded on the node that responded to our query /// (<1 second delay after the transaction is submitted). Optimistic, - /// Near-final finality. Similiarly to `Final` finality, but delay should be roughly 1 second. + /// Near-final finality. Similarly to `Final` finality, but delay should be roughly 1 second. DoomSlug, /// Final finality. The block that has been validated on at least 66% of the nodes in the /// network. (At max, should be 2 second delay after the transaction is submitted.)