From a501e8fa1fe2220d0240499b36c83a16816b4ac8 Mon Sep 17 00:00:00 2001 From: teslaedison Date: Wed, 6 Mar 2024 11:48:41 +0800 Subject: [PATCH] fix some typos Signed-off-by: teslaedison --- docs/docs/guides/hardhat_tutorial/index.md | 2 +- fixtures/contracts/GreeterWithOverloading.sol | 2 +- .../test/integration/web3_eth/sign_transaction.test.ts | 4 ++-- packages/web3-utils/src/converters.ts | 2 +- packages/web3/test/integration/web3.config.test.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/docs/guides/hardhat_tutorial/index.md b/docs/docs/guides/hardhat_tutorial/index.md index 74d92b868ef..3b6166db2b3 100644 --- a/docs/docs/guides/hardhat_tutorial/index.md +++ b/docs/docs/guides/hardhat_tutorial/index.md @@ -72,7 +72,7 @@ export default config; ``` -By default, `hardhat-toolbox` is added to the file. You will need to explicity invoke the plugin. This will modify the Hardhat Run-time Environment - HRE and to include both the Web3 class and an instantiated web3 object. With the latter, you get a modified ready-to-use web3 object can comes with an initialized local/Hardhat provider. The object will be available to use anywhere in the project such as testing and deployment files. +By default, `hardhat-toolbox` is added to the file. You will need to explicitly invoke the plugin. This will modify the Hardhat Run-time Environment - HRE and to include both the Web3 class and an instantiated web3 object. With the latter, you get a modified ready-to-use web3 object can comes with an initialized local/Hardhat provider. The object will be available to use anywhere in the project such as testing and deployment files. ### Write the Smart Contract When you start a new project, Hardhat provides a sample `Lock` contracts. Please refer to the contract in `myproject/contracts/Lock.sol` file. diff --git a/fixtures/contracts/GreeterWithOverloading.sol b/fixtures/contracts/GreeterWithOverloading.sol index ca2a00dadd3..384709287b2 100644 --- a/fixtures/contracts/GreeterWithOverloading.sol +++ b/fixtures/contracts/GreeterWithOverloading.sol @@ -25,7 +25,7 @@ contract GreeterWithOverloading { return (true, greeting); } - // function overlading with addtional parameter + // function overlading with additional parameter function setGreeting(string memory _greeting, bool _raiseEvents) public returns (bool, string memory) { if(_raiseEvents) { emit GREETING_CHANGING(greeting, _greeting); diff --git a/packages/web3-eth/test/integration/web3_eth/sign_transaction.test.ts b/packages/web3-eth/test/integration/web3_eth/sign_transaction.test.ts index 317c180519f..630a67cfba2 100644 --- a/packages/web3-eth/test/integration/web3_eth/sign_transaction.test.ts +++ b/packages/web3-eth/test/integration/web3_eth/sign_transaction.test.ts @@ -66,7 +66,7 @@ describeIf(getSystemTestBackend() !== BACKEND.HARDHAT)('Web3Eth.signTransaction' expect(response).toMatchObject(expectedResponse); - // Pulling out of toMatchObject to be compatiable with Cypress + // Pulling out of toMatchObject to be compatible with Cypress expect(response.raw).toMatch(/0[xX][0-9a-fA-F]+/); expect(typeof (response.tx as TransactionLegacySignedAPI).v).toBe('bigint'); expect(response.tx.r).toMatch(/0[xX][0-9a-fA-F]{64}/); @@ -98,7 +98,7 @@ describeIf(getSystemTestBackend() !== BACKEND.HARDHAT)('Web3Eth.signTransaction' // eslint-disable-next-line jest/no-standalone-expect expect(response).toMatchObject(expectedResponse); - // Pulling out of toMatchObject to be compatiable with Cypress + // Pulling out of toMatchObject to be compatible with Cypress expect(response.raw).toMatch(/0[xX][0-9a-fA-F]+/); expect(typeof (response.tx as TransactionLegacySignedAPI).v).toBe('bigint'); expect(response.tx.r).toMatch(/0[xX][0-9a-fA-F]{64}/); diff --git a/packages/web3-utils/src/converters.ts b/packages/web3-utils/src/converters.ts index b84d5c28335..3d005ca3deb 100644 --- a/packages/web3-utils/src/converters.ts +++ b/packages/web3-utils/src/converters.ts @@ -187,7 +187,7 @@ export const numberToHex = (value: Numbers, hexstrict?: boolean): HexString => { let updatedValue = validatorUtils.numberToHex(value); if (hexstrict) { if (!updatedValue.startsWith('-') && updatedValue.length % 2 === 1) { - // To avoid duplicate a circular dependancy we will not be using the padLeft method + // To avoid duplicate a circular dependency we will not be using the padLeft method updatedValue = '0x0'.concat(updatedValue.slice(2)); } else if (updatedValue.length % 2 === 0 && updatedValue.startsWith('-')) updatedValue = '-0x0'.concat(updatedValue.slice(3)); diff --git a/packages/web3/test/integration/web3.config.test.ts b/packages/web3/test/integration/web3.config.test.ts index abf115b7276..33a3e8e2ad0 100644 --- a/packages/web3/test/integration/web3.config.test.ts +++ b/packages/web3/test/integration/web3.config.test.ts @@ -65,7 +65,7 @@ describe('Web3 instance', () => { } }); - it('should be send transaction, change for defaultTransactionType and sucesfully send transaction with different type', async () => { + it('should be send transaction, change for defaultTransactionType and successfully send transaction with different type', async () => { const transaction = { from: accounts[0], to: accounts[0],