Contract Overview
Balance: 0 Ether
Transactions: 837 txns
Token Tracker: FirstBloodToken (1ST)
 Latest 25 txns from a total Of 837 transactions

TxHash Age From To Value [TxFee]
0x1aa41aac18a81a03ff5d218cf34420fe74320ca5a90f2bf2a7881d267a91d0893 days 10 hrs ago0x950bc68ccd99e4bbe424288e6f0dd583e57c9174  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.00004557
0xdfeb51adc1d7493fe79f182eaeab982aef027edeebe844bcd5491692d06ea55d3 days 10 hrs ago0x950bc68ccd99e4bbe424288e6f0dd583e57c9174  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.00004557
0x2e5a4ce54f9e4645e2a56190ccaf2cd1b91032ebfa1426ad07a0279f10c7ec024 days 4 hrs ago0x950bc68ccd99e4bbe424288e6f0dd583e57c9174  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.00004557
0xf0ced55f35622a88c1332c0043ae1dd510b9970b3bf0f6863adc7a2fa040c2314 days 7 hrs ago0x950bc68ccd99e4bbe424288e6f0dd583e57c9174  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.000030634
0x113cae449f541f5e2f50d00a1551475e4639a9cc158b6ab89f46349735704fdd4 days 7 hrs ago0x950bc68ccd99e4bbe424288e6f0dd583e57c9174  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.00004557
0xfc7bbdd4770c9ba09a8d3bca443383c7866bc29e77db1a0af05deccab949cbe44 days 7 hrs ago0x950bc68ccd99e4bbe424288e6f0dd583e57c9174  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.00004557
0x8014e8c2b0949ec8986e3915ad581dc7d13c402b9765bf59958b945f787021314 days 7 hrs ago0x950bc68ccd99e4bbe424288e6f0dd583e57c9174  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.000045634
0x8416ce201e2adda777cdd0872ded27029137abe4780f56ab0c4acfdb3fb256b34 days 7 hrs ago0x950bc68ccd99e4bbe424288e6f0dd583e57c9174  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.00004557
0xb111457e4207adaaac6d384484128377fcaaeb02b2ffe559fd00993ee91e71924 days 7 hrs ago0x950bc68ccd99e4bbe424288e6f0dd583e57c9174  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.00004557
0x291f015785a3219ce08e0bdfe7155a63f486fb2a9630ff75155ab9e9c509e36e4 days 7 hrs ago0x950bc68ccd99e4bbe424288e6f0dd583e57c9174  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.000045442
0x6ae3f36c294909303845cfc800184d1c4d1dafc1cc728cc0f2fa5ccc8cf636304 days 7 hrs ago0x950bc68ccd99e4bbe424288e6f0dd583e57c9174  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.00004557
0x80fd496d92b1807e142cee927cc4986a4c72ff12a3d0072599a25cdb9025ae0c4 days 7 hrs ago0x950bc68ccd99e4bbe424288e6f0dd583e57c9174  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.000030506
0x865fc4edea1d36c0c84eead4b5d38b7d96b05781db97968d50b641fafb927be34 days 7 hrs ago0x950bc68ccd99e4bbe424288e6f0dd583e57c9174  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.000045506
0x4b7d75264bcfe0ae6842cf9c351eac777387890493e1b4a7c3c91ced195ee9444 days 7 hrs ago0x950bc68ccd99e4bbe424288e6f0dd583e57c9174  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.000045634
0xc0aeda60504750b9a6d428a02e9663b561ce01d1ef954c3d3be692847ef989734 days 7 hrs ago0x950bc68ccd99e4bbe424288e6f0dd583e57c9174  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.000045634
0xccbcd2403ddfba18f20364645233548f9e16236c070dddf56f4b3f70de05f57a4 days 7 hrs ago0x950bc68ccd99e4bbe424288e6f0dd583e57c9174  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.00004557
0x2b6f6d24f8c01c04e18d16ae22d5cff960d0fc3cfdb2753a944687ee163633744 days 7 hrs ago0x22c9a2a370d42657c06bc8b770832e98bedd4255  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.000045378
0xf0b590bd74c7967a783a2e08acb1ec630ddb6fb28a37cf48179f46fb5e87b8224 days 7 hrs ago0x22c9a2a370d42657c06bc8b770832e98bedd4255  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.00003057
0x13dda872148b44f794e81298858869ca312a22b7c051fa32594c3992c79ec6ff4 days 7 hrs ago0x22c9a2a370d42657c06bc8b770832e98bedd4255  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.00004557
0x13d16cfec21e959125f2b683a3049686ee46e2e56fc2142b363e4539aceb09d34 days 8 hrs ago0xb32709c707bd7f1e49fafc556bc7217da88793f9  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.00022785
0x21eef2a8c99c073fcd4ddf571e1b3e8d9614cb6c3e2b9050fd1fcb214cd2f3fd4 days 9 hrs ago0xb32709c707bd7f1e49fafc556bc7217da88793f9  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.00022689
0xae2059d7a5926076b153eff0be67135f2b0b1b60f110a16035c7550788f772534 days 9 hrs ago0xb32709c707bd7f1e49fafc556bc7217da88793f9  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.000045506
0x2181aa127b690d91ad31b5d1f1dd2bbb04259bb93a8622c0d65972b6458238b95 days 42 mins ago0xb32709c707bd7f1e49fafc556bc7217da88793f9  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.000045506
0xe424df5ea4b56be55482b43d8195d7388d28e56f6e661885c06928878353019b5 days 43 mins ago0xb32709c707bd7f1e49fafc556bc7217da88793f9  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.000045442
0xa0237660d01df180c787e2ccdd469fd10ecba341a9c2326a926c3470ef9cc0d85 days 45 mins ago0xb32709c707bd7f1e49fafc556bc7217da88793f9  IN   0xe49c32368d1045f0dc1e4fd527d66762b64328f30 Ether0.000045634
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Warning: The compiled contract might be susceptible to EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) Solidity compiler bugs.

