This version adds a new helper to the hre.ethers
object: deployContract
.
// before
const Foo = await ethers.getContractFactory("Foo")
const foo = await Foo.deploy()
// after
const foo = await ethers.deployContract("Foo")
If your contract has constructor arguments, you can pass them as an array:
const foo = await ethers.deployContract("Foo", [1000, "some string"])
Thanks to @zemse for working on this!