-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add types for user input in send/call #5960
Conversation
Deploying with
|
Latest commit: |
f6e0fa0
|
Status: | ✅ Deploy successful! |
Preview URL: | https://ae3c8372.web3-js-docs.pages.dev |
Branch Preview URL: | https://nikos-5945-inocrrect-type-fo.web3-js-docs.pages.dev |
Bundle StatsHey there, this message comes from a github action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## 4.x #5960 +/- ##
=======================================
Coverage 85.84% 85.85%
=======================================
Files 156 156
Lines 7427 7425 -2
Branches 2018 2018
=======================================
- Hits 6376 6375 -1
+ Misses 1051 1050 -1
Flags with carried forward coverage won't be shown. Click here to find out 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.
I don't think InputNonPayableCallOptions
and InputNonPayableTxOptions
are needed. I think the existing types NonPayableCallOptions
and NonPayableTxOptions
need to have the aforementioned properties removed
1.x
's Contract.methods.method.call
allowed for the options:
Contract.methods.method.send
allowed for:
estimateGas
:
createAccessList
:
And deploy
:
I don't think the types NonPayableCallOptions
and NonPayableTxOptions
can be used for all these calls. I think we should update the types for each of these methods to match 1.x
with the addition of the fields: maxPriorityFeePerGas
, maxFeePerGas
, and type
…b.com/web3/web3.js into nikos/5945/inocrrect-type-for-options
@@ -78,7 +78,7 @@ try { | |||
const contract = new web3.eth.Contract(ContractAbi); | |||
const contractDeployed = await contract | |||
.deploy({ | |||
input: ContractBytecode, | |||
data: ContractBytecode, |
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.
data: ContractBytecode, | |
input: ContractBytecode, |
Since input
is the correct term
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.
Could we have a test that verifies that the initially reported issue is fixed?
Thanks,
…b.com/web3/web3.js into nikos/5945/inocrrect-type-for-options
Description
closes #5945
Please include a summary of the changes and be sure to follow our Contribution Guidelines.
Type of change
Checklist for 1.x:
npm run dtslint
with success and extended the tests and types if necessary.npm run test:cov
and my test cases cover all the lines and branches of the added code.npm run build
with success.dist/web3.min.js
in a browser.CHANGELOG.md
file in the root folder.Checklist for 4.x:
yarn
successfullyyarn lint
successfullyyarn build:web
successfullyyarn test:unit
successfullyyarn test:integration
successfullycompile:contracts
successfullyCHANGELOG.md
file in the packages I have edited.