Sponsored Link:   Buy your 1st Ethereum in 5 minutes. Trusted by more than 100k buyers.
Contract Overview
ETH Balance: 0.01 Ether
ETH USD Value: $3.57 (@ $356.58/ETH)
No Of Transactions: 35 txns
  Latest 25 txns from a total Of 35 transactions View All

TxHash Age From To Value [TxFee]
0x81bc6095b3eae25769f4bf2e37b1a71b299d63e3a5bf90f719799b4aaf448d912 days 19 hrs ago0x561cbb53ba4d7912dbf9969759725bd79d920e2c  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0.001 Ether0.001
0x3063aa9d02e3b5cf3563de3173841682184a8ad4cf185255e440397eee2c14b418 days 9 hrs ago0x79dc75c2e8bd552d848cd44ac2762486538880f7  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0.001 Ether0.003394908
0x5b583b2be8782c63a0f8f91496c4fff0ec6f3433a318cd99ef741c1c93767c9321 days 12 hrs ago0x4da2e85d64bece663ccab06e89b970b6b077f22f  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0.001 Ether0.0009546
0x8a25a6afadb5ad986757170ce5c65e6ffea06ccd4d4fa2a72a52c13e0ae99e7a21 days 12 hrs ago0x4da2e85d64bece663ccab06e89b970b6b077f22f  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0.0005 Ether0.000787708
0x53ff38ddfa2395455ed4b3b55c863a58b637eb4b5fd33205f9599094610f90cc21 days 21 hrs ago0x1aff1e0f1d5f76f92145a278d8c31af9ade783dd  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0.0005 Ether0.000199591
0x65a45303db8565b4e133b28662f76b5556a6af7f4f180685accd3b3f595dec7121 days 21 hrs ago0x1aff1e0f1d5f76f92145a278d8c31af9ade783dd  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0.0005 Ether0.000199591
0xb59a9c33a2aec15b84b64a306fb5188b9e2bfc37408f82ed9c71c871bb6354e923 days 5 hrs ago0x53038b3d79a35dfec1fb3a1b10d920ee31224455  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0.001 Ether0.000790276
0x73df89ef223317a4b732da9e34462ee7a0625679024ede58b9e5ecdd433f510423 days 6 hrs ago0x2e933dd349f63fa9f71163f4a2d0a1f00abed643  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0.001 Ether0.000313704
0x777e763b901223f4cb93e3eac684f4f60dc32c9c9bc84a2d38a8ae32553ebf5123 days 6 hrs ago0x8ebdbbd9a2a91432b5a8380e81344be86fa85b52  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0.001 Ether0.00132406
0xa19566978db34270e8675478529931ce957f3e277c388faa3318d06a6d4902f923 days 6 hrs ago0xf25dde3716399a51edd595b350c4a0d301290be8  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0.001 Ether0.000461804
0x0946be0869fd8074113c384c98da07905525f2e2a72552ee86e66526ed5870d423 days 7 hrs ago0xf25dde3716399a51edd595b350c4a0d301290be8  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0.001 Ether0.0010421
0xb1d48157015a6b8e674f608898b9356823442db3b7e35e34804f71aff162e8ec23 days 7 hrs ago0x2e933dd349f63fa9f71163f4a2d0a1f00abed643  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0.0005 Ether0.00002386016
0x0f5ed476eea9aa9c48aa117ba51009a2a2e11daff17a07826345d219b20edf1423 days 7 hrs ago0x0a4eafeb533d4111a1fe3a8b323c468976ac2323  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0.001 Ether0.000786948
0x2867454e59f84e478c13b63e980b5169b71d0db7de0581e616fa60c748da54d423 days 10 hrs ago0x00dddbf1b8c9f6cf814699a8f5d5348a601edd77  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0 Ether0.000000000002
0x2e2e796e694ab3122abbec24d4954fd58e962ab529516221aee0747dc716bfdb23 days 10 hrs ago0x7e8fc8b3145e8bf15683b1bad9ec39223826cf56  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0 Ether0.00032737
0x50c7aafa8383d7790dd63b0d4737c89023ebc8c78a788538b57508ad4c7b902c23 days 10 hrs ago0x7e8fc8b3145e8bf15683b1bad9ec39223826cf56  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0.004 Ether0.00287886
0x53667c7e6bcb3be8e16137bbc18ebce969d69b8ce02b40fc80a334345d64ef2a23 days 11 hrs ago0x2e933dd349f63fa9f71163f4a2d0a1f00abed643  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0.004 Ether0.001095724
0x345d54ecb346fdde8abd405212fe8a95a13c6b79b15bdc6d471599ee07b0f92e23 days 13 hrs ago0x1239cd55b456752b1a70a9ea8f2664e89c58b5b2  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0.001 Ether0.0000146642
0x996b41098b4b1d9c279521374565a5ad9702c4e7d2af1692ad2846664d7f6edf23 days 15 hrs ago0x7e8fc8b3145e8bf15683b1bad9ec39223826cf56  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0 Ether0.00062673
0xcbe135fed907c48adbd183ed9e3cdf506dc31f2d2e91855840ae34fbe55575da23 days 15 hrs ago0x2e933dd349f63fa9f71163f4a2d0a1f00abed643  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0 Ether0.0015698
0x04b24c1cfde7a84da3d5875b134d661a58e8abd6a1db4fa989e0617317c1d71023 days 15 hrs ago0x2e933dd349f63fa9f71163f4a2d0a1f00abed643  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0 Ether0.00149506
0xa2b4e14ae880458decdecbfb602e0857c563208204473c0f4d13f65b1d8dfee423 days 15 hrs ago0x2e933dd349f63fa9f71163f4a2d0a1f00abed643  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0 Ether0.00149442
0x00ef6c8ce107ebeb1742d59c655e91f616112a234c3ec1cecc1c6cd62d6bc06923 days 15 hrs ago0x2e933dd349f63fa9f71163f4a2d0a1f00abed643  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0 Ether0.00164558
0xf6bcf6d5f62041e56664922d2325f5a1bd9089f4f2b28cc9b2d323d9bcff693f23 days 15 hrs ago0x2e933dd349f63fa9f71163f4a2d0a1f00abed643  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0 Ether0.00159
0xa2a004fc38617b6ea38e0fbd752c69538498e1cefa4d5ce72f6a0132d098a33c23 days 15 hrs ago0x2e933dd349f63fa9f71163f4a2d0a1f00abed643  IN   0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0 Ether0.00163732
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
  Latest 1 Internal Transaction

