mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
docs: update the explanation of constructor
This commit is contained in:
parent
8d666e180d
commit
a9f2936f27
@ -24,8 +24,8 @@ Creating contracts programatically on Ethereum is best done via using the JavaSc
|
|||||||
As of today it has a method called `web3.eth.Contract <https://web3js.readthedocs.io/en/1.0/web3-eth-contract.html#new-contract>`_
|
As of today it has a method called `web3.eth.Contract <https://web3js.readthedocs.io/en/1.0/web3-eth-contract.html#new-contract>`_
|
||||||
to facilitate contract creation.
|
to facilitate contract creation.
|
||||||
|
|
||||||
When a contract is created, its constructor (a function with the same
|
When a contract is created, its constructor (a function declared with the
|
||||||
name as the contract) is executed once.
|
``constructor`` keyword) is executed once.
|
||||||
A constructor is optional. Only one constructor is allowed, and this means
|
A constructor is optional. Only one constructor is allowed, and this means
|
||||||
overloading is not supported.
|
overloading is not supported.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user