Contract Source Code Verified (Exact match)
Contract Name: ReserveToken
Compiler Version: v0.4.19+commit.c4cbbb05
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.19;
// last compiled with v0.4.19+commit.c4cbbb05;

contract SafeMath {
  //internals

  function safeMul(uint a, uint b) internal pure returns (uint) {
    uint c = a * b;
    require(a == 0 || c / a == b);
    return c;
  }

  function safeSub(uint a, uint b) internal pure returns (uint) {
    require(b <= a);
    return a - b;
  }

  function safeAdd(uint a, uint b) internal pure returns (uint) {
    uint c = a + b;
    require(c>=a && c>=b);
    return c;
  }
}

contract Token {

  /// @return total amount of tokens
  function totalSupply() public constant returns (uint256 supply) {}

  /// @param _owner The address from which the balance will be retrieved
  /// @return The balance
  function balanceOf(address _owner) public constant returns (uint256 balance) {}

  /// @notice send `_value` token to `_to` from `msg.sender`
  /// @param _to The address of the recipient
  /// @param _value The amount of token to be transferred
  /// @return Whether the transfer was successful or not
  function transfer(address _to, uint256 _value) public returns (bool success) {}

  /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
  /// @param _from The address of the sender
  /// @param _to The address of the recipient
  /// @param _value The amount of token to be transferred
  /// @return Whether the transfer was successful or not
  function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {}

  /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
  /// @param _spender The address of the account able to transfer the tokens
  /// @param _value The amount of wei to be approved for transfer
  /// @return Whether the approval was successful or not
  function approve(address _spender, uint256 _value) public returns (bool success) {}

  /// @param _owner The address of the account owning tokens
  /// @param _spender The address of the account able to transfer the tokens
  /// @return Amount of remaining tokens allowed to spent
  function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {}

  event Transfer(address indexed _from, address indexed _to, uint256 _value);
  event Approval(address indexed _owner, address indexed _spender, uint256 _value);

}

