You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. This is a very minor seemingly non-critical thing I observed:
For solidity contracts that do not have any constructors the ContractFactory object returned by new ethers.ContractFactory() seems to have payable: true set by default in its ContractFactory.interface.deployFunction property.
This seems odd. Should it not be a payable: falsedefault if NO constructor is present in the solidity source?
Not critical because contract deploys anyway, even though it does not have a payableconstructor, nor is value required to be sent with the deployment tx.
The text was updated successfully, but these errors were encountered:
This, unfortunately, is the case because early Solidity did not have the payable keyword; by default all functions and constructors were payable.
But it is a good point, I should update v5 to default to assume modern Solidity semantics and force anyone updating to v5 from v4 to update their ABI to include payable if they are importing a very old ABI.
Hi. This is a very minor seemingly non-critical thing I observed:
For solidity contracts that do not have any constructors the
ContractFactory
object returned bynew ethers.ContractFactory()
seems to havepayable: true
set by default in itsContractFactory.interface.deployFunction
property.This seems odd. Should it not be a
payable: false
default
if NOconstructor
is present in the solidity source?Not critical because contract deploys anyway, even though it does not have a
payable
constructor
, nor isvalue
required to be sent with thedeployment tx
.The text was updated successfully, but these errors were encountered: