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

feat(messaging): callbacks #376

Open
wants to merge 6 commits into
base: sub0
Choose a base branch
from
Open

feat(messaging): callbacks #376

wants to merge 6 commits into from

Conversation

evilrobot-01
Copy link
Collaborator

Adds optional callback specification when using the messaging API. See the messaging contract within pop-api/integration-tests/contracts for usage.

Ok(())
}

#[pallet::call_index(3)]
#[pallet::weight(Weight::zero())] // todo: benchmarking after consolidating storage
#[pallet::weight(Weight::zero() // todo: benchmarking after consolidating storage
// Add any additional gas limit specified for callback execution
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Copy link
Collaborator

@al3mart al3mart left a comment

Choose a reason for hiding this comment

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

Awesome! This is super cool.

There are some clippy warnings about missing documentation that I think could be easily added.

Aside from that left a comment as I was curious about one detail you pointed out. :)

data: &impl Encode,
deposit: BalanceOf<T>,
) -> DispatchResult {
// TODO: check weight removed from block weight - may need dispatching via executive
Copy link
Collaborator

Choose a reason for hiding this comment

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

may need dispatching via executive

Curious about this one. The weight would be at least the corresponding to executing the Callback plus the resulting of execution this function, right ?

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