contract StandardToken is Token {

  function transfer(address _to, uint256 _value) public returns (bool success) {
    //Default assumes totalSupply can't be over max (2^256 - 1).
    //If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check if it doesn't wrap.
    //Replace the if with this one instead.
    if (balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
    //if (balances[msg.sender] >= _value && _value > 0) {
      balances[msg.sender] -= _value;
      balances[_to] += _value;
      Transfer(msg.sender, _to, _value);
      return true;
    } else { return false; }
  }

  function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
    //same as above. Replace this line with the following if you want to protect against wrapping uints.
    if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
    //if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0) {
      balances[_to] += _value;
      balances[_from] -= _value;
      allowed[_from][msg.sender] -= _value;
      Transfer(_from, _to, _value);
      return true;
    } else { return false; }
  }

  function balanceOf(address _owner) public constant returns (uint256 balance) {
    return balances[_owner];
  }

  function approve(address _spender, uint256 _value) public returns (bool success) {
    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
    return true;
  }

  function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
    return allowed[_owner][_spender];
  }

  mapping(address => uint256) public balances;

  mapping (address => mapping (address => uint256)) public allowed;

  uint256 public totalSupply;

}

contract ReserveToken is StandardToken, SafeMath {
  string public name;
  string public symbol;
  uint public decimals = 18;
  address public minter;

  event Create(address account, uint amount);
  event Destroy(address account, uint amount);

  function ReserveToken(string name_, string symbol_) public {
    name = name_;
    symbol = symbol_;
    minter = msg.sender;
  }

  function create(address account, uint amount) public {
    require(msg.sender == minter);
    balances[account] = safeAdd(balances[account], amount);
    totalSupply = safeAdd(totalSupply, amount);
    Create(account, amount);
  }

  function destroy(address account, uint amount) public {
    require(msg.sender == minter);
    require(balances[account] >= amount);
    balances[account] = safeSub(balances[account], amount);
    totalSupply = safeSub(totalSupply, amount);
    Destroy(account, amount);
  }
}

