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

feat(ethers-contract): add send_with_receipt to Deployer #865

Merged

Conversation

tynes
Copy link
Contributor

@tynes tynes commented Feb 5, 2022

Motivation

I'd like to print the transaction hash when using forge create and its just generally
useful to have a reference to the receipt when deploying a contract. Currently
this is not possible due to the interface on the Deployer

Solution

The Deployer is used to deploy contracts and its send
function returns an attached instance of a Contract.
There is no way to know the transaction hash of the
deployment transaction, so this commit adds another
method send_with_receipt that returns an attached
Contract as well as a TransactionReceipt.

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

The `Deployer` is used to deploy contracts and its `send`
function returns an attached instance of a `Contract`.
There is no way to know the transaction hash of the
deployment transaction, so this commit adds another
method `send_with_receipt` that returns an attached
`Contract` as well as a `TransactionReceipt`.
@gakonst gakonst merged commit 100f121 into gakonst:master Feb 5, 2022
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.

2 participants