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(contract): return multicall pending transaction #2044

Merged
merged 3 commits into from
Jan 12, 2023

Conversation

DaniPopes
Copy link
Collaborator

Motivation

2 year-old TODO comment from #107

TODO: Can we make this return a PendingTransaction directly instead?
Seems hard due to `returns a value referencing data owned by the current function`

The only data that PendingTransaction has to hold a reference to is M::Provider. which we can get with Arc::as_ref but this is currently not exposed

Solution

add client_ref method that returns Arc::as_ref(self.client) for Contract
return PendingTransaction in Multicall::send

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog
  • Breaking changes

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm, but this is a breaking change and needs to be added to the changelog

I don't have strong feelings about this, perhaps a separate function that awaits the pedingtx would be useful?

@gakonst gakonst merged commit 015eeab into gakonst:master Jan 12, 2023
@DaniPopes DaniPopes deleted the feat/multicall-pending-tx branch January 27, 2023 17:00
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