Skip to content
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

ETH2 packages types fix #3878

Merged
merged 36 commits into from
Jan 25, 2021
Merged

ETH2 packages types fix #3878

merged 36 commits into from
Jan 25, 2021

Conversation

spacesailor24
Copy link
Contributor

Description

  • Wraps web3-eth2-beaconchain function parameter types in an object

E.g.:

Before

getAttestationsFromPool(slot: Slot, committee_index: CommitteeIndex): Promise<Attestation[]>

After

getAttestationsFromPool(params: {slot: Slot, committee_index: CommitteeIndex}): Promise<Attestation[]>
  • Move interfaces IBaseAPISchema and IBaseAPIMethodSchema to index.d.ts for web3-eth2-core
    • Removes no longer needed schema.ts
  • Add ETH2Core class export to index.d.ts for web3-eth2-core
  • Removes IETH2BeaconChain interface in favor of exporting a class type: ETH2BeaconChain

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran npm run dtslint with success and extended the tests and types if necessary.
  • I ran npm run test:unit with success.
  • I ran npm run test:cov and my test cases cover all the lines and branches of the added code.
  • I ran npm run build and tested dist/web3.min.js in a browser.
  • I have tested my code on the live network.
  • I have checked the Deploy Preview and it looks correct.
  • I have updated the CHANGELOG.md file in the root folder.

@coveralls
Copy link

coveralls commented Jan 22, 2021

Pull Request Test Coverage Report for Build 510127159

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 76.234%

Totals Coverage Status
Change from base Build 504724575: 0.0%
Covered Lines: 3161
Relevant Lines: 3935

💛 - Coveralls

@spacesailor24 spacesailor24 requested review from GregTheGreek and frankiebee and removed request for GregTheGreek January 23, 2021 04:43
@spacesailor24 spacesailor24 changed the title Wyatt/beaconchain types fix ETH2 packages types fix Jan 23, 2021
CHANGELOG.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants