ReasonJun

Solidity : Smart Contract rule 본문

Blockchain/Solidity

Solidity : Smart Contract rule

ReasonJun 2023. 10. 14. 13:03
728x90

1. SPDX - License - Identifier

ex . //SPDX-License-Identifier: MIT

: In each file of the project, add a line at the top that matches the license.

  • Determine the License applied to the file
  • License standardization of source code and documents
  • Eliminate error-prone license header parsing

 

2. Pragma solidity

ex. pragma solidity >= 0.7.0 < 0.9.0;

: Indicates the solidity compiled version of the currently written smart contract. An error occurs if you use a compiler other than the predefined compiler version.

 

3. contract

ex. contract EX1 {}

: This is a keyword that announces the start of smart contract creation, and the name can be specified right next to it.

728x90

'Blockchain > Solidity' 카테고리의 다른 글

Solidity : constant  (0) 2023.10.15
Solidity : Data Type (1)  (0) 2023.10.15
Solidity : storage, memory, calldata, stack  (0) 2023.10.15
Solidity : Variable  (0) 2023.10.15
Solidity : What is Solidity ?  (0) 2023.10.13
Comments