Ethereum Classic
$4.48 3.19%
ETC · 10w

universalSortingMechanism.sol - Universal Sorting Mechanism for Ethereum

struct RandomizationMechanism { mapping(uint => uint) sortingMechanism; uint totalSorted; bytes32 entropy; } RandomizationMechanism sortingTool[]; function sortingHat(uint _sortingType, uint _listSize) internal returns (uint) { RandomizationMechanism storage s = sortingTool[_sortingType]; s.totalSorted++; uint randomNumber = uint(sha3(block.blockhash(block.number-1), s.entropy, now)) % (_listSize - s.totalSorted); uint querySorter = s.totalSorted + randomNumber; // Instantiate sortingMechanism while people sort themselves if(s.sortingMechanism[querySorter] == 0) s.sortingMechanism[querySorter] = querySorter; if(sortingMechanism[totalSorted] == 0) s.sortingMechanism[s.totalSorted] = s.totalSorted; uint randomPosition = s.sortingMechanism[querySorter]; s.sortingMechanism[randomPosition] = s.sortingMechanism[s.totalSorted]; s.entropy = sha3(randomPosition, msg.sender, now); if(s.totalSorted == _listSize) s.totalSorted = 0; return randomPosition; }
Go to gist.github.com
Recent news
ETC +3.19% · twitter.com · 5h

Let's do ... this

$etc $btc looks 🧔👍 let's to this @barrysilbert pic.twitter.com/iK8yrG9glH— crypto norwood (@crypto_norwood) January 17, 2019
ETC +3.19% · blockchainreporter.net · 16h

ETC - Calming The Storm

In the wake of the recent 51% attack, Ethereum Classic Labs comissions a new core development team. Read more about the decision here.
10