wighawag / hardhat-deploy

hardhat deployment plugin
MIT License
1.17k stars 283 forks source link

Deploy multiple contracts in the same block? #442

Open n00b21337 opened 1 year ago

n00b21337 commented 1 year ago

From using deploy function locally I see it always increases block number when it is used, wondering if it is possible to have multiple deployments in the same block. I have some use cases for that, so I wonder if it is possible?

wighawag commented 1 year ago

There is no native support for combining 2 deployment in a tx

Having said that you can use deployment.save to save the deployment if you did that

Note that unless you combine 2 deployment in a tx (through a factory contract) you cannot guarantee that the 2 dpeloyment will happen in 1 block

n00b21337 commented 1 year ago

thnx, good to know that

On Thu, Apr 13, 2023, 12:17 Ronan Sandford @.***> wrote:

There is no native support for combining 2 deployment in a tx

Having said that you can use deployment.save to save the deployment if you did that

Note that unless you combine 2 deployment in a tx (through a factory contract) you cannot guarantee that the 2 dpeloyment will happen in 1 block

— Reply to this email directly, view it on GitHub https://github.com/wighawag/hardhat-deploy/issues/442#issuecomment-1506714616, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACEN4J6NL2T7CIDT63NMTBDXA7HE5ANCNFSM6AAAAAAW3ZW7YE . You are receiving this because you authored the thread.Message ID: @.***>