deploy contract and call a function in one go
huahuayu opened this issue · comments
Shiming commented
hi Miguel,
Usually, the process is to deploy contact first and then call the function.
But now the cost for deploy a contract is high.
I wonder if I can deploy a contract and call a function within one transaction?
You may think why I want to do this because it's a special temporary contract, I just need to call the function once in mainnet , and what's more, I don't really need to submit it to chain, I just want to estimate gas for that function.
Shiming commented
I get it, I can put that function call in the constructor, so it will be executed in deployment.
miguel commented
Yes that's the way to do it!