Skip to content

Instantly share code, notes, and snippets.

@anubhavgirdhar
Created May 13, 2020 13:18
Show Gist options
  • Save anubhavgirdhar/355ed70ba8da49cb27f69b04f001fc00 to your computer and use it in GitHub Desktop.
Save anubhavgirdhar/355ed70ba8da49cb27f69b04f001fc00 to your computer and use it in GitHub Desktop.
Smart Contract for a Quotes DApp to store a quote and its respective owner on the Ethereum Blockchain
pragma solidity ^0.5.0;
contract Quote {
string public quote;
address public owner;
function setQuote(string memory newQuote) public {
quote = newQuote;
owner = msg.sender;
}
function getQuote() public view returns (string memory currentQuote, address currentOwner)
{
currentQuote = quote;
currentOwner = owner;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment