Solidity upgrading code from 0.5.17 to 0.8.14

Viewed 64

everyone. I am studying about smart contract developing by solidity. In tutorial, I found this code made by solidity version 0.5.17.

function step() public;

This work for version 0.5.17 but 0.8.14. How can I change this code to work on version 0.8.14?

1 Answers

Functions without implementation must be marked virtual.

function step() public virtual;

Just as an advice, in solidity it is not recommended to use codes built in previous versions without a deep study because they can present serious vulnerabilities.

Related