Solidity File Structure
Structure of a Solidity file
SPDX License Identifier
// SPDX-License-Identifier: MITPragmas
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20; // use compiler version 0.8.20 and above// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0; // use compiler version bigger or equal to 0.4.22 and less than 0.9.0Import file from other sources
Import the whole file
Import all and assign alias
Name import
Comment
Last updated