Skip to content

Commit

Permalink
fixed broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
web3js-org committed Jan 2, 2024
1 parent 99ea8e4 commit 3c63118
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 16 deletions.
4 changes: 2 additions & 2 deletions docs/docs/guides/getting_started/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ The following documentation will guide you through different use cases of Web3.j

- Web3.js [Plugins Feature](/guides/web3_plugin_guide/) for extending functionality ( [List of Existing Plugins](https://web3js.org/plugins) )
- ECMAScript (ESM) and CommonJS (CJS) builds
- [Tree shakable with ESM](/guides/advanced/web3_tree_shaking_support_guide/)
- [Contracts dynamic types](/guides/smart_contracts/infer_contract_types_guide/) & full API in TypeScript
- [Tree shakable with ESM](/guides/advanced/tree_shaking)
- [Contracts dynamic types](/guides/smart_contracts/infer_contract_types/) & full API in TypeScript
- Using native BigInt instead of large BigNumber libraries
- More efficient ABI Encoder & Decoder
- Custom Output formatters
Expand Down
5 changes: 0 additions & 5 deletions docs/docs/guides/glossary/_category_.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,35 @@
---
title: JSON Interface
sidebar_position: 13
sidebar_label: '📖 Glossary'
title: Glossary
---


## Provider

In web3.js, a `provider` is an object responsible for enabling connectivity with the Ethereum network in various ways. Providers facilitate the connection of your web application to an Ethereum node, different provider types are available in web3.js(HTTP, WebSocket and IPC), each with its own features and use cases. **It's important to note that a provider itself only provides read-only access to the blockchain.** It does not use any private keys or accounts for interaction. This read-only functionality is particularly useful for querying data and making calls to the blockchain without the need for private key authorization.

## Accounts

In web3.js, an `account` allows you to perform operations on the blockchain, such as sending transactions, signing data, and interacting with contracts. It serves as the key component for **using a private key** directly to execute various blockchain operations. In other libraries, this concept is often referred to as a `signer`. This versatility in terminology doesn't change its fundamental purpose, providing a secure and straightforward means to manage Ethereum-related operations.


## Wallet

A `wallet` in web3.js can store multiple `accounts`. This feature allows you to manage various private keys for different operations. When using methods such as `web3.eth.sendTransaction()` or `web3.eth.contract.methods.doSomething().send({})`, the web3.js library handles these transactions using the wallet accounts under the hood. Essentially, the wallet makes it easier to coordinate multiple accounts for smoother Ethereum operations.


## Contract

The `Contract` class is an important class in the `web3-eth-contract` package, also available in the `web3` package. It serves as an abstraction representing a connection to a specific contract on the Ethereum Network, enabling applications to interact with it as a typical JavaScript object. Through the `Contract` class, you can execute functions and listen to events associated with the smart contract (e.g, `contract.methods.doSomething().call()`)

## JSON Interface (ABI)

The JSON interface is a `JSON` object describing the [Application Binary Interface (ABI)](https://docs.soliditylang.org/en/develop/abi-spec.html) for an Ethereum smart contract.

Using this JSON interface, web3.js is able to create a JavaScript object representing the smart contract , its methods and events using the `web3.eth.Contract` object.

### Specification

#### Functions
### Functions

- `type`: `"function"`, `"constructor"` (can be omitted, defaulting to `"function"`; `"fallback"` also possible but not relevant in web3.js);
- `name`: the name of the function (only present for function types);
Expand All @@ -20,7 +41,7 @@ Using this JSON interface, web3.js is able to create a JavaScript object represe
-- `type`: the canonical type of the parameter.
- `outputs`: an `Array of objects`, same as inputs, can be omitted if no outputs exist.

#### Events
### Events

- `type`: always `"event"`
- `name`: the name of the event;
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/migration_from_other_libs/ethers.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ console.log('contract address', deployedContract.options.address)
```

:::tip
📝 To get the smart contract ABI, you are advised to check: [Compile the Solidity code using the Solidity Compiler and get its ABI and Bytecode](/guides/smart_contracts/deploying_and_interacting_with_smart_contracts#step-4-compile-the-solidity-code-using-the-solidity-compiler-and-get-its-abi-and-bytecode) and [Infer Contract Types from JSON Artifact](/guides/smart_contracts/infer_contract_types_guide/)
📝 To get the smart contract ABI, you are advised to check: [#Step 4: Compile the Solidity code using the Solidity Compiler and get its ABI and Bytecode](/guides/smart_contracts/smart_contracts_guide#step-4-compile-the-solidity-code-using-the-solidity-compiler-and-get-its-abi-and-bytecode) and [Infer Contract Types from JSON Artifact](/guides/smart_contracts/infer_contract_types/)
:::


Expand Down
4 changes: 2 additions & 2 deletions docs/docs/guides/smart_contracts/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_label: 'Mastering Smart Contracts'
# Mastering Smart Contracts

:::info
This guide expects you to have some basic knowledge. If you are just starting, it is recommended to first check out this [Tutorial: Deploying and Interacting with Smart Contracts](./deploying_and_interacting_with_smart_contracts).
This guide expects you to have some basic knowledge. If you are just starting, it is recommended to first check out this [Tutorial: Deploying and Interacting with Smart Contracts](./smart_contracts_guide.md).
:::

## Contract class
Expand Down Expand Up @@ -78,7 +78,7 @@ When you instantiate a `Contract`, you primarily provide one or two parameters,
1. **ABI (Application Binary Interface):** The ABI tells the `Contract` how to format calls and transactions so that the contract can understand them.

:::tip
If you do not know how to get the contract ABI, we recommend you to check the Step 4 at the [Deploying and Interacting with Smart Contracts](./deploying_and_interacting_with_smart_contracts#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_guide/).
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).
:::

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.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/web3_eth/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,5 @@ The [signTransaction](/api/web3-eth/function/signTransaction) method is used to
The [sendSignedTransaction](/api/web3-eth/function/sendSignedTransaction) method is used to send a signed Ethereum transaction to the Ethereum network. Before sending a transaction, you need to sign it using a private key, and then you can use this method to broadcast the signed transaction to the network.

:::note
[Here](/guides/basics/sign_and_send_tx/) you can find more examples how to send transaction.
[Here](/guides/wallet/transactions) you can find more examples how to send transaction.
:::

0 comments on commit 3c63118

Please sign in to comment.