Skip to content

Instantly share code, notes, and snippets.

View firmianavan's full-sized avatar

marjaho firmianavan

View GitHub Profile
@firmianavan
firmianavan / forum.sol
Created May 13, 2018 14:14
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.23+commit.124ca40d.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract Forum {
uint16 constant maxValue = 10000;//when currentValue>maxValue let currentValue=currentValue%maxValue
uint16 currentValue;//increase by 1 in every Publish/Comment, and set item.valueSend with it as locater in current block
struct User {
address addr;
uint weight; //used to exercise his rights
string name;