-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Conversation
Muhammad-Altabba
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
However, I suggest using await in the sample coding snippits.
The application binary interface link used to point to https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI when it should point to https://docs.soliditylang.org/en/develop/abi-spec.html Co-authored-by: Junaid <86780488+jdevcs@users.noreply.github.com>
…eb3.js into wyatt/4.x/4973-web3-eth-docs
| } | ||
|
|
||
| /** | ||
| * @param block The {@link BlockNumberOrTag} (defaults to {@link Web3Eth.defaultBlock}) or block hash of the desired block. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its desc :
| * @param block The {@link BlockNumberOrTag} (defaults to {@link Web3Eth.defaultBlock}) or block hash of the desired block. | |
| * Returns a block matching the block number, block hash or block tag. | |
| * | |
| * @param block The {@link BlockNumberOrTag} (defaults to {@link Web3Eth.defaultBlock}) or block hash of the desired block. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
block is the name of the first parameter of this method, referring to the block identifier that's being requested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats correct. I suggested to add description before block param.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented via this commit
| import { NUMBER_DATA_FORMAT } from './constants'; | ||
|
|
||
| /** | ||
| * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add some note in documentation like:
All these functions are available in web3Eth class and normal users should use from there. These RPC wrapper functions are used internally in web3Eth class and are also available for advance users of lib if they want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no single place to add that disclaimer, but we did talk about linking to the Web3Eth methods for each rpc_method_wrapper method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are multiple places / rpc functions, you are right, but we can add this note at top (may be before first wrapper function only or at top section?) like one of:

https://docusaurus.io/docs/next/markdown-features/admonitions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made an issue to track this
| * @returns The [data](https://ethereum.org/en/developers/docs/transactions/#the-data-field) at the provided `address`. | ||
| * | ||
| * ```ts | ||
| * web3.eth.getCode("0x033456732123ffff2342342dd12342434324234234fd234fd23fd4f23d4234").then(console.log); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly functions in Web3Eth class are only returning results of wrappers by passing context, so Could you check if possible, can we use inherit doc feature https://typedoc.org/tags/inheritDoc/ for copying doc from Web3Eth class functions into these wrappers in rendered doc? and add additional @ param web3Context in these functions.
This will help us for avoiding duplicate effort for maintaining doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made an issue to track this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like @remarks should maybe solve the code example being copied
Co-authored-by: Alex <alex.luu@mail.utoronto.ca>
Co-authored-by: Junaid <86780488+jdevcs@users.noreply.github.com>
|
Good work Wyatt for lifting Eth package |
|
Your Render PR Server URL is https://web3js-docs-pr-5251.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-cbhcuhb97ej1nnb5lceg. |

Adds documentation for
web3_eth.tsandrpc_method_wrappers.tsRPC functionsNon-RPC functions such as:
detectTransactionTypeformatTransactionisAccessListisAccessListEntryisBaseTransactionisTransaction1559UnsignedisTransaction2930UnsignedisTransactionCallisTransactionlegacyUnsignedisTransactionWithSenderprepareTransactionForSigningtransactionBuildervalidateChainInfovalidateCustomChainInfovalidateFeeMarketGasvalidateGasvalidateLegacyGasvalidateTransacitonCallvalidateTransactionForSigningvalidateTransactionWithSenderare exported, but not currently manually documented
closes #4973