ParentTxHash Block Age From To Value
0x2867454e59f84e478c13b63e980b5169b71d0db7de0581e616fa60c748da54d4444016323 days 10 hrs ago0x470fb19d08c3d2eb8923a31d1408c393dab09ccf0x7e8fc8b3145e8bf15683b1bad9ec39223826cf560.009 Ether
[ Download CSV Export  ] 
Warning: The compiled contract might be susceptible to ZeroFunctionSelector (very low-severity) Solidity compiler bugs.

Contract Source Code Verified
Contract Name: FiveMedium
Compiler Version: v0.4.16+commit.d7661dd9
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
pragma solidity 0.4.16;

contract FiveMedium {
	
	// owner
	address private owner;

	// fees
	uint256 public feeNewThread;
	uint256 public feeReplyThread;

	//
	// Database
	//

	// the threads
	struct thread {
		string text;
		string imageUrl;

		uint256 indexLastReply;
		uint256 indexFirstReply;

		uint256 timestamp;
	}
	mapping (uint256 => thread) public threads;
	uint256 public indexThreads = 1;

	// the replies
	struct reply {
		string text;
		string imageUrl;

		uint256 replyTo;
		uint256 nextReply;

		uint256 timestamp;
	}
	mapping (uint256 => reply) public replies;
	uint256 public indexReplies = 1;

	// last 20 active threads 
	uint256[20] public lastThreads;
	uint256 public indexLastThreads = 0; // the index of the thread that was added last in lastThreads

	// 
	// Events
	//

	event newThreadEvent(uint256 threadId, string text, string imageUrl, uint256 timestamp);

	event newReplyEvent(uint256 replyId, uint256 replyTo, string text, string imageUrl, uint256 timestamp);

	//
	// Meta
	//

	// constructor
	function FiveMedium(uint256 _feeNewThread, uint256 _feeReplyThread) public {
		owner = msg.sender;
		feeNewThread = _feeNewThread;
		feeReplyThread = _feeReplyThread;
	}
	
	// modifying the fees
	function SetFees(uint256 _feeNewThread, uint256 _feeReplyThread) public {
		require(owner == msg.sender);
		feeNewThread = _feeNewThread;
		feeReplyThread = _feeReplyThread;
	}

	// To get the money back
	function withdraw(uint256 amount) public {
		owner.transfer(amount);
	}

	//
	// Core
	//

	// To create a Thread
	function createThread(string _text, string _imageUrl) payable public {
		// collect the fees
		require(msg.value >= feeNewThread); 
		// calculate a new thread ID and post
		threads[indexThreads] = thread(_text, _imageUrl, 0, 0, now);
		// add it to our last active threads array
		lastThreads[indexLastThreads] = indexThreads;
		indexLastThreads = addmod(indexLastThreads, 1, 20); // increment index
		// log!
		newThreadEvent(indexThreads, _text, _imageUrl, now);
		// increment index for next thread
		indexThreads += 1;
	}

	// To reply to a thread
	function replyThread(uint256 _replyTo, string _text, string _imageUrl)  payable public {
		// collect the fees
		require(msg.value >= feeReplyThread);
		// make sure you can't reply to an inexistant thread
		require(_replyTo < indexThreads && _replyTo > 0);
		// post the reply with nextReply = 0 (this is the last message in the chain)
		replies[indexReplies] = reply(_text, _imageUrl, _replyTo, 0, now);
		// update the thread 
		if(threads[_replyTo].indexFirstReply == 0){// we're first
			threads[_replyTo].indexFirstReply = indexReplies;
			threads[_replyTo].indexLastReply = indexReplies;
		}
		else { // we're not first so we update the previous reply as well
			replies[threads[_replyTo].indexLastReply].nextReply = indexReplies;
			threads[_replyTo].indexLastReply = indexReplies;
		}
		// update the last active threads 
		for (uint8 i = 0; i < 20; i++) { 
			if(lastThreads[i] == _replyTo) {
				break; // already in the list
			}
			if(i == 19) {
				lastThreads[indexLastThreads] = _replyTo;
				indexLastThreads = addmod(indexLastThreads, 1, 20);
			}
		} 
		// log!
		newReplyEvent(indexReplies, _replyTo, _text, _imageUrl, now);
		// increment index for next reply
		indexReplies += 1;
	}
}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"lastThreads","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_feeNewThread","type":"uint256"},{"name":"_feeReplyThread","type":"uint256"}],"name":"SetFees","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"feeNewThread","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"replies","outputs":[{"name":"text","type":"string"},{"name":"imageUrl","type":"string"},{"name":"replyTo","type":"uint256"},{"name":"nextReply","type":"uint256"},{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_replyTo","type":"uint256"},{"name":"_text","type":"string"},{"name":"_imageUrl","type":"string"}],"name":"replyThread","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"feeReplyThread","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"indexReplies","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"indexLastThreads","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_text","type":"string"},{"name":"_imageUrl","type":"string"}],"name":"createThread","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"indexThreads","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"threads","outputs":[{"name":"text","type":"string"},{"name":"imageUrl","type":"string"},{"name":"indexLastReply","type":"uint256"},{"name":"indexFirstReply","type":"uint256"},{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_feeNewThread","type":"uint256"},{"name":"_feeReplyThread","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"threadId","type":"uint256"},{"indexed":false,"name":"text","type":"string"},{"indexed":false,"name":"imageUrl","type":"string"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"newThreadEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"replyId","type":"uint256"},{"indexed":false,"name":"replyTo","type":"uint256"},{"indexed":false,"name":"text","type":"string"},{"indexed":false,"name":"imageUrl","type":"string"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"newReplyEvent","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052600160045560016006556000601b55341561001e57600080fd5b604051604080610c2e83398101604052808051919060200180519150505b60008054600160a060020a03191633600160a060020a0316179055600182905560028190555b50505b610bba806100746000396000f300606060405236156100b75763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631707599281146100bc5780632e1a7d4d146100e45780633be6e637146100fc57806358c0bde0146101175780635c7c366d1461013c5780637cdcc5141461026d5780638783d407146102fc578063c37d8a7e14610321578063c3c6e20214610346578063cb1650b41461036b578063d9a7556f146103f5578063f552b2ba1461041a575b600080fd5b34156100c757600080fd5b6100d260043561054b565b60405190815260200160405180910390f35b34156100ef57600080fd5b6100fa600435610563565b005b341561010757600080fd5b6100fa6004356024356105a7565b005b341561012257600080fd5b6100d26105de565b60405190815260200160405180910390f35b341561014757600080fd5b6101526004356105e4565b60405160408101849052606081018390526080810182905260a08082528654600260001961010060018416150201909116049082018190528190602082019060c0830190899080156101e55780601f106101ba576101008083540402835291602001916101e5565b820191906000526020600020905b8154815290600101906020018083116101c857829003601f168201915b50508381038252875460026000196101006001841615020190911604808252602090910190889080156102595780601f1061022e57610100808354040283529160200191610259565b820191906000526020600020905b81548152906001019060200180831161023c57829003601f168201915b505097505050505050505060405180910390f35b6100fa600480359060446024803590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052818152929190602084018383808284375094965061060b95505050505050565b005b341561030757600080fd5b6100d26108c7565b60405190815260200160405180910390f35b341561032c57600080fd5b6100d26108cd565b60405190815260200160405180910390f35b341561035157600080fd5b6100d26108d3565b60405190815260200160405180910390f35b6100fa60046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405281815292919060208401838380828437509496506108d995505050505050565b005b341561040057600080fd5b6100d2610abc565b60405190815260200160405180910390f35b341561042557600080fd5b610152600435610ac2565b60405160408101849052606081018390526080810182905260a08082528654600260001961010060018416150201909116049082018190528190602082019060c0830190899080156101e55780601f106101ba576101008083540402835291602001916101e5565b820191906000526020600020905b8154815290600101906020018083116101c857829003601f168201915b50508381038252875460026000196101006001841615020190911604808252602090910190889080156102595780601f1061022e57610100808354040283529160200191610259565b820191906000526020600020905b81548152906001019060200180831161023c57829003601f168201915b505097505050505050505060405180910390f35b6007816014811061055857fe5b0160005b5054905081565b60005473ffffffffffffffffffffffffffffffffffffffff1681156108fc0282604051600060405180830381858888f1935050505015156105a357600080fd5b5b50565b6000543373ffffffffffffffffffffffffffffffffffffffff9081169116146105cf57600080fd5b600182905560028190555b5050565b60015481565b60056020526000908152604090206002810154600382015460048301546001840192919085565b60025460009034101561061d57600080fd5b6004548410801561062e5750600084115b151561063957600080fd5b60a0604051908101604090815284825260208083018590528183018790526000606084018190524260808501526006548152600590915220815181908051610685929160200190610aee565b506020820151816001019080516106a0929160200190610aee565b5060408201518160020155606082015181600301556080820151600490910155506000848152600360208190526040909120015415156106fd5760065460008581526003602081905260409091209081018290556002015561072b565b6006546000858152600360208181526040808420600201805485526005835290842083018590559288905252555b5060005b60148160ff1610156107985783600760ff83166014811061074c57fe5b0160005b5054141561075d57610798565b8060ff166013141561078f57836007601b5460148110151561077b57fe5b0160005b5055601b5460149060019008601b555b5b60010161072f565b7f0a10376fec2af3cfd7b84cf2d443bc3479c71cc96b6523d20fc876f4cdce745160065485858542604051808681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156108145780820151818401525b6020016107fb565b50505050905090810190601f1680156108415780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156108785780820151818401525b60200161085f565b50505050905090810190601f1680156108a55780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a16006805460010190555b50505050565b60025481565b60065481565b601b5481565b6001543410156108e857600080fd5b60a0604051908101604090815283825260208083018490526000828401819052606084018190524260808501526004548152600390915220815181908051610934929160200190610aee565b5060208201518160010190805161094f929160200190610aee565b506040820151816002015560608201518160030155608082015160049182015554601b549091506007906014811061098357fe5b0160005b5055601b5460149060019008601b556004547f19aec6a975c3906841d0bc9754286c99d208604b3e71f08a017e331f45b9a31390838342604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610a0c5780820151818401525b6020016109f3565b50505050905090810190601f168015610a395780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b83811015610a705780820151818401525b602001610a57565b50505050905090810190601f168015610a9d5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a16004805460010190555b5050565b60045481565b600360208190526000918252604090912060028101549181015460048201549192600184019290919085565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610b2f57805160ff1916838001178555610b5c565b82800160010185558215610b5c579182015b82811115610b5c578251825591602001919060010190610b41565b5b50610b69929150610b6d565b5090565b610b8b91905b80821115610b695760008155600101610b73565b5090565b905600a165627a7a7230582034bfc0bbf8f654cce801143e7a31d2011e6c4b208cd5f35577cd15e2f7e5dd680029000000000000000000000000000000000000000000000000000e35fa931a000000000000000000000000000000000000000000000000000000038d7ea4c68000

    Constructor Arguments (ABI-encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000e35fa931a000000000000000000000000000000000000000000000000000000038d7ea4c68000

-----Decoded View---------------
Found 2 constructor arguments :
Arg [0] : 000000000000000000000000000000000000000000000000000e35fa931a0000
Arg [1] : 00000000000000000000000000000000000000000000000000038d7ea4c68000


   Swarm Source:
bzzr://34bfc0bbf8f654cce801143e7a31d2011e6c4b208cd5f35577cd15e2f7e5dd68
View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.