Skip to content

Commit

Permalink
fix some typos (#6863)
Browse files Browse the repository at this point in the history
Signed-off-by: teslaedison <[email protected]>
  • Loading branch information
teslaedison authored Mar 6, 2024
1 parent ca31f6a commit 040d3a3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/docs/guides/hardhat_tutorial/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion fixtures/contracts/GreeterWithOverloading.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}/);
Expand Down Expand Up @@ -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}/);
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-utils/src/converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion packages/web3/test/integration/web3.config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

1 comment on commit 040d3a3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 040d3a3 Previous: 6c075db Ratio
processingTx 9611 ops/sec (±4.04%) 9301 ops/sec (±4.81%) 0.97
processingContractDeploy 39716 ops/sec (±8.67%) 39129 ops/sec (±7.62%) 0.99
processingContractMethodSend 20335 ops/sec (±6.65%) 19443 ops/sec (±5.19%) 0.96
processingContractMethodCall 40185 ops/sec (±5.54%) 38971 ops/sec (±6.34%) 0.97
abiEncode 46632 ops/sec (±6.33%) 44252 ops/sec (±6.92%) 0.95
abiDecode 32493 ops/sec (±7.32%) 30419 ops/sec (±8.89%) 0.94
sign 1651 ops/sec (±3.24%) 1656 ops/sec (±4.08%) 1.00
verify 376 ops/sec (±0.61%) 373 ops/sec (±0.78%) 0.99

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.