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

Add submit_and_watch_extrinsic_until_success method #398

Merged
merged 8 commits into from
Jan 3, 2023

Conversation

haerdib
Copy link
Contributor

@haerdib haerdib commented Dec 23, 2022

Allows to watch an extrinsic and automatically checks if the extrinsic was successful or not (by retrieving and checking the associated events).

closes #288

@haerdib haerdib self-assigned this Dec 23, 2022
@haerdib haerdib added F8-newfeature Introduces a new feature E1-breaksnothing labels Dec 23, 2022
@haerdib haerdib force-pushed the bh/288-add-watch-until-success branch 2 times, most recently from 0d3b5b3 to 45e43b6 Compare December 28, 2022 07:24
extract separate functions

move trait to top

fix ci

fix no-std build serde_full

fix clippy

remove no good test

remove comment
@haerdib haerdib force-pushed the bh/288-add-watch-until-success branch from 45e43b6 to 5cf49eb Compare December 28, 2022 07:26
@haerdib haerdib marked this pull request as ready for review December 29, 2022 09:30
Copy link
Collaborator

@clangenb clangenb left a comment

Choose a reason for hiding this comment

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

Nice, looks good to me!

Comment on lines +161 to +165
Runtime::Hashing: HashTrait<Output = Runtime::Hash>,
Runtime: FrameSystemConfig + GetRuntimeBlockType,
Runtime::RuntimeBlock: BlockTrait + DeserializeOwned,
Runtime::Hashing: HashTrait<Output = Runtime::Hash>,
Runtime::Hash: FromHexString,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see us repeatedly having these excessive trait bounds. I would vote for adding them to the respective pallet's config, so we don't need to repeat them here every time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@haerdib haerdib mentioned this pull request Jan 3, 2023
@haerdib haerdib merged commit c6cc7a9 into master Jan 3, 2023
@haerdib haerdib deleted the bh/288-add-watch-until-success branch January 3, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E1-breaksnothing F8-newfeature Introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

send_extrinsic(xt, XtStatus::Finalized) does not report error upon xt failure
2 participants