-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Type arguments in JSON ABI and the function selector #2218
Conversation
Is there an issue in |
I created an issue for the full feature here: FuelLabs/fuels-rs#448. |
type_arguments: self | ||
.type_id | ||
.get_type_parameters() | ||
.map(|v| v.iter().map(|param| param.generate_json_abi()).collect()), |
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.
code golf: .map(TypeParameter::generate_json_abi)
type_arguments: x | ||
.type_id | ||
.get_type_parameters() | ||
.map(|v| v.iter().map(|param| param.generate_json_abi()).collect()), |
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.
similar golf can be played here
type_arguments: self | ||
.type_id | ||
.get_type_parameters() | ||
.map(|v| v.iter().map(|param| param.generate_json_abi()).collect()), |
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'm running out of creativity but the same code golf could apply here
type_arguments: self | ||
.return_type | ||
.get_type_parameters() | ||
.map(|v| v.iter().map(|param| param.generate_json_abi()).collect()), |
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.
why go for par when you can go for a birdie?
Closes #1993
Spec change in FuelLabs/fuel-specs#382
Mostly similar to how
components
work.I had to switch to using copies of
Property
andFunction
fromfuels-types
to local versions insway-types
becausetype_arguments
still need to be added infuels-types
. This is temporary untilfuels-types
is ready.