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

feat: handle Unknown transactions, blocks and consensus parameters #2154

Open
wants to merge 38 commits into
base: master
Choose a base branch
from

Conversation

hal3e
Copy link
Contributor

@hal3e hal3e commented Sep 2, 2024

Linked Issues/PRs

FuelLabs/fuels-rs#1477

Description

Refactored code to handle Unknown transaction types, ConsensusParameters and Blocks.

For transactions I have craeted a new TransactionType that we can try_into the fuel_tx::Transaction.
For ConsesnsuParameters and Block I have used cynic's fallback attrbute and added a Unknown variant for all Version enums.

I had to bump cynic to 3.1.0 and reqwest to 0.12.0 to use the fallback attribute on enums.

Note: I have not added tests for the changes in the endpoints. I was not sure how that should be done.

BREAKING CHANGES:
graphql endpoints for transactions use the new TransactionType type instead of fuel_tx::Transaction

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests
  • The specification matches the implemented behavior (link update PR if changes are needed)

Before requesting review

  • I have reviewed the code myself
  • I have created follow-up issues caused by this PR and linked them here

After merging, notify other teams

[Add or remove entries as needed]

@hal3e hal3e self-assigned this Sep 2, 2024
@hal3e hal3e marked this pull request as draft September 2, 2024 14:36
@hal3e hal3e changed the title support Unknowon transaction type support Unknown transaction type Sep 2, 2024
@hal3e hal3e changed the title support Unknown transaction type feat: handle Unknown transactions and consensus parameters Sep 18, 2024
@hal3e hal3e marked this pull request as ready for review September 18, 2024 09:34
CHANGELOG.md Show resolved Hide resolved
crates/client/src/client.rs Outdated Show resolved Hide resolved
crates/client/src/client/schema/gas_price.rs Outdated Show resolved Hide resolved
crates/client/src/client/schema/tx.rs Outdated Show resolved Hide resolved
MitchTurner
MitchTurner previously approved these changes Sep 19, 2024
@hal3e hal3e changed the title feat: handle Unknown transactions and consensus parameters feat: handle Unknown transactions, blocks and consensus parameters Sep 23, 2024
@rymnc rymnc requested a review from a team September 26, 2024 11:45
Cargo.lock Outdated Show resolved Hide resolved
crates/client/src/client/types.rs Outdated Show resolved Hide resolved
@hal3e hal3e requested a review from xgreenx November 14, 2024 18:07
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.

3 participants