diff --git a/contracts/YourContract/YourContract.sol b/contracts/YourContract/YourContract.sol new file mode 100644 index 000000000..c0fab3cea --- /dev/null +++ b/contracts/YourContract/YourContract.sol @@ -0,0 +1,27 @@ +pragma solidity ^0.4.24; + +contract YourContract { + + string public YourVar = "HELLO WORLD"; + address public owner; + mapping (uint256 => string) public chat; + uint256 public messageCount; + + constructor() public { + owner = msg.sender; + messageCount = 0; + } + + function updateVar(string newVal) public returns (bool) { + require(msg.sender==owner,"YourContract::updateVar not owner"); + YourVar=newVal; + return true; + } + + function sendMessage(string message) public returns (bool) { + chat[messageCount] = message; + messageCount = messageCount + 1; + return true; + } + +} diff --git a/src/App.js b/src/App.js index 55965f262..c7fc85f1e 100644 --- a/src/App.js +++ b/src/App.js @@ -1344,7 +1344,7 @@ render() { return (