A simple example of say hello in Solidity.
mapping(address => string) public greetings;
greeting format stored: 0x680cde08860141f9d223ce4e620b10cd6741037e says hello to Dani!!!
Create a .env
file using example.env
as a template
npm install
npm run deploy
npx hardhat getGreetings --account 0x680cde08860141F9D223cE4E620B10Cd6741037E
npx hardhat sayHelloTo --someone Dani
After the deployment, you can call the sayHelloTo
method, with a someone
string parameter:
0x57cb13cbef735fbdd65f5f2866638c546464e45f says hello to Daniel!!!