Subscribe to Helix
Subscribe to Helix
Share Dialog
Share Dialog
<100 subscribers
<100 subscribers
Solidity - Hello World
// SPDX-License-Identifier: MIT
// Pragma solidity tells the compiler version.
// In this case compiler version must be greater than or equal to 0.8.13 and less than 0.9.0
pragma solidity ^0.8.13;
contract HelloWorld {
string public welcome = "Hello Ethereum";
}
The above contract is a basic hello world in solidity.
Key concepts
SPDX - Blockchains are open space environment. Opening source code open can have legal implications. To maintina the trust we need to add the License identifier on the top
Pragma - Like any other language, solidity has multiple versions. Solidity folks try to ensure that changes are backward compatible but sometimes it is not possible to do. e.g. New methods introduced or any bug fixes. You can learn more about it here.
References
Solidity - Hello World
// SPDX-License-Identifier: MIT
// Pragma solidity tells the compiler version.
// In this case compiler version must be greater than or equal to 0.8.13 and less than 0.9.0
pragma solidity ^0.8.13;
contract HelloWorld {
string public welcome = "Hello Ethereum";
}
The above contract is a basic hello world in solidity.
Key concepts
SPDX - Blockchains are open space environment. Opening source code open can have legal implications. To maintina the trust we need to add the License identifier on the top
Pragma - Like any other language, solidity has multiple versions. Solidity folks try to ensure that changes are backward compatible but sometimes it is not possible to do. e.g. New methods introduced or any bug fixes. You can learn more about it here.
References
No activity yet