1

I am having an issue creating a contract on the Ethereum test net. I am getting the following warning statement:

sol:21:5: Warning: Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.

2

As of Solidity version 4.23, you should be using

constructor() {
  //...
}

Instead of

function MyContract() {
  //...
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.