From 193250c65a4434ccfc070444ea2afa4fdf56399e Mon Sep 17 00:00:00 2001 From: tabVersion Date: Sun, 17 Mar 2024 15:52:13 +0800 Subject: [PATCH 1/2] add workflow Signed-off-by: tabVersion --- .github/workflows/typo-checker.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/typo-checker.yml diff --git a/.github/workflows/typo-checker.yml b/.github/workflows/typo-checker.yml new file mode 100644 index 0000000000..e3a7b39dac --- /dev/null +++ b/.github/workflows/typo-checker.yml @@ -0,0 +1,12 @@ +name: Typo Checker +on: [pull_request] + +jobs: + run: + name: Spell Check with Typos + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v2 + - name: Check spelling of the entire repository + uses: crate-ci/typos@v1.11.1 From 7238112aea6ec37f72bde456ade86a81b3f0120d Mon Sep 17 00:00:00 2001 From: tabVersion Date: Sat, 23 Mar 2024 16:41:28 +0800 Subject: [PATCH 2/2] fix typos Signed-off-by: tabVersion --- .typos.toml | 3 +++ CHANGELOG.md | 12 ++++++------ contracts/examples/bonding-curve-contract/README.md | 2 +- .../bonding-curve-contract/src/function_selector.rs | 2 +- .../examples/crypto-kitties/common/random/src/lib.rs | 2 +- contracts/examples/crypto-kitties/documentation.md | 4 ++-- contracts/examples/digital-cash/README.md | 2 +- .../scenarios/pay-fee-and-fund-egld.scen.json | 2 +- .../digital-cash/src/signature_operations.rs | 4 ++-- contracts/examples/esdt-transfer-with-fee/README.md | 10 +++++----- .../multisig/interact/src/multisig_interact_nfts.rs | 4 ++-- .../multisig/interact/src/multisig_interact_wegld.rs | 4 ++-- contracts/examples/nft-minter/readme.md | 2 +- contracts/examples/order-book/pair/src/validation.rs | 2 +- ...on => ping-pong-call-ping-wrong-amount.scen.json} | 2 +- .../tests/ping_pong_egld_scenario_go_test.rs | 2 +- .../tests/ping_pong_egld_scenario_rs_test.rs | 2 +- ...ho_ser_ex_1.scen.json => echo_set_ex_1.scen.json} | 4 ++-- .../parent/src/lib.rs | 4 ++-- .../composability/forwarder-raw/src/forwarder_raw.rs | 2 +- .../forwarder-raw/src/forwarder_raw_alt_init.rs | 2 +- .../forwarder-raw/src/forwarder_raw_async.rs | 2 +- .../promises-features/src/call_sync_bt.rs | 2 +- .../forwarder_call_sync_retrieve_egld_bt.scen.json | 2 +- .../forwarder_call_sync_retrieve_esdt_bt.scen.json | 2 +- .../forwarder_call_sync_retrieve_nft_bt.scen.json | 2 +- ...n => forwarder_transfer_esdt_with_fees.scen.json} | 0 .../tests/composability_scenario_go_test.rs | 2 +- .../tests/composability_scenario_rs_test.rs | 2 +- .../transfer-role-features/interactions/snippets.sh | 2 +- .../feature-tests/composability/vault/src/vault.rs | 2 +- .../vault/wasm-vault-promises/src/lib.rs | 2 +- .../composability/vault/wasm/src/lib.rs | 2 +- .../erc1155-marketplace/src/lib.rs | 2 +- .../erc-style-contracts/erc1155/src/erc1155.rs | 12 ++++++------ .../scenarios/nft-transfer-approved-token.scen.json | 2 +- .../erc721/scenarios/nft-transfer-token-ok.scen.json | 2 +- .../lottery-erc20/documentation.md | 2 +- .../rust-testing-framework-tester/src/lib.rs | 2 +- .../tests/tester_whitebox_legacy_test.rs | 2 +- .../rust-testing-framework-tester/wasm/src/lib.rs | 2 +- .../use-module/use_module_expected_main.abi.json | 2 +- contracts/modules/src/governance/README.md | 4 ++-- contracts/modules/src/governance/mod.rs | 4 ++-- data/codec/src/codec_err_handler.rs | 4 ++-- data/codec/src/impl_for_types/impl_phantom.rs | 4 ++-- data/codec/src/impl_for_types/impl_slice.rs | 2 +- data/codec/src/multi/top_en_multi.rs | 2 +- data/codec/src/single/top_de.rs | 2 +- data/codec/src/single/top_en.rs | 2 +- framework/base/src/abi/build_info_abi.rs | 2 +- framework/base/src/abi/type_description_container.rs | 4 ++-- .../base/src/api/external_view/ev_storage_api.rs | 4 ++-- .../src/contract_base/wrappers/call_value_wrapper.rs | 2 +- .../base/src/contract_base/wrappers/send_wrapper.rs | 4 ++-- framework/base/src/esdt/system_sc_proxy.rs | 2 +- framework/base/src/external_view_contract.rs | 4 ++-- framework/base/src/formatter/formatter_impl_num.rs | 4 ++-- framework/base/src/hex_call_data/cd_de.rs | 2 +- framework/base/src/hex_call_data/cd_ser.rs | 2 +- framework/base/src/types/heap/boxed_bytes.rs | 2 +- framework/base/src/types/heap/queue.rs | 4 ++-- framework/base/src/types/managed/basic/big_int.rs | 2 +- .../managed/wrapped/egld_or_esdt_token_identifier.rs | 2 +- framework/base/tests/formatter_test.rs | 2 +- framework/derive/src/generate/auto_impl_proxy.rs | 2 +- framework/derive/src/model/payable.rs | 2 +- framework/derive/src/parse/attributes/util.rs | 4 ++-- framework/derive/src/parse/supertrait_parse.rs | 2 +- framework/meta/src/abi_json.rs | 2 +- framework/meta/src/cargo_toml_contents.rs | 2 +- framework/meta/src/cli_args/cli_args_standalone.rs | 4 ++-- .../contract_variant_settings/contract_allocator.rs | 2 +- .../meta/src/cmd/contract/sc_config/wasm_build.rs | 4 ++-- .../src/cmd/standalone/scen_test_gen/stg_section.rs | 2 +- .../src/cmd/standalone/template/template_adjuster.rs | 10 +++++----- framework/meta/src/tools/wasm_extractor.rs | 2 +- .../src/scenario/model/step/into_blockchain_call.rs | 2 +- .../src/scenario/model/step/typed_sc_call.rs | 2 +- .../src/scenario/model/step/typed_sc_query.rs | 2 +- framework/scenario/src/standalone/account_tool.rs | 6 +++--- .../src/whitebox_legacy/contract_obj_wrapper.rs | 2 +- .../tests/scenarios-io/example_normalized.scen.json | 2 +- .../tests/scenarios-io/example_raw.scen.json | 2 +- .../set-check/set-check-esdt.scen.json | 6 +++--- framework/scenario/tests/scenarios_self_test.rs | 2 +- framework/scenario/tests/single_tx_api_test.rs | 2 +- sdk/core/src/blockchain.rs | 6 +++--- .../multiversx_sc_lldb_pretty_printers.py | 2 +- vm/src/tx_execution/exec_call.rs | 2 +- vm/src/tx_mock/tx_cache.rs | 2 +- vm/src/vm_hooks/vh_impl/vh_debug_api.rs | 2 +- vm/src/vm_hooks/vh_impl/vh_single_tx_api.rs | 2 +- vm/src/vm_hooks/vh_impl/vh_static_api.rs | 2 +- 94 files changed, 138 insertions(+), 135 deletions(-) create mode 100644 .typos.toml rename contracts/examples/ping-pong-egld/scenarios/{ping-pong-call-ping-wrong-ammount.scen.json => ping-pong-call-ping-wrong-amount.scen.json} (97%) rename contracts/feature-tests/alloc-features/scenarios/{echo_ser_ex_1.scen.json => echo_set_ex_1.scen.json} (97%) rename contracts/feature-tests/composability/scenarios/{forwarder_tranfer_esdt_with_fees.scen.json => forwarder_transfer_esdt_with_fees.scen.json} (100%) diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000000..b623785904 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,3 @@ +[files] +extend-exclude = ["framework/scenario/src/scenario/model/transaction/tx_response.rs"] + diff --git a/CHANGELOG.md b/CHANGELOG.md index c69c506421..ba1e57dbdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -237,7 +237,7 @@ They are: ## [sc 0.39.5, vm 0.1.5] - 2023-02-06 - `multiversx-sc-meta` improvements: - Rust snippet generator fixes. The generator creates compilable code with appropriate argument types. - - `local-deps` command: generates a report on the local depedencies of contract crates. Will explore indirect depdencies too. + - `local-deps` command: generates a report on the local dependencies of contract crates. Will explore indirect dependencies too. - Upgrade tool minor fix. ## [sc 0.39.4, vm 0.1.4] - 2023-01-26 @@ -263,7 +263,7 @@ They are: ## [sc 0.39.1, codec 0.17.1, vm 0.1.1, scenario-format 0.19.1, sdk 0.1.1] - 2023-01-18 - `multiversx-sc-meta` can be installed as a standalone tool (`sc-meta`), and used to automatically upgrade contracts. -- Many depedencies updates across the repo. +- Many dependencies updates across the repo. - Updated readme files. ## [sc 0.39.0, codec 0.17.0, vm 0.1.0, scenario-format 0.19.0, sdk 0.1.0] - 2023-01-12 @@ -531,7 +531,7 @@ They are: - Made the generated code in `wasm/lib.rs` more compact with the use of macros. ## [elrond-wasm 0.22.0] - 2021-11-02 -- Mechanism for generating contract endpoints based on ABI. Previously, all endpoints from all modules from a crate were automaticaly included, now they can be filtered based on what modules are used. +- Mechanism for generating contract endpoints based on ABI. Previously, all endpoints from all modules from a crate were automatically included, now they can be filtered based on what modules are used. - Contract `meta` crates are now capable of building the respective contracts and the ABIs without relying on `erdpy`. - Renamed feature `arwen-tests` to `mandos-go-tests` @@ -618,7 +618,7 @@ They are: - Send API refactored for more consistency and ease of use. - High level proxies can be used to deploy contracts. - Mandos log syntax updated, to match Arwen. -- A better `#[only_owner]` annotation, which can be applied directly to endoint methods. This annotation also shows up in the ABI. +- A better `#[only_owner]` annotation, which can be applied directly to endpoint methods. This annotation also shows up in the ABI. - `elrond-wasm-derive` now an optional dependency of `elrond-wasm`. Use `#[elrond_wasm::contract]` instead of `#[elrond_wasm_derive::contract]` now. Same for proxies and modules. ## [elrond-wasm 0.17.4] - 2021-06-30 @@ -773,7 +773,7 @@ They are: - ABI generation of endpoint output names ## [elrond-wasm 0.10.2, elrond-codec 0.4.2] - 2020-12-28 -- Codec type hygene +- Codec type hygiene ## [elrond-wasm 0.10.1, elrond-codec 0.4.1, mandos 0.4.1] - 2020-12-23 - Minor fixes, support for strings @@ -928,7 +928,7 @@ They are: - Async call contract proxy infrastructure ## [elrond-wasm 0.1.0] - 2020-02-05 -- Initial relase of the framework +- Initial release of the framework - Main features at this time: - contract main macro - handling of arguments and results automagically using macros diff --git a/contracts/examples/bonding-curve-contract/README.md b/contracts/examples/bonding-curve-contract/README.md index 4170afaa3a..831ebd3e50 100644 --- a/contracts/examples/bonding-curve-contract/README.md +++ b/contracts/examples/bonding-curve-contract/README.md @@ -18,7 +18,7 @@ The payment was chosen to be stored under a storage named `BondingCurve` because Here the balance and the payment amount are variable and they will usually get changed together, reason why it was chosen for these elements to be kept away from `token_details`. -**Important!** Only 1 seller can have a specific token to be sold at a time, avoiding this way scenarion of which token from which seller should be selled at one point. +**Important!** Only 1 seller can have a specific token to be sold at a time, avoiding this way scenario of which token from which seller should be selled at one point. There is an option of `sell_availability` which can be set from the `init` of the contract allowing or denying a token once bought by a buyer to be sold back. diff --git a/contracts/examples/bonding-curve-contract/src/function_selector.rs b/contracts/examples/bonding-curve-contract/src/function_selector.rs index 218a490c9c..5f7e17c2a1 100644 --- a/contracts/examples/bonding-curve-contract/src/function_selector.rs +++ b/contracts/examples/bonding-curve-contract/src/function_selector.rs @@ -32,7 +32,7 @@ impl CurveFunction for FunctionSelector { &(&sum * &sum * sum / 3u32) + &arguments.balance + initial_cost.clone() }, FunctionSelector::None => { - M::error_api_impl().signal_error(b"Bonding Curve function is not assiged") + M::error_api_impl().signal_error(b"Bonding Curve function is not assigned") }, } } diff --git a/contracts/examples/crypto-kitties/common/random/src/lib.rs b/contracts/examples/crypto-kitties/common/random/src/lib.rs index 46ddd076d6..7dd3b01ef2 100644 --- a/contracts/examples/crypto-kitties/common/random/src/lib.rs +++ b/contracts/examples/crypto-kitties/common/random/src/lib.rs @@ -16,7 +16,7 @@ pub struct Random { // usually, types should create their own `random` instance, // but because standalone types can't create a random seed -// (due to no access to blockhain functions), +// (due to no access to blockchain functions), // the method will use a provided `random` instance pub trait Randomizeable { fn get_random(random: &mut Random) -> Self; diff --git a/contracts/examples/crypto-kitties/documentation.md b/contracts/examples/crypto-kitties/documentation.md index 147a9199ca..935462ac68 100644 --- a/contracts/examples/crypto-kitties/documentation.md +++ b/contracts/examples/crypto-kitties/documentation.md @@ -201,7 +201,7 @@ This function ends the auction for the kitty if one of the end conditions has be Anyone may call this function, not only the ones involved in the auction. -If this was a selling auction, the `current_bid` is sent to the `kitty_owner` and the kitty's ownership is transfered to `current_winner`. Auction is then cleared from storage. +If this was a selling auction, the `current_bid` is sent to the `kitty_owner` and the kitty's ownership is transferred to `current_winner`. Auction is then cleared from storage. If this was a siring auction, the `current_bid` is sent to the `kitty_owner` and the kitty's `sire_allowed_address` is set to `current_winner`. @@ -233,7 +233,7 @@ fn init( ) ``` -Each breeding will cost a fixed amount of eGLD. The birth operation can cost a lot of gas, depending on the implementation of the genetic algortihm, so whoever calls the give_birth method (will be discussed later) will get the deposited `birth_fee`. +Each breeding will cost a fixed amount of eGLD. The birth operation can cost a lot of gas, depending on the implementation of the genetic algorithm, so whoever calls the give_birth method (will be discussed later) will get the deposited `birth_fee`. The next two arguments are the addresses of the other two contracts: the kitty-auction contract and the kitty-genetic-alg contract. These can either be set now or later by the owner, using the appropriate setter methods. diff --git a/contracts/examples/digital-cash/README.md b/contracts/examples/digital-cash/README.md index a3856cc84c..f7c1732389 100644 --- a/contracts/examples/digital-cash/README.md +++ b/contracts/examples/digital-cash/README.md @@ -12,7 +12,7 @@ In order to fund one should first call `deposit_fees` depositing the fee funds a `fund` after making sure everything is ok on the fee aspect will set up the `deposit` storage increasing the number of tokens to transfer by the number of tokens paid to the endpoint and set the expiration date by the number of rounds specified within the `valability` parameter. -The fees are unique per address and only cover one instance of transfer, either if it is a `claim` or a `forward`, per number of tokens transfered. Only by making one of these actions will consume the fee funds following to to refund the rest of the fees to the depositor. +The fees are unique per address and only cover one instance of transfer, either if it is a `claim` or a `forward`, per number of tokens transferred. Only by making one of these actions will consume the fee funds following to to refund the rest of the fees to the depositor. ## Claiming funds diff --git a/contracts/examples/digital-cash/scenarios/pay-fee-and-fund-egld.scen.json b/contracts/examples/digital-cash/scenarios/pay-fee-and-fund-egld.scen.json index 4c66d33df3..0f3f8b4bd9 100644 --- a/contracts/examples/digital-cash/scenarios/pay-fee-and-fund-egld.scen.json +++ b/contracts/examples/digital-cash/scenarios/pay-fee-and-fund-egld.scen.json @@ -1,5 +1,5 @@ { - "name": "pay-fee-adn-fund-egld", + "name": "pay-fee-and-fund-egld", "steps": [ { "step": "externalSteps", diff --git a/contracts/examples/digital-cash/src/signature_operations.rs b/contracts/examples/digital-cash/src/signature_operations.rs index 3da7143f88..1bf86fd0fb 100644 --- a/contracts/examples/digital-cash/src/signature_operations.rs +++ b/contracts/examples/digital-cash/src/signature_operations.rs @@ -57,14 +57,14 @@ pub trait SignatureOperationsModule: storage::StorageModule + helpers::HelpersMo let block_round = self.blockchain().get_block_round(); let deposit = deposit_mapper.take(); - let num_tokens_transfered = deposit.get_num_tokens(); + let num_tokens_transferred = deposit.get_num_tokens(); let mut deposited_fee = deposit.fees.value; let fee_token = deposited_fee.token_identifier.clone(); let fee = self.fee(&fee_token).get(); require!(deposit.expiration_round >= block_round, "deposit expired"); - let fee_cost = fee * num_tokens_transfered as u64; + let fee_cost = fee * num_tokens_transferred as u64; deposited_fee.amount -= &fee_cost; self.collected_fees(&fee_token) diff --git a/contracts/examples/esdt-transfer-with-fee/README.md b/contracts/examples/esdt-transfer-with-fee/README.md index e3884edf3d..b92f1fc187 100644 --- a/contracts/examples/esdt-transfer-with-fee/README.md +++ b/contracts/examples/esdt-transfer-with-fee/README.md @@ -1,13 +1,13 @@ # Interaction -The contract allows transfering token with the `ESDTRoleTransfer` role. +The contract allows transferring token with the `ESDTRoleTransfer` role. The owner can set a fee for the contract, being one of 2 possible types: -- `ExactValue` - `EsdtTokenPayment` type with desired token + amount per token transfered -- `Percentage` - % of the transfered token (this number is multiplied by 100 so that we can have 2 decimal percentages. ex.: 12,50% percentage fee will be set with 1250) +- `ExactValue` - `EsdtTokenPayment` type with desired token + amount per token transferred +- `Percentage` - % of the transferred token (this number is multiplied by 100 so that we can have 2 decimal percentages. ex.: 12,50% percentage fee will be set with 1250) The transfer endpoint requires the tokens having a `ExactValue` type fee to have the fee as the following token in exact amount. -The `Percentage` type will make the fee to be taken from the value transfered. +The `Percentage` type will make the fee to be taken from the value transferred. -Tokens that have no fee set will be simply transfered without additional requirements. +Tokens that have no fee set will be simply transferred without additional requirements. diff --git a/contracts/examples/multisig/interact/src/multisig_interact_nfts.rs b/contracts/examples/multisig/interact/src/multisig_interact_nfts.rs index ab8fa001f7..7b3e39e954 100644 --- a/contracts/examples/multisig/interact/src/multisig_interact_nfts.rs +++ b/contracts/examples/multisig/interact/src/multisig_interact_nfts.rs @@ -68,7 +68,7 @@ impl MultisigInteract { println!("proposing issue collection with all roles..."); let action_id = self.propose_issue_collection_with_all_roles().await; - println!("perfoming issue collection with all roles action `{action_id}`..."); + println!("performing issue collection with all roles action `{action_id}`..."); if !self.quorum_reached(action_id).await && !self.sign(action_id).await { return; @@ -126,7 +126,7 @@ impl MultisigInteract { println!("proposing issue collection..."); let action_id = self.propose_issue_collection().await; - println!("perfoming issue collection action `{action_id}`..."); + println!("performing issue collection action `{action_id}`..."); if !self.quorum_reached(action_id).await && !self.sign(action_id).await { return; diff --git a/contracts/examples/multisig/interact/src/multisig_interact_wegld.rs b/contracts/examples/multisig/interact/src/multisig_interact_wegld.rs index a0d105abd9..a1a16d0f3c 100644 --- a/contracts/examples/multisig/interact/src/multisig_interact_wegld.rs +++ b/contracts/examples/multisig/interact/src/multisig_interact_wegld.rs @@ -33,7 +33,7 @@ impl MultisigInteract { println!("proposing wrap egld..."); let action_id = self.propose_wrap_egld().await; - println!("perfoming wrap egld action `{action_id}`..."); + println!("performing wrap egld action `{action_id}`..."); self.perform_action(action_id, "15,000,000").await; } @@ -41,7 +41,7 @@ impl MultisigInteract { println!("proposing unwrap egld..."); let action_id = self.propose_unwrap_egld().await; - println!("perfoming unwrap egld action `{action_id}`..."); + println!("performing unwrap egld action `{action_id}`..."); self.perform_action(action_id, "15,000,000").await; } diff --git a/contracts/examples/nft-minter/readme.md b/contracts/examples/nft-minter/readme.md index 9e0ecaf46f..84fae6e8a0 100644 --- a/contracts/examples/nft-minter/readme.md +++ b/contracts/examples/nft-minter/readme.md @@ -22,7 +22,7 @@ fn issue_token(&self, token_name: ManagedBuffer, token_ticker: ManagedBuffer) The endpoint needs a 0.05 EGLD payment for the token issue (note: if you use mxpy directly, you need to pass 0.05 * 10^18 as --value, i.e. 50000000000000000). -`token_name` is the disply name that will be shown on the explorer in the user's balance, while `token_ticker` is the prefix of the token identifier that will be created. The token identifier is the token ticker + a dash (`-`) and 6 random hex characters. This is done to be able to differentiate between tokens with the same ticker. More information can be found here: https://docs.multiversx.com/tokens/esdt-tokens +`token_name` is the display name that will be shown on the explorer in the user's balance, while `token_ticker` is the prefix of the token identifier that will be created. The token identifier is the token ticker + a dash (`-`) and 6 random hex characters. This is done to be able to differentiate between tokens with the same ticker. More information can be found here: https://docs.multiversx.com/tokens/esdt-tokens Once the issue is complete, you have to set the NFTCreate local role, which can be done through the `setLocalRoles` endpoint. No arguments and no payment required. diff --git a/contracts/examples/order-book/pair/src/validation.rs b/contracts/examples/order-book/pair/src/validation.rs index 488edbdb24..3aebd83c97 100644 --- a/contracts/examples/order-book/pair/src/validation.rs +++ b/contracts/examples/order-book/pair/src/validation.rs @@ -13,7 +13,7 @@ use super::{ #[multiversx_sc::module] pub trait ValidationModule: common::CommonModule { fn require_valid_order_input_amount(&self, params: &OrderInputParams) { - require!(params.amount != BigUint::zero(), "Amout cannot be zero"); + require!(params.amount != BigUint::zero(), "Amount cannot be zero"); require!( self.calculate_fee_amount( ¶ms.amount, diff --git a/contracts/examples/ping-pong-egld/scenarios/ping-pong-call-ping-wrong-ammount.scen.json b/contracts/examples/ping-pong-egld/scenarios/ping-pong-call-ping-wrong-amount.scen.json similarity index 97% rename from contracts/examples/ping-pong-egld/scenarios/ping-pong-call-ping-wrong-ammount.scen.json rename to contracts/examples/ping-pong-egld/scenarios/ping-pong-call-ping-wrong-amount.scen.json index b80ed7ad3b..304cc4e411 100644 --- a/contracts/examples/ping-pong-egld/scenarios/ping-pong-call-ping-wrong-ammount.scen.json +++ b/contracts/examples/ping-pong-egld/scenarios/ping-pong-call-ping-wrong-amount.scen.json @@ -1,5 +1,5 @@ { - "name": "try to ping the wrong ammount of funds", + "name": "try to ping the wrong amount of funds", "gasSchedule": "v3", "steps": [ { diff --git a/contracts/examples/ping-pong-egld/tests/ping_pong_egld_scenario_go_test.rs b/contracts/examples/ping-pong-egld/tests/ping_pong_egld_scenario_go_test.rs index 4f8d99bd7f..57fc13865e 100644 --- a/contracts/examples/ping-pong-egld/tests/ping_pong_egld_scenario_go_test.rs +++ b/contracts/examples/ping-pong-egld/tests/ping_pong_egld_scenario_go_test.rs @@ -40,7 +40,7 @@ fn ping_pong_call_ping_twice_go() { } #[test] -fn ping_pong_call_ping_wrong_ammount_go() { +fn ping_pong_call_ping_wrong_amount_go() { world().run("scenarios/ping-pong-call-ping-wrong-ammount.scen.json"); } diff --git a/contracts/examples/ping-pong-egld/tests/ping_pong_egld_scenario_rs_test.rs b/contracts/examples/ping-pong-egld/tests/ping_pong_egld_scenario_rs_test.rs index ccec7f5ca9..692cf02b5d 100644 --- a/contracts/examples/ping-pong-egld/tests/ping_pong_egld_scenario_rs_test.rs +++ b/contracts/examples/ping-pong-egld/tests/ping_pong_egld_scenario_rs_test.rs @@ -47,7 +47,7 @@ fn ping_pong_call_ping_twice_rs() { } #[test] -fn ping_pong_call_ping_wrong_ammount_rs() { +fn ping_pong_call_ping_wrong_amount_rs() { world().run("scenarios/ping-pong-call-ping-wrong-ammount.scen.json"); } diff --git a/contracts/feature-tests/alloc-features/scenarios/echo_ser_ex_1.scen.json b/contracts/feature-tests/alloc-features/scenarios/echo_set_ex_1.scen.json similarity index 97% rename from contracts/feature-tests/alloc-features/scenarios/echo_ser_ex_1.scen.json rename to contracts/feature-tests/alloc-features/scenarios/echo_set_ex_1.scen.json index c5c19db0b6..3f08e9f576 100644 --- a/contracts/feature-tests/alloc-features/scenarios/echo_ser_ex_1.scen.json +++ b/contracts/feature-tests/alloc-features/scenarios/echo_set_ex_1.scen.json @@ -21,7 +21,7 @@ "tx": { "from": "address:an_account", "to": "sc:alloc-features", - "function": "echo_ser_example_1", + "function": "echo_set_example_1", "arguments": [ { "0-int": "u16:0", @@ -71,7 +71,7 @@ "tx": { "from": "address:an_account", "to": "sc:alloc-features", - "function": "echo_boxed_ser_example_1", + "function": "echo_boxed_set_example_1", "arguments": [ { "3-uint_32": "u32:5", diff --git a/contracts/feature-tests/composability/execute-on-dest-esdt-issue-callback/parent/src/lib.rs b/contracts/feature-tests/composability/execute-on-dest-esdt-issue-callback/parent/src/lib.rs index ddb8a09a09..19e1b685db 100644 --- a/contracts/feature-tests/composability/execute-on-dest-esdt-issue-callback/parent/src/lib.rs +++ b/contracts/feature-tests/composability/execute-on-dest-esdt-issue-callback/parent/src/lib.rs @@ -39,9 +39,9 @@ pub trait Parent { initial_supply: BigUint, ) { let issue_cost = self.call_value().egld_value(); - let child_contract_adress = self.child_contract_address().get(); + let child_contract_address = self.child_contract_address().get(); let _: IgnoreValue = self - .child_proxy(child_contract_adress) + .child_proxy(child_contract_address) .issue_wrapped_egld(token_display_name, token_ticker, initial_supply) .with_egld_transfer(issue_cost.clone_value()) .with_gas_limit(ISSUE_EXPECTED_GAS_COST) diff --git a/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw.rs b/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw.rs index d481fd6746..3fc1cd245e 100644 --- a/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw.rs +++ b/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw.rs @@ -13,7 +13,7 @@ multiversx_sc::imports!(); /// TODO: split into modules #[multiversx_sc::contract] pub trait ForwarderRaw: - forwarder_raw_alt_init::ForwarderRawAlterativeInit + forwarder_raw_alt_init::ForwarderRawAlternativeInit + forwarder_raw_common::ForwarderRawCommon + forwarder_raw_async::ForwarderRawAsync + forwarder_raw_sync::ForwarderRawSync diff --git a/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw_alt_init.rs b/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw_alt_init.rs index 79cab17a11..2a3d358b77 100644 --- a/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw_alt_init.rs +++ b/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw_alt_init.rs @@ -5,7 +5,7 @@ multiversx_sc::imports!(); /// We are using the multi-contract build system, to avoid having too many SC crates. /// We need to generate a separate contract for each of these constructors. #[multiversx_sc::module] -pub trait ForwarderRawAlterativeInit: super::forwarder_raw_common::ForwarderRawCommon { +pub trait ForwarderRawAlternativeInit: super::forwarder_raw_common::ForwarderRawCommon { /// Will not work, only written for VM testing. /// /// Async calls are explicitly forbidden in constructors. diff --git a/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw_async.rs b/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw_async.rs index 25d8868298..1c6720df80 100644 --- a/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw_async.rs +++ b/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw_async.rs @@ -182,7 +182,7 @@ pub trait ForwarderRawAsync: super::forwarder_raw_common::ForwarderRawCommon { ContractCallWithMultiEsdt::::new( to, - "burn_and_create_retrive_async", + "burn_and_create_retrieve_async", all_payments, ) .async_call() diff --git a/contracts/feature-tests/composability/promises-features/src/call_sync_bt.rs b/contracts/feature-tests/composability/promises-features/src/call_sync_bt.rs index d3cc048ccc..a62fedeb77 100644 --- a/contracts/feature-tests/composability/promises-features/src/call_sync_bt.rs +++ b/contracts/feature-tests/composability/promises-features/src/call_sync_bt.rs @@ -72,7 +72,7 @@ pub trait BackTransfersFeatureModule { ); } - #[event("back_tranfers")] + #[event("back_transfers")] fn back_transfers_event( &self, #[indexed] egld_value: &BigUint, diff --git a/contracts/feature-tests/composability/scenarios/forwarder_call_sync_retrieve_egld_bt.scen.json b/contracts/feature-tests/composability/scenarios/forwarder_call_sync_retrieve_egld_bt.scen.json index 5d7d625f85..e37b88eac8 100644 --- a/contracts/feature-tests/composability/scenarios/forwarder_call_sync_retrieve_egld_bt.scen.json +++ b/contracts/feature-tests/composability/scenarios/forwarder_call_sync_retrieve_egld_bt.scen.json @@ -84,7 +84,7 @@ "address": "sc:forwarder", "endpoint": "str:forward_sync_retrieve_funds_bt", "topics": [ - "str:back_tranfers", + "str:back_transfers", "1000" ], "data": [ diff --git a/contracts/feature-tests/composability/scenarios/forwarder_call_sync_retrieve_esdt_bt.scen.json b/contracts/feature-tests/composability/scenarios/forwarder_call_sync_retrieve_esdt_bt.scen.json index cc09dab90a..169f0f5a7e 100644 --- a/contracts/feature-tests/composability/scenarios/forwarder_call_sync_retrieve_esdt_bt.scen.json +++ b/contracts/feature-tests/composability/scenarios/forwarder_call_sync_retrieve_esdt_bt.scen.json @@ -91,7 +91,7 @@ "address": "sc:forwarder", "endpoint": "str:forward_sync_retrieve_funds_bt", "topics": [ - "str:back_tranfers", + "str:back_transfers", "0", "str:TEST-TOKENA", "0", diff --git a/contracts/feature-tests/composability/scenarios/forwarder_call_sync_retrieve_nft_bt.scen.json b/contracts/feature-tests/composability/scenarios/forwarder_call_sync_retrieve_nft_bt.scen.json index cd0501af64..40cb0d3c39 100644 --- a/contracts/feature-tests/composability/scenarios/forwarder_call_sync_retrieve_nft_bt.scen.json +++ b/contracts/feature-tests/composability/scenarios/forwarder_call_sync_retrieve_nft_bt.scen.json @@ -100,7 +100,7 @@ "address": "sc:forwarder", "endpoint": "str:forward_sync_retrieve_funds_bt", "topics": [ - "str:back_tranfers", + "str:back_transfers", "0", "str:NFT-000001", "5", diff --git a/contracts/feature-tests/composability/scenarios/forwarder_tranfer_esdt_with_fees.scen.json b/contracts/feature-tests/composability/scenarios/forwarder_transfer_esdt_with_fees.scen.json similarity index 100% rename from contracts/feature-tests/composability/scenarios/forwarder_tranfer_esdt_with_fees.scen.json rename to contracts/feature-tests/composability/scenarios/forwarder_transfer_esdt_with_fees.scen.json diff --git a/contracts/feature-tests/composability/tests/composability_scenario_go_test.rs b/contracts/feature-tests/composability/tests/composability_scenario_go_test.rs index 8f61befdbe..ea2f9bf8c4 100644 --- a/contracts/feature-tests/composability/tests/composability_scenario_go_test.rs +++ b/contracts/feature-tests/composability/tests/composability_scenario_go_test.rs @@ -400,7 +400,7 @@ fn forwarder_sync_echo_go() { } #[test] -fn forwarder_tranfer_esdt_with_fees_go() { +fn forwarder_transfer_esdt_with_fees_go() { world().run("scenarios/forwarder_tranfer_esdt_with_fees.scen.json"); } diff --git a/contracts/feature-tests/composability/tests/composability_scenario_rs_test.rs b/contracts/feature-tests/composability/tests/composability_scenario_rs_test.rs index fae64b1ab1..e127844c29 100644 --- a/contracts/feature-tests/composability/tests/composability_scenario_rs_test.rs +++ b/contracts/feature-tests/composability/tests/composability_scenario_rs_test.rs @@ -454,7 +454,7 @@ fn forwarder_sync_echo_rs() { } #[test] -fn forwarder_tranfer_esdt_with_fees_rs() { +fn forwarder_transfer_esdt_with_fees_rs() { world().run("scenarios/forwarder_tranfer_esdt_with_fees.scen.json"); } diff --git a/contracts/feature-tests/composability/transfer-role-features/interactions/snippets.sh b/contracts/feature-tests/composability/transfer-role-features/interactions/snippets.sh index 8660693fdb..b04ba191ba 100644 --- a/contracts/feature-tests/composability/transfer-role-features/interactions/snippets.sh +++ b/contracts/feature-tests/composability/transfer-role-features/interactions/snippets.sh @@ -1,6 +1,6 @@ USER_PEM="" USER_ADDRESS_BECH32= -USER_ADDDRESS_HEX="0x$(mxpy wallet bech32 --decode ${USER_ADDRESS_BECH32})" +USER_ADDRESS_HEX="0x$(mxpy wallet bech32 --decode ${USER_ADDRESS_BECH32})" RECEIVER_ADDRESS_BECH32= RECEIVER_ADDRESS_HEX="0x$(mxpy wallet bech32 --decode ${RECEIVER_ADDRESS_BECH32})" diff --git a/contracts/feature-tests/composability/vault/src/vault.rs b/contracts/feature-tests/composability/vault/src/vault.rs index 9dfaa11a07..04325a08a2 100644 --- a/contracts/feature-tests/composability/vault/src/vault.rs +++ b/contracts/feature-tests/composability/vault/src/vault.rs @@ -190,7 +190,7 @@ pub trait Vault { #[payable("*")] #[endpoint] - fn burn_and_create_retrive_async(&self) { + fn burn_and_create_retrieve_async(&self) { let payments = self.call_value().all_esdt_transfers(); let mut uris = ManagedVec::new(); uris.push(ManagedBuffer::new()); diff --git a/contracts/feature-tests/composability/vault/wasm-vault-promises/src/lib.rs b/contracts/feature-tests/composability/vault/wasm-vault-promises/src/lib.rs index f1a599dafe..6a814f3b57 100644 --- a/contracts/feature-tests/composability/vault/wasm-vault-promises/src/lib.rs +++ b/contracts/feature-tests/composability/vault/wasm-vault-promises/src/lib.rs @@ -30,7 +30,7 @@ multiversx_sc_wasm_adapter::endpoints! { retrieve_funds_with_transfer_exec => retrieve_funds_with_transfer_exec retrieve_funds => retrieve_funds retrieve_multi_funds_async => retrieve_multi_funds_async - burn_and_create_retrive_async => burn_and_create_retrive_async + burn_and_create_retrieve_async => burn_and_create_retrieve_async get_owner_address => get_owner_address call_counts => call_counts num_called_retrieve_funds_promises => num_called_retrieve_funds_promises diff --git a/contracts/feature-tests/composability/vault/wasm/src/lib.rs b/contracts/feature-tests/composability/vault/wasm/src/lib.rs index 3ef976396a..75aa15b25f 100644 --- a/contracts/feature-tests/composability/vault/wasm/src/lib.rs +++ b/contracts/feature-tests/composability/vault/wasm/src/lib.rs @@ -30,7 +30,7 @@ multiversx_sc_wasm_adapter::endpoints! { retrieve_funds_with_transfer_exec => retrieve_funds_with_transfer_exec retrieve_funds => retrieve_funds retrieve_multi_funds_async => retrieve_multi_funds_async - burn_and_create_retrive_async => burn_and_create_retrive_async + burn_and_create_retrieve_async => burn_and_create_retrieve_async get_owner_address => get_owner_address call_counts => call_counts num_called_retrieve_funds_promises => num_called_retrieve_funds_promises diff --git a/contracts/feature-tests/erc-style-contracts/erc1155-marketplace/src/lib.rs b/contracts/feature-tests/erc-style-contracts/erc1155-marketplace/src/lib.rs index 676b2b5b1d..70f9f1d7a2 100644 --- a/contracts/feature-tests/erc-style-contracts/erc1155-marketplace/src/lib.rs +++ b/contracts/feature-tests/erc-style-contracts/erc1155-marketplace/src/lib.rs @@ -26,7 +26,7 @@ pub struct AuctionArgument { #[multiversx_sc::contract] pub trait Erc1155Marketplace { - /// `bid_cut_percentage` is the cut that the contract takes from any sucessful bid + /// `bid_cut_percentage` is the cut that the contract takes from any successful bid #[init] fn init(&self, token_ownership_contract_address: ManagedAddress, bid_cut_percentage: u8) { self.token_ownership_contract_address() diff --git a/contracts/feature-tests/erc-style-contracts/erc1155/src/erc1155.rs b/contracts/feature-tests/erc-style-contracts/erc1155/src/erc1155.rs index 9fb1fb5216..24aa268954 100644 --- a/contracts/feature-tests/erc-style-contracts/erc1155/src/erc1155.rs +++ b/contracts/feature-tests/erc-style-contracts/erc1155/src/erc1155.rs @@ -52,7 +52,7 @@ pub trait Erc1155 { self.try_reserve_fungible(&from, &type_id, &amount); if self.blockchain().is_smart_contract(&to) { - self.peform_async_call_single_transfer(from, to, type_id, amount, data); + self.perform_async_call_single_transfer(from, to, type_id, amount, data); } else { self.increase_balance(&to, &type_id, &amount); } @@ -69,7 +69,7 @@ pub trait Erc1155 { self.try_reserve_non_fungible(&from, &type_id, &nft_id); if self.blockchain().is_smart_contract(&to) { - self.peform_async_call_single_transfer(from, to, type_id, nft_id, data); + self.perform_async_call_single_transfer(from, to, type_id, nft_id, data); } else { let amount = BigUint::from(1u32); self.increase_balance(&to, &type_id, &amount); @@ -101,7 +101,7 @@ pub trait Erc1155 { ); require!( type_ids.len() == values.len(), - "Id and value lenghts do not match" + "Id and value lengths do not match" ); // storage edits are rolled back in case of SCError, @@ -127,7 +127,7 @@ pub trait Erc1155 { } if is_receiver_smart_contract { - self.peform_async_call_batch_transfer(from, to, type_ids, values, &data); + self.perform_async_call_batch_transfer(from, to, type_ids, values, &data); } } @@ -340,7 +340,7 @@ pub trait Erc1155 { } } - fn peform_async_call_single_transfer( + fn perform_async_call_single_transfer( &self, from: ManagedAddress, to: ManagedAddress, @@ -362,7 +362,7 @@ pub trait Erc1155 { .call_and_exit() } - fn peform_async_call_batch_transfer( + fn perform_async_call_batch_transfer( &self, from: ManagedAddress, to: ManagedAddress, diff --git a/contracts/feature-tests/erc-style-contracts/erc721/scenarios/nft-transfer-approved-token.scen.json b/contracts/feature-tests/erc-style-contracts/erc721/scenarios/nft-transfer-approved-token.scen.json index 4da6ccb2d0..f0b3c6d8f2 100644 --- a/contracts/feature-tests/erc-style-contracts/erc721/scenarios/nft-transfer-approved-token.scen.json +++ b/contracts/feature-tests/erc-style-contracts/erc721/scenarios/nft-transfer-approved-token.scen.json @@ -1,5 +1,5 @@ { - "name": "transfer approved token succesfully", + "name": "transfer approved token successfully", "steps": [ { "step": "externalSteps", diff --git a/contracts/feature-tests/erc-style-contracts/erc721/scenarios/nft-transfer-token-ok.scen.json b/contracts/feature-tests/erc-style-contracts/erc721/scenarios/nft-transfer-token-ok.scen.json index 98992ca1e5..e29da92d59 100644 --- a/contracts/feature-tests/erc-style-contracts/erc721/scenarios/nft-transfer-token-ok.scen.json +++ b/contracts/feature-tests/erc-style-contracts/erc721/scenarios/nft-transfer-token-ok.scen.json @@ -1,5 +1,5 @@ { - "name": "transfer token succesfully", + "name": "transfer token successfully", "steps": [ { "step": "externalSteps", diff --git a/contracts/feature-tests/erc-style-contracts/lottery-erc20/documentation.md b/contracts/feature-tests/erc-style-contracts/lottery-erc20/documentation.md index 988f3a63e4..88c54a86e5 100644 --- a/contracts/feature-tests/erc-style-contracts/lottery-erc20/documentation.md +++ b/contracts/feature-tests/erc-style-contracts/lottery-erc20/documentation.md @@ -10,7 +10,7 @@ Now that that’s out of the way, there’s not much else to say in this section There is no difference in rights between users. Everyone is equal in the eyes of the lottery SC. -Deployment of the lottery SC requires the addresss of the erc20 SC as argument. +Deployment of the lottery SC requires the address of the erc20 SC as argument. # Actions after deploy diff --git a/contracts/feature-tests/rust-testing-framework-tester/src/lib.rs b/contracts/feature-tests/rust-testing-framework-tester/src/lib.rs index 010f002e6a..26c2cc3572 100644 --- a/contracts/feature-tests/rust-testing-framework-tester/src/lib.rs +++ b/contracts/feature-tests/rust-testing-framework-tester/src/lib.rs @@ -61,7 +61,7 @@ pub trait RustTestingFrameworkTester: dummy_module::DummyModule { #[payable("EGLD")] #[endpoint] - fn recieve_egld_half(&self) { + fn receive_egld_half(&self) { let caller = self.blockchain().get_caller(); let payment_amount = &*self.call_value().egld_value() / 2u32; self.send().direct( diff --git a/contracts/feature-tests/rust-testing-framework-tester/tests/tester_whitebox_legacy_test.rs b/contracts/feature-tests/rust-testing-framework-tester/tests/tester_whitebox_legacy_test.rs index 1f56f5bb21..72f024cae9 100644 --- a/contracts/feature-tests/rust-testing-framework-tester/tests/tester_whitebox_legacy_test.rs +++ b/contracts/feature-tests/rust-testing-framework-tester/tests/tester_whitebox_legacy_test.rs @@ -273,7 +273,7 @@ fn test_sc_half_payment() { wrapper .execute_tx(&caller_addr, &sc_wrapper, &rust_biguint!(1_000), |sc| { - sc.recieve_egld_half(); + sc.receive_egld_half(); }) .assert_ok(); diff --git a/contracts/feature-tests/rust-testing-framework-tester/wasm/src/lib.rs b/contracts/feature-tests/rust-testing-framework-tester/wasm/src/lib.rs index e8aaa36184..2868e338f8 100644 --- a/contracts/feature-tests/rust-testing-framework-tester/wasm/src/lib.rs +++ b/contracts/feature-tests/rust-testing-framework-tester/wasm/src/lib.rs @@ -26,7 +26,7 @@ multiversx_sc_wasm_adapter::endpoints! { get_egld_balance => get_egld_balance get_esdt_balance => get_esdt_balance receive_egld => receive_egld - recieve_egld_half => recieve_egld_half + receive_egld_half => receive_egld_half receive_esdt => receive_esdt reject_payment => reject_payment receive_esdt_half => receive_esdt_half diff --git a/contracts/feature-tests/use-module/use_module_expected_main.abi.json b/contracts/feature-tests/use-module/use_module_expected_main.abi.json index 2e4694e6fb..e22bf15817 100644 --- a/contracts/feature-tests/use-module/use_module_expected_main.abi.json +++ b/contracts/feature-tests/use-module/use_module_expected_main.abi.json @@ -345,7 +345,7 @@ "docs": [ "Queue a proposal for execution.", "This can be done only if the proposal has reached the quorum.", - "A proposal is considered successful and ready for queing if", + "A proposal is considered successful and ready for queuing if", "total_votes - total_downvotes >= quorum" ], "name": "queue", diff --git a/contracts/modules/src/governance/README.md b/contracts/modules/src/governance/README.md index f61d955953..51dbdf1f33 100644 --- a/contracts/modules/src/governance/README.md +++ b/contracts/modules/src/governance/README.md @@ -45,9 +45,9 @@ A maximum of `MAX_GOVERNANCE_PROPOSAL_ACTIONS` may be proposed at a time. All ac Additionally, a minimum of `min_token_balance_for_proposal` governance tokens must be deposited at proposal time. Examples of actions that can be proposed: -- transfering ESDT tokens to user accounts +- transferring ESDT tokens to user accounts - calling other smart contracts, with or without sending tokens as well -- calling the goverance contract itself, for the purpose of changing configurable parameters +- calling the governance contract itself, for the purpose of changing configurable parameters ## Voting/Downvoting diff --git a/contracts/modules/src/governance/mod.rs b/contracts/modules/src/governance/mod.rs index ee343f7101..c0ead5030b 100644 --- a/contracts/modules/src/governance/mod.rs +++ b/contracts/modules/src/governance/mod.rs @@ -60,7 +60,7 @@ pub trait GovernanceModule: self.require_valid_proposal_id(proposal_id); require!( self.get_proposal_status(proposal_id) == GovernanceProposalStatus::WaitingForFees, - "Cannot claim deposited tokens anymore; Proposal is not in WatingForFees state" + "Cannot claim deposited tokens anymore; Proposal is not in WaitingForFees state" ); require!( @@ -224,7 +224,7 @@ pub trait GovernanceModule: /// Queue a proposal for execution. /// This can be done only if the proposal has reached the quorum. - /// A proposal is considered successful and ready for queing if + /// A proposal is considered successful and ready for queuing if /// total_votes - total_downvotes >= quorum #[endpoint] fn queue(&self, proposal_id: usize) { diff --git a/data/codec/src/codec_err_handler.rs b/data/codec/src/codec_err_handler.rs index c7e6d6d90d..13ecf0706a 100644 --- a/data/codec/src/codec_err_handler.rs +++ b/data/codec/src/codec_err_handler.rs @@ -43,7 +43,7 @@ impl EncodeErrorHandler for PanicErrorHandler { #[inline] fn handle_error(&self, err: EncodeError) -> Self::HandledErr { - panic!("Encode error occured: {}", err.message_str()) + panic!("Encode error occurred: {}", err.message_str()) } } @@ -52,6 +52,6 @@ impl DecodeErrorHandler for PanicErrorHandler { #[inline] fn handle_error(&self, err: DecodeError) -> Self::HandledErr { - panic!("Decode error occured: {}", err.message_str()) + panic!("Decode error occurred: {}", err.message_str()) } } diff --git a/data/codec/src/impl_for_types/impl_phantom.rs b/data/codec/src/impl_for_types/impl_phantom.rs index 6036152f02..c6a071c475 100644 --- a/data/codec/src/impl_for_types/impl_phantom.rs +++ b/data/codec/src/impl_for_types/impl_phantom.rs @@ -82,7 +82,7 @@ pub mod tests { } #[test] - fn test_dep_struc() { + fn test_dep_struct() { check_dep_encode_decode( TestStructWithPhantom:: { x: 42, @@ -94,7 +94,7 @@ pub mod tests { } #[test] - fn test_top_struc() { + fn test_top_struct() { check_top_encode_decode( TestStructWithPhantom:: { x: 42, diff --git a/data/codec/src/impl_for_types/impl_slice.rs b/data/codec/src/impl_for_types/impl_slice.rs index 70eb469fa8..50e3117f31 100644 --- a/data/codec/src/impl_for_types/impl_slice.rs +++ b/data/codec/src/impl_for_types/impl_slice.rs @@ -4,7 +4,7 @@ use crate::{ }; use alloc::{boxed::Box, vec::Vec}; -/// Adds the concantenated encoded contents of a slice to an output buffer, +/// Adds the concatenated encoded contents of a slice to an output buffer, /// without serializing the slice length. /// Byte slice is treated separately, via direct transmute. pub fn dep_encode_slice_contents( diff --git a/data/codec/src/multi/top_en_multi.rs b/data/codec/src/multi/top_en_multi.rs index 2883a8c478..d4bab0f064 100644 --- a/data/codec/src/multi/top_en_multi.rs +++ b/data/codec/src/multi/top_en_multi.rs @@ -3,7 +3,7 @@ use crate::{ }; pub trait TopEncodeMulti: Sized { - /// Attempt to serialize the value to ouput. + /// Attempt to serialize the value to output. fn multi_encode(&self, output: &mut O) -> Result<(), EncodeError> where O: TopEncodeMultiOutput, diff --git a/data/codec/src/single/top_de.rs b/data/codec/src/single/top_de.rs index 778181e5a9..6174fffd18 100644 --- a/data/codec/src/single/top_de.rs +++ b/data/codec/src/single/top_de.rs @@ -9,7 +9,7 @@ use crate::{ /// /// 'Top' stands for the fact that values are deserialized on their own, /// so we have the benefit of knowing their length. -/// This is useful in many scnearios, such as not having to encode Vec length and others. +/// This is useful in many scenarios, such as not having to encode Vec length and others. /// /// The opther optimization that can be done when deserializing top-level objects /// is using special functions from the underlying API that do some of the work for the deserializer. diff --git a/data/codec/src/single/top_en.rs b/data/codec/src/single/top_en.rs index 2826c7d3d2..1ffb438bc0 100644 --- a/data/codec/src/single/top_en.rs +++ b/data/codec/src/single/top_en.rs @@ -5,7 +5,7 @@ use crate::{ use alloc::vec::Vec; pub trait TopEncode: Sized { - /// Attempt to serialize the value to ouput. + /// Attempt to serialize the value to output. fn top_encode(&self, output: O) -> Result<(), EncodeError> where O: TopEncodeOutput, diff --git a/framework/base/src/abi/build_info_abi.rs b/framework/base/src/abi/build_info_abi.rs index 917cfa6b5a..5004c8e673 100644 --- a/framework/base/src/abi/build_info_abi.rs +++ b/framework/base/src/abi/build_info_abi.rs @@ -1,4 +1,4 @@ -/// Deisgned to hold metadata of the contract crate. +/// Designed to hold metadata of the contract crate. /// Must be instanced inside the smart contract crate to work, /// that is why a `create` associated method would not make sense here. #[derive(Clone, Default, Debug)] diff --git a/framework/base/src/abi/type_description_container.rs b/framework/base/src/abi/type_description_container.rs index 7b9c0e892c..0d08d45fec 100644 --- a/framework/base/src/abi/type_description_container.rs +++ b/framework/base/src/abi/type_description_container.rs @@ -32,10 +32,10 @@ impl TypeDescriptionContainer for TypeDescriptionContainerImpl { } fn insert(&mut self, type_name: TypeName, type_description: TypeDescription) { - if let Some((_existing_type_name, exisiting_type_description)) = + if let Some((_existing_type_name, existing_type_description)) = self.0.iter_mut().find(|(name, _)| name == &type_name) { - *exisiting_type_description = type_description; + *existing_type_description = type_description; } else { self.0.push((type_name, type_description)); } diff --git a/framework/base/src/api/external_view/ev_storage_api.rs b/framework/base/src/api/external_view/ev_storage_api.rs index 6012fc094e..18c9e2a925 100644 --- a/framework/base/src/api/external_view/ev_storage_api.rs +++ b/framework/base/src/api/external_view/ev_storage_api.rs @@ -5,7 +5,7 @@ use crate::api::{ use super::ExternalViewApi; -pub const EXTERNAL_VIEW_TARGET_ADRESS_KEY: &[u8] = b"external-view-target-address"; +pub const EXTERNAL_VIEW_TARGET_ADDRESS_KEY: &[u8] = b"external-view-target-address"; impl StorageReadApi for ExternalViewApi where @@ -29,7 +29,7 @@ where use_raw_handle(const_handles::MBUF_TEMPORARY_1); A::managed_type_impl().mb_overwrite( external_view_target_key_handle.clone(), - EXTERNAL_VIEW_TARGET_ADRESS_KEY, + EXTERNAL_VIEW_TARGET_ADDRESS_KEY, ); let external_view_target_address_handle: A::ManagedBufferHandle = use_raw_handle(A::static_var_api_impl().next_handle()); diff --git a/framework/base/src/contract_base/wrappers/call_value_wrapper.rs b/framework/base/src/contract_base/wrappers/call_value_wrapper.rs index 520ee4228e..51828dfc0c 100644 --- a/framework/base/src/contract_base/wrappers/call_value_wrapper.rs +++ b/framework/base/src/contract_base/wrappers/call_value_wrapper.rs @@ -44,7 +44,7 @@ where } /// Returns all ESDT transfers that accompany this SC call. - /// Will return 0 results if nothing was transfered, or just EGLD. + /// Will return 0 results if nothing was transferred, or just EGLD. /// Fully managed underlying types, very efficient. pub fn all_esdt_transfers(&self) -> ManagedRef<'static, A, ManagedVec>> { let mut call_value_handle: A::ManagedBufferHandle = diff --git a/framework/base/src/contract_base/wrappers/send_wrapper.rs b/framework/base/src/contract_base/wrappers/send_wrapper.rs index 78f4f045d6..7e10d1f9eb 100644 --- a/framework/base/src/contract_base/wrappers/send_wrapper.rs +++ b/framework/base/src/contract_base/wrappers/send_wrapper.rs @@ -306,7 +306,7 @@ where /// /// If you want to perform multiple transfers, use `self.send().transfer_multiple_esdt_via_async_call()` instead. /// - /// Note that EGLD can NOT be transfered with this function. + /// Note that EGLD can NOT be transferred with this function. pub fn transfer_esdt_via_async_call( &self, to: ManagedAddress, @@ -326,7 +326,7 @@ where /// so only use as the last call in your endpoint. /// /// If you want to perform multiple transfers, use `self.send().transfer_multiple_esdt_via_async_call()` instead. - /// Note that EGLD can NOT be transfered with this function. + /// Note that EGLD can NOT be transferred with this function. /// /// If the amount is 0, it returns without error. pub fn transfer_esdt_non_zero_via_async_call( diff --git a/framework/base/src/esdt/system_sc_proxy.rs b/framework/base/src/esdt/system_sc_proxy.rs index 62182eeb1a..caf2f124b3 100644 --- a/framework/base/src/esdt/system_sc_proxy.rs +++ b/framework/base/src/esdt/system_sc_proxy.rs @@ -37,7 +37,7 @@ where SA: SendApi + 'static, { /// Constructor. - /// TODO: consider moving this to a new Proxy contructor trait (bonus: better proxy constructor syntax). + /// TODO: consider moving this to a new Proxy constructor trait (bonus: better proxy constructor syntax). pub fn new_proxy_obj() -> Self { ESDTSystemSmartContractProxy { _phantom: PhantomData, diff --git a/framework/base/src/external_view_contract.rs b/framework/base/src/external_view_contract.rs index ba14d7072a..1dcf5c3ce1 100644 --- a/framework/base/src/external_view_contract.rs +++ b/framework/base/src/external_view_contract.rs @@ -4,7 +4,7 @@ use crate::{ abi::{EndpointAbi, EndpointMutabilityAbi, EndpointTypeAbi, InputAbi, TypeAbi}, api::{ const_handles, use_raw_handle, CallValueApiImpl, ManagedBufferApiImpl, StorageWriteApiImpl, - VMApi, EXTERNAL_VIEW_TARGET_ADRESS_KEY, + VMApi, EXTERNAL_VIEW_TARGET_ADDRESS_KEY, }, io::load_endpoint_args, types::ManagedType, @@ -24,7 +24,7 @@ where (crate::types::ManagedAddress, ()), >(("target_contract_address", ())); let key_handle: A::ManagedBufferHandle = use_raw_handle(const_handles::MBUF_TEMPORARY_1); - A::managed_type_impl().mb_overwrite(key_handle.clone(), EXTERNAL_VIEW_TARGET_ADRESS_KEY); + A::managed_type_impl().mb_overwrite(key_handle.clone(), EXTERNAL_VIEW_TARGET_ADDRESS_KEY); A::storage_write_api_impl() .storage_store_managed_buffer_raw(key_handle, target_contract_address.get_handle()); } diff --git a/framework/base/src/formatter/formatter_impl_num.rs b/framework/base/src/formatter/formatter_impl_num.rs index 536d3c62e9..d2b0b071c8 100644 --- a/framework/base/src/formatter/formatter_impl_num.rs +++ b/framework/base/src/formatter/formatter_impl_num.rs @@ -67,7 +67,7 @@ fn format_signed(num: i64, f: &mut F) { } else { f.append_bytes(MINUS_SYMBOL); if num == i64::MIN { - // overflow egde case + // overflow edge case (i64::MAX as u64) + 1 } else { (-num) as u64 @@ -80,7 +80,7 @@ fn format_signed_hex(num: i64, f: &mut F, size_in_ let abs = if num >= 0 { num as u64 } else if size_in_bits == 64 { - // overflow for 64 bits egde case + // overflow for 64 bits edge case (num | i64::MIN) as u64 } else { ((1 << size_in_bits) - 1) & (num & i64::MAX) as u64 diff --git a/framework/base/src/hex_call_data/cd_de.rs b/framework/base/src/hex_call_data/cd_de.rs index ce6d6bdb63..e37f665ebf 100644 --- a/framework/base/src/hex_call_data/cd_de.rs +++ b/framework/base/src/hex_call_data/cd_de.rs @@ -8,7 +8,7 @@ use alloc::{boxed::Box, vec::Vec}; /// Deserializes from the MultiversX smart contract call format. /// -/// This format consists of the function name, followed by '@', follwed by hex-encoded argument bytes separated by '@' characters. +/// This format consists of the function name, followed by '@', followed by hex-encoded argument bytes separated by '@' characters. /// Example: "funcName@00000@aaaa@1234@@". /// Arguments can be empty. /// Argument hex encodings must always have an even number of digits. diff --git a/framework/base/src/hex_call_data/cd_ser.rs b/framework/base/src/hex_call_data/cd_ser.rs index 04c7daf179..85ed4c159b 100644 --- a/framework/base/src/hex_call_data/cd_ser.rs +++ b/framework/base/src/hex_call_data/cd_ser.rs @@ -9,7 +9,7 @@ use super::SEPARATOR; /// Serializes to the MultiversX smart contract call format. /// -/// This format consists of the function name, followed by '@', follwed by hex-encoded argument bytes separated by '@' characters. +/// This format consists of the function name, followed by '@', followed by hex-encoded argument bytes separated by '@' characters. /// Example: "funcName@00000@aaaa@1234@@". /// Arguments can be empty, in which case no hex digits are emitted. /// Argument hex encodings will always have an even number of digits. diff --git a/framework/base/src/types/heap/boxed_bytes.rs b/framework/base/src/types/heap/boxed_bytes.rs index 24c08d1199..0f80fe1f58 100644 --- a/framework/base/src/types/heap/boxed_bytes.rs +++ b/framework/base/src/types/heap/boxed_bytes.rs @@ -106,7 +106,7 @@ impl BoxedBytes { } /// Splits BoxedBytes into 2 others at designated position. - /// Returns the original and an empty BoxedBytes if position arugment out of range. + /// Returns the original and an empty BoxedBytes if position argument out of range. pub fn split(self, at: usize) -> (BoxedBytes, BoxedBytes) { if at >= self.len() { (self, BoxedBytes::empty()) diff --git a/framework/base/src/types/heap/queue.rs b/framework/base/src/types/heap/queue.rs index 1c32848acf..2dcfbda805 100644 --- a/framework/base/src/types/heap/queue.rs +++ b/framework/base/src/types/heap/queue.rs @@ -51,7 +51,7 @@ impl Queue { self.vec.push(value); } - /// Returns a referenece to the first item in the queue, without removing it. + /// Returns a reference to the first item in the queue, without removing it. /// Returns None if the queue is empty. pub fn peek(&self) -> Option<&T> { if self.start == self.vec.len() { @@ -61,7 +61,7 @@ impl Queue { Some(head_ref) } - /// Returns a mutable referenece to the first item in the queue, without removing it. + /// Returns a mutable reference to the first item in the queue, without removing it. /// Returns None if the queue is empty. pub fn peek_mut(&mut self) -> Option<&mut T> { if self.start == self.vec.len() { diff --git a/framework/base/src/types/managed/basic/big_int.rs b/framework/base/src/types/managed/basic/big_int.rs index 227a298d02..a649ec2621 100644 --- a/framework/base/src/types/managed/basic/big_int.rs +++ b/framework/base/src/types/managed/basic/big_int.rs @@ -135,7 +135,7 @@ impl BigInt { #[inline] pub fn zero() -> Self { let handle: M::BigIntHandle = use_raw_handle(M::static_var_api_impl().next_handle()); - // TODO: seting 0 will no longer be needed once we fix VM handle error + // TODO: setting 0 will no longer be needed once we fix VM handle error M::managed_type_impl().bi_set_int64(handle.clone(), 0); BigInt::from_handle(handle) } diff --git a/framework/base/src/types/managed/wrapped/egld_or_esdt_token_identifier.rs b/framework/base/src/types/managed/wrapped/egld_or_esdt_token_identifier.rs index 3e7ae8afb5..f81704d6ed 100644 --- a/framework/base/src/types/managed/wrapped/egld_or_esdt_token_identifier.rs +++ b/framework/base/src/types/managed/wrapped/egld_or_esdt_token_identifier.rs @@ -31,7 +31,7 @@ pub struct EgldOrEsdtTokenIdentifier { impl EgldOrEsdtTokenIdentifier { /// This special representation is interpreted as the EGLD token. - #[allow(clippy::needless_borrow)] // clippy is wrog here, there is no other way + #[allow(clippy::needless_borrow)] // clippy is wrong here, there is no other way pub const EGLD_REPRESENTATION: &'static [u8; 4] = &b"EGLD"; /// New instance of the special EGLD token representation. diff --git a/framework/base/tests/formatter_test.rs b/framework/base/tests/formatter_test.rs index 6ecf716150..1519374672 100644 --- a/framework/base/tests/formatter_test.rs +++ b/framework/base/tests/formatter_test.rs @@ -157,7 +157,7 @@ fn check_lower_hex(item: T) { } #[test] -fn test_lower_hex_usigned() { +fn test_lower_hex_unsigned() { check_lower_hex(0x0u8); check_lower_hex(0x50u8); check_lower_hex(0xFFu8); diff --git a/framework/derive/src/generate/auto_impl_proxy.rs b/framework/derive/src/generate/auto_impl_proxy.rs index 7590b57b63..282892b9a0 100644 --- a/framework/derive/src/generate/auto_impl_proxy.rs +++ b/framework/derive/src/generate/auto_impl_proxy.rs @@ -25,7 +25,7 @@ pub fn proxy_getter_return_type(m: &Method) -> ProxyGetterReturnType { proxy_obj_name: last_segment, } } else { - panic!("Proxy getter return type must be specfied with some module specifier (e.g. `path::to::module::Proxy`)"); + panic!("Proxy getter return type must be specified with some module specifier (e.g. `path::to::module::Proxy`)"); } } else { panic!("Invalid proxy getter return type") diff --git a/framework/derive/src/model/payable.rs b/framework/derive/src/model/payable.rs index aa6d148427..afad0698ea 100644 --- a/framework/derive/src/model/payable.rs +++ b/framework/derive/src/model/payable.rs @@ -1,4 +1,4 @@ -/// Contains metdata from the `#[payable(...)]` attribute. +/// Contains metadata from the `#[payable(...)]` attribute. /// Only endpoints and the constructor can be marked payable. #[derive(Clone, Debug)] pub enum MethodPayableMetadata { diff --git a/framework/derive/src/parse/attributes/util.rs b/framework/derive/src/parse/attributes/util.rs index 586bc1030f..b6aed5b6b3 100644 --- a/framework/derive/src/parse/attributes/util.rs +++ b/framework/derive/src/parse/attributes/util.rs @@ -92,7 +92,7 @@ pub(super) fn attr_one_string_arg(attr: &syn::Attribute) -> String { syn::Meta::List(list) => { assert!( list.delimiter == syn::MacroDelimiter::Paren(syn::token::Paren::default()), - "attribute paranthesis expected" + "attribute parenthesis expected" ); assert!( @@ -154,7 +154,7 @@ fn attr_one_opt_token_tree_arg(attr: &syn::Attribute) -> Option { assert!( val.delimiter == syn::MacroDelimiter::Paren(syn::token::Paren::default()), - "attribute paranthesis expected" + "attribute parenthesis expected" ); assert!( diff --git a/framework/derive/src/parse/supertrait_parse.rs b/framework/derive/src/parse/supertrait_parse.rs index ff86dc3f25..f118ab4780 100644 --- a/framework/derive/src/parse/supertrait_parse.rs +++ b/framework/derive/src/parse/supertrait_parse.rs @@ -21,7 +21,7 @@ pub fn parse_supertrait(supertrait: &syn::TypeParamBound) -> Supertrait { module_path: leading_segments, } } else { - panic!("All contract module supertraits must be specfied with some module specifier (e.g. `path::to::module::ContractName`)"); + panic!("All contract module supertraits must be specified with some module specifier (e.g. `path::to::module::ContractName`)"); } }, _ => panic!("Contract trait can only extend other traits."), diff --git a/framework/meta/src/abi_json.rs b/framework/meta/src/abi_json.rs index c46672ded6..17f5dd55f9 100644 --- a/framework/meta/src/abi_json.rs +++ b/framework/meta/src/abi_json.rs @@ -30,7 +30,7 @@ pub fn print_abi() { } /// Same as `contract_abi`, but allows caller to replace the compiler metadata, -/// so that ABI tests are deterministc and independent on compiler version. +/// so that ABI tests are deterministic and independent on compiler version. /// Will return the main contract ABI + view contract ABI. pub fn abi_to_json_dummy_environment(contract_abi: &ContractAbi) -> String { let mut abi_json = ContractAbiJson::from(contract_abi); diff --git a/framework/meta/src/cargo_toml_contents.rs b/framework/meta/src/cargo_toml_contents.rs index 1a6596a68d..c11bb5f9b2 100644 --- a/framework/meta/src/cargo_toml_contents.rs +++ b/framework/meta/src/cargo_toml_contents.rs @@ -288,7 +288,7 @@ impl CargoTomlContents { } } -/// Checks that path == ".." in a depdency. +/// Checks that path == ".." in a dependency. fn is_dep_path_above(dep: &Value) -> bool { if let Some(path) = dep.get("path") { if let Some(s) = path.as_str() { diff --git a/framework/meta/src/cli_args/cli_args_standalone.rs b/framework/meta/src/cli_args/cli_args_standalone.rs index a81d145dab..7f25565406 100644 --- a/framework/meta/src/cli_args/cli_args_standalone.rs +++ b/framework/meta/src/cli_args/cli_args_standalone.rs @@ -31,7 +31,7 @@ pub struct StandaloneCliArgs { #[derive(Clone, PartialEq, Eq, Debug, Subcommand)] pub enum StandaloneCliAction { #[command( - about = "General info about the contract an libraries residing in the targetted directory.." + about = "General info about the contract an libraries residing in the targeted directory.." )] Info(InfoArgs), @@ -47,7 +47,7 @@ pub enum StandaloneCliAction { #[command( name = "local-deps", - about = "Generates a report on the local depedencies of contract crates. Will explore indirect depdencies too." + about = "Generates a report on the local dependencies of contract crates. Will explore indirect dependencies too." )] LocalDeps(LocalDepsArgs), diff --git a/framework/meta/src/cmd/contract/sc_config/contract_variant_settings/contract_allocator.rs b/framework/meta/src/cmd/contract/sc_config/contract_variant_settings/contract_allocator.rs index 6a5cc68c75..e8ba7ceb6e 100644 --- a/framework/meta/src/cmd/contract/sc_config/contract_variant_settings/contract_allocator.rs +++ b/framework/meta/src/cmd/contract/sc_config/contract_variant_settings/contract_allocator.rs @@ -4,7 +4,7 @@ pub enum ContractAllocator { #[default] AllocationForbidden, - /// An allocator that never deallocates. It calls memory grow to reserve memory chuncks. + /// An allocator that never deallocates. It calls memory grow to reserve memory chunks. LeakingAllocator, /// An allocator that uses a statically pre-allocated chunk of memory, of 64kb. diff --git a/framework/meta/src/cmd/contract/sc_config/wasm_build.rs b/framework/meta/src/cmd/contract/sc_config/wasm_build.rs index bfe0539738..8e7b45916a 100644 --- a/framework/meta/src/cmd/contract/sc_config/wasm_build.rs +++ b/framework/meta/src/cmd/contract/sc_config/wasm_build.rs @@ -137,7 +137,7 @@ impl ContractVariant { build_args.extract_imports, &self.settings.check_ei, ) - .expect("error occured while extracting imports from .wasm "); + .expect("error occurred while extracting imports from .wasm "); } let output_imports_json_path = format!( @@ -149,7 +149,7 @@ impl ContractVariant { let wasm_data = WasmInfo::extract_wasm_info(&output_wasm_path, true, &self.settings.check_ei) - .expect("error occured while extracting imports from .wasm "); + .expect("error occurred while extracting imports from .wasm "); write_imports_output( output_imports_json_path.as_str(), diff --git a/framework/meta/src/cmd/standalone/scen_test_gen/stg_section.rs b/framework/meta/src/cmd/standalone/scen_test_gen/stg_section.rs index a359c6796e..b037a93455 100644 --- a/framework/meta/src/cmd/standalone/scen_test_gen/stg_section.rs +++ b/framework/meta/src/cmd/standalone/scen_test_gen/stg_section.rs @@ -9,7 +9,7 @@ pub struct Section { pub test_fn: Option, } -/// Parsed secion. +/// Parsed section. pub struct ScenarioTestFn { pub docs: String, pub test_line: String, diff --git a/framework/meta/src/cmd/standalone/template/template_adjuster.rs b/framework/meta/src/cmd/standalone/template/template_adjuster.rs index 1182463c8f..a5119054c5 100644 --- a/framework/meta/src/cmd/standalone/template/template_adjuster.rs +++ b/framework/meta/src/cmd/standalone/template/template_adjuster.rs @@ -142,8 +142,8 @@ impl TemplateAdjuster { &[ Query::substring(&package_name_expr(&old_meta), &package_name_expr(&new_meta)), Query::substring( - &dependecy_decl_expr(&self.metadata.name), - &dependecy_decl_expr(&self.target.new_name), + &dependency_decl_expr(&self.metadata.name), + &dependency_decl_expr(&self.target.new_name), ), ][..], ); @@ -159,8 +159,8 @@ impl TemplateAdjuster { &[ Query::substring(&package_name_expr(&old_wasm), &package_name_expr(&new_wasm)), Query::substring( - &dependecy_decl_expr(&self.metadata.name), - &dependecy_decl_expr(&self.target.new_name), + &dependency_decl_expr(&self.metadata.name), + &dependency_decl_expr(&self.target.new_name), ), ][..], ); @@ -263,7 +263,7 @@ fn as_path(name: &str) -> String { fn package_name_expr(template: &str) -> String { format!("name = \"{template}\"") } -fn dependecy_decl_expr(template: &str) -> String { +fn dependency_decl_expr(template: &str) -> String { format!("dependencies.{template}") } diff --git a/framework/meta/src/tools/wasm_extractor.rs b/framework/meta/src/tools/wasm_extractor.rs index c8b9943190..3e327d7bb8 100644 --- a/framework/meta/src/tools/wasm_extractor.rs +++ b/framework/meta/src/tools/wasm_extractor.rs @@ -23,7 +23,7 @@ impl WasmInfo { check_ei: &Option, ) -> Result { let wasm_data = fs::read(output_wasm_path) - .expect("error occured while extracting information from .wasm: file not found"); + .expect("error occurred while extracting information from .wasm: file not found"); populate_wasm_info(wasm_data, extract_imports_enabled, check_ei) } diff --git a/framework/scenario/src/scenario/model/step/into_blockchain_call.rs b/framework/scenario/src/scenario/model/step/into_blockchain_call.rs index 66b3872f77..58fad26fde 100644 --- a/framework/scenario/src/scenario/model/step/into_blockchain_call.rs +++ b/framework/scenario/src/scenario/model/step/into_blockchain_call.rs @@ -12,7 +12,7 @@ use crate::{ }, }; -/// Converts a [`ContractCall`] or [`ContractDeploy`] into a scenario object that additonally +/// Converts a [`ContractCall`] or [`ContractDeploy`] into a scenario object that additionally /// contains gas costs and transaction-related data. #[deprecated( since = "0.42.0", diff --git a/framework/scenario/src/scenario/model/step/typed_sc_call.rs b/framework/scenario/src/scenario/model/step/typed_sc_call.rs index bf939ee590..4dec1574f4 100644 --- a/framework/scenario/src/scenario/model/step/typed_sc_call.rs +++ b/framework/scenario/src/scenario/model/step/typed_sc_call.rs @@ -105,7 +105,7 @@ impl TypedScCall { /// Shorthand for creating a tx expect with status "Ok" and the given value. /// - /// The given value is type-checked agains the tx return type. + /// The given value is type-checked again the tx return type. pub fn expect_value(self, expected_value: ExpectedResult) -> Self where OriginalResult: TopEncodeMulti, diff --git a/framework/scenario/src/scenario/model/step/typed_sc_query.rs b/framework/scenario/src/scenario/model/step/typed_sc_query.rs index 60b3b91818..3bdba55de5 100644 --- a/framework/scenario/src/scenario/model/step/typed_sc_query.rs +++ b/framework/scenario/src/scenario/model/step/typed_sc_query.rs @@ -68,7 +68,7 @@ impl TypedScQuery { /// Shorthand for creating a tx expect with status "Ok" and the given value. /// - /// The given value is type-checked agains the tx return type. + /// The given value is type-checked again the tx return type. pub fn expect_value(self, expected_value: ExpectedResult) -> Self where OriginalResult: TopEncodeMulti, diff --git a/framework/scenario/src/standalone/account_tool.rs b/framework/scenario/src/standalone/account_tool.rs index c1f4c5f605..f580ba6169 100644 --- a/framework/scenario/src/standalone/account_tool.rs +++ b/framework/scenario/src/standalone/account_tool.rs @@ -102,7 +102,7 @@ fn convert_esdt( ) -> BTreeMap { let mut result = BTreeMap::new(); for (key, value) in sdk_esdt.into_iter() { - let (token_identifier, nonce) = split_token_identifer_nonce(key); + let (token_identifier, nonce) = split_token_identifier_nonce(key); let esdt_raw = result .entry(format!("str:{}", token_identifier.clone())) .or_insert(EsdtRaw::Full(EsdtFullRaw::default())); @@ -117,7 +117,7 @@ fn convert_esdt( } for (key, roles) in sdk_esdt_roles.into_iter() { - let (token_identifier, _) = split_token_identifer_nonce(key); + let (token_identifier, _) = split_token_identifier_nonce(key); let esdt_raw = result .entry(format!("str:{}", token_identifier.clone())) .or_insert(EsdtRaw::Full(EsdtFullRaw::default())); @@ -129,7 +129,7 @@ fn convert_esdt( result } -fn split_token_identifer_nonce(full_identifier: String) -> (String, u64) { +fn split_token_identifier_nonce(full_identifier: String) -> (String, u64) { let tokens = full_identifier.split('-').collect::>(); match tokens.len() { 2 => (full_identifier, 0), diff --git a/framework/scenario/src/whitebox_legacy/contract_obj_wrapper.rs b/framework/scenario/src/whitebox_legacy/contract_obj_wrapper.rs index edb4f8f019..2aeb77cfbe 100644 --- a/framework/scenario/src/whitebox_legacy/contract_obj_wrapper.rs +++ b/framework/scenario/src/whitebox_legacy/contract_obj_wrapper.rs @@ -299,7 +299,7 @@ impl BlockchainStateWrapper { .set_state_step(SetStateStep::new().put_account(address, account)); } - // Has to be used before perfoming a deploy from a SC + // Has to be used before performing a deploy from a SC // The returned SC wrapper cannot be used before the deploy is actually executed pub fn prepare_deploy_from_sc( &mut self, diff --git a/framework/scenario/tests/scenarios-io/example_normalized.scen.json b/framework/scenario/tests/scenarios-io/example_normalized.scen.json index 1908c31fba..bae532b7b7 100644 --- a/framework/scenario/tests/scenarios-io/example_normalized.scen.json +++ b/framework/scenario/tests/scenarios-io/example_normalized.scen.json @@ -118,7 +118,7 @@ "2-u32": "u32:42", "3-u64": "u32:42", "4-str": "nested:str:lorem iposum", - "5-struc": { + "5-struct": { "50-u8": "u8:2", "51-u16": "u16:1", "52-u32": "u32:42", diff --git a/framework/scenario/tests/scenarios-io/example_raw.scen.json b/framework/scenario/tests/scenarios-io/example_raw.scen.json index 439eb5b13a..53338c4f22 100644 --- a/framework/scenario/tests/scenarios-io/example_raw.scen.json +++ b/framework/scenario/tests/scenarios-io/example_raw.scen.json @@ -119,7 +119,7 @@ "2-u32": "u32:42", "3-u64": "u32:42", "4-str": "nested:str:lorem iposum", - "5-struc": { + "5-struct": { "50-u8": "u8:2", "51-u16": "u16:1", "52-u32": "u32:42", diff --git a/framework/scenario/tests/scenarios-self/set-check/set-check-esdt.scen.json b/framework/scenario/tests/scenarios-self/set-check/set-check-esdt.scen.json index f7b28cf300..dbec461aaa 100644 --- a/framework/scenario/tests/scenarios-self/set-check/set-check-esdt.scen.json +++ b/framework/scenario/tests/scenarios-self/set-check/set-check-esdt.scen.json @@ -33,7 +33,7 @@ "2-u32": "u32:42", "3-u64": "u32:42", "4-str": "nested:str:lorem iposum", - "5-struc": { + "5-struct": { "50-u8": "u8:2", "51-u16": "u16:1", "52-u32": "u32:42", @@ -81,7 +81,7 @@ "2-u32": "u32:42", "3-u64": "u32:42", "4-str": "nested:str:lorem iposum", - "5-struc": { + "5-struct": { "50-u8": "u8:2", "51-u16": "u16:1", "52-u32": "u32:42", @@ -129,7 +129,7 @@ "2-u32": "u32:42", "3-u64": "u32:42", "4-str": "nested:str:lorem iposum", - "5-struc": { + "5-struct": { "50-u8": "u8:2", "51-u16": "u16:1", "52-u32": "u32:42", diff --git a/framework/scenario/tests/scenarios_self_test.rs b/framework/scenario/tests/scenarios_self_test.rs index df3c6e310e..23d64dca0f 100644 --- a/framework/scenario/tests/scenarios_self_test.rs +++ b/framework/scenario/tests/scenarios_self_test.rs @@ -1,6 +1,6 @@ use multiversx_sc_scenario::*; -// These tests don't really test any contract, but the testing framework itslef. +// These tests don't really test any contract, but the testing framework itself. fn world() -> ScenarioWorld { let mut blockchain = ScenarioWorld::new(); diff --git a/framework/scenario/tests/single_tx_api_test.rs b/framework/scenario/tests/single_tx_api_test.rs index 24ce21cdd2..35bee42e5f 100644 --- a/framework/scenario/tests/single_tx_api_test.rs +++ b/framework/scenario/tests/single_tx_api_test.rs @@ -6,7 +6,7 @@ fn single_tx_api_test() { let storage_raw = StorageRawWrapper::::new(); let storage_key = "test-num"; - // unitialized, we get the default + // uninitialized, we get the default let x: i32 = storage_raw.read(storage_key); assert_eq!(x, 0); diff --git a/sdk/core/src/blockchain.rs b/sdk/core/src/blockchain.rs index 73d97ef0ea..98ac9b8df1 100644 --- a/sdk/core/src/blockchain.rs +++ b/sdk/core/src/blockchain.rs @@ -372,12 +372,12 @@ impl CommunicationProxy { match resp.data { None => Err(anyhow!("{}", resp.error)), Some(b) => { - let mut tx_hashs: Vec = vec![]; + let mut tx_hashes: Vec = vec![]; for key in b.txs_hashes.keys().sorted() { - tx_hashs.push(b.txs_hashes[key].clone()); + tx_hashes.push(b.txs_hashes[key].clone()); } - Ok(tx_hashs) + Ok(tx_hashes) }, } } diff --git a/tools/rust-debugger/pretty-printers/multiversx_sc_lldb_pretty_printers.py b/tools/rust-debugger/pretty-printers/multiversx_sc_lldb_pretty_printers.py index 31bf1a7724..4270455ee5 100644 --- a/tools/rust-debugger/pretty-printers/multiversx_sc_lldb_pretty_printers.py +++ b/tools/rust-debugger/pretty-printers/multiversx_sc_lldb_pretty_printers.py @@ -179,7 +179,7 @@ def format_buffer_hex(buffer: lldb.value) -> str: def ascii_to_string(buffer_iterator: Iterable[int]) -> str: """ - Converts ascii codes to the coresponding string. + Converts ascii codes to the corresponding string. >>> ascii_to_string([116, 101, 115, 116]) 'test' diff --git a/vm/src/tx_execution/exec_call.rs b/vm/src/tx_execution/exec_call.rs index ffc48e12ae..48e62caa3d 100644 --- a/vm/src/tx_execution/exec_call.rs +++ b/vm/src/tx_execution/exec_call.rs @@ -18,7 +18,7 @@ use super::BlockchainVMRef; /// /// Works directly with the top of the execution stack, that is why it takes no arguments. /// -/// It expectes that the stack is properly set up. +/// It expects that the stack is properly set up. pub fn execute_current_tx_context_input() { let tx_context_arc = TxContextStack::static_peek(); let func_name = tx_context_arc.input_ref().func_name.clone(); diff --git a/vm/src/tx_mock/tx_cache.rs b/vm/src/tx_mock/tx_cache.rs index 5925f3dd20..b3e7f26f29 100644 --- a/vm/src/tx_mock/tx_cache.rs +++ b/vm/src/tx_mock/tx_cache.rs @@ -92,7 +92,7 @@ impl TxCache { .insert(account_data.address.clone(), account_data); } - pub fn increase_acount_nonce(&self, address: &VMAddress) { + pub fn increase_account_nonce(&self, address: &VMAddress) { self.with_account_mut(address, |account| { account.nonce += 1; }); diff --git a/vm/src/vm_hooks/vh_impl/vh_debug_api.rs b/vm/src/vm_hooks/vh_impl/vh_debug_api.rs index 618788d966..e00f77f121 100644 --- a/vm/src/vm_hooks/vh_impl/vh_debug_api.rs +++ b/vm/src/vm_hooks/vh_impl/vh_debug_api.rs @@ -158,7 +158,7 @@ impl VMHooksHandlerSource for DebugApiVMHooksHandler { }; let tx_cache = TxCache::new(self.0.blockchain_cache_arc()); - tx_cache.increase_acount_nonce(contract_address); + tx_cache.increase_account_nonce(contract_address); let (tx_result, new_address, blockchain_updates) = self.0.vm_ref.deploy_contract( tx_input, contract_code, diff --git a/vm/src/vm_hooks/vh_impl/vh_single_tx_api.rs b/vm/src/vm_hooks/vh_impl/vh_single_tx_api.rs index 27fa484a4a..d77d9136cc 100644 --- a/vm/src/vm_hooks/vh_impl/vh_single_tx_api.rs +++ b/vm/src/vm_hooks/vh_impl/vh_single_tx_api.rs @@ -58,7 +58,7 @@ impl VMHooksHandlerSource for SingleTxApiVMHooksHandler { } fn halt_with_error(&self, status: u64, message: &str) -> ! { - panic!("VM error occured, status: {status}, message: {message}") + panic!("VM error occurred, status: {status}, message: {message}") } fn input_ref(&self) -> &TxInput { diff --git a/vm/src/vm_hooks/vh_impl/vh_static_api.rs b/vm/src/vm_hooks/vh_impl/vh_static_api.rs index aba07908e0..0345c0d8d3 100644 --- a/vm/src/vm_hooks/vh_impl/vh_static_api.rs +++ b/vm/src/vm_hooks/vh_impl/vh_static_api.rs @@ -29,7 +29,7 @@ impl VMHooksHandlerSource for StaticApiVMHooksHandler { } fn halt_with_error(&self, status: u64, message: &str) -> ! { - panic!("VM error occured, status: {status}, message: {message}") + panic!("VM error occurred, status: {status}, message: {message}") } fn input_ref(&self) -> &TxInput {