11.SWC-111_Use of Deprecated Solidity Functions
2023-07-13 15:51:51 # 09.SWC

SWC-111_Use of Deprecated Solidity Functions

Use of Deprecated Solidity Functions

  • Description: Several functions and operators in Solidity are deprecated. Using them leads to reduced code quality. With new major versions of the Solidity compiler, deprecated functions and operators may result in side effects and compile errors.

  • Remediation: Solidity provides alternatives to the deprecated constructions. Most of them are aliases, thus replacing old constructions will not break current behavior. For example, sha3 can be replaced with keccak256.

Deprecated Alternative
suicide(address) selfdestruct(address)
block.blockhash(uint) blockhash(uint)
sha3(...) keccak256(...)
callcode(...) delegatecall(...)
throw revert()
msg.gas gasleft
constant view
var corresponding type name
Prev
2023-07-13 15:51:51 # 09.SWC
Next