contract Challenge is SafeMath {

  uint public fee = 10 * (10 ** 16); // fee percentage (100% = 10 ** 18)
  uint public blockPeriod = 6000; // period of blocks for waiting until certain transactions can be sent
  uint public blockNumber; // block number when this challenge was initiated
  bool public funded; // has the initial challenger funded the contract?
  address public witnessJury; // the WitnessJury smart contract
  address public token; // the token of the prize pool
  address public user1; // the initial challenger
  address public user2; // the responding challenger
  string public key1; // something to identify the initial challenger
  string public key2; // something to identify the responding challenger
  uint public amount; // the amount each challenger committed to prize pool
  address public host; // the witness who agreed to host
  string public hostKey; // something to identify the host
  string public witnessJuryKey; // something the host used to identify the challenge specifics
  uint public witnessJuryRequestNum; // the WitnessJury request number (in the WitnessJury smart contract)
  uint public winner; // the winner (1 or 2)
  bool public rescued; // has the contract been rescued?
  bool public juryCalled; // has the jury been called?
  address public referrer; // the referrer of the person who created the challenge (splits reward with host)

  event NewChallenge(uint amount, address user1, string key1);
  event Fund();
  event Respond(address user2, string key2);
  event Host(address host, string hostKey);
  event SetWitnessJuryKey(uint witnessJuryRequestNum, string witnessJuryKey);
  event RequestJury();
  event Resolve(uint winner, bool wasContested, uint winnerAmount, uint hostAmount, uint witnessJuryAmount);
  event Rescue();

  function Challenge(address witnessJury_, address token_, uint amount_, address user1_, string key1_, uint blockPeriod_, address referrer_) public {
    require(amount_ > 0);
    blockPeriod = blockPeriod_;
    witnessJury = witnessJury_;
    token = token_;
    user1 = user1_;
    key1 = key1_;
    amount = amount_;
    referrer = referrer_;
    blockNumber = block.number;
    NewChallenge(amount, user1, key1);
  }

  function fund() public {
    // remember to call approve() on the token first...
    require(!funded);
    require(!rescued);
    require(msg.sender == user1);
    require(Token(token).transferFrom(user1, this, amount));
    funded = true;
    blockNumber = block.number;
    Fund();
  }

  function respond(address user2_, string key2_) public {
    // remember to call approve() on the token first...
    require(user2 == 0x0);
    require(funded);
    require(!rescued);
    user2 = user2_;
    key2 = key2_;
    blockNumber = block.number;
    require(Token(token).transferFrom(user2, this, amount));
    Respond(user2, key2);
  }

  function host(string hostKey_) public {
    require(host == 0x0);
    require(!rescued);
    host = msg.sender;
    hostKey = hostKey_;
    blockNumber = block.number;
    Host(host, hostKey);
  }

  function setWitnessJuryKey(string witnessJuryKey_) public {
    require(witnessJuryRequestNum == 0);
    require(msg.sender == host);
    require(!rescued);
    witnessJuryRequestNum = WitnessJury(witnessJury).numRequests() + 1;
    witnessJuryKey = witnessJuryKey_;
    blockNumber = block.number;
    WitnessJury(witnessJury).newRequest(witnessJuryKey, this);
    SetWitnessJuryKey(witnessJuryRequestNum, witnessJuryKey);
  }

  function requestJury() public {
    require(!juryCalled);
    require(msg.sender == user1 || msg.sender == user2);
    require(!rescued);
    require(winner == 0);
    require(WitnessJury(witnessJury).getWinner1(witnessJuryRequestNum) != 0 && WitnessJury(witnessJury).getWinner2(witnessJuryRequestNum) != 0);
    juryCalled = true;
    blockNumber = block.number;
    WitnessJury(witnessJury).juryNeeded(witnessJuryRequestNum);
    RequestJury();
  }

  function resolve(uint witnessJuryRequestNum_, bool juryContested, address[] majorityJurors, uint winner_, address witness1, address witness2, uint witnessJuryRewardPercentage) public {
    require(winner == 0);
    require(witnessJuryRequestNum_ == witnessJuryRequestNum);
    require(msg.sender == witnessJury);
    require(winner_ == 1 || winner_ == 2);
    require(!rescued);
    require(block.number > blockNumber + blockPeriod);
    uint totalFee = safeMul(safeMul(amount, 2), fee) / (1 ether);
    uint winnerAmount = safeSub(safeMul(amount, 2), totalFee);
    uint witnessJuryAmount = safeMul(totalFee, witnessJuryRewardPercentage) / (1 ether);
    uint hostAmount = safeSub(totalFee, witnessJuryAmount);
    uint flipWinner = winner_ == 1 ? 2 : 1;
    winner = juryContested ? flipWinner : winner_;
    require(Token(token).transfer(winner == 1 ? user1 : user2, winnerAmount));
    if (referrer != 0x0) {
      require(Token(token).transfer(host, hostAmount / 2));
      require(Token(token).transfer(referrer, safeSub(hostAmount, hostAmount / 2)));
    } else {
      require(Token(token).transfer(host, hostAmount));
    }
    if (!juryContested) {
      require(Token(token).transfer(witness1, witnessJuryAmount / 2));
      require(Token(token).transfer(witness2, witnessJuryAmount / 2));
    } else {
      for (uint i = 0; i < majorityJurors.length; i++) {
        require(Token(token).transfer(majorityJurors[i], witnessJuryAmount / majorityJurors.length));
      }
    }
    uint excessBalance = Token(token).balanceOf(this);
    if (excessBalance > 0) {
      require(Token(token).transfer(0x0, excessBalance));
    }
    Resolve(winner, juryContested, winnerAmount, hostAmount, witnessJuryAmount);
  }

  function rescue() public {
    require(!rescued);
    require(block.number > blockNumber + blockPeriod * 10);
    require(msg.sender == user1 || msg.sender == user2);
    require(winner == 0);
    rescued = true;
    if (user2 != 0x0) {
      require(Token(token).transfer(user1, amount));
      require(Token(token).transfer(user2, amount));
    } else {
      require(Token(token).transfer(user1, amount));
    }
    Rescue();
  }

}

