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

Simplify the TxPayload trait a little #638

Merged
merged 4 commits into from
Aug 29, 2022
Merged

Simplify the TxPayload trait a little #638

merged 4 commits into from
Aug 29, 2022

Conversation

jsdw
Copy link
Collaborator

@jsdw jsdw commented Aug 25, 2022

Most custom implementations will not do static validation, and for these, there's no need to require that a pallet and call name can be handed back. This tweak to the trait signature makes that clear.

I also exposed a way to create a SubmittableExtrinsic without going through the previous steps, in case somebody has bytes for a pre-signed extrinsic that they'd like to submit.

In response to #637 (though I think their issue is unrelated, it'll help with this sort of thing)

Copy link
Member

@TarikGul TarikGul left a comment

Choose a reason for hiding this comment

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

LGTM 👍 , From what I see this PR replaces using call to abstract information with call.validation_details so that all information is in a single struct (which i definitely like).

@jsdw
Copy link
Collaborator Author

jsdw commented Aug 26, 2022

Yeah; I realised that the call and pallet name were only ever used in validation so wanted to make it clear that they didn't need implementing/werent used otherwise :)

(one advantage just that it's then more obvious that you can just impl TxPayload with some already-encoded call data and all it has to do is write that out to some vec when asked, and you don't need to worry about pallet/call name etc)

@jsdw jsdw merged commit 5ff8493 into master Aug 29, 2022
@jsdw jsdw deleted the jsdw-simpler-tx-payload branch August 29, 2022 18:46
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.

None yet

3 participants