-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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!: convert client types to fuels types #707
Conversation
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 to me! Just one question
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.
🚢 it
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.
LGTM!
Closes #711
The goal of this PR is to introduce an anti-corruption layer between the SDK and fuel-core and to provide a more consistent interface to our users.
It adds the Rust SDK equivalent of types we usually query from the client:
Message
,Coin
,TransactionResponse
,Block
etc.The new types have been applied to
provider
methods as a return type and tofuels-test-helpers
methods likesetup_single_asset_coins
,setup_single_message
.Previously, setup methods would use different types, from those returned by provider methods even though they describe the same data, e.g.
fuel_gql_client::...:: Coin
vs. 'fuel_core_interface::...:: Coin'.This also lets us hide
Address
(in some cases) in favor ofBech32Addres
, ridding us of.into()
calls and thereby reducing confusion for the user.