contract ChallengeFactory is SafeMath {

  address witnessJury;
  address token;

  mapping(uint => Challenge) public challenges;
  uint numChallenges;

  event NewChallenge(address addr, uint amount, address user, string key);

  function ChallengeFactory(address witnessJury_, address token_) public {
    witnessJury = witnessJury_;
    token = token_;
  }

  function newChallenge(uint amount, address user, string key, address referrer) public {
    numChallenges = safeAdd(numChallenges, 1);
    uint blockPeriod = 6000;
    challenges[numChallenges] = new Challenge(witnessJury, token, amount, user, key, blockPeriod, referrer);
    NewChallenge(address(challenges[numChallenges]), amount, user, key);
  }

}

contract WitnessJury is SafeMath {
  mapping(address => uint) public balances; // mapping of witness address to witness balance
  uint public limit = 10 ** 16; // 1% = the max percentage of the overall witness pool one person can have
  uint public numWitnessesBeforeLimit = 100; // the number of witnesses before the limit starts kicking in
  uint public totalBalance; // the total of all witness balances
  uint public numWitnesses; // count of total witnesses with non-zero balances
  uint public blockPeriod = 6000; // 1 day at 14.4 seconds per block
  uint public desiredWitnesses = 2; // desired number of witnesses to fulfill a request (witness a match)
  uint public desiredJurors = 3; // desired number of jurors
  uint public penalty = 50 * (10 ** 16); // penalty for witnesses if jury votes yes (penalty is sent back to the witnesses)
  address public token; // the token being staked by witnesses
  mapping(uint => Request) public requests; // mapping of requests that are partially or completely filled
  uint public numRequests; // count of total number of partially or completely filled requests
  mapping(uint => uint) public requestsPerBlockGroup; // map of number of requests per block group
  uint public drmVolumeCap = 10000; // after this many matches per block group, fee stops increasing
  uint public drmMinFee = 25 * (10 ** 16); // minimum witness reward percentage (100% = 10 ** 18)
  uint public drmMaxFee = 50 * (10 ** 16); // maximum witness reward percentage (100% = 10 ** 18)
  mapping(uint => bool) public juryNeeded; // mapping of requestNum to whether the jury is needed
  mapping(uint => mapping(address => bool)) public juryVoted; // mapping of requestNum to juror addresses who already voted
  mapping(uint => uint) public juryYesCount; // mapping of requestNum to number of yes votes
  mapping(uint => uint) public juryNoCount; // mapping of requestNum to number of no votes
  mapping(uint => address[]) public juryYesVoters; // mapping of requestNum to array of yes voters
  mapping(uint => address[]) public juryNoVoters; // mapping of requestNum to array of no voters

  struct Request {
    string key; // the key, which should contain details about the request (for example, match ID)
    address witness1; // the first witness
    address witness2; // the second witness
    string answer1; // the first witness' answer
    string answer2; // the second witness' answer
    uint winner1; // the first witness' winner
    uint winner2; // the second witness' winner
    uint fee; // percentage of match fee that will go to witness / jury pool (100% = 10 ** 18)
    address challenge; // challenge smart contract
    uint blockNumber; // block number when request was made
  }

  event Deposit(uint amount);
  event Withdraw(uint amount);
  event ReduceToLimit(address witness, uint amount);
  event Report(uint requestNum, string answer, uint winner);
  event NewRequest(uint requestNum, string key);
  event JuryNeeded(uint requestNum);
  event JuryVote(uint requestNum, address juror, bool vote);
  event Resolve(uint requestNum);
  event JuryContested(uint requestNum);

  function WitnessJury(address token_) public {
    token = token_;
  }

  function balanceOf(address user) public constant returns(uint) {
    return balances[user];
  }

  function reduceToLimit(address witness) public {
    require(witness == msg.sender);
    uint amount = balances[witness];
    uint limitAmount = safeMul(totalBalance, limit) / (1 ether);
    if (amount > limitAmount && numWitnesses > numWitnessesBeforeLimit) {
      uint excess = safeSub(amount, limitAmount);
      balances[witness] = safeSub(amount, excess);
      totalBalance = safeSub(totalBalance, excess);
      require(Token(token).transfer(witness, excess));
      ReduceToLimit(witness, excess);
    }
  }

  function deposit(uint amount) public {
    // remember to call approve() on the token first...
    require(amount > 0);
    if (balances[msg.sender] == 0) {
      numWitnesses = safeAdd(numWitnesses, 1);
    }
    balances[msg.sender] = safeAdd(balances[msg.sender], amount);
    totalBalance = safeAdd(totalBalance, amount);
    require(Token(token).transferFrom(msg.sender, this, amount));
    Deposit(amount);
  }

  function withdraw(uint amount) public {
    require(amount > 0);
    require(amount <= balances[msg.sender]);
    balances[msg.sender] = safeSub(balances[msg.sender], amount);
    totalBalance = safeSub(totalBalance, amount);
    if (balances[msg.sender] == 0) {
      numWitnesses = safeSub(numWitnesses, 1);
    }
    require(Token(token).transfer(msg.sender, amount));
    Withdraw(amount);
  }

  function isWitness(uint requestNum, address witness) public constant returns(bool) {
    //random number from 0-999999999
    bytes32 hash = sha256(this, requestNum, requests[requestNum].key);
    uint rand = uint(sha256(requestNum, hash, witness)) % 1000000000;
    return (
      rand * totalBalance < 1000000000 * desiredWitnesses * balances[witness] ||
      block.number > requests[requestNum].blockNumber + blockPeriod
    );
  }

  function isJuror(uint requestNum, address juror) public constant returns(bool) {
    //random number from 0-999999999
    bytes32 hash = sha256(1, this, requestNum, requests[requestNum].key);
    uint rand = uint(sha256(requestNum, hash, juror)) % 1000000000;
    return (
      rand * totalBalance < 1000000000 * desiredWitnesses * balances[juror]
    );
  }

  function newRequest(string key, address challenge) public {
    numRequests = safeAdd(numRequests, 1);
    require(requests[numRequests].challenge == 0x0);
    requests[numRequests].blockNumber = block.number;
    requests[numRequests].challenge = challenge;
    requests[numRequests].key = key;
    requestsPerBlockGroup[block.number / blockPeriod] = safeAdd(requestsPerBlockGroup[block.number / blockPeriod], 1);
    uint recentNumRequests = requestsPerBlockGroup[block.number / blockPeriod];
    if (recentNumRequests < drmVolumeCap) {
      requests[numRequests].fee = safeAdd(safeMul(safeMul(recentNumRequests, recentNumRequests), safeSub(drmMaxFee, drmMinFee)) / safeMul(drmVolumeCap, drmVolumeCap), drmMinFee);
    } else {
      requests[numRequests].fee = drmMaxFee;
    }
    NewRequest(numRequests, key);
  }

  function report(uint requestNum, string answer, uint winner) public {
    require(requests[requestNum].challenge != 0x0);
    require(requests[requestNum].witness1 == 0x0 || requests[requestNum].witness2 == 0x0);
    require(isWitness(requestNum, msg.sender));
    reportLogic(requestNum, answer, winner);
    Report(requestNum, answer, winner);
  }

  function reportLogic(uint requestNum, string answer, uint winner) private {
    reduceToLimit(msg.sender);
    if (requests[requestNum].witness1 == 0x0) {
      requests[requestNum].witness1 = msg.sender;
      requests[requestNum].answer1 = answer;
      requests[requestNum].winner1 = winner;
    } else if (requests[requestNum].witness2 == 0x0) {
      requests[requestNum].witness2 = msg.sender;
      requests[requestNum].answer2 = answer;
      requests[requestNum].winner2 = winner;
    }
  }

  function juryNeeded(uint requestNum) public {
    require(msg.sender == requests[requestNum].challenge);
    require(!juryNeeded[requestNum]);
    juryNeeded[requestNum] = true;
    JuryNeeded(requestNum);
  }

  function juryVote(uint requestNum, bool vote) public {
    require(!juryVoted[requestNum][msg.sender]);
    require(juryNeeded[requestNum]);
    require(safeAdd(juryYesCount[requestNum], juryNoCount[requestNum]) < desiredJurors);
    require(isJuror(requestNum, msg.sender));
    juryVoted[requestNum][msg.sender] = true;
    if (vote) {
      juryYesCount[requestNum] = safeAdd(juryYesCount[requestNum], 1);
      juryYesVoters[requestNum].push(msg.sender);
    } else {
      juryNoCount[requestNum] = safeAdd(juryNoCount[requestNum], 1);
      juryNoVoters[requestNum].push(msg.sender);
    }
    JuryVote(requestNum, msg.sender, vote);
  }

  function resolve(uint requestNum) public {
    if (requests[requestNum].winner1 == requests[requestNum].winner2) {
      bool juryContested = juryYesCount[requestNum] > juryNoCount[requestNum] && safeAdd(juryYesCount[requestNum], juryNoCount[requestNum]) == desiredJurors;
      Challenge(requests[requestNum].challenge).resolve(
        requestNum,
        juryContested,
        juryYesCount[requestNum] > juryNoCount[requestNum] ? juryYesVoters[requestNum] : juryNoVoters[requestNum],
        requests[requestNum].winner1,
        requests[requestNum].witness1,
        requests[requestNum].witness2,
        requests[requestNum].fee
      );
      if (juryContested) {
        uint penalty1 = safeMul(balances[requests[requestNum].witness1], penalty) / (1 ether);
        uint penalty2 = safeMul(balances[requests[requestNum].witness2], penalty) / (1 ether);
        balances[requests[requestNum].witness1] = safeSub(balances[requests[requestNum].witness1], penalty1);
        balances[requests[requestNum].witness2] = safeSub(balances[requests[requestNum].witness2], penalty2);
        require(Token(token).transfer(requests[requestNum].witness1, penalty1));
        require(Token(token).transfer(requests[requestNum].witness2, penalty2));
        JuryContested(requestNum);
      }
      Resolve(requestNum);
    }
  }

  function getWinner1(uint requestNum) public constant returns(uint) {
    return requests[requestNum].winner1;
  }

  function getWinner2(uint requestNum) public constant returns(uint) {
    return requests[requestNum].winner2;
  }

  function getRequest(uint requestNum) public constant returns(string, address, address, string, string, uint, address) {
    return (requests[requestNum].key,
            requests[requestNum].witness1,
            requests[requestNum].witness2,
            requests[requestNum].answer1,
            requests[requestNum].answer2,
            requests[requestNum].fee,
            requests[requestNum].challenge);
  }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minter","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"},{"name":"amount","type":"uint256"}],"name":"create","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balances","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"},{"name":"amount","type":"uint256"}],"name":"destroy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"name_","type":"string"},{"name":"symbol_","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Create","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Destroy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Approval","type":"event"}]

  Contract Creation Code Switch To Opcodes View
