solidity-basics / first-steps

First Steps

Lets get our contract started by adding the pragma version.

Add the following code to editor and compile.

pragma solidity ^0.8.14;

You may also see an error about the license identifier:

The license identifier displays the intended usage and restrictions of this contract

Add the following code to editor, at the first line, and compile again.

// SPDX-License-Identifier: MIT
“ Trust in smart contract can be better established if their source code is available. Since making source code available always touches on legal problems with regards to copyright, the Solidity compiler encouranges the use of machine-readable SPDX license identifiers. Every source file should start with a comment indicating its license. ”

- soliditylang.org
solidity-basics / first-steps

First Steps

Lets get our contract started by adding the pragma version.

Add the following code to editor and compile.

pragma solidity ^0.8.14;

You may also see an error about the license identifier:

The license identifier displays the intended usage and restrictions of this contract

Add the following code to editor, at the first line, and compile again.

// SPDX-License-Identifier: MIT
“ Trust in smart contract can be better established if their source code is available. Since making source code available always touches on legal problems with regards to copyright, the Solidity compiler encouranges the use of machine-readable SPDX license identifiers. Every source file should start with a comment indicating its license. ”

- soliditylang.org
Loading...