//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.25;
contract SimpleStore {
  
  string[12] passagesArtistes;
  uint creneauxLibres = 12;
  function sInscrire(string memory nomDArtiste) public {
   if(creneauxLibres>0){
     passagesArtistes[12-creneauxLibres] = nomDArtiste;
     creneauxLibres -= 1;
   }
  }

  uint tour;
   function passerArtisteSuivant() public {
     if(tour < passagesArtistes.length){
   tour += 1;
     }
 }

  function artisteEnCours () public constant returns (string) {
    if(tour < passagesArtistes.length){
    return passagesArtistes[tour];
  }
  else{
    return 'FIN';
  }
  }
 
Feb 17, 2020 14:07:57 UTC

[
 {
   "name": "third-party-backend",
   "status": "OK",
   "endpoints": [
     {
       "url": "http://hostname/third-party-backend/api/client/endopoint1",
       "status": "OK",
       "statusCode": 200
     },
     {
       "url": "http://hostname/third-party-backend/api/client/v1/endpoint2/parameter",
       "status": "OK",
       "statusCode": 200
     },
     {
       "url": "http://hostname/third-party-backend/api/client/v1/endpoint3/parameter",
       "status": "OK",
       "statusCode": 200
     },
     {
       "url": "http://hostname/third-party-backend/api/client/v2/endpoint2",
       "status": "OK",
       "statusCode": 20
Feb 14, 2020 13:49:44 UTC
pragma solidity ^0.4.24;

import "./ERC721Asset.sol";
import "./SafeMath.sol";
import "./Ownable.sol";

contract TradingCardSet is Ownable {
    using SafeMath for uint256;

    // Set name
    string internal name_;

    // Address where funds are collected
    address public wallet;

    address[] public tradingCardContracts;

    mapping(bytes32 => address) private codeHashToCardAddressMapping;
    mapping(bytes32 => uint256) private codeHashToTokenIdMapping;

    uint256 public pricePerCard = 50 finney;

    uint16 private totalWeight;
    mapping(uint16 => address) private diceRollToCard;
    bytes32 private lastHash;

    constructor(address _wallet, string _name) public Ownable() {
        wallet = _wallet;
        name_ = _name;
        lastHash = keccak256(block.timestamp, block.difficulty, block.number);
    }

    /**
   * @dev Gets the set name
   * @return string representing the set name
   */
    function name() external view returns (string) {
        return name_;
    }

    function setPrice
Feb 12, 2020 09:10:38 UTC
pragma solidity ^0.4.17;

contract CampaignFactory {
    address[] public deployedCampaigns;
    
    function createCampaign(uint minimumContribution) public {
        address newCampaign = new Campaign(minimumContribution, msg.sender);
        deployedCampaigns.push(newCampaign);
    }
    
    function getDeployedCampaigns() public view returns (address[]) {
        return deployedCampaigns;
    }
}

contract Campaign {
    
    struct Request {
        string description;
        uint value;
        address recipient;
        bool complete;
        uint approvalCount;
        mapping(address=>bool) approvals;
    }
    
    Request[] public requests;
    address public manager;
    uint public minimumContribution;
    mapping(address => bool) public approvers;
    uint public approversCount;
    
    modifier restricted() {
        require(msg.sender == manager);
        _;
    }
    
    constructor(uint minimum, address creator) public {
        manager = creator;
        minimumContribution = minimum;
Feb 12, 2020 09:03:13 UTC
pragma solidity ^0.4.18;

contract Assemblee {
    address[] public membres;
    uint[] public votesPour;
    uint[] public votesContre;

    struct Decision {
        string description;
        uint[] votesPour;
        uint[] votesContre;
    }

    mapping(uint => address[]) hasVoted;

    Decision public decision;

    function rejoindre() public {
        membres.push(msg.sender);
    }

    function estMembre(address utilisateur) public view returns (bool) {
        for (uint i = 0; i < membres.length; i++) {
            if (membres[i] == utilisateur) {
                return true;
            }
        }
        return false;
    }

    function proposerDecision(string memory description) public {
        if (estMembre(msg.sender)) {
            decision.description = description;
            decision.votesPour.push(0);
            decision.votesContre.push(0);
        }
    }

    function voter(uint indice, uint value) public {
        if (estMembre(msg.sender)) {
            uint length = hasVoted[
Feb 07, 2020 10:15:45 UTC
pragma solidity 0.4.18;


/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {
	function mul(uint256 a, uint256 b) internal pure returns (uint256) {
		if (a == 0) {
			return 0;
		}
		uint256 c = a * b;
		assert(c / a == b);
		return c;
	}

	function div(uint256 a, uint256 b) internal pure returns (uint256) {
		// assert(b > 0); // Solidity automatically throws when dividing by 0
		uint256 c = a / b;
		// assert(a == b * c + a % b); // There is no case in which this doesn't hold
		return c;
	}

	function sub(uint256 a, uint256 b) internal pure returns (uint256) {
		assert(b <= a);
		return a - b;
	}

	function add(uint256 a, uint256 b) internal pure returns (uint256) {
		uint256 c = a + b;
		assert(c >= a);
		return c;
	}
}

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
	uint256 public totalSupply;
	function balanceOf(address who) public view returns (
Feb 04, 2020 06:25:36 UTC
pragma solidity ^0.4.17;

contract poker {
    enum State {UNCERTAIN, VALID, ALLIN, FOLD}
    string[52] deck = ['p7', 'h6', 't14', 'h12', 'c10', 'p9', 'c3', 't2', 'p11', 'c14', 'c4', 'h5', 'p12', 'c2', 'h13', 't5', 't13', 'p2', 'c5', 'h2', 'h10', 'h7','p4', 'c12', 'h8', 'c7', 'p14', 'c8', 't8', 't11', 't12', 'h14', 'h4','c11', 't4', 'c6', 'p10', 't9', 'p6', 't3', 't6', 'p13', 'c9', 'h11', 'p5', 't10', 'p8', 'h3', 't7', 'p3', 'h9', 'c13'];
    uint8 deck_i = 0;

    struct Player {
        string[2] hand;
        uint16 tokens;
        State playerState;
        address id;
    }

    uint8 constant NB_PLAYER = 2;
    Player[] players;
    uint128 constant FEE = 10**3;
    uint128 gain = 0; 

    function join() public payable{
        require (msg.value == FEE);
        if(players.length < NB_PLAYER) {
            string[2] memory hand = [deck[deck_i++], deck[deck_i++]];
            players.push(Player(hand, 100, State.UNCERTAIN, msg.sender));
            gain += FEE;
        }
    }

    /*function quit() p
Feb 04, 2020 04:51:03 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Feb 02, 2020 23:06:14 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Feb 02, 2020 15:31:58 UTC
pragma solidity ^0.4.24;  


/* 合約本體 */
contract SimpleAdd {

    /* 變數宣告 */
    uint number = 0;

    // ... 更多變數


    /* 函數定義 */
    function getNumber() public view returns (uint) {
        return number;
    }

    // ... 更多函數 
    function increase() public {
        number++;
    }

    
Feb 01, 2020 16:24:08 UTC
pragma solidity ^0.4.17;

contract poker {
    enum State {UNCERTAIN, VALID, ALLIN, FOLD}
    //"4 of a Kind", "Straight Flush", "Straight", "Flush", "High Card", "1 Pair", "2 Pair", "Royal Flush", "3 of a Kind", "Full House"
    int[] hands_point = [7000, 8000, 4000, 5000, 0, 1000, 2000, 9000, 3000, 6000];
    string[52] deck = ['p7', 'h6', 't14', 'h12', 'c10', 'p9', 'c3', 't2', 'p11', 'c14', 'c4', 'h5', 'p12', 'c2', 'h13', 't5', 't13', 'p2', 'c5', 'h2', 'h10', 'h7','p4', 'c12', 'h8', 'c7', 'p14', 'c8', 't8', 't11', 't12', 'h14', 'h4','c11', 't4', 'c6', 'p10', 't9', 'p6', 't3', 't6', 'p13', 'c9', 'h11', 'p5', 't10', 'p8', 'h3', 't7', 'p3', 'h9', 'c13'];
    string[3] card_revealed;
    uint8 deck_i = 0;
    uint8 current_turn = 1;
    uint16 tokens_pot = 0;
    uint16 call_value = 0;

    struct Player {
        string[2] hand;
        uint16 tokens;
        State playerState;
        address id;
        uint16 raise;
        int score; //score =  rang de la combinaison en milliers de points + somme des rang
Jan 31, 2020 10:13:36 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jan 30, 2020 13:49:14 UTC
pragma solidity ^0.5.0;

import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "./mocks/tokens/MintableERC20.sol";
import "./flashloan/base/FlashLoanReceiverBase.sol";
import "./configuration/LendingPoolAddressesProvider.sol";

contract FlashLoanReceiverArb is FlashLoanReceiverBase {

    using SafeMath for uint256;

    // Events
    event borrowMade(address _reserve, uint256 _amount , uint256 _value);

    constructor(LendingPoolAddressesProvider _provider) FlashLoanReceiverBase(_provider)
        public {}

    bytes32 public constant SALT = keccak256(abi.encodePacked("FlashLoanReceiver"));
    uint256 public constant TEST = 20200128;
    bytes   public paramFromExecuteOperation;

    /// implementing abstract function "executeOperation()" from IFlashLoanReceiver.sol:
    /// function executeOperation(address _reserve, uint256 _amount, uint256 _fee, bytes calldata _params) external;
    function executeOperation(
        address _reserve,
        uint256 _amount,
        uint256 _fee,
        
Jan 30, 2020 03:59:04 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.25;
contract estMembreDelAssemblee {

address[]membres;

function estMembre(address utilisateur) public view returns (bool) {
    for (uint i = 0; i < membres.length; i++) {
        if (membres[i] == utilisateur){
        return true;
        } else {
        return false;
        }
    }
}

Jan 28, 2020 14:49:21 UTC
pragma solidity ^0.4.17;

contract poker {
    enum State {UNCERTAIN, VALID, ALLIN, FOLD}
    string[52] deck = ['p7', 'h6', 't14', 'h12', 'c10', 'p9', 'c3', 't2', 'p11', 'c14', 'c4', 'h5', 'p12', 'c2', 'h13', 't5', 't13', 'p2', 'c5', 'h2', 'h10', 'h7','p4', 'c12', 'h8', 'c7', 'p14', 'c8', 't8', 't11', 't12', 'h14', 'h4','c11', 't4', 'c6', 'p10', 't9', 'p6', 't3', 't6', 'p13', 'c9', 'h11', 'p5', 't10', 'p8', 'h3', 't7', 'p3', 'h9', 'c13'];
    uint8 deck_i = 0;

    struct Player {
        string[2] hand;
        uint16 tokens;
        State playerState;
        address id;
    }

    uint8 constant NB_PLAYER = 2;
    Player[] players;
    uint128 constant FEE = 10**3;
    uint128 gain = 0; 

    function join() public payable{
        require (msg.value == FEE);
        if(players.length < NB_PLAYER) {
            string[2] memory hand = [deck[deck_i++], deck[deck_i++]];
            players.push(Player(hand, 100, State.UNCERTAIN, msg.sender));
            gain += FEE;
        }
    }

    /*function quit() p
Jan 28, 2020 14:00:02 UTC
pragma solidity ^0.4.17;

contract poker {
    enum State {UNCERTAIN, VALID, ALLIN, FOLD}
    string[52] deck = ['p7', 'h6', 't14', 'h12', 'c10', 'p9', 'c3', 't2', 'p11', 'c14', 'c4', 'h5', 'p12', 'c2', 'h13', 't5', 't13', 'p2', 'c5', 'h2', 'h10', 'h7','p4', 'c12', 'h8', 'c7', 'p14', 'c8', 't8', 't11', 't12', 'h14', 'h4','c11', 't4', 'c6', 'p10', 't9', 'p6', 't3', 't6', 'p13', 'c9', 'h11', 'p5', 't10', 'p8', 'h3', 't7', 'p3', 'h9', 'c13'];
    uint8 deck_i = 0;

    struct Player {
        string[2] hand;
        uint16 tokens;
        State playerState;
        address id;
    }

    uint8 constant NB_PLAYER = 2;
    Player[] players;
    uint32 gain; 

    function join() public {
        if(players.length < NB_PLAYER) {
            players.push(Player([deck[deck_i++], deck[deck_i++]], 100, State.UNCERTAIN, msg.sender));
        }
    }

    /*function quit() public {
        
    }*/

    function get() public view returns (string) {
        return players[0].hand[0];
    }

    /*constructor() public {
  
Jan 28, 2020 11:08:32 UTC
pragma solidity ^0.4.17;

contract poker {
    enum State {UNCERTAIN, VALID, ALLIN, FOLD}
    string[52] deck;
    
    struct Player {
        string[2] hand;
        uint16 tokens;
        State playerState;
        address id;
    }

    /*constructor() public {
        hand = ["", ""];
        tokens = 100;
        playerState = State.UNCERTAIN;

        uint i;
        uint j;
        uint pos = 0;
        string[4] type = ["c", "t", "h", "p"]
        for(i=0; i<type.length; i++) {
            for(j=2; j<15; i++) {
                deck[pos] = type[i] + j;
                pos++;
            }
        }
    }*/

  function uintToBytes(uint v) public pure returns (bytes32 ret) {
      if (v == 0) {
          ret = '0';
      }
      else {
          while (v > 0) {
              ret = bytes32(uint(ret) / (2 ** 8));
              ret |= bytes32(((v % 10) + 48) * 2 ** (8 * 31));
              v /= 10;
          }
      }
      return ret;
  }
// https://solidity.readthedocs.io/en/develop/miscellaneous.html?hi
Jan 28, 2020 09:50:38 UTC
pragma solidity ^0.4.17;

contract poker {
    enum State {UNCERTAIN, VALID, ALLIN, FOLD}
    string[52] deck;
    
    struct Player {
        string[2] hand;
        uint16 tokens;
        State playerState;
        address id;
    }

// https://solidity.readthedocs.io/en/develop/miscellaneous.html?highlight=Pure
    function caress() public view returns (string) {
        return "OKTEST";
	  }

}
Jan 28, 2020 09:10:54 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jan 28, 2020 09:09:29 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.5.16;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jan 25, 2020 20:13:01 UTC
pragma experimental ABIEncoderV2;
pragma solidity ^0.5.0;

contract Verifier {
    
    mapping (address => uint) public nonces;
    
    mapping (address => uint) public smiles;
    mapping (address => uint) public nods;
    
    function nod(address nodder, uint nodNum, uint nodMultiplier) public {
        nods[nodder] = nods[nodder]*nodMultiplier + nodNum;
    }
    
    function smile(address smiler, uint256 smileNum) public {
        smiles[smiler] += smileNum;
    }

    // ---------- For Meta Tx --------- //
    
    bytes32 private constant SMILE_METHOD_SIG_HASHED = keccak256(bytes('smile(address,uint256)'));
    bytes32 private constant SMILE_TYPEHASH = keccak256(abi.encodePacked(
        "Packet(string method_name,address smiler,uint256 smile_num,bytes4 method_identifier,bytes params_packed,uint256 nonce)"    
    ));
 
    bytes32 public constant  NOD_METHOD_SIG_HASHED = keccak256(bytes('nod(address,uint256,uint256)'));
    bytes32 private constant NOD_TYPEHASH = keccak256(abi.encodePacked(
       
Jan 23, 2020 16:45:24 UTC
pragma experimental ABIEncoderV2;
pragma solidity ^0.5.0;

contract Verifier {
    
    mapping (address => uint) public nonces;
    
    mapping (address => uint) public smiles;
    mapping (address => uint) public nods;
    
    function nod(address nodder, uint nodNum, uint nodMultiplier) public {
        nods[nodder] = nods[nodder]*nodMultiplier + nodNum;
    }
    
    function smile(address smiler, uint256 smileNum) public {
        smiles[smiler] += smileNum;
    }

    // ---------- For Meta Tx --------- //
    
    bytes32 private constant SMILE_METHOD_SIG_HASHED = keccak256(bytes('smile(address,uint256)'));
    bytes32 private constant SMILE_TYPEHASH = keccak256(abi.encodePacked(
        "Packet(string method_name,address smiler,uint256 smile_num,bytes4 method_identifier,bytes params_packed)"    
    ));
 
    bytes32 public constant  NOD_METHOD_SIG_HASHED = keccak256(bytes('nod(address,uint256,uint256)'));
    bytes32 private constant NOD_TYPEHASH = keccak256(abi.encodePacked(
        "Packet(strin
Jan 23, 2020 15:07:25 UTC
pragma experimental ABIEncoderV2;
pragma solidity ^0.5.0;

contract Verifier {
    mapping (address => uint) public smiles;
    mapping (address => uint) public nods;
    
    function nod(address nodder, uint nodNum, uint nodMultiplier) public {
        nods[nodder] = nods[nodder]*nodMultiplier + nodNum;
    }
    
    function smile(address smiler, uint256 smileNum) public {
        smiles[smiler] += smileNum;
    }

    // ---------- For Meta Tx --------- //
    
    bytes32 private constant SMILE_METHOD_SIG_HASHED = keccak256(bytes('smile(address,uint256)'));
    bytes32 private constant SMILE_TYPEHASH = keccak256(abi.encodePacked(
        "Packet(string method_name,address smiler,uint256 smile_num,bytes4 method_identifier,bytes params_packed)"    
    ));
 
    bytes32 public constant  NOD_METHOD_SIG_HASHED = keccak256(bytes('nod(address,uint256,uint256)'));
    bytes32 private constant NOD_TYPEHASH = keccak256(abi.encodePacked(
        "Packet(string method_name,address nodder,uint256 nod_num,uint256 no
Jan 22, 2020 17:29:58 UTC
pragma experimental ABIEncoderV2;
pragma solidity ^0.5.0;

contract Verifier {
    mapping (address => uint) public smiles;
    mapping (address => uint) public nods;
    
    function nod(address nodder, uint nodNum, uint nodMultiplier) public {
        nods[nodder] = nods[nodder]*nodMultiplier + nodNum;
    }
    
    function smile(address smiler, uint256 smileNum) public {
        smiles[smiler] += smileNum;
    }

    // ---------- For Meta Tx --------- //
    
    string private constant  SMILE_METHOD_SIG = 'smile(address,uint256)';
    bytes4 private constant  SMILE_METHOD_IDENTIFIER = bytes4(keccak256(bytes(SMILE_METHOD_SIG)));
    string private constant SMILE_TYPE = "Packet(string method_name,address smiler,uint256 smile_num,bytes4 method_identifier,bytes params_packed)";
    bytes32 private constant SMILE_TYPEHASH = keccak256(abi.encodePacked(SMILE_TYPE));
 
    string public constant  NOD_METHOD_SIG = 'nod(address,uint256,uint256)';
    bytes4 public constant  NOD_METHOD_IDENTIFIER = bytes4(keccak
Jan 22, 2020 10:06:43 UTC
pragma experimental ABIEncoderV2;
pragma solidity ^0.5.0;

contract Verifier {
    bytes32 constant SALT = 0xf2d857f4a3edcb9b78b4d503bfe733db1e3f6cdc2b7971ee739626c97e86a558; // Finally method to identify Dapp
    uint256 chainId = 3; // Ropsten testnet
    
    string private constant EIP712_DOMAIN = "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract,bytes32 salt)";
    bytes32 private constant EIP712_DOMAIN_TYPEHASH = keccak256(abi.encodePacked(EIP712_DOMAIN));
    bytes32 private DOMAIN_SEPARATOR = keccak256(abi.encode(
        EIP712_DOMAIN_TYPEHASH,
        keccak256("EIP712Dapp"),
        keccak256("1"),
        chainId,
        address(this),
        SALT
    ));
    
    mapping (address => uint) public smiles;
    string public constant  SMILE_METHOD_SIG = 'smile(address,uint256)';
    bytes4 public constant  SMILE_METHOD_IDENTIFIER = bytes4(keccak256(bytes(SMILE_METHOD_SIG)));
    bytes32 public constant SMILE_METHOD_SIG_HASH = keccak256(abi.encodePacked(SMILE_METHOD_
Jan 22, 2020 01:12:49 UTC
pragma experimental ABIEncoderV2;
pragma solidity ^0.5.0;

contract Verifier {
    bytes32 constant SALT = 0xf2d857f4a3edcb9b78b4d503bfe733db1e3f6cdc2b7971ee739626c97e86a558; // Finally method to identify Dapp
    uint256 chainId = 3; // Ropsten testnet
    
    string private constant EIP712_DOMAIN = "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract,bytes32 salt)";
    bytes32 private constant EIP712_DOMAIN_TYPEHASH = keccak256(abi.encodePacked(EIP712_DOMAIN));
    bytes32 private DOMAIN_SEPARATOR = keccak256(abi.encode(
        EIP712_DOMAIN_TYPEHASH,
        keccak256("EIP712Dapp"),
        keccak256("1"),
        chainId,
        address(this),
        SALT
    ));
    
    mapping (address => uint) public smiles;
    struct Smile {
        uint256 num;
    }
    string private constant SMILE_TYPE = "Smile(uint256 num)";
    bytes32 private constant SMILE_TYPEHASH = keccak256(abi.encodePacked(SMILE_TYPE));
    
    struct Packet {
        bytes4 method;
        bytes  para
Jan 21, 2020 20:11:46 UTC
pragma experimental ABIEncoderV2;
pragma solidity ^0.5.0;

contract Verifier {
    bytes32 constant SALT = 0xf2d857f4a3edcb9b78b4d503bfe733db1e3f6cdc2b7971ee739626c97e86a558; // Finally method to identify Dapp
    uint256 chainId = 3; // Ropsten testnet
    
    string private constant EIP712_DOMAIN = "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract,bytes32 salt)";
    bytes32 private constant EIP712_DOMAIN_TYPEHASH = keccak256(abi.encodePacked(EIP712_DOMAIN));
    bytes32 private DOMAIN_SEPARATOR = keccak256(abi.encode(
        EIP712_DOMAIN_TYPEHASH,
        keccak256("EIP712Dapp"),
        keccak256("1"),
        chainId,
        address(this),
        SALT
    ));
    
    mapping (address => uint) public smiles;
    struct Smile {
        uint256 num;
    }
    string private constant SMILE_TYPE = "Smile(uint256 num)";
    bytes32 private constant SMILE_TYPEHASH = keccak256(abi.encodePacked(SMILE_TYPE));
    
    struct Packet {
        bytes4 method;
        bytes param
Jan 21, 2020 15:18:04 UTC

pragma solidity >=0.4.22 <0.6.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.

contract dapp {
    
    mapping (address => uint) public value; // 測試用
    bytes4 METHOD1_IDENTIFIER;
    bytes4 METHOD2_IDENTIFIER;
    mapping (address => uint) public nonces;
    bytes32 public DOMAIN_SEPARATOR;
    
    constructor() public {
        DOMAIN_SEPARATOR = keccak256(abi.encode(
            keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
            keccak256(bytes("dapp")), // contract name
            keccak256(bytes("0.1")), // contract version
            1, // chain ID
            address(this) // contract address
        ));

        // 儲存每個 function 的簽名 hash
        METHOD1_IDENTIFIER = bytes4(keccak256(bytes("method1(address)")));
        METHOD2_IDENTIFIER = bytes4(keccak256(bytes("method2(address,uint)")));
    }
    
    function method1(address from) public { // 測試用
        value[from] ++;
    }

Jan 20, 2020 16:16:54 UTC
pragma experimental ABIEncoderV2;
pragma solidity ^0.5.0;

contract Verifier {
    bytes32 constant SALT = 0xf2d857f4a3edcb9b78b4d503bfe733db1e3f6cdc2b7971ee739626c97e86a558; // Finally method to identify Dapp
    uint256 chainId = 4; // Rinkeby
    
    string private constant EIP712_DOMAIN = "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract,bytes32 salt)";
    bytes32 private constant EIP712_DOMAIN_TYPEHASH = keccak256(abi.encodePacked(EIP712_DOMAIN));
    bytes32 private DOMAIN_SEPARATOR = keccak256(abi.encode(
        EIP712_DOMAIN_TYPEHASH,
        keccak256("EIP712Dapp"),
        keccak256("1"),
        chainId,
        address(this),
        SALT
    ));
    
    string private constant SMILE_TYPE = "Smile(uint256 num)";
    bytes32 private constant SMILE_TYPEHASH = keccak256(abi.encodePacked(SMILE_TYPE));
    struct Smile {
        uint256 num;
    }

    mapping (address => uint) public smiles;

    function smile(address smiler, uint256 smileNum) public {
        smi
Jan 20, 2020 15:54:20 UTC

pragma solidity >=0.4.22 <0.6.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.

contract test {
   
    bytes32 public  constant  DOMAIN_SEPARATOR;
    bytes4  public  constant XADD_IDENTIFIER;
    address private constant FROM = ;
    uint8   private constant V = ;
    bytes32 private constant R = ;
    bytes32 private constant S = ;
    uint private constant Y = 15;
    uint private constant Z = 9;
    
    uint public x;
    
    constructor() public {
        DOMAIN_SEPARATOR = keccak256(abi.encode(
            keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
            keccak256(bytes("test")),
            keccak256(bytes("1")),
            1,
            FROM
        ));
        XADD_IDENTIFIER = ;
        x = 7;
    }
    
    function metaTx () public {
        bytes message = abi.encodeWithSignature("xAdd(uint,uint)", Y, Z);
        bytes32 digest =
            keccak256(abi.encodePacked(
                "\x19\x01",
    
Jan 20, 2020 15:17:54 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.26;


/*
Should manage relationships between cards and people, store a list of cards, generate cards and assign them to people:
  - selling
  - list them
  - create new ones
  - start fights
  - breed
  - invoke state of card
*/
contract PokeCore {
  mapping (address => uint[]) private ownerToIDs;
  mapping (uint => address) private IDToOwner;
  mapping (address => cardForSaleToAddress) private sellerToCardForSaleToAddress;
  Pokemon[] private cards;

  uint private timeoutBreeding = 30 minutes;

  struct cardForSaleToAddress {
    uint cardID;
    address authToBuy;
    bool canBuy;
    uint price;
  }

  struct Pokemon {
    uint totalHp;
    uint currentHp;
    uint atk;
    uint speciesID;
    bool isFighting;
    bool isBreeding;
    uint breedingWith;
    uint breedUntil;
    uint parent1ID;
    uint parent2ID;
    uint ID;
  }

  constructor() public {
    Pokemon memory pkm = Pokemon({
      to
Jan 19, 2020 23:43:04 UTC
<script src ="https://cdn01.basis.net/assets/up.js?um=1"></script>
<script type="text/javascript">
	cntrUpTag.track('cntrData', '48a921ade243f6f2');
</script
Jan 19, 2020 19:29:05 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jan 19, 2020 14:21:56 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jan 19, 2020 14:05:38 UTC
pragma solidity  >=0.4.8 <0.4.22;

// ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------

// ERC Token Standard #20 Interface
// https://github.com/ethereum/EIPs/issues/20
contract ERC20Interface {
    // Get the total token supply
    function totalSupply() constant returns(uint256 initialSupply);

    // Get the account balance of another account with address _owner
    function balanceOf(address _owner) constant returns(uint256 balance);

    // Send _value amount of tokens to address _to
    function transfer(address _to, uint256 _value) returns(bool success);

    // Send _value amount of tokens from address _from to address _to
    function transferFrom(address _from, address _to, uint256 _value) returns(bool success);

    // Allow _spender to withdraw from your account, multip
Jan 19, 2020 10:26:34 UTC

pragma solidity >=0.4.22 <0.6.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.

// 注意:凡是 relayer 想代為互動的 dapp contracts 都要個別建立 interface
//      每個 interface 內含一個 function (metaTx) 即可。
//      所有想處理 meta-transaction 的 dapp 都要實作一個 metaTx(),實現 contest 目標。

interface dapp {
    function metaTx(address initiatorAddr, bytes calldata message, uint8 v, bytes32 r, bytes32 s, uint256 nonce) external returns (bool); 
}
    
contract relayer {
    
    dapp dappContract;
    
    constructor(address dappAddr) public { // 傳入想幫忙 relay 的 address
        dappContract = dapp(dappAddr);
    }
    
    function relayTx(bytes memory message, uint8 v, bytes32 r, bytes32 s, uint256 nonce) public {
                         
        dappContract.metaTx(msg.sender, message, v, r, s, nonce); // 注意:msg.sender 理應不需要為這行付 gas

        // 如果是用 dappAddr.call() 的話,不確定 
Jan 18, 2020 17:45:22 UTC

pragma solidity >=0.4.22 <0.6.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.

contract dapp {
    
    mapping (address => uint) public smiles; // 測試用
    mapping (address => uint) public nonces;
    bytes32 public DOMAIN_SEPARATOR;
    
    constructor() public {
        DOMAIN_SEPARATOR = keccak256(abi.encode(
            keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
            keccak256(bytes("dapp")), // contract name
            keccak256(bytes("0.1")), // contract version
            1, // chain ID
            address(this) // contract address
        ));
    }
    
    function smile(address smiler) public { // 測試用
        smiles[smiler] ++;
    }
    
    function metaSmile(address addr) public { // 測試用
        bytes memory payload = abi.encodeWithSignature("smile(address)", addr); // "smile(address)" 正是 smile 的 function signature
        (bool success, bytes memory returnData) = address(this)
Jan 18, 2020 17:41:51 UTC

pragma solidity >=0.4.22 <0.6.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.

interface dapp {
    function metaTx(address initiatorAddr, bytes calldata message, uint8 v, bytes32 r, bytes32 s, uint256 nonce) external returns (bool); 
}
    
contract relayer {
    
    dapp dappContract;
    
    constructor(address dappAddr) public { // 傳入想幫忙 relay 的 address
        dappContract = dapp(dappAddr);
    }
    
    function relayTx(bytes memory message, uint8 v, bytes32 r, bytes32 s, uint256 nonce) public {
                         
        dappContract.metaTx(msg.sender, message, v, r, s, nonce); // 注意:msg.sender 理應不需要為這行付 gas
        
    }
    
}
Jan 18, 2020 17:39:52 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jan 17, 2020 00:48:39 UTC

contract DAI {
  [略]
  function transferFrom(address src, address dst, uint wad) public returns (bool) {
    [內容略]      
  }
  function approve(address usr, uint wad) external returns (bool) {
    [內容略]     
  }
  [略]
}

contract DAI_meta {

  function transfer_meta(string memory metaMessage, r,s,v) {
    digest = [依照 EIP712 規定打包 metaMessage]
    address signer = ecrecover(digest, r,s,v)

    require( [某種檢查機制確認本合約 & 錢包願意幫 signer 代付 gas 以及 relay metaMessage] )

    接下來有兩種方案
    方案一:// 不允許 meta-meta transaction
    require (signer == msg.sender) 
    [解析 metaMessage 內容,萃取目標 method]
    [代 signer 呼叫 DAI 裡的目標 method] 

    方案二:// 允許 meta-meta transaction
    [解析 metaMessage 內容,萃取目標 method]
    [代 signer 呼叫 DAI 裡的目標 method] 

    解法完畢。兩個 follow-up 想法:
    1. 似乎可以 propose 新的 EIP 建議「如何 structure metaMes
Jan 16, 2020 15:42:43 UTC

contract DAI {
  [略]
  function transferFrom(address src, address dst, uint wad) public returns (bool) {
    [內容略]      
  }
  function approve(address usr, uint wad) external returns (bool) {
    [內容略]     
  }
  [略]
}

contract DAI_meta {

  function transfer_meta(string memory metaMessage, r,s,v) {
    digest = [依照 EIP712 規定打包 metaMessage]
    address signer = ecrecover(digest, r,s,v)

    require( [某種檢查機制確認本合約 & 錢包願意幫 signer 代付 gas 以及 relay metaMessage] )

    接下來有兩種方案
    方案一:// 不允許 meta-meta transaction
    require (signer == msg.sender) 
    [解析 metaMessage 內容,萃取目標 method]
    [代 signer 呼叫 DAI 裡的目標 method] 

    方案二:// 允許 meta-meta transaction
    [解析 metaMessage 內容,萃取目標 method]
    [代 signer 呼叫 DAI 裡的目標 method] 

    解法完畢。兩個 follow-up 想法:
    1. 似乎可以 propose 新的 EIP 建議「如何 structure metaMes
Jan 16, 2020 15:21:18 UTC
/*
 * @source: https://ethernaut.openzeppelin.com/level/0x234094aac85628444a82dae0396c680974260be7
 * @author: Alejandro Santander (OpenZeppelin)
 * Modified by B. Mueller
 */
pragma solidity ^0.5.0;
contract Ownable {
    address payable public _owner;
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        _owner = msg.sender;
        emit OwnershipTransferred(address(0), _owner);
    }
    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }
    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(), "Ownable: caller is not the owner");
        _;
    }
    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bo
Jan 16, 2020 06:18:36 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jan 16, 2020 05:59:08 UTC
pragma solidity ^0.4.23; 

// A Locked Name Registrar
contract Locked {

    bool public unlocked = false;  // registrar locked, no name updates
    
    struct NameRecord { // map hashes to addresses
        bytes32 name; // 
        address mappedAddress;
    }

    mapping(address => NameRecord) public registeredNameRecord; // records who registered names 
    mapping(bytes32 => address) public resolve; // resolves hashes to addresses
    
    function register(bytes32 _name, address _mappedAddress) public {
        // set up the new NameRecord
        NameRecord newRecord;
        newRecord.name = _name;
        newRecord.mappedAddress = _mappedAddress; 

        resolve[_name] = _mappedAddress;
        registeredNameRecord[msg.sender] = newRecord; 

        require(unlocked); // only allow registrations if contract is unlocked
    }
Jan 16, 2020 03:25:12 UTC
pragma solidity ^0.5.4;

import "Gazillion.sol";

// Can you have a gazillion balance?

contract VerifyGazillion is challenge1 {
    
    function buy() public payable {

        uint256 initial_balance = balance;

        super.buy();

        // post checks
        assert(balance == initial_balance + msg.value);
        assert(balance >= initial_balance);
    }
    
    function burn(uint256 amount) public {

        uint256 initial_balance = balance;

        super.burn(amount);

        // post checks
        assert(balance == initial_balance - amount);
        assert(balance <= initial_balance);
    }

}
Jan 14, 2020 05:41:04 UTC
pragma solidity >=0.4.23 <0.6.0;

interface IERC20 {
  function totalSupply() external view returns (uint256);
  function balanceOf(address who) external view returns (uint256);
  function allowance(address owner, address spender) external view returns (uint256);
  function transfer(address to, uint256 value) external returns (bool);
  function approve(address spender, uint256 value) external returns (bool);
  function transferFrom(address from, address to, uint256 value) external returns (bool);

  event Transfer(address indexed from, address indexed to, uint256 value);
  event Approval(address indexed owner, address indexed spender, uint256 value);
}

library SafeMath {
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) {
      return 0;
    }
    uint256 c = a * b;
    assert(c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a / b;
    return c;
  }

  function sub(uint256 a, uint256 b) internal pure re
Jan 12, 2020 22:54:48 UTC
interface EIP1753 {
	string public name;
	uint256 public totalSupply;
	
	function grantAuthority(address who);
	function revokeAuthority(address who);
	function hasAuthority(address who) pure public returns (bool);
	
	function issue(address who, uint256 from, uint256 to) public;
	function revoke(address who) public;
	
	function hasValid(address who) public view returns (boolean);
	function purchase(uint256 from, uint256 to) public payable;
}

pragma solidity ^0.5.3;

contract EIP is EIP1753 {

	string public name = "Kakadu National Park Camping Permit";
	uint256 public totalSupply;

	address private _owner;
	mapping(address => bool) private _authorities;
	mapping(address => Permit) private _holders;
	
	struct Permit {
		address issuer;
		uint256 start;
		uint256 end;
	}
	
	constructor() public {
		_owner = msg.sender;
	}
	
	function grantAuthority(address who) public onlyOwner() {
		_authorities[who] = true;
	}
	
	function revokeAuthority(address who) public onlyOwner() {
		delete _authorities[who];
	}
	
	fun
Jan 12, 2020 03:06:06 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity >=0.4.0 <0.6.0;
contract SimpleStorage {
   uint storedData;
   function set(uint x) public {
      storedData = x;
   }
   function get() public view returns (uint) {
      return storedData;
   }
Jan 05, 2020 05:11:34 UTC
// Write your own contracts here.
pragma solidity ^0.5.15;
contract Bank {
  constructor() public {

  }

  function deposit() public payable {

  }

  function withdraw() public {

  }
Jan 02, 2020 09:23:46 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }






  

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Dec 31, 2019 09:17:27 UTC
pragma solidity ^0.5.4;

import "./gazillion.sol";

contract VerifyGazillion is challenge1 {
    
    event AssertionFailed(string message);

    function buy() public payable {
        
        uint256 balance_pre = balance;
        
        super.buy();

        if (balance < balance_pre) {
            emit AssertionFailed("Postcondition violated in buy(): Balance must be higher or equal.");
        }
    }
    
    function burn(uint256 amount) public {
     
        uint256 balance_pre = balance;   
        
        super.burn(amount);
        
        if (balance > balance_pre) {
            emit AssertionFailed("Postcondition violated in burn(): Balance must be lower or equal.");
        }
        
    }
Dec 25, 2019 04:21:04 UTC
pragma solidity >=0.4.22 <0.6.0;

contract MyAssertion {
  event AssertionFailed(string message);
  
  // "Vanilla" Solidity assertion
  
  uint256 solution = 0xbf * 0x7;
  
  function assertion1(uint256 x) public {
    
    assert(x != solution);
  }    

  // MythX-style assertion
  
  function assertion(uint256 x) public {
      
    if (x == solution) {
        emit AssertionFailed("Secret value uncovered!");     
    }

  }
}
Dec 25, 2019 03:38:39 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Dec 22, 2019 14:44:48 UTC
# apt-get install qem
Dec 19, 2019 16:39:55 UTC
pragma solidity ^0.4.24;

import "./SafeToken.sol";
import "./Pausable.sol";
import "./IKyberSwap.sol";

contract LiquidPledging {
    function addGiverAndDonate(uint64 idReceiver, address donorAddress, address token, uint amount)
        public
    {}
}

contract SwapProxy is Pausable, SafeToken {
    address public ETH;
    address public vault;
    uint public maxSlippage;
    KyberNetworkProxy public kyberProxy;
    LiquidPledging public liquidPledging;

    /**
     * @param _liquidPledging LiquidPledging contract address
     * @param _kyberProxy Kyber Network Proxy address
     * @param _ETH Kyber ETH address
     * @param _vault address that receives swap fees
     * @param _maxSlippage most slippage as a percentage
     */
    function SwapProxy(address _liquidPledging, address _kyberProxy, address _ETH, address _vault, uint _maxSlippage) public {
      require(_maxSlippage < 100);
      if (_vault == address(0)){
        _vault = address(this);
      }
      liquidPledging = LiquidPledging(_liquidPl
Dec 18, 2019 16:39:49 UTC

pragma solidity ^0.4.24;

// ----------------------------------------------------------------------------
// '0Fucks' token contract
//
// Deployed to : 0x0e92F480015de7a0Dd30a32125016dB5e37eaabB
// Symbol      : HAMT
// Name        : Ham Trial Token
// Total supply: 100000000
// Decimals    : 18
//
// Enjoy.
//
// (c) by Moritz Neto with BokkyPooBah / Bok Consulting Pty Ltd Au 2017. The MIT Licence.
// ----------------------------------------------------------------------------


// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
contract SafeMath {
    function safeAdd(uint a, uint b) public pure returns (uint c) {
        c = a + b;
        require(c >= a);
    }
    function safeSub(uint a, uint b) public pure returns (uint c) {
        require(b <= a);
        c = a - b;
    }
    function safeMul(uint a, uint b) public pure returns (uint c) {
        c = a * b;
        require(a ==
Dec 17, 2019 14:50:16 UTC
pragma solidity ^0.4.24;


contract PaginatedNumbers {

  uint256[] public squares;

  constructor()
    public
  {
    for (uint256 _i = 1; _i <= 51; _i++) {
      squares.push(_i * _i);
    }
  }

  function getPaginatedSquares(
    uint256 _page,
    uint256 _resultsPerPage
  )
    external
    view
    returns (uint256[])
  {
    /*
    ex: _page 1, _resultsPerPage 20 | 1 * 20 - 20 = 0
    ex2: _page 2, _resultsPerPage 20 | 2 * 20 - 20 = 20
    starting point for listing items in array
    */
    uint256 _squareIndex = _resultsPerPage * _page - _resultsPerPage;

    // return emptry array if already empty or _squareIndex is out of bounds
    if (
      squares.length == 0 || 
      _squareIndex > squares.length - 1
    ) {
      return new uint256[](0);
    }

    // need to create fixed length array because we cannot push to array in memory
    uint256[] memory _squares = new uint256[](_resultsPerPage);
    // start starting counter for return array
    uint256 _returnCounter = 0;
    // loop through arr
Dec 16, 2019 20:52:43 UTC
pragma solidity ^0.4.18;
contract CMCEnabled {
    address CMC;
    function setCMCAddress(address cmcAddr) returns (bool result){
        if (CMC != 0x0 && msg.sender != CMC) {
            return false;
        }
        CMC = cmcAddr;
        return true;
    }
    function remove(){
        if (msg.sender == CMC) {
            selfdestruct(CMC);
        }
    }
}
contract InfoManEnabled is CMCEnabled {
    function isInfoMan() constant returns (bool) {
        if (CMC != 0x0) {
            address im = CProvider(CMC).contracts("infoman");
            return msg.sender == im;
        }
        return false;
    }
}
contract CMC {
    address owner;
    mapping(bytes32 => address) public contracts;
    modifier onlyOwner {
        if (msg.sender == owner)
            _;
    }
    function CMC(){
        owner = msg.sender;
    }
    function addContract(bytes32 name, address addr) onlyOwner returns (bool result) {
        CMCEnabled cmce = CMCEnabled(addr);
        if (!cmce.setCMCAddress(address(this))) {
 
Dec 15, 2019 21:15:20 UTC
// CrowdFunder.sol
pragma solidity ^0.4.19;

/// @title CrowdFunder
/// @author nemild
contract CrowdFunder {
    // Variables set on create by creator
    address public creator;
    address public fundRecipient; // creator may be different than recipient
    uint public minimumToRaise; // required to tip, else everyone gets refund
    string campaignUrl;
    byte constant version = 1;

    // Data structures
    enum State {
        Fundraising,
        ExpiredRefund,
        Successful
    }
    struct Contribution {
        uint amount;
        address contributor;
    }

    // State variables
    State public state = State.Fundraising; // initialize on create
    uint public totalRaised;
    uint public raiseBy;
    uint public completeAt;
    Contribution[] contributions;

    event LogFundingReceived(address addr, uint amount, uint currentTotal);
    event LogWinnerPaid(address winnerAddress);

    modifier inState(State _state) {
        require(state == _state);
        _;
    }

    modifier isCrea
Dec 12, 2019 19:35:31 UTC
pragma solidity >=0.4.22 <0.7.0;

contract SimpleAuction {
    address payable public beneficiary;
    uint public auctionEndTime;

    address public highestBidder;
    uint public highestBid;

    mapping(address => uint) pendingReturns;

    bool ended;

    event HighestBidIncreased(address bidder, uint amount);
    event AuctionEnded(address winner, uint amount);

    constructor(
        uint _biddingTime,
        address payable _beneficiary
    ) public {
        beneficiary = _beneficiary;
        auctionEndTime = now + _biddingTime;
    }

    function bid() public payable {
        require(
            now <= auctionEndTime,
            "Auction already ended."
        );

        require(
            msg.value > highestBid,
            "There already is a higher bid."
        );

        if (highestBid != 0) {
            pendingReturns[highestBidder] += highestBid;
        }
        highestBidder = msg.sender;
        highestBid = msg.value;
        emit HighestBidIncreased(msg.sender, msg.value)
Dec 12, 2019 07:46:32 UTC
contract MyToken {
    /* This creates an array with all balances */
    mapping (address => uint256) public balanceOf;

    /* Initializes contract with initial supply tokens to the creator of the contract */
    function MyToken(
        uint256 initialSupply
        ) {
        balanceOf[msg.sender] = initialSupply;              // Give the creator all initial tokens
    }

    /* Send coins */
    function transfer(address _to, uint256 _value) {
        require(balanceOf[msg.sender] >= _value);           // Check if the sender has enough
        require(balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows
        balanceOf[msg.sender] -= _value;                    // Subtract from the sender
        balanceOf[_to] += _value;                           // Add the same to the recipient
    }
Dec 07, 2019 11:57:00 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity^0.4.18;
 
contract Math {
 
function add(uint256 a, uint256 b) internal pure returns (uint) {
    uint c = a + b;
    assert(c >= a);
    return c;
  }
 
 function multiply(uint256 a, uint256 b) internal pure returns (uint) {
    if (a == 0) {
      return 0;
    }
    uint c = a * b;
    assert(c / a == b);
    return c;
  }
}
Dec 06, 2019 19:01:38 UTC
//ASSIGNMENT: Structs
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Dec 06, 2019 16:21:11 UTC
/*
 * @source: https://ethernaut.openzeppelin.com/level/0x234094aac85628444a82dae0396c680974260be7
 * @author: Alejandro Santander (OpenZeppelin)
 * Modified by B. Mueller
 */

pragma solidity ^0.5.0;

contract Ownable {
    address payable public _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        _owner = msg.sender;
        emit OwnershipTransferred(address(0), _owner);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view retu
Dec 06, 2019 07:25:03 UTC
pragma solidity ^0.4.24;

//Primero defino las funciones utilizadas para hacer el contrato ERC20.

contract SafeMath {
	function safeAdd(uint a, uint b) public pure returns (uint c) {
    	c = a + b;
    	require(c >= a);
	}
	function safeSub(uint a, uint b) public pure returns (uint c) {
    	require(b <= a);
    	c = a - b;
	}
	function safeMul(uint a, uint b) public pure returns (uint c) {
    	c = a * b;
    	require(a == 0 || c / a == b);
	}
	function safeDiv(uint a, uint b) public pure returns (uint c) {
    	require(b > 0);
    	c = a / b;
	}
}

contract ERC20Interface {
	function totalSupply() public constant returns (uint);
	function balanceOf(address tokenOwner) public constant returns (uint balance);
	function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
	function transfer(address to, uint tokens) public returns (bool success);
	function approve(address spender, uint tokens) public returns (bool success);
	function transferFrom(address from, address to, u
Dec 05, 2019 20:59:37 UTC
pragma solidity ^0.4.24;

//Primero defino las funciones utilizadas para hacer el contrato ERC20.

contract SafeMath {
	function safeAdd(uint a, uint b) public pure returns (uint c) {
    	c = a + b;
    	require(c >= a);
	}
	function safeSub(uint a, uint b) public pure returns (uint c) {
    	require(b <= a);
    	c = a - b;
	}
	function safeMul(uint a, uint b) public pure returns (uint c) {
    	c = a * b;
    	require(a == 0 || c / a == b);
	}
	function safeDiv(uint a, uint b) public pure returns (uint c) {
    	require(b > 0);
    	c = a / b;
	}
}

contract ERC20Interface {
	function totalSupply() public constant returns (uint);
	function balanceOf(address tokenOwner) public constant returns (uint balance);
	function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
	function transfer(address to, uint tokens) public returns (bool success);
	function approve(address spender, uint tokens) public returns (bool success);
	function transferFrom(address from, address to, u
Dec 05, 2019 19:29:12 UTC
pragma solidity ^0.4.18;
contract CredentialAuthentication {
  function _intializeAcP(uint16 _Age, string _CandidateName, string _ProgrammeName) public {
    Age = _Age;
    CandidateName = _CandidateName;
    ProgrammeName = _ProgrammeName;
  }

  function _initializeCII(uint16 _CompletionYear, string _IssuingInstitute) public {
    CompletionYear = _CompletionYear;
    IssuingInstitute = _IssuingInstitute; 
  }

  function _GetAge() public constant returns (uint16) {
    return Age;
  }

  function _GetCandidateName() public constant returns(string) {
    return CandidateName;
  }

  function _GetProgrammeName() public constant returns(string) {
    return ProgrammeName;
  }

  function _GetIssuingInstitute() public constant returns(string) {
    return IssuingInstitute;
  }

  function _GetCompletionYear() public constant returns(uint16) {
    return CompletionYear;
  }

  string CandidateName; 
  string ProgrammeName;
  string IssuingInstitute;
  uint16 Age;
  uint16 CompletionYear;
Dec 05, 2019 07:00:42 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;

  uint value;
Dec 05, 2019 02:42:12 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value
  }

  uint value;
Dec 05, 2019 02:41:37 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Dec 02, 2019 08:14:32 UTC
pragma solidity 0.4.25;

contract Taxi {

    struct Participant {
        address addr;
		uint accountBalance;
    }
    struct Driver {
        address addr;
		uint accountBalance;
		uint32 lastPaidTimestamp;
    }

    struct CarProposal{
        uint32 proposedCarID;
        uint price;
        uint32 offerValidTime;
    }

    struct PurchaseProposal{
        CarProposal carToBePurchasedByDealer;
        mapping(address=>bool) participantsVoted;
        uint8 yesCount;
        // no need to hold the approval state, it will be determined by vote counts inside sellCar() called by the dealer.
    }

    address public manager;

    mapping (address=>bool) public participantJoinedFlag;
    Participant[] public participants;

    Driver public driver;
    address public dealer;
	uint32 public carID;
	CarProposal public carProposal;
	PurchaseProposal purchaseProposal;
    uint32 public lastCarExpensePaid_timestamp;
	uint32 dividendLastPaidTimestamp;

    modifier onlyManager(){
        require(msg.sender == ma
Dec 01, 2019 10:46:51 UTC
pragma solidity >=0.5.0;

library Bits {

    uint constant internal ONE = uint(1);
    uint constant internal ONES = uint(~0);

    // Sets the bit at the given 'index' in 'self' to '1'.
    // Returns the modified value.
    function setBit(uint self, uint8 index) internal pure returns (uint) {
        return self | ONE << index;
    }

    // Sets the bit at the given 'index' in 'self' to '0'.
    // Returns the modified value.
    function clearBit(uint self, uint8 index) internal pure returns (uint) {
        return self & ~(ONE << index);
    }

    // Sets the bit at the given 'index' in 'self' to:
    //  '1' - if the bit is '0'
    //  '0' - if the bit is '1'
    // Returns the modified value.
    function toggleBit(uint self, uint8 index) internal pure returns (uint) {
        return self ^ ONE << index;
    }

    // Get the value of the bit at the given 'index' in 'self'.
    function bit(uint self, uint8 index) internal pure returns (uint8) {
        return uint8(self >> index & 1);
    }

    //
Dec 01, 2019 05:23:40 UTC
contract SimpleDSChief {
    mapping(bytes32=>address) public slates;
    mapping(address=>bytes32) public votes;
    mapping(address=>uint256) public approvals;
    mapping(address=>uint256) public deposits;

    function lock(uint wad) public {
        deposits[msg.sender] = add(deposits[msg.sender], wad);
        addWeight(wad, votes[msg.sender]);
    }

    function free(uint wad) public {
        deposits[msg.sender] = sub(deposits[msg.sender], wad);
        subWeight(wad, votes[msg.sender]);
    }

    function voteYays(address yay) public returns (bytes32) {
        bytes32 slate = etch(yay);
        voteSlate(slate);

        return slate;
    }

    function etch(address yay) public returns (bytes32 slate) {
        bytes32 hash = keccak256(abi.encodePacked(yay));

        slates[hash] = yay;

        return hash;
    }
    
    function voteSlate(bytes32 slate) public {
        uint weight = deposits[msg.sender];
        subWeight(weight, votes[msg.sender]);
        votes[msg.sender] = slate;
      
Nov 27, 2019 15:51:41 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.

  pragma solidity >=0.4.24 <0.6.0;

contract OrganisationName {

    struct Organisation {
        string CompanyName;
        string ID;
        string University;
        string location;
        string DHASH;
    }

    address company;

    constructor () public {
        company = msg.sender;
    }

    modifier onlyname() {
        if (msg.sender == company) {
            _;
        }
    }

    Organisation[] public invokeCompany;

    function registerCompnay(
        string memory _CompanyName,
        string memory _ID,
        string memory _University,
        string memory _location, 
        string memory _DHASH) public onlyname {
        invokeCompany.push(Organisation(_CompanyName, _ID, _University, _location, _DHASH));
    }

}
Nov 27, 2019 12:12:34 UTC
pragma solidity ^0.4.24;
 
contract SmartExchange {
	event Deposit(address from, bytes32 to, uint indexed  value);
	event Transfer(bytes32 from, address to, uint indexed value);
 
	function deposit(bytes32 to) payable public {
		emit Deposit(msg.sender, to, msg.value);
	}
 
	function transfer(bytes32 from, address to, uint value) payable public{
		to.transfer(value);
		emit Transfer(from, to, value);
	}
Nov 26, 2019 22:45:37 UTC
pragma solidity ^0.4.24;
 
contract SmartExchange {
	event Deposit(address from, bytes32 to, uint indexed  value);
	event Transfer(bytes32 from, address to, uint indexed value);
 
	function deposit(bytes32 to) payable public {
		emit Deposit(msg.sender, to, msg.value);
	}
 
	function transfer(bytes32 from, address to, uint value) payable public{
		to.transfer(value);
		emit Transfer(from, to, value);
	}
Nov 26, 2019 22:39:22 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Nov 26, 2019 22:34:07 UTC
pragma solidity >0.4.23 <0.5.0;

contract Parent {
    int value;

    function setValue(int v) public {
        value = v;
    }

    function getValue() external view returns (int) {
        return value;
    }
}

contract Child {
    Parent parent;

    function setParent(address a) public {
        parent = Parent(a);
    }

    function getValue() external view returns (int value) {
        // -- Should work
        //return parent.getValue();

        // -- Make it work
        address addr = address(parent);
        bytes4 sig = bytes4(keccak256("getValue()"));

        assembly {
           let o := mload(0x40) // Empty storage pointer
           mstore(o,sig)        // Push function signature to memory (function signature is 4 bytes/0x04)

           let success := call(
               15000,           // Gas limit
               addr,            // To address
               0,               // No ether to transfer
               o,               // Input location ptr
               0x04,            
Nov 25, 2019 23:01:32 UTC
contract SimpleDSChief {
    mapping(bytes32=>address) public slates;
    mapping(address=>bytes32) public votes;
    mapping(address=>uint256) public approvals;
    mapping(address=>uint256) public deposits;

    function lock(uint wad) public {
        deposits[msg.sender] = add(deposits[msg.sender], wad);
        addWeight(wad, votes[msg.sender]);
    }

    function free(uint wad) public {
        deposits[msg.sender] = sub(deposits[msg.sender], wad);
        subWeight(wad, votes[msg.sender]);
    }

    function voteYays(address yay) public returns (bytes32){
        bytes32 slate = etch(yay);
        voteSlate(slate);

        return slate;
    }

    function etch(address yay) public returns (bytes32 slate) {
        bytes32 hash = keccak256(abi.encodePacked(yay));

        slates[hash] = yay;

        return hash;
    }
    
    function voteSlate(bytes32 slate) public {
        uint weight = deposits[msg.sender];
        subWeight(weight, votes[msg.sender]);
        votes[msg.sender] = slate;
       
Nov 23, 2019 10:07:35 UTC
//sets the version of solidity that this smart contract will work with
pragma solidity ^0.4.25;


//fundamental building block of ETH applications
contract ZombieFactory {

    // declare our event here
    event NewZombie(uint zombieId, string name, uint dna);

    //uint: unsigned integers (means you know they are positive)
    uint dnaDigits = 16;
    uint dnaModulus = 10 ** dnaDigits;

    struct Zombie {
        string name;
        uint dna;
    }

    Zombie[] public zombies;

    function _createZombie(string _name, uint _dna) private {
        zombies.push(Zombie(_name, _dna));
        // and fire it here
    } 

    function _generateRandomDna(string _str) private view returns (uint) {
        uint rand = uint(keccak256(abi.encodePacked(_str)));
        return rand % dnaModulus;
    }

    function createRandomZombie(string _name) public {
        uint randDna = _generateRandomDna(_name);
        _createZombie(_name, randDna);
    }

Nov 22, 2019 21:47:38 UTC
pragma solidity ^0.5.1;
//pragma experimental ABIEncoderV2;

/*TODO: mapping of unsuccessful buyers. Adding bid requires payment. 
Rsoultion passes bidprice back to unsuccessful bidders. 
Wait until smart meter data comes in. 

Transfer %clearingPrice to sellers and (1-%)clearingPrice to buyers. SORT DISCREPANCY BETWEEN ENERGY SENT AND ENERGY RECEIVED*/


/*TODO: Establish inputs/outputs and function of contract with outside.
Concept of time for bidding-EXECUTE AUCTION() AUTO-. Improve clearing function.
Transfer of ether for successful buyers/sellers.
Encryption/security improvements. Gas usage. Require statements.
Unbounded loops (https://medium.com/robhitchens/solidity-crud-part-1-824ffa69509a).*/



contract doubleAuction {
    
    address internal owner;
    int256 internal buyerCount = 0;
    int256 internal sellerCount = 0;
    int256 internal clearingPrice = 0;
    int256 internal sucBuyerCount = 0;
    int256 internal sucSellerCount = 0;
    int256 internal unsucbuyercount =0;
    address payable in
Nov 22, 2019 12:30:11 UTC
pragma solidity ^0.4.20;

contract SpaceDoggos {

    uint maxPlanetsPerSystem = 10;
    uint minPlanetsPerSystem = 3;

    uint planetCodeDigits = 7;
    uint systemCodeDigits = 7;

    uint planetCodeModulus = 10 ** planetCodeDigits;
    uint systemCodeModulus = 10 ** systemCodeDigits;

    struct Doggo {
        string name;
        uint8 breed;
        uint8 color;
        uint8 face;
        uint8 costume;
        uint coordX;
        uint coordY;
    }

    mapping(address => Doggo) doggos;

    function createDoggo(string _name, uint8 _breed, uint8 _color, uint8 _face, uint8 _costume) {
        Doggo memory myDoggo = Doggo({
            name: _name,
            breed: _breed,
            color: _color,
            face: _face,
            costume: _costume,
            coordX: 0,
            coordY: 0
        });

        doggos[msg.sender] = myDoggo;
    }

    function getSystemMap(uint _coordX ,uint _coordY) returns(uint){
        return uint(keccak256(_coordX,_coordY));
    }



}
Nov 21, 2019 21:41:22 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Nov 21, 2019 16:29:11 UTC
pragma solidity >=0.4.22 <0.6.0;

contract MyAssertion {
  event AssertionFailed(string message);
  
  // "Vanilla" Solidity assertion
  
  function assertion1(uint256 x) public {
   
    // x must never be 1!
    
    assert(x != 1);
  }    

  // MythX-style assertion
  
  function assertion(uint256 x) public {
      
    // x must never be 1!
      
    if (x == 1) {
        emit AssertionFailed("x is 1");        
    }

  }
}
Nov 20, 2019 14:35:06 UTC
pragma solidity >=0.4.22 <0.6.0;

contract MyAssertion {
  event AssertionFailed(string message);
  
  function assertion(uint256 x) public {
    if (x == 1) {
        emit AssertionFailed("x is 1");        
    }

  }
}
Nov 20, 2019 14:31:53 UTC
pragma solidity ^0.5.4;

import "./gazillion.sol";

contract VerifyGazillion is challenge1 {
    
    event AssertionFailed(string message);

    function buy() public payable {
        
        uint256 balance_pre = balance;
        
        super.buy();

        bool postcondition = balance >= balance_pre;

        if (!postcondition) {
            emit AssertionFailed("Postcondition violated in buy(): Balance must be higher or equal.");
        }
    }
    
    function burn(uint256 amount) public {
     
        uint256 balance_pre = balance;   
        
        super.burn(amount);
    
        bool postcondition = balance <= balance_pre;
        
        if (!postcondition) {
            emit AssertionFailed("Postcondition violated in burn(): Balance must be lower or equal.");
        }
        
    }

}
Nov 19, 2019 08:35:06 UTC
// ConsenSys Diligence
// NorthSec 2019
// Montreal, Canada

pragma solidity ^0.5.10;

// Can you have a gazillion balance?

contract challenge1 {
   
    uint256 public balance;
    
    constructor() public payable {
        balance = 10;
    }
    
    function buy() public payable {
        balance += msg.value;
    }
    
    function burn(uint256 amount) public {
        balance -= amount;
    }

}

//   ___  __   __ _  ____  ____  __ _  ____  _  _  ____ 
//  / __)/  \ (  ( \/ ___)(  __)(  ( \/ ___)( \/ )/ ___)
// ( (__(  O )/    /\___ \ ) _) /    /\___ \ )  / \___ \
//  \___)\__/ \_)__)(____/(____)\_)__)(____/(__/  (____/
//  ____  __  __    __  ___  ____  __ _   ___  ____     
// (    \(  )(  )  (  )/ __)(  __)(  ( \ / __)(  __)    
//  ) D ( )( / (_/\ )(( (_ \ ) _) /    /( (__  ) _)     
// (____/(__)\____/(__)\___/(____)\_)__) \___)(____)  
Nov 19, 2019 08:32:26 UTC
pragma solidity ^0.5.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see `ERC20Detailed`.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a `Transfer` event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through `transferFrom`. This is
     * zero by default.
     *
     * This value changes when `approve` or `transferFrom` 
Nov 17, 2019 22:35:35 UTC
pragma solidity ^0.5.1;
contract Timesheet {

    address employee;
    address boss;
    
    mapping(uint  => uint) times; // day (starting 1.1.1970) -> hours worked
    mapping(uint  => bool) approvals; // day (starting 1.1.1970) -> is approved


    constructor(address _employee, address _boss) public {
        employee = _employee;
        boss = _boss;
    }

    function approveWork(uint _day) public {
        // only accept approval from boss:
        if (msg.sender != boss) {
           return;
        }
        approvals[_day] = true;
    }

    function logWork(uint _day, uint _hours) public {
        // only accept work logged by employee:
        if (msg.sender != employee) { 
            return;
        }
        // only accept work logged if day not yet approved:
        if (approvals[_day] == true) {
            return;
        }
        times[_day] = _hours;
        emit WorkLogged(_day, _hours);
    }

    function getHoursWorked(uint _day) public view returns (uint hoursWorked) {
        ho
Nov 14, 2019 16:38:38 UTC
pragma solidity ^0.5.1 <0.6.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.
import "./timesheet.sol";

contract TimesheetTest {
    
    function testNoTimeUpdateAfterApproval() public {
        address employee = address(this);
        address boss = address(this);
        Timesheet timesheet = new Timesheet(employee, boss);
        
        uint _day = 1;
        timesheet.logWork(_day, 8);
        timesheet.approveWork(_day);
        timesheet.logWork(_day, 10);
        
        Assert.equal(timesheet.getHoursWorked(_day), uint(8), "hours worked should still be 8!");
        
    }
    
    function testApprovalByBossOnly() public {
        address employee = address(this);
        address boss = 0x33eC1E7D89F78D4268747FBe99e9A484B5Cb1e47;
        Timesheet timesheet = new Timesheet(employee, boss);
        
        uint _day = 1;
        timesheet.logWork(_day, 8);
        timesheet.approveWork(_day);
        timesheet.logWork(_day, 10);
        
        Assert.equal(timesh
Nov 14, 2019 16:12:15 UTC
pragma solidity ^0.5.1;
contract Timesheet {

    address employee;
    
    mapping(uint  => uint) times; // day (starting 1.1.1970) -> hours worked
    
    // Event (=logging) for logged work
    event WorkLogged(uint _day, uint _hours);

    constructor(address _employee, address _boss) public {
        employee = _employee;
    }

    function approveWork(uint _day) public {
        // TODO
    }

    function logWork(uint _day, uint _hours) public {
        // only accept work logged by employee:
        if (msg.sender != employee) { 
            return;
        }
        times[_day] = _hours;
        emit WorkLogged(_day, _hours);
    }

    function getHoursWorked(uint _day) public view returns (uint hoursWorked) {
        hoursWorked = times[_day];
    }
Nov 14, 2019 16:00:29 UTC
pragma solidity ^0.5.2;
contract Timesheet {

    address employee;
    
    mapping(uint  => uint) times; // day (starting 1.1.1970) -> hours worked
    
    // Event (=logging) for logged work
    event WorkLogged(uint _day, uint _hours);

    constructor(address _employee, address _boss) public {
        employee = _employee;
    }

    function approveWork(uint _day) public {
        // TODO
    }

    function logWork(uint _day, uint _hours) public {
        // only accept work logged by employee:
        if (msg.sender != employee) { 
            return;
        }
        times[_day] = _hours;
        emit WorkLogged(_day, _hours);
    }

    function getHoursWorked(uint _day) public view returns (uint hoursWorked) {
        hoursWorked = times[_day];
    }
Nov 14, 2019 15:56:59 UTC
pragma solidity ^0.5.1;
contract Timesheet {

    address employee;
    
    mapping(uint  => uint) times; // day (starting 1.1.1970) -> hours worked

    constructor(address _employee) public {
        employee = _employee;
    }

    function logWork(uint _day, uint _hours) public {
        // only accept work logged by employee:
        if (msg.sender != employee) { 
            return;
        }
        times[_day] = _hours;
        emit WorkLogged(_day, _hours); // logging
    }

    function getHoursWorked(uint _day) public view returns (uint hoursWorked) {
        hoursWorked = times[_day];
    }
        
    // Event (=logging) for logged work
    event WorkLogged(uint _day, uint _hours);
Nov 14, 2019 15:47:31 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Nov 12, 2019 11:18:25 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Nov 07, 2019 05:49:35 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.

  pragma solidity >=0.4.24 <0.6.0;

contract OrganisationName {

    struct Organisation {
        string CompanyName;
        string ID;
        string University;
        string location;
    }

    address company;

    constructor () public {
        company = msg.sender;
    }

    modifier onlyname() {
        if (msg.sender == company) {
            _;
        }
    }

    Organisation[] public invokeCompany;

    function registerCompnay(
        string memory _CompanyName,
        string memory _ID,
        string memory _University,
        string memory _location) public onlyname {
        invokeCompany.push(Organisation(_CompanyName, _ID, _University, _location));
    }

}
Nov 04, 2019 19:48:52 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Nov 04, 2019 12:05:40 UTC
function guess (uint256 _key) public {
        bytes32 time1 = bytes32(block.timestamp);
        bytes32 entropy1 = keccak256(abi.encodePacked(time1));
        
        bytes32 time2 = bytes32(block.timestamp);
        bytes32 entropy2 = keccak256(abi.encodePacked(time2));
        
        bytes32 target = ((entropy1 ^ entropy2) & keccak256(abi.encodePacked(block.number))) & sault;
        complete = (target == bytes32(_key));
Nov 01, 2019 11:21:32 UTC
pragma solidity ^0.4.22;

contract Purchase {
    uint public value;
    address public seller;
    address public buyer;
    enum State { Created, Locked, Inactive }
    State public state;

    //确保 `msg.value` 是一个偶数。
    //如果它是一个奇数,则它将被截断。
    //通过乘法检查它不是奇数。
    constructor() public payable {
        seller = msg.sender;
        value = msg.value / 2;
        require((2 * value) == msg.value, "Value has to be even.");
    }

    modifier condition(bool _condition) {
        require(_condition);
        _;
    }

    modifier onlyBuyer() {
        require(
            msg.sender == buyer,
            "Only buyer can call this."
        );
        _;
    }

    modifier onlySeller() {
        require(
            msg.sender == seller,
            "Only seller can call this."
        );
        _;
    }

    modifier inState(State _state) {
        require(
            state == _state,
            "Invalid state."
        );
        _;
  
Oct 30, 2019 08:22:11 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.22;
contract SimpleStore {
  mapping(address => uint) public balances;

  constructor() public {
    balances[msg.sender] = 1000;
  }
Oct 26, 2019 08:46:18 UTC
/**
 *Submitted for verification at Etherscan.io on 2019-10-19
*/

pragma solidity ^0.5.12;

// 
// * whitebetting.com - the whitest european football betting game based on ethereum blockchain
// on 2019-09-24
//

contract WhiteBetting {
  address payable public owner;

  // Game information
  struct GameInfo {
    // game start time
    uint256 timestamp;
    // game odds
    uint32 odd_homeTeam;
    uint32 odd_drawTeam; 
    uint32 odd_awayTeam;
    uint32 odd_over;
    uint32 odd_under;
    uint32 odd_homeTeamAndDraw;
    uint32 odd_homeAndAwayTeam;
    uint32 odd_awayTeamAndDraw;
    // Checking the game status
    uint8  open_status;
    // Checking whether winning were paid
    bool   isDone;
  }
  mapping(uint64 => GameInfo) public gameList;

  // Player betting infomation
  struct BetFixture {
    address payable player;
    uint256 stake;
    uint32  odd;
    // betting type
    uint16  selectedTeam;
  }
  mapping(uint64 => BetFixture[]) public betList;

  // Events that are issued to make statistic 
Oct 25, 2019 17:52:51 UTC
pragma solidity >=0.4.24 <0.7.0;

// ----------------------------------------------------------------------------
// 'ProSigns v0.1' token contract
//
// Deployed to : 0x685c91896f7889738B6C1F2C479d6508133E8906
// Symbol      : NYB
// Name        : NAYAB
// Total supply: 100000000
// Decimals    : 9
//
// Enjoy.
//
// (c) by Moritz Neto with BokkyPooBah / Bok Consulting Pty Ltd Au 2017. The MIT Licence.
// ---------------------------------------------------------------------------- 


// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
contract SafeMath {
    function safeAdd(uint a, uint b) public pure returns (uint c) {
        c = a + b;
        require(c >= a);
    }
    function safeSub(uint a, uint b) public pure returns (uint c) {
        require(b <= a);
        c = a - b;
    }
    function safeMul(uint a, uint b) public pure returns (uint c) {
        c = a * b;
        require(a
Oct 25, 2019 14:22:17 UTC
function guess (uint256 _key) public {
        bytes32 time1 = bytes32(block.timestamp);
        bytes32 entropy1 = keccak256(abi.encodePacked(time1));
        
        bytes32 time2 = bytes32(block.timestamp);
        bytes32 entropy2 = keccak256(abi.encodePacked(time2));
        
        bytes32 target = ((entropy1 ^ entropy2) & keccak256(abi.encodePacked(block.number))) & sault;
        complete = (target == bytes32(_key));
Oct 25, 2019 08:33:45 UTC
pragma solidity ^0.4.18;

contract Bank {

  mapping(address => uint) balances;
  uint public totalSupply;

  function Bank (uint _initialSupply) public {
    balances[msg.sender] = totalSupply = _initialSupply;
  }

  function transfer (address _to, uint _value) public returns (bool) {
    require(balances[msg.sender] - _value >= 0);
    balances[msg.sender] -= _value;
    balances[_to] += _value;
    return true;
  }

  function balanceOf (address _owner) public view returns (uint balance) {
    return balances[_owner];
  }
Oct 24, 2019 11:08:56 UTC
pragma solidity ^0.4.18;
contract TestMemoryInit {
  function test() external pure returns (uint[]) {
    uint[] memory x = new uint[](8);
    x[5] = 3;
    return x;
  }

  uint value;
Oct 23, 2019 05:45:52 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;

contract simplestorage {
   string public storedData;

   function simplestorage(string initVal) public {
      storedData = initVal;
   }

   function set(string x) public {
      storedData = x;
   }

   function get() public constant returns (string retVal) {
      return storedData;
   }

   function query() public constant returns (string retVal) {
      return storedData;
   }
}
Oct 20, 2019 12:45:16 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.21;
contract SimpleStore {
  function set(uint _value) public {
    value = _value + 2;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Oct 16, 2019 07:48:49 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Oct 11, 2019 22:09:58 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Oct 11, 2019 21:07:11 UTC
pragma solidity ^0.5.0;

contract MySuperContract1 {
    address private owner ;
    address[] private opers;

    constructor() public {
    owner = msg.sender;
  }

function TryAddOper(address operAddress)public returns (bool) {
  if(IsUserCanChange(msg.sender)){
    AddOper(operAddress);
    return true;
  }
  else{
    return false;
  }
}

function IsUserCanChange(address user) public view returns(bool canCHange) {
 canCHange = false;
 if (user == owner)  canCHange = true;
 for (uint i = 0; i < opers.length ; i++ ){
       if (opers[i] == user) {canCHange = true;}
   }
   return canCHange;
}

function AddOper(address oper) private {
  opers.push(oper);
}
}
Oct 08, 2019 17:31:22 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore2 {
  function set(uint _value) private {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Oct 07, 2019 22:22:46 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore2 {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Oct 07, 2019 22:22:23 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Oct 07, 2019 15:50:55 UTC
pragma solidity ^0.4.26;
contract depowithdraw {

    mapping (address => uint) internal balances;

    address public owner;

    event LogDepositMade(address accountAddress, uint amount);

    constructor() public {
        owner = msg.sender;
    }

    function enroll() public returns (uint){
      balances[msg.sender]=1000;
      return balances[msg.sender];
    }

    function deposit() public payable returns (uint) {
          balances[msg.sender] += msg.value;
          emit LogDepositMade(msg.sender, msg.value);
          return balances[msg.sender];
    }

    function withdraw(uint withdrawAmount) public returns (uint remainingBal) {
        require(withdrawAmount <= balances[msg.sender]);

        balances[msg.sender] -= withdrawAmount;
        if(!msg.sender.send(withdrawAmount))
        {
            balances[msg.sender] += withdrawAmount;
        }

        remainingBal=balances[msg.sender];
    }

    function balance() public constant returns (uint) {
        return balances[msg.sender];
    
Oct 05, 2019 12:59:19 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value + 2;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Oct 04, 2019 20:55:27 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Oct 03, 2019 09:40:27 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;

contract SampleOverflow {
     string constant statictext = "HelloStackOverFlow\N";
     bytes32 constant byteText = "HelloStackOverFlow\N";
    function  getString() payable public  returns(string){
        return statictext;
    }

     function  getByte() payable public returns(bytes32){
        return byteText;
    }
Oct 03, 2019 08:29:39 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  function div(uint256 a, uint256 b) public pure returns (uint256) {
        uint256 c = a / b;
        return c;
  }

  uint value;
Oct 01, 2019 22:18:45 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
library  mysuperLibrary1 {
  //ax^2+bx+c=0
  function sqrt(int x) private pure returns (int y)   {
     if (x == 0) return 0;
     else if (x <= 3) return 1;
     int z = (x + 1) / 2;
     y = x;
     while (z < y)
     {
        y = z;
        z = (x / z + z) / 2;
    }
}
function D (int a,int b, int c) public pure returns( int) {
  return  b * b - 4 * a * c ;
 }
 function equation (int a, int b, int c) public pure returns (int, int) {
   var temp = D (a,b,c);
   if (temp < 0) {
     require (!(temp < 0) ); 
  }
   if (temp > 0) { 
     var x1 = (b* -1) + sqrt(temp) /2*a;
     var x2 = (b* -1) - sqrt(temp) /2*a;
     return (x1 ,x2);
  }
  if (temp == 0) {
    var x = (b* -1) / 2*a;
    return (x,x);
  }
 }
 
}
Sep 30, 2019 18:20:51 UTC
pragma solidity ^0.4.11;

contract voteContract{
    
    mapping (address => bool) voters;
    mapping (string => uint) candidates;
    mapping (uint8 => string) candidateList;
    
    uint8 numberOfCandidates;
    address contractOwner;
    
    function voteContract() public {
        contractOwner = msg.sender;
    }
    
    function addCandidate(string cand) public {
        bool add = true;
        for(uint8 i = 0; i < numberOfCandidates; i++){
            if(sha3(candidateList[i]) == sha3(cand)){
                add = false;
                break;
            }
        }
        
        if(add){
            candidateList[numberOfCandidates] = cand;
            numberOfCandidates++;
        }
    }
    
    function vote(string cand) public {
        if(voters[msg.sender]){}
        else{
            voters[msg.sender] = true;
            candidates[cand]++;
        }
    }
    
    function alreadyVoted() constant returns(bool){
        if(voters[msg.sender])
            return true;
        else
  
Sep 30, 2019 14:10:06 UTC
=======================================
		ARCHIVO CLAIMHOLDER.SOL
=======================================

pragma solidity ^0.4.22;

import './ERC735.sol';
import './KeyHolder.sol';

// **Warning!** This file is a protoype version of our work around ERC 725.
// This file is now out of date and **should not be used**.
// Our current identity contracts are here:
// https://github.com/OriginProtocol/origin/tree/master/origin-contracts/contracts/identity

contract ClaimHolder is KeyHolder, ERC735 {

    mapping (bytes32 => Claim) claims;
    mapping (uint256 => bytes32[]) claimsByType;

    function addClaim(
        uint256 _claimType,
        uint256 _scheme,
        address _issuer,
        bytes _signature,
        bytes _data,
        string _uri
    )
        public
        returns (bytes32 claimRequestId)
    {
        bytes32 claimId = keccak256(_issuer, _claimType);

        if (msg.sender != address(this)) {
          require(keyHasPurpose(keccak256(msg.sender), 3), "Sender does not have claim signer ke
Sep 23, 2019 16:10:04 UTC
pragma solidity ^0.4.19;

import "./PermissionGroups.sol";
import "./CFIATInterface.sol";
import "./TST20Interface.sol";
import "./CDSDBInterface.sol";
import "./SafeMath.sol";

contract CDS is PermissionGroups {
    using SafeMath for uint;
     /*  CLAY token */
     
    TST20 public CLAY;
    CFIAT public CUSD;
    CFIAT public CCNY;
    CFIAT public CKRW;
    CDSDB public DB;
    
    /* daily retrieveInfo  */
    struct dailyRetrieve {
        address[] TTCApplicants;
        address[] CLAYApplicants;
        uint  totalRetrieveTTC;
        uint  totalRetrieveCLAY;
        mapping(address => uint) TTCAmounts;
        mapping(address => uint) CLAYAmounts;
    }
    mapping(uint => dailyRetrieve) public retrieveInfo;

    uint public constant SECONDS_PER_DAY = 86400;
    uint public constant BASE_DECIMAL = 6;
    uint public constant BASE_PERCENT = 10**BASE_DECIMAL; // 1000,000
    uint public constant liquidationRate = 9*10**(BASE_DECIMAL - 1);
    uint public constant MIN_COLLATERAL_TTC = 100*10**18; 
 
Sep 23, 2019 14:28:29 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract stamping {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Sep 22, 2019 00:42:38 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;

library homeWork //библиотека с домашкой. ф-ция принадлежит либо контракту,либо библиотеке, либо интерфейсу
 {
   function GetSquare (int param) public pure returns(int256) {//вернуть квадрат числа
    return param * param;
    }

      function isLessThan100 (int param) public pure returns(bool) { //является ли число меньшим, чем 100 
    return param < 100;
  }
 }
Sep 21, 2019 17:15:20 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;

//библиотека, в которую лежат функции от домашки
library homework
{

//функция, возвращающая-является ли параметр меньшим, чем 100
 function isLessThan100 (int param) public pure returns(bool) {
    return param  < 100;
  }


  //функция, возвращающая-квадрат числа
 function GetSquere (int param) public pure returns(int256) {
    return param  * param;
  }
}

Sep 21, 2019 16:29:40 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;

 function isPositiv (int param) public pure reterns(bool) {
    return param^ < 100;
  }
Sep 21, 2019 15:49:28 UTC
pragma solidity 0.4.24;

import "./Chainlink.sol";
import "./interfaces/ENSInterface.sol";
import "./interfaces/LinkTokenInterface.sol";
import "./interfaces/ChainlinkRequestInterface.sol";
import "./interfaces/PointerInterface.sol";
import { ENSResolver as ENSResolver_Chainlink } from "./vendor/ENSResolver.sol";
import { SafeMath as SafeMath_Chainlink } from "./vendor/SafeMath.sol";

/**
 * @title The ChainlinkClient contract
 * @notice Contract writers can inherit this contract in order to create requests for the
 * Chainlink network
 */
contract ChainlinkClient {
  using Chainlink for Chainlink.Request;
  using SafeMath_Chainlink for uint256;

  uint256 constant internal LINK = 10**18;
  uint256 constant private AMOUNT_OVERRIDE = 0;
  address constant private SENDER_OVERRIDE = 0x0;
  uint256 constant private ARGS_VERSION = 1;
  bytes32 constant private ENS_TOKEN_SUBNAME = keccak256("link");
  bytes32 constant private ENS_ORACLE_SUBNAME = keccak256("oracle");
  address constant private LINK_TOKEN_POINTER = 
Sep 21, 2019 05:48:21 UTC
pragma solidity ^0.5.0;

contract Auction {
    
    uint public startTime;
    uint public endTime;
    uint public startingPrice;
    uint tokenId;
    
    address payable owner;
    address payable[] public bidders;       

    mapping(address => uint) public balances;   // bidderAddress => bidAmount
    
    /// @dev Bid event emits when a participant makes a successful bid
    event NewBid(address indexed _bidder, uint indexed _bidValue,uint _time);
    /// @dev Refund event emits when a participant withdraws their locked ethers after auction ends.
    event Refund(address indexed _participant, uint indexed _amount, uint indexed _time);
    
    modifier NotOwner {
        require(msg.sender != owner,'owner cannot place bid');
        _;
    }

    modifier onlyOwner {
        require(msg.sender == owner,'only owner can call');
        _;
    }    
    
    modifier isAuctionOn {
        require(now > startTime && now < endTime,'Auction has end');
        _;
    }
    
    modifier isAuctionEnd {
      
Sep 20, 2019 13:37:29 UTC
pragma solidity >=0.4.22 <0.6.0;

library SafeMath {
    function add(uint a, uint b) internal pure returns (uint) {
        uint c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    function sub(uint a, uint b) internal pure returns (uint) {
        require(b <= a, "SafeMath: subtraction overflow");
        uint c = a - b;
        return c;
    }


    function mul(uint a, uint b) internal pure returns (uint) {
        if (a == 0) {
            return 0;
        }
        uint c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }


    function div(uint a, uint b) internal pure returns (uint) {
        require(b > 0, "SafeMath: division by zero");
        uint c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold
        return c;
    }


    function mod(uint a, uint b) internal pure returns (uint) {
        require(b != 0, "SafeMath: modulo by zero");
        return a % b;
  
Sep 20, 2019 13:32:35 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
}
Sep 18, 2019 13:02:06 UTC
pragma solidity ^0.4.23;
contract depowithdraw {

    mapping (address => uint) internal balances;

    address public owner;

    event LogDepositMade(address accountAddress, uint amount);

    constructor() public {
        owner = msg.sender;
    }

    function enroll() public returns (uint){
      balances[msg.sender]=1000;
      return balances[msg.sender];
    }

    function deposit() public payable returns (uint) {
          balances[msg.sender] += msg.value;
          emit LogDepositMade(msg.sender, msg.value);
          return balances[msg.sender];
    }

    function withdraw(uint withdrawAmount) public returns (uint remainingBal) {
        require(withdrawAmount <= balances[msg.sender]);

        balances[msg.sender] -= withdrawAmount;
        if(!msg.sender.send(withdrawAmount))
        {
            balances[msg.sender] += withdrawAmount;
        }

        remainingBal=balances[msg.sender];
    }

    function balance() public constant returns (uint) {
        return balances[msg.sender];
    
Sep 17, 2019 17:24:14 UTC
pragma solidity ^0.4.25;

/*
    Just the interface so solidity can compile properly
    We could skip this if we use generic call creation or abi.encodeWithSelector
*/
contract ERC20 {
    function totalSupply() public constant returns (uint);
    function balanceOf(address tokenOwner) public constant returns (uint balance);
    function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
    function transfer(address to, uint tokens) public returns (bool success);
    function approve(address spender, uint tokens) public returns (bool success);
    function transferFrom(address from, address to, uint tokens) public returns (bool success);
    event Transfer(address indexed from, address indexed to, uint tokens);
    event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}

/*
    Generic Receiver Contract
*/
contract Receiver {

    address public owner;

    constructor() public {
        /* 
            Deployer's address ( Factory in our cas
Sep 17, 2019 14:28:24 UTC
pragma solidity ^0.4.23;


contract SimpleContract {
    uint public a;
  
  function setNum(uint _num) public {
      a = _num;
  }
}
Sep 16, 2019 07:28:19 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {

  event ValueSet(address sender, uint value);

  function set(uint _value) public {
    value = _value;
    ValueSet(msg.sender, value);
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Sep 13, 2019 12:59:11 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.5.11;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Sep 06, 2019 17:59:50 UTC
pragma solidity ^0.4.17;

contract Coin {
    
    address public minter;
    mapping (address => uint) public balances;

    
   
    function Coin() public {
        minter = msg.sender;
    }

    function mint(address receiver, uint amount) public {
        if (msg.sender != minter) return;
        balances[receiver] += amount;
    }

    function deposit(address customer) public payable returns(uint)
    {
      require(balances[customer]+msg.value>balances[customer]);
      balances[customer]+=msg.value;
      return balances[customer];
    }
    function withdraw(address customer)public payable returns(uint)
    {
       require(balances[customer]>msg.value && customer.send(msg.value));
            {
      
      
            balances[customer]-=msg.value;
            return balances[customer];
            }
      
      
    }
    
    function send(address sender, address receiver, uint amount) public {
        if (balances[sender] < amount) return;
        balances[sender] -= amount;
        balance
Sep 06, 2019 10:53:17 UTC
pragma solidity ^0.4.17;

contract Coin {
    // The keyword "public" makes those variables
    // readable from outside.
    address public minter;
    mapping (address => uint) public balances;

    
    // This is the constructor whose code is
    // run only when the contract is created.
    function Coin() public {
        minter = msg.sender;
    }

    function mint(address receiver, uint amount) public {
        if (msg.sender != minter) return;
        balances[receiver] += amount;
    }

    function deposit(address customer) public payable returns(uint)
    {
      require(balances[customer]+msg.value>balances[customer]);
      balances[customer]+=msg.value;
      return balances[customer];
    }
    function withdraw(address customer)public payable returns(uint)
    {
       require(balances[customer]>msg.value && customer.send(msg.value));
            {
      
      
            balances[customer]-=msg.value;
            return balances[customer];
            }
      
      
    }
    
    functi
Sep 06, 2019 07:05:30 UTC
pragma solidity ^0.4.17;

contract Coin {
    // The keyword "public" makes those variables
    // readable from outside.
    address public minter;
    mapping (address => uint) public balances;

    // Events allow light clients to react on
    // changes efficiently.
     event Sent(address from, address to, uint amount);

    // This is the constructor whose code is
    // run only when the contract is created.
    function Coin() public {
        minter = msg.sender;
    }

    function mint(address receiver, uint amount) public {
        if (msg.sender != minter) return;
        balances[receiver] += amount;
    }

    function send(address receiver, uint amount) public {
        if (balances[msg.sender] < amount) return;
        balances[msg.sender] -= amount;
        balances[receiver] += amount;
         Sent(msg.sender, receiver, amount);
    }
Sep 06, 2019 04:58:50 UTC
pragma solidity ^0.4.18;
    
contract bankPlus {
    /* Define variable owner of the type address*/
    address public owner;
    uint256 fifty = 500000000000000000;
    
    address public taxContract = 0x29a02cd0f340efb6492c535a951fb33270ad1ef7;
    /*address public dividend = 0xebf91f1fb1df67709cc8346abcd9085c34c92a7e;*/

    mapping (address => uint) balances;

    event _deposit(address _dividend);
    event _payDividend(address _dividend);
    event _withdraw50(address _customer);
    event _sendMoney(address _customer, address _recipient, address _amount);
    /* this function is executed at initialization and sets the owner of the contract */
    function mortal() public { owner = msg.sender; }

    /* Function to recover the funds on the contract */
    function kill() public { if (msg.sender == owner) selfdestruct(owner); }

    /*function cashOut() { owner.send(this.balance / 2 ) ;}//pays out half the contract with the other half taxed*/

    function deposit(address customer) public payable{
    
Sep 06, 2019 04:50:34 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract FoodSafe
{
  struct location
  {
    string LocationName;
    uint LocationId;
    uint PreviouslocationId;
    uint Timestamp;
    string Secret;
  }
  mapping(uint => location) Trail;
  uint8 TrailCount=0;

  function GetTrailCount() public constant returns(uint8) 
  {
    return TrailCount;
  }
  function AddNewLocation(uint LocationId, string LocationName, string Secret) public
  {
        location memory newLocation;
        newLocation.LocationName=LocationName;
       newLocation.LocationId=LocationId;
       newLocation.Secret=Secret;
       newLocation.Timestamp= now ;
       if(TrailCount!=0)
       {
         newLocation.PreviouslocationId=Trail[TrailCount].LocationId;
       } 
        Trail[TrailCount]=newLocation;
        TrailCount++;
  }
  function GetLocation(uint8 TrailNo) public constant returns (string, uint, uint, uint, string)
  {
    return (Trail[TrailNo].LocationNa
Sep 06, 2019 03:54:40 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
    sdsdfd
  }

  uint value;
Sep 06, 2019 02:02:00 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
    sdsdf
  }

  uint value;
Sep 06, 2019 02:01:53 UTC
pragma solidity ^0.4.18;
    
contract bankPlus {
    /* Define variable owner of the type address*/
    address public owner;
    uint256 fifty = 500000000000000000;
    address public taxContract = 0x29a02cd0f340efb6492c535a951fb33270ad1ef7;
    /*address public dividend = 0xebf91f1fb1df67709cc8346abcd9085c34c92a7e;*/

    mapping (address => uint) balances;

    event _deposit(address _dividend);
    event _payDividend(address _dividend);
    event _withdraw50(address _customer);
    event _sendMoney(address _customer, address _recipient, address _amount);
    /* this function is executed at initialization and sets the owner of the contract */
    function mortal() public { owner = msg.sender; }

    /* Function to recover the funds on the contract */
    function kill() { if (msg.sender == owner) selfdestruct(owner); }

    /*function cashOut() { owner.send(this.balance / 2 ) ;}//pays out half the contract with the other half taxed*/

    function deposit(address customer) public{
      uint value = msg.v
Sep 04, 2019 11:16:11 UTC
pragma solidity ^0.4.18;
    
contract bankPlus {
    /* Define variable owner of the type address*/
    address public owner;
    uint256 fifty = 500000000000000000;
    address public taxContract = 0x29a02cd0f340efb6492c535a951fb33270ad1ef7;
    /*address public dividend = 0xebf91f1fb1df67709cc8346abcd9085c34c92a7e;*/

    mapping (address => uint) balances;

    event _deposit(address _dividend);
    event _payDividend(address _dividend);
    event _withdraw50(address _customer);
    event _sendMoney(address _customer, address _recipient, address _amount);
    /* this function is executed at initialization and sets the owner of the contract */
    function mortal() { owner = msg.sender; }

    /* Function to recover the funds on the contract */
    function kill() { if (msg.sender == owner) selfdestruct(owner); }

    /*function cashOut() { owner.send(this.balance / 2 ) ;}//pays out half the contract with the other half taxed*/

    function deposit(address customer) public{
      uint value = msg.value;
 
Sep 04, 2019 11:04:01 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;

contract FoodSafe
{
  struct location
  {
    string LocationName;
    uint LocationId;
    uint PreviouslocationId;
    uint Timestamp;
    string Secret;
  }
  mapping(uint => location) Trail;
  uint8 TrailCount=0;

  function GetTrailCount() public view returns(uint8) 
  {
    return TrailCount;
  }
  function AddNewLocation(uint LocationId, string LocationName, string Secret) public
  {
        location memory newLocation;
        newLocation.LocationName=LocationName;
       newLocation.LocationId=LocationId;
       newLocation.Secret=Secret;
       newLocation.Timestamp= now ;
       if(TrailCount!=0)
       {
         newLocation.PreviouslocationId=Trail[TrailCount].LocationId;
       } 
        Trail[TrailCount]=newLocation;
        TrailCount++;
  }
        function GetLocation(uint8 TrailNo)public constant returns (string,uint,uint,uint,string) 
        {
          return (Trail[TrailNo]
Sep 04, 2019 06:32:53 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract FoodSafe
{
  struct location
  {
    string LocationName;
    uint LocationId;
    uint PreviouslocationId;
    uint Timestamp;
    string Secret;
  }
  mapping(uint => location) Trail;
  uint8 TrailCount=0;

  function GetTrailCount returns(uint8)
  {
    return TrailCount;
  }
  function AddNewLocation(uint LocationId, string LocationName, string Secret) internal 
  {
        location memory newLocation;
        newLocation.LocationName=LocationName;
       newLocation.LocationId=LocationId;
       newLocation.Secret=Secret;
       newLocation.Timestamp= now ;
       if(TrailCount!=0)
       {
         newLocation.PreviouslocationId=Trail[TrailCount].LocationId;
       } 
        Trail[TrailCount]=newLocation;
        TrailCount++;
  }
        function GetLocation(uint8 TrailNo) internal view returns (string,uint,uint,uint,string) 
        {
          return (Trail[TrailNo].LocationName,
Sep 04, 2019 05:38:28 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract seguro {
uint256 public precioPrima=0;
bool public abierto = false;
address public oraculo;
address public asegurado;
address public asegurador;
string public vuelo;
bool hayRetraso;
uint public saldodeposito =this.balance;
//metodo constructor. El asegurador presta su consentimiento, define el oráculo (en este caso, pues en un 
//supuesto real debería ser v.g. un notario), y el precio de la prima. 
//el importe de la indemnización se define automáticamente equivale a precioPrima x 10
function seguro(uint256 _precioPrima,address _oraculo, address _asegurado, string _vuelo)public payable {
precioPrima=_precioPrima;
require(msg.value==precioPrima*10);
asegurador=msg.sender;
abierto=true;
asegurado=_asegurado;
oraculo=_oraculo;
vuelo=_vuelo;
asegurador.balance==asegurador.balance-(precioPrima*10);

}

function pagarPrima()public payable{
require(msg.value==precioPrima);
asegurado=msg.send
Sep 03, 2019 18:22:17 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract seguro {
uint256 public precioPrima=0;
bool public abierto = false;
address oraculo;

function seguro(uint256 _precioPrima,address _oraculo)public payable {

  precioPrima=_precioPrima;
  require(msg.value==precioPrima*10);
  asegurador=msg.sender;
  abierto=true;
  oraculo=_oraculo;
  asegurador.balance==asegurador.balance-(precioPrima*10);

}



address public asegurador;
  
  function defineAsegurador (address _aseguradorAddress) public {
    asegurador = _aseguradorAddress;
   
  
  }
address public beneficiario;
  
  function definebeneficiario (address _beneficiarioAddress) public {
    beneficiario = _beneficiarioAddress;
   }

uint public saldoasegurador =asegurador.balance; 
uint public saldobeneficiario =beneficiario.balance; 
uint public saldodeposito =this.balance; 
Sep 03, 2019 17:21:46 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract seguro {


address public oraculo;
  
function defineOraculo (address _oracleAddress) public {
   oraculo = _oracleAddress;
  }

address public asegurador;
  
  function defineAsegurador (address _aseguradorAddress) public {
    asegurador = _aseguradorAddress;
   
  
  }
address public beneficiario;
  
  function definebeneficiario (address _beneficiarioAddress) public {
    beneficiario = _beneficiarioAddress;
   }

uint public saldoasegurador =asegurador.balance; 
uint public saldobeneficiario =beneficiario.balance; 
uint public saldodeposito =this.balance; 
Sep 03, 2019 16:33:47 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract FoodSafe
{
  struct location
  {
    string LocationName;
    uint LocationId;
    uint PreviouslocationId;
    uint Timestamp;
    string Secret;
  }
  mapping(uint => location) Trail;
  uint8 TrailCount=0;

  function GetTrailCount() internal constant returns(uint8) 
  {
    return TrailCount;
  }
  function AddNewLocation(uint LocationId, string LocationName, string Secret)
  {
        location memory newLocation;
        newLocation.LocationName=LocationName;
       newLocation.LocationId=LocationId;
       newLocation.Secret=Secret;
       newLocation.Timestamp= now ;
       if(TrailCount!=0)
       {
         newLocation.PreviouslocationId=Trail[TrailCount].LocationId;
       } 
        Trail[TrailCount]=newLocation;
        TrailCount++;

        


  }
Sep 03, 2019 12:14:52 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract FoodSafe
{
  struct location
  {
    string LocationName;
    uint LocationId;
    uint PreviouslocationId;
    uint Timestamp;
    string Secret;
  }
  mapping(uint => location) Trail;
  uint8 TrailCount=0;

  function GetTrailCount() internal constant returns(uint8) 
  {
    return TrailCount;
  }
  function AddNewLocation(uint LocationId, string LocationName, string Secret)internal  view
  {
        location memory newLocation;
        newLocation.LocationName=LocationName;
       newLocation.LocationId=LocationId;
       newLocation.Secret=Secret;
       newLocation.Timestamp= now ; 
        
        


  }
Sep 03, 2019 12:07:15 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
}
contract coin
{
  address public minter;
  mapping(address => uint) public balances;
  event Sent(address from, address to, uint amount);

  function coin() public
  {
    minter=msg.sender;
  }

  function mint(address receiver, uint amount) public
  {
    if(msg.sender!=minter)
    {
      return;
    }
    balances[receiver]+=amount;
  }
  function send(address receiver,uint amount) public
  {
    if(balances[msg.sender]<amount)return;
    balances[msg.sender]-=amount;
    balances[receiver]+=amount;
    //emit Sent (msg.sender, receiver, amount);
  }
  function checkbal(address addr) public view returns(uint)
  {

    return balances[addr];
  }
}
Sep 03, 2019 10:04:48 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
}
contract coin
{
  address public minter;
  mapping(address => uint) public balances;
  event Sent(address from, address to, uint amount);

  function coin() public
  {
    minter=msg.sender;
  }

  function mint(address receiver, uint amount) public
  {
    if(msg.sender!=minter)
    {
      return;
    }
    balances[receiver]+=amount;
  }
  function send(address receiver,uint amount) public
  {
    if(balances[msg.sender]<amount)return;
    balances[msg.sender]-=amount;
    balances[receiver]+=amount;
    emit Sent (msg.sender, receiver, amount);
  }
  function checkbal(address addr) public view returns(uint)
  {

    return balances[addr];
  }
}
Sep 03, 2019 10:04:31 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {

  address asegurador;
  address asegurado;
  address oraculo;
  uint256 precio_prima; 
  uint256 indemnizacion;
  bool abierto; 
  string numerovuelo;

  
  
  function setasegurador(address _value) public {
    asegurador= _value;
  }

  function getasegurado() public constant returns (address) {
    return asegurador;
  
  }

  function setpoliza(address _asegurado, uint256 _precio_prima, uint256 _indemnizacion, string _numerovuelo )public{
  precio_prima=_precio_prima;
  indemnizacion=_indemnizacion;
  asegurado=_asegurado;
  numerovuelo=_numerovuelo;
  abierto=true; 


  }


 
Sep 03, 2019 08:03:51 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Sep 01, 2019 09:58:06 UTC
pragma solidity ^0.5.7;

import "github.com/OpenZeppelin/openzeppelin-solidity/contracts/math/SafeMath.sol";

contract Credibilite {
  
   using SafeMath for uint256;
  
   mapping (address => uint256) public cred;
   bytes32[] private devoirs;
   
   function produireHash(string memory url) public returns (bytes32){
       bytes32 condensat = keccak256(bytes(url));
       devoirs.push(condensat);
       return condensat;
   }

    function transfert(address payable destinataire, uint256 valeur) public {
        require(cred[msg.sender]>valeur, "tu n'as pas assez de cred");
        require(cred[msg.sender]>1, "Tu dois avoir au mloins 1 cred");
        destinataire.transfer(valeur);
    }
    
    function remettre(bytes32 devoir) public view returns (uint256) {
        for(uint256 i=0;i<devoirs.length;i++){
            if(devoirs[i] == devoir){
                return i+1;
            }
        }
        
        return 0;
    }
Aug 30, 2019 20:38:04 UTC
pragma solidity 0.4.19;

contract PiggyBank {
    address owner;
    uint248 balance;
    bytes32 hashedPassword;

    function piggyBank(bytes32 _hashedPassword) payable {
        owner = msg.sender;
        balance += uint248(msg.value);
        hashedPassword = _hashedPassword;
    }

    function () payable {
        if (msg.sender != owner) revert();
        balance += uint248(msg.value);
    }

    function kill(bytes32 password) {
        if (keccak256(owner, password) != hashedPassword) revert();
        selfdestruct(owner);
    }
Aug 29, 2019 21:15:39 UTC
//Exercice 3.2.2 Organisateurs
pragma solidity ^0.4.25;


contract CagnotteFestival {

  mapping(address => uint) organisateurs;
  mapping(address => bool) festivaliers;
   mapping(address => string) sponsors;
  uint private depensesTotales;
  uint public nbPlaces = 1000;

  constructor() public {
    organisateurs[msg.sender] = 100;
  }

  function transfererOrga(address orga, uint parts) public {
    
      organisateurs[msg.sender] -= parts;
      organisateurs[orga] += parts;

  }

  function estOrga(address orga) public view returns (bool) {

    if(organisateurs[orga] > 0){
      return true;
    }else{
      return false;
    }
  }

  function acheterTicket() public payable {
    require(msg.value>500 finney, "Place à 0.5 Ethers");
    festivaliers[msg.sender];
  }

  function payer(address destinataire, uint montant) public {
    require(estOrga(msg.sender));
    require(destinataire != address(0));
    require(montant > 0);
    destinataire.transfer(montant);
  }

  function payerSponsor(address des
Aug 28, 2019 15:42:19 UTC
pragma solidity ^0.5.0;


contract feeApplicator {
    address[] public coins
    mapping(address => mapping(address => address[]) ) public pairsToShells;
    mapping(address => mapping(address => uint256) ) public shells;
    
    constructor () public {
    
    }
    
    function addShell (address[] memory coins) public {
        Shell shell = new Shell(coins);
        for (uint8 i = 0; i < coins.length; i++) {
            
            for (uint j = i + 1; j < coins.length; j++){
                pairsToShells[coins[i]][coins[j]].push(shell)
                pairsToShells[coins[j]][coins[i]].push(shell)
            }
            
            shells[shell][coins[i]] = 0
            
        }
    }
    
    function swap(ERC20 origin, ERC20 target, uint256 originInput) public {
      
      address[] storage shells = pairsToShells[origin][target];
      
      uint256[shells.length] fees;

      uint256 originSupply = origin.balanceOf(address(this));
      uint256 targetSupply = target.balanceOf(address(this
Aug 27, 2019 19:01:06 UTC
pragma solidity ^0.5.0;


contract feeApplicator {
    address[] public coins
    mapping(address => mapping(address => address[]) ) public pairsToShells
    mapping(address => mapping(address => uint256) ) public shells
    
    constructor () public {
    
    }
    
    function addShell (address[] memory coins) public {
        Shell shell = new Shell(coins);
        for (uint8 i = 0; i < coins.length; i++) {
            
            for (uint j = i + 1; j < coins.length; j++){
                pairsToShells[coins[i]][coins[j]].push(shell)
                pairsToShells[coins[j]][coins[i]].push(shell)
            }
            
            shells[shell][coins[i]] = 0
            
        }
    }
    
    function swap(ERC20 origin, ERC20 target, uint256 originInput) public {
      
      address[] storage shells = pairsToShells[origin][target];
      
      uint256[shells.length] fees;

      uint256 originSupply = origin.balanceOf(address(this));
      uint256 targetSupply = target.balanceOf(address(this))
Aug 27, 2019 19:00:51 UTC
pragma solidity ^0.4.25;
contract sample {
  struct Human {
    string name;
    uint32 age;
  }
  Human human = Human("taro", 20);
  uint store;


  function setStore(uint _value) public {
    store = _value;
  }

  function getStore() public view returns(uint) {
    return store;
  }

  function setHuman(string _name, uint32 _age) public {
    human = Human(_name, _age);
  }

  function getHuman() public view returns(Human) {
    ABIEncoderV2
  }
Aug 23, 2019 05:28:31 UTC
pragma solidity 0.4.24;

// Contract to test unsigned integer underflows and overflows
// note: uint in solidity is an alias for uint256

// Guidelines: Press "Create" to the right, then check the values of max and zero by clicking "Call"
// Then, call overflow and underflow and check the values of max and zero again

contract OverflowUnderFlow {
    uint public zero = 0;
    uint public max = 2**256-1;
    
    // zero will end up at 2**256-1
    function underflow() public {
        zero -= 1;
    }
    // max will end up at 0
    function overflow() public {
        max += 1;
    }

    function getMax() public constant returns (uint256) {
        return 2**256-1;
    }
Aug 21, 2019 01:25:03 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Aug 16, 2019 20:05:04 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  function add1() public returns(uint) {
    value++;
    return value;
  }

  uint value;
Aug 16, 2019 03:57:30 UTC
pragma solidity ^0.4.25;
contract ZombieFactory {
   event NewZombie(uint zombieId, string name, uint dna);
   uint dnaDigits = 16;
   uint dnaModulus = 10 ** dnaDigits;
   uint cooldownTime = 1 days;
   struct Zombie {
     string name;
     uint dna;
     uint32 level;
     uint32 readyTime;
   }
   Zombie[] public zombies;
   mapping (uint => address) public zombieToOwner;
   mapping (address => uint) ownerZombieCount;
   function _createZombie(string _name, uint _dna) internal {
       uint id = zombies.push(Zombie(_name, _dna, 1, uint32(now + cooldownTime))) - 1;
       zombieToOwner[id] = msg.sender;
       ownerZombieCount[msg.sender]++;
       emit NewZombie(id, _name, _dna);
   }
   function _generateRandomDna(string _str) private view returns (uint) {
       uint rand = uint(keccak256(abi.encodePacked(_str)));
       return rand % dnaModulus;
   }
   function createRandomZombie(string _name) public {
       require(ownerZombieCount[msg.sender] == 0);
       uint randDna = _generateRandomDna(_name);
Aug 15, 2019 17:38:21 UTC
function set_root(
    bytes32 root,
    uint height,
    uint[] memory signers,
    uint8[] memory vs,
    bytes32[] memory rs,
    bytes32[] memory ss
) public {
    require(height > Height + T_anchor, "Next anchor height not reached");
    bytes32 message = keccak256(abi.encodePacked(root, height, Nonce, ContractID, "R"));
    validate_signatures(message, signers, vs, rs, ss);
    Root = root;
    Height = height;
    Nonce += 1;
    emit anchorEvent(root, height);
Aug 14, 2019 04:55:56 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
pragma solidity ^0.5.0;

contract DeUber{
    
    mapping(address => uint) addressRiderID;
    mapping(address => uint) addressDriverID;
    
    struct Ride {
        uint rideID;
        uint riderID;
        uint driverID;
        uint totalCost;
        uint[] bids;
        
        bool rideStart;
        bool rideFinish;
        bool riderPaymentPermission;
        bool paymentFinish;
        
        string source;
        string destination;
    }
    
    constructor() public {
       addressRiderID[msg.sender]=5000;
    }
    
    function registerDriver() public payable returns(string memory) {
        require(addressDriverID[msg.sender] == 0,"Already registered as Driver.");
        return "Already registered as Driver.";
    }
    
    function registerRider() public payable returns(string memory) {
        require(addressRiderID[msg.sender] == 0, "Already registered as Rider.");
    
Aug 13, 2019 14:31:49 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;

contract DeUber{
    
    mapping(address => uint) addressRiderID;
    mapping(address => uint) addressDriverID;
    
    struct Ride {
        uint rideID;
        uint riderID;
        uint driverID;
        uint totalCost;
        uint[] bids;
        
        bool rideStart;
        bool rideFinish;
        bool riderPaymentPermission;
        bool paymentFinish;
        
        string source;
        string destination;
    }
    
    constructor() public {
       addressRiderID[msg.sender]=5000;
    }
    
    function registerDriver() public payable returns(string memory) {
        require(addressDriverID[msg.sender] == 0,"Already registered as Driver.");
        return "Already registered as Driver.";
    }
    
    function registerRider() public payable returns(string memory) {
        require(addressRiderID[msg.sender] == 0, "Already registered as Rider.");
        return "Already regi
Aug 13, 2019 14:25:35 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {sd
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Aug 12, 2019 15:57:06 UTC
pragma solidity ^0.4.25;

contract SupplyChain {
    
    enum Status { Created, Delivering, Delivered, Accepted, Declined }
    
    Order[] orders;
    
    struct Order {
        string title;
        string description;
        address supplier;
        address deliveryCompany;
        address customer;
        Status status;
    }
    
    event OrderCreated(
        uint256 index,
        address indexed supplier,
        address indexed deliveryCompany,
        address indexed customer
    );
    
    event OrderDelivering(
        uint256 index,
        address indexed supplier,
        address indexed deliveryCompany,
        address indexed customer
    );
    
    event OrderDelivered(
        uint256 index,
        address indexed supplier,
        address indexed deliveryCompany,
        address indexed customer
    );
    
    event OrderAccepted(
        uint256 index,
        address indexed supplier,
        address indexed deliveryCompany,
        address indexed customer
    );
    
    eve
Aug 11, 2019 18:12:05 UTC
pragma solidity ^0.4.25;

contract SupplyChain {
    
    enum Status { Created, Delivering, Delivered, Accepted, Declined }
    
    Order[] orders;
    
    struct Order {
        string title;
        string description;
        address supplier;
        address deliveryCompany;
        address customer;
        Status status;
    }
    
    event OrderCreated(
        uint256 index,
        address indexed supplier,
        address indexed deliveryCompany,
        address indexed customer
    );
    
    event OrderDelivering(
        uint256 index,
        address indexed supplier,
        address indexed deliveryCompany,
        address indexed customer
    );
    
    event OrderDelivered(
        uint256 index,
        address indexed supplier,
        address indexed deliveryCompany,
        address indexed customer
    );
    
    event OrderAccepted(
        uint256 index,
        address indexed supplier,
        address indexed deliveryCompany,
        address indexed customer
    );
    
    eve
Aug 11, 2019 18:11:30 UTC
pragma solidity ^0.4.0;

contract PizzaOrNot{
    
    struct Candidate {
        string name;
        uint voteCount;
    }
    
    struct Voter {
        bool voted;
        uint voteIndex;
        uint weight;
    } 
    address public owner;
    string public name;
    mapping(address => Voter) public voters;
    Candidate[] public candidates;
    uint public auctionEnd;
    
    event ElectionResult(string name, uint voteCount);
    
    
    function Election(string _name, uint durationMinutes, string candidate1, string candidate2) public{ 
            owner = msg.sender;
            name = _name;
            auctionEnd = now + (durationMinutes * 1 minutes);
            candidates.push(Candidate(candidate1,0));
            candidates.push(Candidate(candidate2,0));
    }
    function authorize(address voter) public {
        require(msg.sender == owner);
        require(!voters[voter].voted);
        voters[voter].weight = 1 ;
    }
    
    function vote(uint voteIndex) {
        require(now < auctionE
Aug 08, 2019 14:49:17 UTC
pragma solidity ^0.5.10;

contract Token {
    bytes32 public standard;
    bytes32 public name;
    bytes32 public symbol;
    uint256 public totalSupply;
    uint8 public decimals;
    bool public allowTransactions;
    mapping (address => uint256) public balanceOf;
    mapping (address => mapping (address => uint256)) public allowance;
    function transfer(address _to, uint256 _value) returns (bool success);
    function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success);
    function approve(address _spender, uint256 _value) returns (bool success);
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
}


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

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

  function safeAdd(uint a, uint b) internal returns (uint) {
    uint c = 
Aug 08, 2019 09:16:11 UTC
pragma solidity 0.4.16;
 contract token {
     string public standard = 'yuyangray';
     string public name; //代币名称
     string public symbol; //代币符号比如'$'
    //代币单位,展示的小数点后面多少个0,和以太币一样后面是是18个0
     uint8 public decimals = 2;  
     uint256 public totalSupply; //代币总量
     mapping (address => uint256) public balanceOf;
     event Transfer(address indexed from, address indexed to, uint256 value);  
     function token(address _owned, string tokenName, string tokenSymbol) public {
         //合约的管理者获得的代币总量
         balanceOf[_owned] = totalSupply;
         name = tokenName;
         symbol = tokenSymbol;
     }
     function transfer(address _to, uint256 _value) public {
       //从发送者减掉发送额
       balanceOf[msg.sender] -= _value;
       //给接收者加上相同的量
       balanceOf[_to] += _value;
       //通知任何监听该交易的客户端
       Transfer(msg.sender, _to, _value)
Aug 07, 2019 21:51:50 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Aug 06, 2019 06:43:15 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    value = 0;
    return value;
  }

  uint value;
Aug 06, 2019 06:07:08 UTC
pragma solidity >=0.4.3 <0.6.0;

contract MeetingContract {
    address owner;
    uint16  private numMeeting;
    Meeting[] private meetings;
    
    constructor () public {
        owner = msg.sender;
    }
    
    function createMeeting(string memory _description) public onlyOwner fieldCantBeEmpty(_description) returns (uint16) {
        require(numMeeting + 1 > numMeeting, "reached maximum number of meetings");
        
        meetings.length = numMeeting + 1;
        meetings[numMeeting] = Meeting({description:_description, amountMembers:0});    
        numMeeting += 1;
        return numMeeting;
    }

    function registerMemberToMeeting(string memory _passport, uint16 _meetingId) public fieldCantBeEmpty(_passport) checkMeetingId(_meetingId)  returns (bool){
        require(numMeeting + 1 > numMeeting, "no meeting places");
        require(checkMemberRegistration(_passport, _meetingId) == false, "this user is already registered");
        
        bytes32 passportHash = getHash(_passport);
        
Aug 03, 2019 16:56:37 UTC
pragma solidity 0.4.16;
 contract token {
     string public standard = 'yuyangray';
     string public name; //代币名称
     string public symbol; //代币符号比如'$'
    //代币单位,展示的小数点后面多少个0,和以太币一样后面是是18个0
     uint8 public decimals = 2;  
     uint256 public totalSupply; //代币总量
     mapping (address => uint256) public balanceOf;
     event Transfer(address indexed from, address indexed to, uint256 value);  
     function token(address _owned, string tokenName, string tokenSymbol) public {
         //合约的管理者获得的代币总量
         balanceOf[_owned] = totalSupply;
         name = tokenName;
         symbol = tokenSymbol;
     }
     function transfer(address _to, uint256 _value) public {
       //从发送者减掉发送额
       balanceOf[msg.sender] -= _value;
       //给接收者加上相同的量
       balanceOf[_to] += _value;
       //通知任何监听该交易的客户端
       Transfer(msg.sender, _to, _value)
Aug 02, 2019 09:30:41 UTC
pragma solidity ^0.5.0;

import "../../sether-interface/contracts/FacebookSetherAPI.sol";

contract MyContract is FacebookSetherAPI {
    event MyEvent(
		bool targetAchieved,
		bytes32 requestID
    );

	uint64 targetLikes;

	constructor() public 
	{
		targetLikes = 1000;
	}

    function checkFacebookLikesTarget( bytes32 setherToken, bytes32 date, bytes32 targetId, uint8 level, bytes32 requestID) public
    {
        super.get_facebook_page_likes(setherToken, "", date, targetId, level, requestID);
    }

	function callback(uint64 setherMetric, bytes32 requestID) public
	{
        emit MyEvent(setherMetric >= targetLikes, requestID);
	}
Aug 01, 2019 09:09:41 UTC
pragma solidity ^0.5.0;

import "../../sether-interface/contracts/FacebookSetherAPI.sol";

contract MyContract is FacebookSetherAPI {
    event MyEvent(
		bool targetAchieved,
		bytes32 requestID
    );

	uint64 targetLikes;

	constructor() public 
	{
		targetLikes = 1000;
	}

    function checkFacebookLikesTarget( bytes32 setherToken, bytes32 date, bytes32 targetId, uint8 level, bytes32 requestID) public
    {
        get_facebook_page_likes(setherToken, "", date, targetId, level, requestID);
    }

	function callback(uint64 setherMetric, bytes32 requestID) public
	{
        emit MyEvent(setherMetric >= targetLikes, requestID);
	}
Aug 01, 2019 08:52:31 UTC
pragma solidity ^0.4.24;

contract tbdocs {

    address owner;

    string public testData;

    constructor() public {
        owner = msg.sender;
    }

    function getOwner() public view returns (address) {
        return owner;
    }

    function setTestData(string data) public returns (string) {
        testData = data;
        return testData;
    }

    function getTestData() public view returns (string) {
        return testData;
    }
Aug 01, 2019 01:35:26 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function sets(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jul 30, 2019 06:38:24 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jul 30, 2019 06:37:36 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.5.7;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jul 29, 2019 12:27:47 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value+1;
  }

  uint value;
Jul 24, 2019 19:54:13 UTC
pragma solidity ^0.5.0;

import "../../sether-interface/contracts/FacebookSetherAPI.sol";

contract MyContract is FacebookSetherAPI {
    event MyEvent(
		uint64 setherMetric,
		string requestID
    );
	
	uint64 target_likes;
	
	constructor() public 
	{
		target_likes = 1000;
	}

	function callback(uint64 setherMetric, string memory requestID) public
	{
		if(setherMetric >= target_likes)
		{
			emit MyEvent(setherMetric, requestID);
		}
	}
Jul 24, 2019 02:36:10 UTC
pragma solidity ^0.5.0;

import "../../sether-interface/contracts/FacebookSetherAPI.sol";

contract MyContract is FacebookSetherAPI {
    event MyEvent(
		uint64 setherMetric,
		string requestID
    );
	
	constructor() public 
	{
	}

	function callback(uint64 setherMetric, string memory requestID) public
	{
		emit MyEvent(setherMetric, requestID);
	}
Jul 24, 2019 02:28:27 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function sumPublic(uint _value) public returns (uint) {
    value += _value;
    return value;
  }

  function sumExternal(uint _value) public returns (uint) {
    value += _value;
    return value;
  }

  function getPublic(uint _value) public returns (uint) {
    return value;
  }

  function getExternal(uint _value) public returns (uint) {
    return value;
  }

  uint value;
Jul 22, 2019 18:36:28 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function sumPublic(uint _value) public returns (uint) {
    return value;
  }

  function sumExternal(uint value) public returns (uint) {
    return value;
  }

  uint value;
Jul 22, 2019 18:28:57 UTC
pragma solidity ^0.4.25;

//copy by wiki https://theethereum.wiki/w/index.php/ERC20_Token_Standard

// ----------------------------------------------------------------------------
// 'FIXED' 'Example Fixed Supply Token' token contract
//
// Symbol      : FIXED
// Name        : Example Fixed Supply Token
// Total supply: 1,000,000.000000000000000000
// Decimals    : 18
//
// Enjoy.
//
// (c) BokkyPooBah / Bok Consulting Pty Ltd 2018. The MIT Licence.
// ----------------------------------------------------------------------------


// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
library SafeMath {
    function add(uint a, uint b) internal pure returns (uint c) {
        c = a + b;
        require(c >= a);
    }
    function sub(uint a, uint b) internal pure returns (uint c) {
        require(b <= a);
        c = a - b;
    }
    function mul(uint a, uint b) internal pure returns (uint c)
Jul 21, 2019 01:33:31 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jul 18, 2019 22:07:13 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jul 16, 2019 11:26:08 UTC
pragma solidity ^0.4.24;

// This is a very simple subscription contract 
// Puts into context how to manage periodic states 
// Using Lazy Evaluation. It uses 

import "openzeppelin-solidity/contracts/ECRecovery.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";


contract Subscription is Ownable {
    using ECRecovery for bytes32;
    using SafeMath for uint256;

    constructor() public { }



    // similar to a nonce that avoids replay attacks this allows a single execution
    // every x seconds for a given subscription
    // subscriptionHash  => next valid block number
    mapping(bytes32 => uint256) public nextValidTimestamp;

    // for some cases of delegated execution, this contract will pay a third party
    // to execute the transfer. If this happens, the owner of this contract must
    // sign the subscriptionHash
    mapping(bytes32 => bool) public publ
Jul 15, 2019 20:36:20 UTC

//

contract Eager {
    uint256 public variable; 

    // This function will be called 
    // You need to trust it!
    function increment(){
        a++;
    }
}


contract Lazy {
    uint256 public variable; 

    // This function will be called 
    // You need to trust it!
    function increment(){
        a++;
    }
Jul 15, 2019 16:02:58 UTC


contract Eager {
    uint256 public a; 

    function increment(){
        a++;

    }
Jul 15, 2019 15:59:04 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.26;
contract SimpleStore {
  using SafeMath for uint;

  function getChangeOrderOfOpps() public constant returns (uint) {
    uint amt = uint(1000).mul(10**18);
    uint percent = 75;
    uint res = amt.mul(percent.div(100));
    return res;
  }

  function getWithoutPrecision() public constant returns (uint) {
    uint amt = uint(1000).mul(10**18);
    uint percent = 75;
    uint res = amt.mul(percent).div(100);
    return res;
  }

  function getWithPrecision() public constant returns (uint) {
    uint amt = uint(1000).mul(10**18);
    uint percent = uint(75).mul(10**18);
    uint denominator = uint(100).mul(10**18);
    uint res = amt.mul(percent).div(denominator);
    return res;
  }
}

/**
 * @title SafeMath
 * @dev Math operations with safety checks that revert on error
 */
library SafeMath {
    int256 constant private INT256_MIN = -2**255;

    /**
    * @dev Multiplies two unsigned integers, r
Jul 11, 2019 16:13:20 UTC
pragma solidity ^0.4.18;


/**
 * @title SafeMath
 * @dev Math operations with safety checks that revert on error
 */
library SafeMath {
    int256 constant private INT256_MIN = -2**255;

    /**
    * @dev Multiplies two unsigned integers, reverts on overflow.
    */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b);

        return c;
    }

    /**
    * @dev Multiplies two signed integers, reverts on overflow.
    */
    function mul(int256 a, int256 b) internal pure returns (int256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZe
Jul 11, 2019 16:13:00 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

/**
 * @title SafeMath
 * @dev Math operations with safety checks that revert on error
 */
library SafeMath {
    int256 constant private INT256_MIN = -2**255;

    /**
    * @dev Multiplies two unsigned integers, reverts on overflow.
    */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b);

        return c;
    }

    /**
    * @dev Multiplies two signed integers, reverts on overflow.
    */
    function mul(int256 a, int256 b) internal pure returns (int256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    
Jul 11, 2019 16:11:45 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.5.0;


library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplicati
Jul 11, 2019 16:01:26 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function set(uint _value) public {
    value = _value;
  }

  function get() public constant returns (uint) {
    return value;
  }

  uint value;
Jul 11, 2019 16:00:46 UTC