Skip to content

Instantly share code, notes, and snippets.

@GrandSchtroumpf
Created June 3, 2018 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GrandSchtroumpf/77e6275a45495520282a467367c5df05 to your computer and use it in GitHub Desktop.
Save GrandSchtroumpf/77e6275a45495520282a467367c5df05 to your computer and use it in GitHub Desktop.
Complete SendMessage Contract
pragma solidity ^0.4.23;
contract MessageSender {
struct Message {
address from;
string content;
}
mapping(address => Message) public messages;
function sendMessage(address to, string content) public {
messages[to] = Message(msg.sender, content);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment