Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants