-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Conversation
>(abi: AbiFunctionFragment, params: unknown[], options?: Options, block?: BlockNumberOrTag) { | ||
return hexToNumber( | ||
await this.requestManager.send({ | ||
method: 'eth_estimateGas', |
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.
Should be using web3Eth.estimateGas
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.
Yes and no both. I want to avoid the circular dependency.
If web3-eth
is using web3-eth-contract
package then we can't use the other way around. To provide web3.eth.Contract
interface to users that dependency is required.
Suggest if you have any other workaround?
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'd like to avoid having multiple implementations of the RPC methods, so we don't repeat the mistakes of 1.x
. I guess that means splitting the rpc wrappers into a separate package (web3-eth-rpc-methods
)?
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 web3-eth-tx
may solve this issue by having common code that can avoid the circular dependency between web3-eth
and web3-eth-contract
package.
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.
web3-eth-tx
doesn't exist anymor. The tx util functions also needed access to Web3Eth
methods, so it was made apart of Web3Eth
for the same circular dependency issues
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.
In that case, I don't see any other way to have that small duplicate code to avoid circular dependency. Maybe as things shape up we may find some other solution. If you think of any other way around, please share.
Could you check CI Build / unit is also failing |
@jdevcs Yes as mentioned this PR is WIP, so had not looked into tests yet. Related to your comments about EIP-1559 transactions, I used the existing implementation as reference. I wonder why it's already not supporting EIP-1559, and if not then should we include it in 4.x or not. |
Its imp to support eip1559 in 4.x for contract Txs. If its increasing scope of current PR , will be ok to open new issue. |
Contract
public interfaces Contract
public interfaces
Co-authored-by: Wyatt Barnes <[email protected]>
Description
Add all public interfaces for the Contract package.
Fixes #4564
Type of change
Checklist:
npm run dtslint
with success and extended the tests and types if necessary.npm run test:unit
with success.npm run test:cov
and my test cases cover all the lines and branches of the added code.npm run build
and testeddist/web3.min.js
in a browser.CHANGELOG.md
file in the root folder.