Writing a Smart Contract

// SPDX-License-Identifier: MIT

// Specifies that the source code is for a version

// of Solidity greater than 0.8.15

pragma solidity ^0.8.15;

contract HelloWorld {

// A publicly accessible function that takes a string as a parameter

// and echoes the `message`

function echo(string memory message) public pure returns (string memory) {

return message;

}

}

Last updated