Simple Blockchain Implementation to Print Hello Blockchain Using Truffle & Ganache.
It is a GUI based project.
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.11;
contract Hello{
string greeting;
constructor() public{
greeting = "Hello Blockchain";
}
function getGreeting() public view returns(string memory){
return greeting;
}
function setGreeting(string memory _greeting) public{
greeting = _greeting;
}
}
Post deploying the Smart Contract
Output with constructor set greeting
Output with setGreeting() set greeting