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

[WIP] Integrate v14 to txdecoder #46

Merged
merged 8 commits into from
Oct 20, 2021
Merged

[WIP] Integrate v14 to txdecoder #46

merged 8 commits into from
Oct 20, 2021

Conversation

insipx
Copy link
Contributor

@insipx insipx commented Oct 12, 2021

for some quick testing!

this is a pretty quick&dirty impl/PoC (kindof created a poc decoder facade too i guess) for tx-decoder

if self.is_version_new(version) {
let decoder = self.new.get(&version.try_into()?).ok_or_else(|| anyhow!("version {} not found for new decoder", version))?;
let ext = decoder.decode_extrinsics(data)?;
// Ok(serde_json::to_string_pretty(&ext)?)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make it a trace log?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean for serde_json?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant to say that I assume this line is here for debugging purposes, to see the xt pretty printed, which seems useful. So maybe it could become a trace level log.

Copy link
Contributor Author

@insipx insipx Oct 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah, it is. I actually just left it here to remind me to uncomment it at some point -- the output of decode_extrinsics in v14 doesn't impl Serialize/Deserialize yet. That's why i return a formatted debug log instead. I'll make this a WIP PR because it won't be merged until after v14 stuff is merged

@insipx insipx changed the title Integrate v14 to txdecoder [WIP] Integrate v14 to txdecoder Oct 13, 2021
@insipx insipx merged commit d1f9490 into master Oct 20, 2021
@insipx insipx deleted the insipx/tx-decoder-v14 branch October 20, 2021 13: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.

2 participants