View quiz-winners.txt
The CertiK Team really appreciates that so many people participated in the PartnerGuess Quiz Campaign on Twitter, and we received huge positive attentions and impressions from our audiences on branding CertiK and all the partners supporting CertiK.
Below is the list of 600 CertiK supporters, aka Quiz Winners, that preformed top in the campaign, with answers not only accurate but also in quick timing. We conducted 13 quizzes in total, and here is how we reach to the final result:
1. create a table [username, correct_answer_count]
2. pick the fastest 300 retweets for each quiz tweet
3. remove those retweets with incorrect answer
4. for each user in the picked retweets, add 1 to the correct_answer_count column in table
5. in the end, the table capped with top 600 rows ordered by correct_answer_count in descending manner.
6. for the relation of [correct_answer_count, score]: [13-12, 4], [11-9, 3], [8-7, 2], [6, 1]
View bancor.js
contract TokenHolder is ITokenHolder, Owned, Utils {
/**
@dev constructor
*/
function TokenHolder() {
}
/**
@dev withdraws tokens held by the contract and sends them to an account
can only be called by the owner
View icx.js
/*@CTK FAIL "OnlyOnwersWalletAllowedToEnableTokenTransfer"
@pre tokenTransfer == false
@pre msg.sender != walletAddress
@post __post.tokenTransfer == false
*/
/* Visit https://certik.org to learn more */
function enableTokenTransfer()
external
onlyFromWallet {
tokenTransfer = true;
View edu.js
pragma solidity ^0.4.18;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract Token {
/// total amount of tokens
uint256 public totalSupply;
View transferFrom.js
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
/// same as above
require(_to != address(0x0));
require(balances[_from] >= _value);
require(balances[_to] + _value > balances[_to]);
uint previousBalances = balances[_from] + balances[_to];
balances[_from] -= _value;
balances[_to] += _value;
View transferFrom.js
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
/// same as above
require(_to != 0x0);
require(balances[_from] >= _value);
require(balances[_to] + _value > balances[_to]);
uint previousBalances = balances[_from] + balances[_to];
balances[_from] -= _value;
balances[_to] += _value;
View batchTransfer.js
function batchTransfer(address[] _receivers, uint256 _value) public returns (bool) {
uint cnt = _receivers.length;
// Total number tokens withdrawn from the sender.
uint256 amount = uint256(cnt) * _value;
require(cnt > 0 && cnt <= 20);
// Check if the sender can afford it.
require(_value > 0 && balances[msg.sender] >= amount);
// Withdraw the amount from sender.
balances[msg.sender] = balances[msg.sender].sub(amount);
View hack.sol
Function: batchTransfer(address[] _receivers, uint256 _value)
MethodID: 0x83f12fec
[0]: 0x0000000000000000000000000000000000000000000000000000000000000040
[1]: 0x8000000000000000000000000000000000000000000000000000000000000000 // 2^255
[2]: 0x0000000000000000000000000000000000000000000000000000000000000002 // array length
[3]: 0x000000000000000000000000b4d30cac5124b46c2df0cf3e3e1be05f42119033 // address 1
[4]: 0x0000000000000000000000000e823ffe018727585eaf5bc769fa80472f76c3d7 // address 2