Skip to content

Latest commit

 

History

History
20 lines (10 loc) · 746 Bytes

52.md

File metadata and controls

20 lines (10 loc) · 746 Bytes

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.

suicide(address) can be replaced with selfdestruct(address).

callcode(...) can be replaced with delegatecall(...).

References:

https://swcregistry.io/docs/SWC-111