60606040526012600555341561001457600080fd5b604051610a08380380610a08833981016040528080518201919060200180519091019050600382805161004b929160200190610082565b50600481805161005f929160200190610082565b505060068054600160a060020a03191633600160a060020a03161790555061011d565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100c357805160ff19168380011785556100f0565b828001600101855582156100f0579182015b828111156100f05782518255916020019190600101906100d5565b506100fc929150610100565b5090565b61011a91905b808211156100fc5760008155600101610106565b90565b6108dc8061012c6000396000f3006060604052600436106100cf5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100d4578063075461721461015e578063095ea7b31461018d5780630ecaea73146101c357806318160ddd146101e757806323b872dd1461020c57806327e235e314610234578063313ce567146102535780635c6581651461026657806370a082311461028b57806395d89b41146102aa578063a24835d1146102bd578063a9059cbb146102df578063dd62ed3e14610301575b600080fd5b34156100df57600080fd5b6100e7610326565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561012357808201518382015260200161010b565b50505050905090810190601f1680156101505780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561016957600080fd5b6101716103c4565b604051600160a060020a03909116815260200160405180910390f35b341561019857600080fd5b6101af600160a060020a03600435166024356103d3565b604051901515815260200160405180910390f35b34156101ce57600080fd5b6101e5600160a060020a0360043516602435610440565b005b34156101f257600080fd5b6101fa6104ef565b60405190815260200160405180910390f35b341561021757600080fd5b6101af600160a060020a03600435811690602435166044356104f5565b341561023f57600080fd5b6101fa600160a060020a0360043516610604565b341561025e57600080fd5b6101fa610616565b341561027157600080fd5b6101fa600160a060020a036004358116906024351661061c565b341561029657600080fd5b6101fa600160a060020a0360043516610639565b34156102b557600080fd5b6100e7610654565b34156102c857600080fd5b6101e5600160a060020a03600435166024356106bf565b34156102ea57600080fd5b6101af600160a060020a0360043516602435610794565b341561030c57600080fd5b6101fa600160a060020a0360043581169060243516610850565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103bc5780601f10610391576101008083540402835291602001916103bc565b820191906000526020600020905b81548152906001019060200180831161039f57829003601f168201915b505050505081565b600654600160a060020a031681565b600160a060020a03338116600081815260016020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b60065433600160a060020a0390811691161461045b57600080fd5b600160a060020a03821660009081526020819052604090205461047e908261087b565b600160a060020a0383166000908152602081905260409020556002546104a4908261087b565b6002557fcc9018de05b5f497ee7618d8830568d8ac2d45d0671b73d8f71c67e824122ec78282604051600160a060020a03909216825260208201526040908101905180910390a15050565b60025481565b600160a060020a0383166000908152602081905260408120548290108015906105455750600160a060020a0380851660009081526001602090815260408083203390941683529290522054829010155b801561056a5750600160a060020a038316600090815260208190526040902054828101115b156105f957600160a060020a0380841660008181526020818152604080832080548801905588851680845281842080548990039055600183528184203390961684529490915290819020805486900390559091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060016105fd565b5060005b9392505050565b60006020819052908152604090205481565b60055481565b600160209081526000928352604080842090915290825290205481565b600160a060020a031660009081526020819052604090205490565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103bc5780601f10610391576101008083540402835291602001916103bc565b60065433600160a060020a039081169116146106da57600080fd5b600160a060020a0382166000908152602081905260409020548190101561070057600080fd5b600160a060020a038216600090815260208190526040902054610723908261089b565b600160a060020a038316600090815260208190526040902055600254610749908261089b565b6002557f81325e2a6c442af9d36e4ee9697f38d5f4bf0837ade0f6c411c6a40af7c057ee8282604051600160a060020a03909216825260208201526040908101905180910390a15050565b600160a060020a0333166000908152602081905260408120548290108015906107d65750600160a060020a038316600090815260208190526040902054828101115b1561084857600160a060020a033381166000818152602081905260408082208054879003905592861680825290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600161043a565b50600061043a565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b60008282018381108015906108905750828110155b15156105fd57600080fd5b6000828211156108aa57600080fd5b509003905600a165627a7a7230582036a2b5bdfd2820686c67ce97354aaa7b85828548f58e415f44d3cc6616b41fa6002900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000f4669727374426c6f6f64546f6b656e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000033153540000000000000000000000000000000000000000000000000000000000

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

-----Decoded View---------------
Found 6 constructor arguments :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [3] : 4669727374426c6f6f64546f6b656e0000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [5] : 3153540000000000000000000000000000000000000000000000000000000000


   Swarm Source:
bzzr://36a2b5bdfd2820686c67ce97354aaa7b85828548f58e415f44d3cc6616b41fa6

 

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward