Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 9fe4eb2

Browse files
author
Dan Forbes
authored
fix(docs): contract-tutorial-hardhat-node (#7076)
* Contract Tutorial Fixes - Ganache has been deprecated, use Hardhat - Use JavaScript instead of TypeScript - Improvements (more links, formatting/consistency) and simplifications * Hardhat node can use default automine behavior * Remove private keys
1 parent 1b1049d commit 9fe4eb2

File tree

3 files changed

+238
-269
lines changed

3 files changed

+238
-269
lines changed

docs/docs/guides/getting_started/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar_label: Introduction
88

99
Web3.js is a robust and flexible collection of **TypeScript and JavaScript** libraries that allows developers to interact with local or remote [Ethereum](https://ethereum.org/en/) nodes (or **any EVM-compatible blockchain**) over **HTTP, IPC or WebSocket** connections. It is a powerful and efficient toolkit for crafting applications within the Ethereum ecosystem and beyond.
1010

11-
This documentation is the entrypoint to Web3.js for developers. It covers [basic](/guides/getting_started/quickstart) and [advanced](/guides/smart_contracts/) usage with examples, and includes comprehensive [API documentation](/api) as well as guides for common tasks, like [upgrading](/guides/web3_upgrade_guide/x/) from older versions.
11+
This documentation is the entrypoint to Web3.js for developers. It covers [basic](/guides/getting_started/quickstart) and [advanced](/guides/smart_contracts/mastering_smart_contracts) usage with examples, and includes comprehensive [API documentation](/api) as well as guides for common tasks, like [upgrading](/guides/web3_upgrade_guide/x/) from older versions.
1212

1313
## Features of Web3.js v4
1414

docs/docs/guides/smart_contracts/index.md renamed to docs/docs/guides/smart_contracts/mastering_smart_contracts.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 1
2+
sidebar_position: 2
33
sidebar_label: 'Mastering Smart Contracts'
44
---
55
# Mastering Smart Contracts
@@ -103,7 +103,7 @@ When you instantiate a `Contract`, you primarily provide one or two parameters,
103103
1. **ABI (Application Binary Interface):** The ABI tells the `Contract` how to format calls and transactions so that the contract can understand them.
104104

105105
:::tip
106-
If you do not know how to get the contract ABI, we recommend you to check the Step 4 at the [# Step 4: Deploying and Interacting with Smart Contracts](./smart_contracts_guide/#step-4-compile-the-solidity-code-using-the-solidity-compiler-and-get-its-abi-and-bytecode) tutorial. And to look into the guide: [Infer Contract Types from JSON Artifact](./infer_contract_types).
106+
If you do not know how to get the contract ABI, we recommend you to check the Step 4 at the [# Step 4: Deploying and Interacting with Smart Contracts](./smart_contracts_guide#step-4-compile-the-solidity-code-with-the-solidity-compiler-and-get-its-abi-and-bytecode) tutorial. And to look into the guide: [Infer Contract Types from JSON Artifact](./infer_contract_types).
107107
:::
108108

109109
2. (optional) **Contract Address:** The Ethereum address at which your contract is deployed. If the contract is not deployed yet, do not pass a second parameter or pass `undefined` to it.
@@ -274,7 +274,7 @@ console.log('Contract deployed at address: ' + tx.options.address);
274274
```
275275

276276
:::tip
277-
If you do not know how to get the contract bytecode, we recommend you to check the Step 4 at the [Deploying and Interacting with Smart Contracts](./smart_contracts_guide#step-4-compile-the-solidity-code-using-the-solidity-compiler-and-get-its-abi-and-bytecode) tutorial.
277+
If you do not know how to get the contract bytecode, we recommend you to check the Step 4 at the [Deploying and Interacting with Smart Contracts](./smart_contracts_guide#step-4-compile-the-solidity-code-with-the-solidity-compiler-and-get-its-abi-and-bytecode) tutorial.
278278
:::
279279

280280
- **getPastEvents**: Gets past events for this contract. It differs from `events` properties that it returns the past events as an array, rather than allowing to subscribe to them like when using `events` properties. More on the [API documentation](/api/web3-eth-contract/class/Contract#getPastEvents)
@@ -351,7 +351,7 @@ const bytecode = '0x60806040523480156100115760006000fd5b506040516102243803806102
351351

352352
:::info
353353
And as mentioned in the tips inside previous sections:
354-
If you do not know how to get the contract ABI and bytecode, we recommend you to check the Step 4 at the [Deploying and Interacting with Smart Contracts](./smart_contracts_guide#step-4-compile-the-solidity-code-using-the-solidity-compiler-and-get-its-abi-and-bytecode) tutorial.
354+
If you do not know how to get the contract ABI and bytecode, we recommend you to check the Step 4 at the [Deploying and Interacting with Smart Contracts](./smart_contracts_guide#step-4-compile-the-solidity-code-with-the-solidity-compiler-and-get-its-abi-and-bytecode) tutorial.
355355
:::
356356

357357
### Do I always need the contract ByteCode?

0 commit comments

Comments
 (0)