Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 651 Bytes

File metadata and controls

10 lines (7 loc) · 651 Bytes

Floating Pragma

Description

Contracts should be deployed with the same compiler version and flags that they have been tested with thoroughly. Locking the pragma helps to ensure that contracts do not accidentally get deployed using, for example, an outdated compiler version that might introduce bugs that affect the contract system negatively.

Remediation

Lock the pragma version and also consider known bugs (https://github.com/ethereum/solidity/releases) for the compiler version that is chosen.

References:

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