scale-type-resolver integration#1460
Merged
tadeohepperle merged 13 commits intomasterfrom Mar 13, 2024
Merged
Conversation
tadeohepperle
commented
Feb 29, 2024
|
|
||
| /// A boxed transaction payload. | ||
| // Dev Note: Arc used to enable easy cloning (given that we can't have dyn Clone). | ||
| pub type BoxedPayload = Payload<Arc<dyn EncodeAsFields + Send + Sync + 'static>>; |
Contributor
Author
There was a problem hiding this comment.
Note: This was removed, because EncodeAsFields is not object safe anymore and in the public element room for subxt noone seemed to care about it not being supported anymore.
jsdw
reviewed
Mar 13, 2024
| ) -> Result<Self::Value<'scale, 'info>, Self::Error> { | ||
| use scale_decode::error::{Error, ErrorKind}; | ||
|
|
||
| if value.path().ident().as_deref() != Some("WrapperKeepOpaque") { |
Collaborator
There was a problem hiding this comment.
Nit: can we add a TODO here like:
// TODO: When `scale-type-resolver` provides struct names, check that this struct name is `WrapperKeepOpaque`
Or alterantely link an issue that says the same :)
jsdw
approved these changes
Mar 13, 2024
niklasad1
reviewed
Mar 13, 2024
subxt/src/utils/wrapper_opaque.rs
Outdated
| let scale_info::TypeDef::Composite(_) = &ty.type_def else { | ||
| return Err(Error::new(ErrorKind::WrongShape { | ||
| let visitor = visitor::new(out, |_, _| { | ||
| // Check that the target shape lines up: any other shape but composite it wrong. |
Contributor
There was a problem hiding this comment.
Suggested change
| // Check that the target shape lines up: any other shape but composite it wrong. | |
| // Check that the target shape lines up: any other shape but the composite is wrong. |
niklasad1
approved these changes
Mar 13, 2024
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates subxt to the latest versions of
scale-value,scale-decode,scale-encodeandscale-typgenwhich rely on thescale-type-resolvercrate James wrote.