//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;
    int a = 0;
  }

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

  uint value;
Jun 22, 2018 23:08: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;
Jun 22, 2018 23:07: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;
Jun 22, 2018 23:07:17 UTC
pragma solidity ^0.4.4;

import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
import "openzeppelin-solidity/contracts/Math/SafeMath.sol";

contract RealmBase {
    // Imports
    using SafeMath for uint256;
    // Events
    event UpdatedTile(uint tileId);
    
    // Structs
    struct Tile {
        int32 x;
        int32 y;
    }

    // -- Storage --
    // World
    Tile[] tiles;

    // Maps
    mapping(int32 => mapping(int32 => uint)) positionToTileId;
    mapping (uint => address) tileIdToOwner;

    function RealmBase() public {
        // Create base tiles

        // Genesis tile! id = 0
        createTile(0, 0);
        // other default tiles
        createTile(0, -1);
        createTile(0, 1);
        createTile(-1, 0);
        createTile(1, 0);
        createTile(1, -1);
        createTile(-1, 1);
    }

    function createTile(int32 _x, int32 _y) internal {
        // TODO - make sure position isn't already occupied
        //   and that it is valid (next to another tile)
        uin
Jun 22, 2018 19:16:40 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;
contract IntegerTest{
    int d;

    function get() public pure returns (int){
      int a = 1;
      int b = 2;
      int c = a/b;
      return c;
    }
    struct S{string a;uint b;}
    
    //默认参数是memory
    function assign(S s) internal pure returns(string){
      //默认的变量是storage的指针
      //Type struct MemoryToLocalVar.S memory is not implicitly convertible to expected type struct MemoryToLocalVar.S storage pointer.
      // uint[3] memory a = [uint(1), 2, 3];
      // bytes4 song = "song";
      // string memory str = "waylon";
      // S tmp = s;
      return s.a;
    }

    function call() public pure returns(string){
      S memory s = S("song", 1);
      string memory str = assign(s);
      return str;
    }
Jun 22, 2018 07:58:02 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;
contract IntegerTest{
    int d;

    function get() public pure returns (int){
      int a = 1;
      int b = 2;
      int c = a/b;
      var d = "2.1";
      return c;
    }
Jun 22, 2018 05:02:41 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;
contract IntegerTest{
    int d;

    function get() public pure returns (int){
      int a = 1;
      int b = 2;
      int c = a/b;
      fixed e = 1/4;
      var d = 2.1;
      return c;
    }
Jun 22, 2018 05:00:51 UTC
pragma solidity^0.4.23;


import "https://github.com/paradoxDAO/accounting/blob/master/contracts/Accounting.sol";
import "https://github.com/dapphub/ds-auth/blob/master/src/auth.sol";


contract RefundableCampaign is SubAccounting, DSAuth {


    bool public failed;
    uint public deadline;
    uint public totalContributed;
    uint public goal = 1 ether;
    SuperAccount contributions;


    constructor () {
        deadline = now + 5 minutes;
    }


    function contribute() public payable {
        require(now <= deadline);
        totalContributed += msg.value;
        depositETH(contributions, bytes32(msg.sender), msg.sender, msg.value);
    }


    function myContribution(address guy) public view returns(uint) {
        return contributions.subAccounts[bytes32(guy)].balanceETH;
    }


    function finalize() public auth {
        require(now > deadline);
        if (totalContributed < goal) {
            failed = true;
        } else {
            drainETH(contributions, base);
        }
    }


    
Jun 22, 2018 04:37:28 UTC
pragma solidity^0.4.23;


import "https://github.com/paradoxDAO/accounting/blob/master/contracts/Accounting.sol";
import "https://github.com/dapphub/ds-auth/blob/master/src/auth.sol";


contract Payroll is AllowanceAccounting, DSAuth {


    mapping (address => LimitedAccount) accounts;


    constructor () {
        //set Dai address
    }


    function deposit(address _for) public payable {
        depositETH(accounts[_for], msg.sender, msg.value);
    }


    function depositStablecoin(address _for, uint value) public {
        depositDai(accounts[_for], msg.sender, value);
    }


    function withdrawAllowanceETH() public {
        sendETHAllowance(accounts[msg.sender], msg.sender);
    }


    function withdrawAllowanceDai() public {
        sendDaiAllowance(accounts[msg.sender], msg.sender);
    }


    function setAllowance(address guy, uint daiPerSecond) public auth {
        accounts[guy].allowance = daiPerSecond;
    }


Jun 22, 2018 04:33:54 UTC
pragma solidity^0.4.23;


import "https://github.com/paradoxDAO/accounting/blob/master/contracts/Accounting.sol";
import "https://github.com/dapphub/ds-auth/blob/master/src/auth.sol";


contract DepositBox is Accounting, DSAuth {


    mapping (address => Account) accounts;


    constructor () {}


    function () public payable {
        depositETH(accounts[msg.sender], msg.sender, msg.value);
    }


    function deposit() public payable {
        depositETH(accounts[msg.sender], msg.sender, msg.value);
    }


    function depositERC20(address token, uint value) public {
        depositToken(accounts[msg.sender], token, msg.sender, value);
    }


    function withdraw(uint value) public {
        sendETH(accounts[msg.sender], msg.sender, value);
    }


    function withdrawERC20(address token, uint value) public {
        sendToken(accounts[msg.sender], token, msg.sender, value);
    }


    function ethBalance(address guy) public view returns(uint balance) {
        return accounts[guy].balanceETH;
   
Jun 22, 2018 04:26:47 UTC
pragma solidity^0.4.23;


import "../contracts/Accounting.sol";
import "https://github.com/dapphub/ds-auth/blob/master/src/auth.sol";


contract DepositBox is Accounting, DSAuth {


    mapping (address => Account) accounts;


    constructor () {}


    function () public payable {
        depositETH(accounts[msg.sender], msg.sender, msg.value);
    }


    function deposit() public payable {
        depositETH(accounts[msg.sender], msg.sender, msg.value);
    }


    function depositERC20(address token, uint value) public {
        depositToken(accounts[msg.sender], token, msg.sender, value);
    }


    function withdraw(uint value) public {
        sendETH(accounts[msg.sender], msg.sender, value);
    }


    function withdrawERC20(address token, uint value) public {
        sendToken(accounts[msg.sender], token, msg.sender, value);
    }


    function ethBalance(address guy) public view returns(uint balance) {
        return accounts[guy].balanceETH;
    }


    function tokenBalance(address guy, addres
Jun 22, 2018 04:19:13 UTC
pragma solidity ^0.4.24;
contract TarotReader {

  mapping (address => uint8[]) readings;

  address public creator;
  function draw_random_card(uint8 index,uint8[] table) view private returns (uint8)  {
    uint8 random_card=random(77,index);
    for (uint8 i = 0; i < table.length; i++) {
      if(random_card==table[i]){ 
        return draw_random_card(index,table);
      }
    }
    return random_card;
  }
function random(uint8 range,uint count) view private returns (uint8 randomNumber) {
  uint8 _seed = uint8(
    keccak256(
      abi.encodePacked(
        keccak256(
          abi.encodePacked(
            blockhash(block.number),
            _seed)
        ), now + count)
    ));
  return _seed % range;
}
  function spread(uint8 cards) private{
    assert(cards<17);
    uint8[] memory table = new uint8[](cards);
    for (uint8 position = 0; position < cards; position++) {
      table[position]=draw_random_card(position,table);
    }
    readings[msg.sender]=table;
  }
  function career_path() payable  pu
Jun 22, 2018 03:15:10 UTC
pragma solidity ^0.4.18;

/* Numero modificable */
/*@autor WEA token - Vultur Token */

contract ERC20 {
    function transfer(address _to, uint256 _value) public returns(bool);
    function balanceOf(address tokenOwner) public constant returns (uint balance);
}

contract Ownable {
  address public owner;


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


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function Ownable() public {
    owner = msg.sender;
  }


  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }


  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) public onlyOwner {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner)
Jun 22, 2018 00:44:43 UTC
pragma solidity ^0.4.18;


// extremely simple example illustrating how to use _slot suffix
contract StorageSlotExample {
  uint256 uintStorage = 1337;

  // returns uintStorage by loading it directly from the appropriate storage slot
  function getStorageByPointer()
    external
    view
    returns (uint256)
  {
    uint256 _foundStorage;

    assembly {
      // use _slot suffix for any contract variable name to access
      _foundStorage := sload(uintStorage_slot)
    }

    return _foundStorage;
  }

  // sets storage by accessing the storage slot directly
  function setStorageByPointer(uint256 _newNumber)
    external
    returns (bool) {

      assembly {
        // _slot suffix can also be used to store storage at a variable's storage pointer
        sstore(uintStorage_slot, _newNumber)
      }

      return true;
    }
Jun 21, 2018 19:19:41 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;

contract StorageSlotExample {
  uint256 uintStorage = 1337;

  function getStorageByPointer()
    external
    view
    returns (uint256)
  {
    uint256 _foundStorage;
    assembly {
      _foundStorage := sload(uintStorage_slot)
    }

    return _foundStorage;
  }

  function setStorageByPointer(uint256 _newNumber)
    external
    returns (bool) {
      assembly {
        sstore(uintStorage_slot, _newNumber)
      }

      return true;
    }
Jun 21, 2018 19:09:50 UTC
pragma solidity ^0.4.24;

contract ConnectFour {

    enum Piece {NONE, RED, YELLOW}

    struct Player {
        bytes32 name;
        address addr;
    }

    struct Status {
        bool endGame;
        Piece winner;
        uint round;
        Piece nextTurn;
        Piece[6][7] board;
    }

    address owner;
    Player playerRed;
    Player playerYellow;
    Status gameStatus;

    event Move(Piece player, uint8 column, uint8 row);
    event End(Piece winner);

    constructor(bytes32 namePlayer1, address addressPlayer1,
        bytes32 namePlayer2, address addressPlayer2) public {
        owner = msg.sender;

        // Init players
        playerRed.name = namePlayer1;
        playerRed.addr = addressPlayer1;
        playerYellow.name = namePlayer2;
        playerYellow.addr = addressPlayer2;

        // Init game
        gameStatus.endGame = false;
        gameStatus.round = 0;
        gameStatus.nextTurn = Piece.RED;
    }

    modifier whenActive {
        require(!gameStatus.endGame);
        _;
Jun 21, 2018 16:34:19 UTC
isDeleted = fals
Jun 21, 2018 13:35:57 UTC
void AExedreCharacter::PreUpdateCamera( float DeltaTime )
{
	if( !FirstPersonCameraComponent || !EPC || !EMC )
		return;
	//-------------------------------------------------------
	// Compute rotation for Mesh AIM Offset
	//-------------------------------------------------------
	FRotator ControllerRotation = EPC->GetControlRotation();
	FRotator NewRotation 		= ControllerRotation;

	// Get current controller rotation and process it to match the Character
	NewRotation.Yaw 			= CameraProcessYaw( ControllerRotation.Yaw );
	NewRotation.Pitch 			= CameraProcessPitch( ControllerRotation.Pitch + RecoilOffset );
	NewRotation.Normalize();

	// Clamp new rotation
	NewRotation.Pitch 	= FMath::Clamp( NewRotation.Pitch, -90.0f + CameraTreshold, 90.0f - CameraTreshold);
	NewRotation.Yaw 	= FMath::Clamp( NewRotation.Yaw, -91.0f, 91.0f);
	
	//Update loca variable, will be retrived by AnimBlueprint
	CameraLocalRotation = NewRotation;
Jun 21, 2018 11:26:02 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

/** 
 * 我们的代码从第968行开始
 */

/*
* 第三方库 (https://github.com/OpenZeppelin/openzeppelin-solidity/)
*/

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
    // Gas optimization: this is cheaper than asserting '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;
    }

    c = a * b;
    assert(c / a == b);
    return c;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    // uin
Jun 21, 2018 10:54:35 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

/** 
 * 我们的代码从第968行开始
 */

/*
* 第三方库 (https://github.com/OpenZeppelin/openzeppelin-solidity/)
*/

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
    // Gas optimization: this is cheaper than asserting '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;
    }

    c = a * b;
    assert(c / a == b);
    return c;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    // uin
Jun 21, 2018 10:51:20 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

/** 
 * 我们的代码从第850行开始
 */

/*
* 第三方库 (https://github.com/OpenZeppelin/openzeppelin-solidity/)
*/

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
    // Gas optimization: this is cheaper than asserting '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;
    }

    c = a * b;
    assert(c / a == b);
    return c;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    // uin
Jun 21, 2018 10:46:38 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

contract GameNodeToken {
  function set(uint _value) public {
    value = _value;
  }

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

  uint value;
Jun 21, 2018 09:49:31 UTC
pragma solidity ^0.4.18;

contract A {
  uint8 a = 0;

  function getA() public constant returns(uint8)
  {
    return a;
  }

  function setA(uint8 value) external returns (bool success) 
  {
     a=value;
     return true;
  }

}

contract B {
  uint256 a = 0;

  function getA() public constant returns(uint256)
  {
    return a;
  }

  function setA(uint256 value)  external returns (bool success) 
  {
     a=value;
     return true;
  }

Jun 21, 2018 08:33: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;
  }

  function foo() constant returns (uint[]) {
   var bar = uint[];
   bar.push(1); 
   return bar;
}

  uint value;
Jun 21, 2018 06:16:52 UTC
pragma solidity ^0.4.24;

contract Salary {
    event PaySalary(address indexed _payee, uint _amountInWei, uint _timestamp);
    
    function makePayment(address _payee, uint _amountInWei) public {
        _payee.transfer(_amountInWei);
        emit PaySalary(_payee, _amountInWei, now);
    }

    function() public payable {}

Jun 21, 2018 00:16:36 UTC
pragma solidity ^0.4.24;

contract salary {
    event PaySalary(address indexed _payee, uint _amountInWei, uint _timestamp);
    
    function makePayment(address _payee, uint _amountInWei) public {
        _payee.transfer(_amountInWei);
        emit PaySalary(_payee, _amountInWei, now);
    }

    function() public payable {}

Jun 21, 2018 00:14:24 UTC
pragma solidity ^0.4.24;

contract salary {
    event PaySalary(address indexed _payee, uint _amountInWei, uint _timestamp);

    constructor() public {}

    function makePayment(address _payee, uint _amountInWei) public {
        _payee.transfer(_amountInWei);
        emit PaySalary(_payee, _amountInWei, now);
    }

    function() public payable {}

Jun 21, 2018 00:01:47 UTC
pragma solidity ^0.4.24;

contract salary {
    event PaySalary(address indexed _payee, uint _amount, uint _timestamp);

    constructor() public {}

    function makePayment(address _payee, uint _amount) public {
        _payee.transfer(_amount);
        emit PaySalary(_payee, _amount, now);
    }

    function() public payable {}

Jun 20, 2018 23:40:37 UTC
pragma solidity 0.4.24;

contract SimpleECDSA {
  address private publicKey = 0x831412;

  modifier mustSignWithECDSA(bytes32 hash, uint8 v, bytes32 r, bytes32 s) {
    require(ecrecover(hash, v, r, s) == publicKey);
    _;
  }

  function callWithECDSA(bytes32 hash, uint8 v, bytes32 r, bytes32 s) 
    public 
    view 
    mustSignWithECDSA(hash, v, r, s) 
    returns (uint8) 
  {
    return 1;
  }
Jun 20, 2018 18:31:20 UTC
pragma solidity ^0.4.17;


/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  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;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  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;
  }

  /**
  * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uin
Jun 20, 2018 16:52:54 UTC
pragma solidity 0.4.24;

contract SimpleECDSA {
  address publicKey = 0x831412;

  modifier mustSignWithECDSA(bytes32 hash, uint8 v, bytes32 r, bytes32 s) {
    require(ecrecover(hash, v, r, s) == publicKey);
    _;
  }

  function callWithECDSA(bytes32 hash, uint8 v, bytes32 r, bytes32 s) 
    public 
    view 
    mustSignWithECDSA(hash, v, r, s) 
    returns (uint8) 
  {
    return 1;
  }
Jun 20, 2018 16:39: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 {
    val = _value;
  }

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

  uint val;
Jun 20, 2018 11:50:29 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;
Jun 20, 2018 11:49:10 UTC
pragma solidity ^0.4.24;

contract Match {
    uint8 results;
    uint minimum;
    string desc;
    address manager;
    uint16 commissionPercent = 1000;

    PoolType[] public allPools;

    struct Bet {
        address player;
        uint amount;
    }

    struct PoolType {
        uint total;
        Bet[] bets;
        fixed odds; //by default 128*18
    }

    constructor (uint8 gameResults, uint min, string description) public {
        results = gameResults;
        minimum = min;
        desc = description;
        manager = msg.sender;
        allPools.length = gameResults;
    }

    function takeGamble(uint8 result) public inResultAndMoreThanMin(result) payable{
        Bet memory bet = Bet({player : msg.sender, amount : msg.value});
        allPools[result].bets.push(bet);
        allPools[result].total += msg.value;
        calcOdds();
    }

    function calcOdds() private {
        for(uint8 i = 0; i < results; i++) {
            allPools[i].odds = allPools[i].total / (address(this).balance 
Jun 20, 2018 08:45:16 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
  pragma solidity ^0.4.18;
  contract Foo {
    uint public value = 123;
  }

  contract Bar {
  Foo foo;
    function MyContract(address otherAddress) {
      foo = Foo(otherAddress);
    }
    function getFooValue() constant returns(uint){
      return foo.value();
    }
  
Jun 20, 2018 07:13:38 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;
Jun 20, 2018 07:05:48 UTC
pragma solidity ^0.4.17;


/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  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;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  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;
  }

  /**
  * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uin
Jun 20, 2018 03:40:23 UTC
function setTokenContractAddress(address newTokenAddress) external onlyOwner {tokenContractAddress = _newTokenAddress; contractToken = Token(tokenContractAddress);}
function viewTokenContractAddress() public view returns (address){return tokenContractAddress;}
function addToken() public {contractToken = Token(tokenContractAddress);}
function checkContractTokenBalance() public onlyOwner view returns(uint256){return contractToken.balanceOf(this);}
function checkUserTokenBalance() public view returns(uint256){return contractToken.balanceOf(msg.sender);}
function tokenTransfer(address _to, uint256 _amount) public onlyOwner returns(bool){contractToken.transfer(to, amount);}
function tokenAllowance(address _owner, address _spender) public view returns(uint256){contractToken.allowance(owner, spender);}
function tokenTransferFrom(address _from, address _to, uint256 _value) public returns (bool){contractToken.transferFrom(from, to, _value);}
function tokenApprove(address _spender, uint256 _value) public returns (bool)
Jun 20, 2018 03:06:29 UTC
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}

contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}

contract BasicToken is ERC20Basic {
using SafeMath for uint256;

mapping(address =&gt; uint256) balances;

uint256 totalSupply_;

/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}

/**
* @dev transfer token for a specified address
* @param to The address to transfer to.
* @param _value The amount to be transf
Jun 20, 2018 03:06:29 UTC
import "fmg-core/contracts/State.sol";

contract PaymentGame {
    using State for bytes;
    // The core State library contains all attributes needed for a payment game state!
    
    function validTransition(bytes _old, bytes _new) public pure returns (bool) {
        uint[] oldResolution = State.resolution(_old);
        uint[] newResolution = State.resolution(_new);
        
        // conserve total balance
        require(oldResolution[0] + oldResolution[1] == newResolution[0] + newResolution[1])
        
        // can't take someone else's funds by moving
        uint8 i = _new.indexOfMover();
        require(newResolution[i] <= oldResolution[i]);
        
        return true;
    }
Jun 19, 2018 21:10:48 UTC
pragma solidity ^0.4.11;

contract HomeWork2 {

   
    uint public value;

   
    function setvalue (uint _value) {
    value = _value;
    
    }
Jun 18, 2018 19:36:28 UTC
pragma solidity ^0.4.24;

contract A {

	string public s = string(abi.encodePacked("a", " ", "concatenated", " ", "string"));

}
Jun 18, 2018 15:25:32 UTC
pragma solidity ^0.4.24;

contract A {
	string public x = string(abi.encodePacked("hello", "world"));
}

contract B {
	string public x = string(abi.encodePacked("helloworld"));
Jun 18, 2018 09:38:17 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

contract Signature {
  function calculate() public pure returns (bytes4) {
    return bytes4(keccak256('newDocument(bytes32,string,uint8)'));
  }
Jun 18, 2018 07:11:49 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
contract StatementHubStandard {

   struct Statement {
    uint256 resourcelinkHash; /*Hash of Resource Link. Hash computed off-chain*/
     uint256 resourceHash; /*Hash of the content present at Resource Link. Hash computed off-chain*/
     uint256 patternHash;  /*Hash of the Pattern which is being referenced within the Resource. Hash computed off-chain */
     bool isPatternPresent; /*Store whether the pattern was present in Resource or not. Determination of the same to be made off-chain */
     uint256 resourceSummaryHash;/*Hash of the Resouce Summary. Resource summary could be a topic*/
     address statementIssuer; /*Address of the person who is issuing a statement. Address of contract which initiated the addition of statement */
  }

  /*Event to be triggered when a Statement is added */
 event StatementAdded(uint256 resourcelinkHash,uint256 indexed resourceHash,uint256 indexed  patternHash, bool indexed isPatternPre
Jun 17, 2018 13:47:01 UTC
pragma solidity ^0.4.24;
pragma experimental ABIEncoderV2;


contract ABIExample {

  enum Permission { ReadOnly, Write, Admin }

  struct User {
    uint256 id;
    Permission permission;
  }

  User[] users;

  constructor() public {
    users.push(User(0, Permission.Admin));
    users.push(User(1, Permission.Write));
    users.push(User(2, Permission.ReadOnly));
  }

  // Add a setter to add new users.
  function set(User newUser) public {
    users.push(newUser);
  }

  function get() public constant returns (bytes) {
    return abi.encode(users);
  }

Jun 17, 2018 01:35:08 UTC
pragma solidity ^0.4.24;
pragma experimental ABIEncoderV2;


contract ABIExample {

  enum Permission { ReadOnly, Write, Admin }

  struct User {
    uint256 id;
    Permission permission;
  }

  User[] users;

  constructor() public {
    users.push(User(0, Permission.Admin));
    users.push(User(1, Permission.Write));
    users.push(User(2, Permission.ReadOnly));
  }

  // Add a setter to add new users.
  function set(User newUser) public {
    users.push(newUser);
  }

  function get() public constant returns (bytes) {
    return abi.encode(users);
  }

Jun 17, 2018 01:23:42 UTC
pragma solidity ^0.4.24;

contract Test {
  uint idIndex = 1;

  struct Ev {
    uint id;
    uint indexInArray;
    string name;
  }

  mapping(uint => Ev) public eventsMap;
  uint[] public eventsMapKeys;

  function getKeys() public view returns(uint[]) {
    return eventsMapKeys;
  }

  function addEvent(string name) public {
    eventsMap[idIndex] = Ev({
      id: idIndex,
      indexInArray: eventsMapKeys.push(idIndex) - 1,
      name: name
    });

    idIndex++;
  }

  function removeEvent(uint id) public{
    uint i = eventsMap[id].indexInArray;
    while (i < eventsMapKeys.length-1) {
        eventsMapKeys[i] = eventsMapKeys[i+1];
        eventsMap[eventsMapKeys[i+1]].indexInArray = i;
        i++;
    }
    eventsMapKeys.length--;
    delete eventsMap[id];
  }

Jun 16, 2018 22:39:12 UTC
// Source: https://ethereum.stackexchange.com/questions/13167/are-there-well-solved-and-simple-storage-patterns-for-solidity

pragma solidity ^0.4.24;

contract Test {
  uint idIndex = 1;

  struct Ev {
    uint id;
    uint indexInArray;
    string name;
  }

  mapping(uint => Ev) public eventsMap;
  uint[] public eventsMapKeys;

  function getKeys() public view returns(uint[]) {
    return eventsMapKeys;
  }

  function addEvent(string name) public {
    eventsMap[idIndex] = Ev({
      id: idIndex,
      indexInArray: eventsMapKeys.push(idIndex) - 1,
      name: name
    });

    idIndex++;
  }

  function removeEvent(uint id) public{
    uint i = eventsMap[id].indexInArray;
    while (i < eventsMapKeys.length-1) {
        eventsMapKeys[i] = eventsMapKeys[i+1];
        eventsMap[eventsMapKeys[i+1]].indexInArray = i;
        i++;
    }
    eventsMapKeys.length--;
    delete eventsMap[id];
  }

Jun 16, 2018 22:37:17 UTC
pragma solidity ^0.4.18;

// ----------------------------------------------------------------------------
// '0Fucks' token contract
//
// Deployed to : 0x5A86f0cafD4ef3ba4f0344C138afcC84bd1ED222
// Symbol      : 0FUCKS
// Name        : 0 Fucks 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 safeMu
Jun 16, 2018 14:43:06 UTC
pragma solidity ^0.4.18;

// ----------------------------------------------------------------------------
// '0Fucks' token contract
//
// Deployed to : 0x5A86f0cafD4ef3ba4f0344C138afcC84bd1ED222
// Symbol      : 0FUCKS
// Name        : 0 Fucks 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 safeMu
Jun 16, 2018 12:45:08 UTC
pragma solidity ^0.4.18;
contract Todo {
bytes32[] List;

bytes32 name = "Hugo Wesley";
bytes32 carrer = "Software Engineer";

function addTodo() public {
  List.push(name);
  List.push(carrer);
}

function showList() public view returns (bytes32[]) {
  return List;
}
Jun 16, 2018 11:55:46 UTC
pragma solidity ^0.4.20;

contract IdDatabase {

	uint[] public ids;
	uint[] public longVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfStoragelongVariableNameTakesUpLotOfSt
Jun 16, 2018 05:32:07 UTC
pragma solidity ^0.4.24;

//
// Purchase Conract
//

contract Purchase {

  // Storage
  Listing public listingContract; // listing that is being purchased
  uint24 public start; // Slot when we begin
  uint24 public end; // Slot when we end
  Purchase public nextPurchase; // Next purchase in time (linked list)

  // ...all the other Purchase stuff. Price, Stage, etc...

  /// Constructor
  constructor(
    Listing _listingContract,
    uint24 _start,
    uint24 _end,
    Purchase _nextPurchase // Purchase that comes next in time (non-overlapping)
  )
    public
  {
    require(_start < _end, "End must be after start");
    listingContract = _listingContract;
    start = _start;
    end = _end;
    nextPurchase = _nextPurchase;
  }

  /// Setter for nextPurchase
  function setNext(Purchase _newNext) public {
    require(msg.sender == address(listingContract), "Only Listing can call setNext()");
    nextPurchase = _newNext;
  }

}


//
// Listing Conract
//

contract Listing {

  //
  // Storage
  //

  // Pur
Jun 15, 2018 21:42:47 UTC
pragma solidity ^0.4.24;

contract Purchase {

  // Storage
  Listing public listingContract; // listing that is being purchased
  uint24 public start; // Slot when we begin
  uint24 public end; // Slot when we end
  Purchase public nextPurchase; // Next purchase in time (linked list)

  // ...all the other Purchase stuff. Price, Stage, etc...

  /// Constructor
  constructor(
    Listing _listingContract,
    uint24 _start,
    uint24 _end,
    Purchase _nextPurchase
  )
    public
  {
    require(_start < _end, "End must be after start");
    listingContract = _listingContract;
    start = _start;
    end = _end;
    nextPurchase = _nextPurchase;
  }

  /// Setter for nextPurchase
  function setNext(Purchase _newNext) public {
    require(msg.sender == address(listingContract), "Only Listing can call setNext()");
    nextPurchase = _newNext;
  }

}

contract Listing {

  //
  // Storage
  //

  // Purchases Ordered Linked List
  Purchase public headPurchase; // Head of linked list
  Purchase public currentP
Jun 15, 2018 21:35:40 UTC
pragma solidity ^0.4.24;

contract Purchase {

  // Storage
  Listing public listingContract; // listing that is being purchased
  uint24 public start; // Slot when we begin
  uint24 public end; // Slot when we end
  Purchase public nextPurchase; // Next purchase in time (linked list)

  // ...all the other Purchase stuff. Price, Stage, etc...

  /// Constructor
  constructor(
    Listing _listingContract,
    uint24 _start,
    uint24 _end,
    Purchase _nextPurchase
  )
    public
  {
    require(_start < _end, "End must be after start");
    listingContract = _listingContract;
    start = _start;
    end = _end;
    nextPurchase = _nextPurchase;
  }

  /// Setter for nextPurchase
  function setNext(Purchase _newNext) public {
    require(msg.sender == address(listingContract), "Only Listing can call setNext()");
    nextPurchase = _newNext;
  }

}

contract Listing {

  //
  // Storage
  //

  // Purchases Ordered Linked List
  Purchase public headPurchase; // Head of linked list
  Purchase public currentP
Jun 15, 2018 21:33:27 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;
contract SimpleStore {
  uint256 public packedTime;

  struct structTime {
    uint16 timezone;
    uint64 reservationStart;
    uint64 reservationEnd;
  }
  structTime public stime;

  function storePackedTime(uint256 _packedTime) {
    packedTime = _packedTime;
  }

  function storeStructTime(uint16 _timezone, uint64 _reservationStart, uint64 _reservationEnd) {
    stime.timezone = _timezone;
    stime.reservationStart = _reservationStart;
    stime.reservationEnd = _reservationEnd;
  }
Jun 15, 2018 21:22:19 UTC
pragma solidity ^0.4.11;

contract LessSimpleContract {

    address public donator;
    address public owner;
    uint public value;

    uint public lasttinefordonate;
    uint public lastTimeForValue;
    uint timeout = 120 seconds;



    function LessSimpleContract(){
    owner = msg.sender;
    }

    function() payable {
    require (msg.value > 1 finney);
    require (lasttinefordonate + timeout < now);
    setDonator(msg.sender);

    }
    function bayvalue (uint _value) payable {
    require (msg.value > 1 finney);
    require (lastTimeForValue + timeout < now);
    setValue (_value);

    }
    function setvalue (uint _value) internal {
    value = _value;
    lastTimeForValue = now;

    }
    function setDonator (address _donator) internal {
    require (msg.value > 1 finney);
    require (lasttinefordonate + timeout < now);
    setDonator(msg.sender);

    }

    }
Jun 15, 2018 19:08:38 UTC
pragma solidity ^0.4.11;

// Credits to OpenZeppelin for this contract taken from the Ethernaut CTF
// https://ethernaut.zeppelin.solutions/level/0x68756ad5e1039e4f3b895cfaa16a3a79a5a73c59
contract Delegate {

  address public owner;

  function Delegate(address _owner) {
    owner = _owner;
  }

  function pwn() {
    owner = msg.sender;
  }
}

contract Delegation {

  address public owner;
  Delegate delegate;

  function Delegation(address _delegateAddress) {
    delegate = Delegate(_delegateAddress);
    owner = msg.sender;
  }
  
  // an attacker can call Delegate.pwn() in the context of Delegation
  // this means that pwn() will modify the state of **Delegation** and not Delegate
  // the result is that the attacker takes unauthorized ownership of the contract
  function() {
    if(delegate.delegatecall(msg.data)) {
      this;
    }
  }
Jun 15, 2018 08:11:53 UTC
// CryptoKitties Source code
// Copied from: https://etherscan.io/address/0x06012c8cf97bead5deae237070f9587f8e7a266d#code

pragma solidity ^0.4.11;

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function Ownable() {
    owner = msg.sender;
  }


  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }


  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) onlyOwner {
    if (newOwner != address(0)) {
      owner = newOwner;
    }
  }

}



/// @title Interface for contract
Jun 14, 2018 14:34:46 UTC
pragma solidity ^0.4.24;

contract BlockchainTraining {

    address public organiser;
    mapping(bytes32 => bool) private participants;

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

    function addParticipant(string name) public {
        
        require(bytes(name).length > 0);
        require(msg.sender == organiser);

        participants[sha256(abi.encodePacked(name))] = true;
    }

    function verify(string name) public view returns (bool) {
        
        require(bytes(name).length > 0);

        return (participants[sha256(abi.encodePacked(name))]);
    }
Jun 14, 2018 14:23:21 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {

  struct Monster {
      uint createdAt;
  }

  mapping (bytes8 => Monster) public monsters;

  function get(bytes8 _genes) public constant returns (uint createdAt) {
    return (monsters[_genes].createdAt);
  }

  function createMonster(bytes8 _parentGenes) public {
    bytes8 parentGenes = _parentGenes & 0xfffffffffffff000;
    bytes8 childGenes = getNewGenes(parentGenes, 0);

    monsters[childGenes] = Monster({
        createdAt: now
    });
  }

  function exists(bytes8 _genes) private constant returns (bool) {
      return monsters[_genes].createdAt != 0;
  }

  function getNewGenes(bytes8 _parentGenes, uint i) private returns (bytes8) {
      if(i > 4096) {
        revert();
      }

      bytes8 newGenes = _parentGenes | bytes8(block_number+i % 4096);

      if (exists(newGenes)) {
        return getNewGenes(_parentGenes, i+1);
      }

      return newGenes;
  }

  
Jun 14, 2018 13:14:11 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;
}erterterter
Jun 14, 2018 07:13:00 UTC
pragma solidity ^0.4.23;
contract Ownerble {
  address public owner;
  event OwnershipRenounced(address indexed previousOwner);
  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
  constractor() public{
    owner = msg.sender;
  }
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }
  function renounceOwnership()public onlyOwner {
     emit ownershipRenounced(owner);
     owner = address(0);
   }
  // この関数です!!
  function transferOwnership(address _newOwner) public onlyOwner {
    _transferOwnership(_newOwner);
  }
  // 何故この関数を経由するのでしょうか?
  function _transferOwnership(address _newOwner) internal {
    require(_newOwner != address(0));
    emit Ownershiptransferred(owner, _newOwner);
    owner = _newOwner;
  }
Jun 13, 2018 12:09:54 UTC
pragma solidity ^0.4.21;

contract FiftyYearsChallenge {
    struct Contribution {
        uint256 amount;
        uint256 unlockTimestamp;
    }
    Contribution[] public queue;
    uint256 public head;

    address public owner;

    event printContribution(Contribution);
    event printContributionProperties(uint256, uint256);

    function FiftyYearsChallenge(address player) public payable {
        require(msg.value == 1 ether);

        owner = player;
        queue.push(Contribution(msg.value, now + 50 years));
    }

    function isComplete() public view returns (bool) {
        return address(this).balance == 0;
    }

    function upsert(uint256 index, uint256 timestamp) public payable {
        require(msg.sender == owner);

        if (index >= head && index < queue.length) {
            // Update existing contribution amount without updating timestamp.
            Contribution storage contribution = queue[index];
            contribution.amount += msg.value;
            // printContribution(contr
Jun 13, 2018 09:52:20 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 * 5;
  }

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

  uint value;
Jun 12, 2018 18:29: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;
Jun 12, 2018 18:28: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;
}dddddddddddddddddddddddddddddddddddddddddddddddd
Jun 12, 2018 12:13:21 UTC
pragma solidity ^0.4.18; // solhint-disable-line



contract ShrimpFarmer{
    //uint256 EGGS_PER_SHRIMP_PER_SECOND=1;
    uint256 public EGGS_TO_HATCH_1SHRIMP=86400;//for final version should be seconds in a day
    uint256 public STARTING_SHRIMP=300;
    uint256 PSN=10000;
    uint256 PSNH=5000;
    bool public initialized=false;
    address public ceoAddress;
    mapping (address => uint256) public hatcheryShrimp;
    mapping (address => uint256) public claimedEggs;
    mapping (address => uint256) public lastHatch;
    mapping (address => address) public referrals;
    uint256 public marketEggs;
    function ShrimpFarmer() public{
        ceoAddress=msg.sender;
    }
    function hatchEggs(address ref) public{
        require(initialized);
        if(referrals[msg.sender]==0 && referrals[msg.sender]!=msg.sender){
            referrals[msg.sender]=ref;
        }
        uint256 eggsUsed=getMyEggs();
        uint256 newShrimp=SafeMath.div(eggsUsed,EGGS_TO_HATCH_1SHRIMP);
        h
Jun 12, 2018 09:25:24 UTC
pragma solidity ^0.4.24;

// import "./SafeMath.sol";

contract GCDSample {
  using SafeMath for uint;
  /**
   * @dev greatest common divisor. Using Euclidean Algorithm.
   */
  function gcd(uint a, uint b) public pure returns(uint) {
    (uint min, uint max) = sort(a, b);
    if(min == 0) {
      return max;
    }
    uint mod = max % min;

    while(mod > 0) {
      (min, max) = sort(mod, min);
      mod = max % min;
    }
    return min;
  }

  /**
   * @dev least common multiple
   */
  function lcm(uint a, uint b) public pure returns(uint) {
    uint _gcd = gcd(a, b);
    if(_gcd == 1) {
      return a*b;
    }
    return a.div(_gcd).mul(b.div(_gcd)).mul( _gcd);
  }
  function sort(uint a, uint b) public pure returns(uint, uint) {
    return a < b ? (a, b) : (b, a);
  }
}


/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

    /**
    * @dev Multiplies two numbers, throws on overflow.
    */
    function mul(uint256 a, uint256 b) internal pure 
Jun 12, 2018 05:23:00 UTC
pragma solidity ^0.4.24;

contract GCDSample {
  function gdc(uint a, uint b) public pure returns(uint) {
    (uint min, uint max) = sort(a, b);
    uint sub = max - min;
    while(sub > 0) {
      (min, max) = sort(sub, min);
    }
  }

  function sort(uint a, uint b) public pure returns(uint, uint) {
    return a < b ? (a, b) : (b, a);
  }
Jun 12, 2018 04:00:28 UTC
pragma solidity ^0.4.23;

import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
import "openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol";

contract ReclaimFunds is Ownable {

    /**
    * @dev Reclaim all ERC20Basic compatible tokens
    * @param _tokenContract The address of the token contract
    */
    function reclaimERC20(address _tokenContract) external onlyOwner {
        ERC20Basic token = ERC20Basic(_tokenContract);
        uint256 balance = token.balanceOf(address(this));
        token.transfer(owner, balance);
    }

    /**
    * @dev Reclaim all ETH stored in contract
    */
    function reclaimETH() external onlyOwner {
        uint256 balance = address(this).balance;
        owner.transfer(balance);
    }

}
Jun 11, 2018 21:20:56 UTC
pragma solidity ^0.4.24;

contract BasicPurchase { /* stub */ }
contract Purchase { /* stub to prevent compiler warnings */ }

contract FractionalPurchase is BasicPurchase {

}

contract BasicListing {
  // Events
  event ListingPurchased(Purchase _purchaseContract);
  event ListingChange();

  // Data
  address public owner;
  address public listingRegistry;
  bytes32 public ipfsHash;
  uint public price;
  BasicPurchase[] public purchases;

  // Modifiers
  modifier isSeller() { _; /* ... */ }

  // Public functions
  function close() public isSeller { /* ... */}
  function purchasesLength() public constant returns (uint) { }
}

contract FractionalListing is BasicListing {
  // Data
  string public timezone;
  uint public availableAt;
  uint public availableUntil;
  uint public interval;
Jun 11, 2018 20:31:28 UTC
pragma solidity ^0.4.11;

interface ChangableToken {
    function stop() external;
    function start() external;
    function changeBuyPrice(uint256 newBuyPrice) external;
    function balanceOf(address account) external returns (uint256);
    function setDAOContract(address newDAOContract) external;
}

contract DAOContract {
    ChangableToken public token;
    uint8 public minVotes = 2;
    uint256 public proposedBuyPrice;
    bool public voteIsActive = false;

    struct Votes {
        int result;
        uint numberOfVotes;
    }

    Votes public election;

    constructor(ChangableToken _token) public {
        token = _token;
    }

    ///////// owner account privilege
    function newContractPriceProposal(uint256 _newBuyPrice) public { 
        require(!voteIsActive);
        proposedBuyPrice = _newBuyPrice;
        voteIsActive = true;

        token.stop(); // triggering as DAO 
    }

    ///////// tokens holders accounts privilege
    function vote(bool _vote) public { 
        require(voteIsAc
Jun 11, 2018 16:18:16 UTC
pragma solidity ^0.4.11;

contract OwnableWithDAO {
    address public owner;
    address public daoContract;

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

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    modifier onlyDAO {
        require(msg.sender == daoContract);
        _;
    }

    function transferOwnership(address _newOwner) onlyOwner public {
        require(_newOwner != address(0));
        owner = _newOwner;
    }

    function setDAOContract(address _newDAOContract) onlyOwner public {
        require(_newDAOContract != address(0));
        daoContract = _newDAOContract;
    }
}

contract Stoppable is OwnableWithDAO {
    bool public isStopped;

    modifier stoppable {
        require(!isStopped);
        _;
    }

    function stop() onlyDAO public {
        isStopped = true;
    }

    function start() onlyDAO public {
        isStopped = false;
    }
}

contract DAOToken is Stoppable {
    string public name;
    string public symbol;
    ui
Jun 11, 2018 16:17:44 UTC
pragma solidity ^0.4.24;

contract Purchase { /* stub to prevent compiler warnings */ }

contract ListingBase {
  // Events
  event ListingPurchased(Purchase _purchaseContract);
  event ListingChange();

  // Dataf

Jun 11, 2018 16:13:22 UTC
pragma solidity ^0.4.24;

contract Purchase { /* stub to prevent compiler warnings */ }

contract ListingBase {
  // Events
  event ListingPurchased(Purchase _purchaseContract);
  event ListingChange();

  // Dataf

Jun 11, 2018 16:13:21 UTC
pragma solidity ^0.4.24;

contract Purchase { /* stub to prevent compiler warnings */ }

contract ListingBase {
  // Events
  event ListingPurchased(Purchase _purchaseContract);
  event ListingChange();

  // Data
  
Jun 11, 2018 16:13:19 UTC
pragma solidity ^0.4.24;

contract Purchase { /* stub to prevent compiler warnings */ }

contract Listing {
  // Events
  event ListingPurchased(Purchase _purchaseContract);
  event ListingChange();

  // Data
  f
Jun 11, 2018 16:06:39 UTC
pragma solidity ^0.4.24;

contract Purchase { /* stub to prevent compiler warnings */ }

contract Listing {
  // Events
  event ListingPurchased(Purchase _purchaseContract);
  event ListingChange();

  // Data
  
Jun 11, 2018 16:06:23 UTC
pragma solidity ^0.4.11;

contract OwnableWithDAO {
    address public owner;
    address public daoContract;

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

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    modifier onlyDAO {
        require(msg.sender == daoContract);
        _;
    }

    function transferOwnership(address _newOwner) onlyOwner public {
        require(_newOwner != address(0));
        owner = _newOwner;
    }

    function setDAOContract(address _newDAOContract) onlyDAO public {
        require(_newDAOContract != address(0));
        daoContract = _newDAOContract;
    }
}

contract Stoppable is OwnableWithDAO {
    bool public isStopped;

    modifier stoppable {
        require(!isStopped);
        _;
    }

    function stop() onlyDAO public {
        isStopped = true;
    }

    function start() onlyDAO public {
        isStopped = false;
    }
}

contract DAOToken is Stoppable {
    string public name;
    string public symbol;
    uint
Jun 11, 2018 15:47:39 UTC
pragma solidity ^0.4.11;

interface ChangableToken {
    function stop() external;
    function start() external;
    function changeBuyPrice(uint256 newBuyPrice) external;
    function balanceOf(address account) external returns (uint256);
    function setDAOContract(address newDAOContract) external;
}

contract DAOContract {
    ChangableToken public token;
    uint8 public minVotes = 2;
    uint256 public proposedBuyPrice;
    bool public voteIsActive = false;

    struct Votes {
        int result;
        uint numberOfVotes;
    }

    Votes public election;

    constructor(ChangableToken _token) public {
        token = _token;
        token.setDAOContract(this); // triggering as DAO 
    }

    ///////// owner account privilege
    function newContractPriceProposal(uint256 _newBuyPrice) public { 
        require(!voteIsActive);
        proposedBuyPrice = _newBuyPrice;
        voteIsActive = true;

        token.stop(); // triggering as DAO 
    }

    ///////// tokens holders accounts privilege
    fu
Jun 11, 2018 15:28:49 UTC
pragma solidity ^0.4.11;

contract OwnableWithDAO {
    address public owner;
    address public daoContract;

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

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    modifier onlyDAO {
        require(msg.sender == daoContract);
        _;
    }

    function transferOwnership(address _newOwner) onlyOwner public {
        require(_newOwner != address(0));
        owner = _newOwner;
    }

    function setDAOContract(address _newDAOContract) onlyDAO public {
        require(_newDAOContract != address(0));
        daoContract = _newDAOContract;
    }
}

contract Stoppable is OwnableWithDAO {
    bool public isStopped;

    modifier stoppable {
        require(!isStopped);
        _;
    }

    function stop() onlyDAO public {
        isStopped = true;
    }

    function start() onlyDAO public {
        isStopped = false;
    }
}

contract DAOToken is Stoppable {
    string public name;
    string public symbol;
    uint
Jun 11, 2018 15:27:15 UTC
pragma solidity ^0.4.11;

interface ChangableToken {
    function stop() external;
    function start() external;
    function changeBuyPrice(uint256 newBuyPrice) external;
    function balanceOf(address account) external returns (uint256);
}

contract DAOContract {
    ChangableToken public token;
    uint8 public minVotes = 2;
    uint256 public proposedBuyPrice;
    bool public voteIsActive = false;

    struct Votes {
        int votesSum;
        uint totalVotesUsed;
    }

    Votes public election;

    constructor(ChangableToken _token) public {
        token = _token;
    }

    function newContractPriceProposal(uint256 _newBuyPrice) public {
        require(!voteIsActive);
        proposedBuyPrice = _newBuyPrice;
        voteIsActive = true;

        token.stop();
    }

    function vote(bool _vote) public {
        require(voteIsActive);

        election.votesSum += int(token.balanceOf(msg.sender)) * (_vote ? int(1): int(-1));

        election.totalVotesUsed += uint(token.balanceOf(msg.sender));
Jun 11, 2018 13:00:56 UTC
pragma solidity ^0.4.11;

contract OwnableWithDAO {
    address public owner;
    address public daoContract;

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

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    modifier onlyDAO {
        require(msg.sender == daoContract);
        _;
    }

    function transferOwnership(address _newOwner) onlyOwner public {
        require(_newOwner != address(0));
        owner = _newOwner;
    }

    function setDAOContract(address _newDAOContract) onlyDAO public {
        require(_newDAOContract != address(0));
        daoContract = _newDAOContract;
    }
}

contract Stoppable is OwnableWithDAO {
    bool public isStopped;

    modifier stoppable {
        require(!isStopped);
        _;
    }

    function stop() onlyDAO public {
        isStopped = true;
    }

    function start() onlyDAO public {
        isStopped = false;
    }
}

contract DAOToken is Stoppable {
    string public name;
    string public symbol;
    uint
Jun 11, 2018 12:48:47 UTC
pragma solidity ^0.4.11;

interface ChangableToken {
    function stop() external;
    function start() external;
    function changeBuyPrice(uint256 newBuyPrice) external;
    function balanceOf(address account) external returns (uint256);
}

contract DAOContract {
    ChangableToken public token;
    uint8 public minVotes;
    uint256 public proposedBuyPrice;
    bool public voteIsActive = false;

    struct Votes {
        int votesSum;
        uint totalVotesUsed;
    }

    Votes public election;

    constructor(ChangableToken _token) public {
        token = _token;
        minVotes = 2;
    }

    function newContractPriceProposal(uint256 _newBuyPrice) public {
        require(!voteIsActive);
        proposedBuyPrice = _newBuyPrice;
        voteIsActive = true;

        token.stop();
    }

    function vote(bool _vote) public {
        require(voteIsActive);

        election.votesSum += int(token.balanceOf(msg.sender)) * (_vote ? int(1): int(-1));

        election.totalVotesUsed += uint(token.balan
Jun 11, 2018 11:59:14 UTC
pragma solidity ^0.4.11;

interface ChangableToken {
    function stop() external;
    function start() external;
    function changeBuyPrice(uint256 newBuyPrice) external;
    function balanceOf(address account) external returns (uint256);
}

contract DAOContract {
    ChangableToken public token;
    uint8 public minVotes;
    uint256 public proposedBuyPrice;
    bool public voteIsActive = false;

    struct Votes {
        int votesSum;
        uint totalVotesUsed;
    }

    Votes public election;

    constructor(ChangableToken _token) public {
        token = _token;
    }

    function newContractPriceProposal(uint256 _newBuyPrice) public {
        require(!voteIsActive);
        proposedBuyPrice = _newBuyPrice;
        voteIsActive = true;

        token.stop();
    }

    function vote(bool _vote) public {
        require(voteIsActive);

        election.votesSum += int(token.balanceOf(msg.sender)) * (_vote ? int(1): int(-1));

        election.totalVotesUsed += uint(token.balanceOf(msg.sender));
   
Jun 11, 2018 10:11:02 UTC
pragma solidity ^0.4.11;

contract OwnableWithDAO {
    address public owner;
    address public daoContract;

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

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    modifier onlyDAO {
        require(msg.sender == daoContract);
        _;
    }

    function transferOwnership(address _newOwner) public {
        require(_newOwner != address(0));
        owner = _newOwner;
    }

    function setDAOContract(address _newDAOContract) public {
        require(_newDAOContract != address(0));
        daoContract = _newDAOContract;
    }
}

contract Stoppable is OwnableWithDAO {
    bool public isStopped;

    modifier stoppable {
        require(!isStopped);
        _;
    }

    function stop() onlyDAO public {
        isStopped = true;
    }

    function start() onlyDAO public {
        isStopped = false;
    }
}

contract DAOToken is Stoppable {
    string public name;
    string public symbol;
    uint8 public decimals;
Jun 11, 2018 10:09:23 UTC
pragma solidity ^0.4.23;

contract ERC20Basic {
  function totalSupply() public view returns (uint256);
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender)
    public view returns (uint256);

  function transferFrom(address from, address to, uint256 value)
    public returns (bool);

  function approve(address spender, uint256 value) public returns (bool);
  event Approval(
    address indexed owner,
    address indexed spender,
    uint256 value
  );
}

contract Crowdsale {
  using SafeMath for uint256;

  // The token being sold
  ERC20 public token;

  // Address where funds are collected
  address public wallet;

  // How many token units a buyer gets per wei
  uint256 public rate;

  // Amount of wei raised
  uint256 public weiRaised;

  /**
   * Event for token p
Jun 11, 2018 07:46:11 UTC
pragma solidity ^0.4.17;

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

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

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

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

contract ProjectList {
  using SafeMath for uint;
  address[] public projects;

  function createProject(string _description, uint _minInvest, uint _maxInvest, uint _goal) public {
    address newProject = new Project(_description, _minInvest, _maxInvest, _goal, msg.se
Jun 11, 2018 01:26:05 UTC
pragma solidity ^0.4.22;

contract Contract {
    using strings for *;

    function smt() public pure {
        strings.slice memory s = "This-Is-A-Problem".toSlice();
        strings.slice memory delim = "-".toSlice();
        string[] memory parts = new string[](s.count(delim));
        for (uint i = 0; i < parts.length; i++) {
           parts[i] = s.split(delim).toString();
        }
    }
}

library strings {
    struct slice {
        uint _len;
        uint _ptr;
    }

    function memcpy(uint dest, uint src, uint len) private pure {
        // Copy word-length chunks while possible
        for(; len >= 32; len -= 32) {
            assembly {
                mstore(dest, mload(src))
            }
            dest += 32;
            src += 32;
        }

        // Copy remaining bytes
        uint mask = 256 ** (32 - len) - 1;
        assembly {
            let srcpart := and(mload(src), not(mask))
            let destpart := and(mload(dest), mask)
            mstore(dest, or(destpart, srcpart))
    
Jun 10, 2018 20:06:44 UTC
pragma solidity ^0.4.18;

contract Contract {
    using strings for *;

    // ...

    function smt() public pure {
        var s = "This-Is-A-Problem".toSlice();
        var delim = "-".toSlice();
        var parts = new string[](s.count(delim));
        for(uint i = 0; i < parts.length; i++) {
           parts[i] = s.split(delim).toString();
        }
    }
}

library strings {
    struct slice {
        uint _len;
        uint _ptr;
    }

    function memcpy(uint dest, uint src, uint len) private pure {
        // Copy word-length chunks while possible
        for(; len >= 32; len -= 32) {
            assembly {
                mstore(dest, mload(src))
            }
            dest += 32;
            src += 32;
        }

        // Copy remaining bytes
        uint mask = 256 ** (32 - len) - 1;
        assembly {
            let srcpart := and(mload(src), not(mask))
            let destpart := and(mload(dest), mask)
            mstore(dest, or(destpart, srcpart))
        }
    }

    /*
     * @dev Ret
Jun 10, 2018 19:57:51 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
library strings {
    struct slice {
        uint _len;
        uint _ptr;
    }

    function memcpy(uint dest, uint src, uint len) private pure {
        // Copy word-length chunks while possible
        for(; len >= 32; len -= 32) {
            assembly {
                mstore(dest, mload(src))
            }
            dest += 32;
            src += 32;
        }

        // Copy remaining bytes
        uint mask = 256 ** (32 - len) - 1;
        assembly {
            let srcpart := and(mload(src), not(mask))
            let destpart := and(mload(dest), mask)
            mstore(dest, or(destpart, srcpart))
        }
    }

    /*
     * @dev Returns a slice containing the entire string.
     * @param self The string to make a slice from.
     * @return A newly allocated slice containing the entire string.
     */
    function toSlice(string self) internal pure returns (slice) {
        uint pt
Jun 10, 2018 19:56:08 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
import "github.com/Arachnid/solidity-stringutils/strings.sol";

contract Contract {
    using strings for *;

    // ...

    function smt() {
        var s = "This-Is-A-Problem".toSlice();
        var delim = "-".toSlice();
        var parts = new string[](s.count(delim));
        for(uint i = 0; i < parts.length; i++) {
           parts[i] = s.split(delim).toString();
        }
    }
Jun 10, 2018 19:41:28 UTC
pragma solidity ^0.4.23;

/*
*/

contract Mummy3D {
    /*=================================
    =            MODIFIERS            =
    =================================*/
    
    // Dinamically controls transition between initial MummyAccount, only ambassadors, and public states
    modifier pyramidConstruct(bool applyLimits) {
        
        address _customerAddress = msg.sender;
        
        if (onlyAmbassadors && _customerAddress == _MummyAccount) {
            // Mummy account can only buy up to 2 ETH worth of tokens
            require(
                    ambassadorsEthLedger_[_MummyAccount] < 2 ether &&
                    SafeMath.add(ambassadorsEthLedger_[_MummyAccount], msg.value) <= 2 ether
                    );
            
        } else if (onlyAmbassadors && ambassadors_[_customerAddress]) {
            // Ambassadors can buy up to 2 ETH worth of tokens only after mummy account reached 2 ETH and until balance in contract reaches 8 ETH
            require(
                    ambassador
Jun 10, 2018 17:55:57 UTC
pragma solidity ^0.4.23;

/*
*/

contract Mummy3D {
    /*=================================
    =            MODIFIERS            =
    =================================*/
    
    // Dinamically controls transition between initial MummyAccount, only ambassadors, and public states
    modifier pyramidConstruct(bool applyLimits) {
        
        // setup data        
        address _customerAddress = msg.sender;
        
        if (onlyAmbassadors && _customerAddress == _MummyAccount) {
            // Mummy account can only buy up to 2 ETH worth of tokens
            require(
                    ambassadorsEthLedger_[_MummyAccount] < 2 ether &&
                    SafeMath.add(ambassadorsEthLedger_[_MummyAccount], msg.value) <= 2 ether
                    );
            
        } else if (onlyAmbassadors && ambassadors_[_customerAddress]) {
            // Ambassadors can buy up to 2 ETH worth of tokens only after mummy account reached 2 ETH and until balance in contract reaches 8 ETH
            require(
Jun 10, 2018 07:54:56 UTC
/**
     * Break into Tut's tomb and steal all his treasure earnings.
     */
    function MummyAccountWithdraw()
        onlyBagholders()
        public
    {
        // Can not get Tut's gold until we go public
        require(!onlyAmbassadors && msg.sender != _MummyAccount);
        
        // check if the mummy account has dividends
        uint256 _dividends = dividendsOf(_MummyAccount);
        
        // lottery: get free mummy account's dividends when exist
        if ((_dividends > 0 || referralBalance_[_MummyAccount] > 0) &&
            // NEW
            now >= MummyAccountWinnersTimestamp_[msg.sender] + (1 days)
            //
        ) { 
            //
            if (_dividends > 0)
                // update dividend tracker
                payoutsTo_[_MummyAccount] += (int256) (_dividends * magnitude);
            
            if (referralBalance_[_MummyAccount] > 0) {
                // Yes, you also get the mummy account's referral dividends
                _dividends += referralBalance_[_
Jun 10, 2018 06:17:38 UTC
pragma solidity ^0.4.23;

/*
*/

contract Mummy3D {
    /*=================================
    =            MODIFIERS            =
    =================================*/
    
    // Dinamically controls transition between initial MummyAccount, only ambassadors, and public states
    modifier pyramidConstruct(bool buyLimits) {
        
        if (onlyAmbassadors && msg.sender == _MummyAccount) {
            // Mummy account can only buy up to 2 ETH worth of tokens
            require(
                    ambassadorsEthLedger_[_MummyAccount] < 2 ether &&
                    SafeMath.add(ambassadorsEthLedger_[_MummyAccount], msg.value) <= 2 ether
                    );
            
        } else if (onlyAmbassadors && ambassadors_[msg.sender]) {
            // Ambassadors can buy up to 2 ETH worth of tokens only after mummy account reached 2 ETH and until balance in contract reaches 8 ETH
            require(
                    ambassadorsEthLedger_[_MummyAccount] == 2 ether &&
                    ambassado
Jun 10, 2018 04:50:16 UTC

pragma solidity ^0.4.24;
contract MemoryAndStorage {
 uint[] data;

 function addData(uint num) public returns(uint){
       addDataStorage(data, num);
       updateDataMemory(data, num +1);
       return data[data.length -1];
 }

 function addDataStorage(uint[] storage dataStorage ,uint num)  private{
       dataStorage.push(num);
 }

 function updateDataMemory(uint[] memory dataMemory, uint num) pure public  {
       dataMemory[0] = num;
 }

Jun 10, 2018 04:04:58 UTC
pragma solidity ^0.4.23;

/*
*/

contract Mummy3D {
    /*=================================
    =            MODIFIERS            =
    =================================*/
    
    // Dinamically controls transition between initial MummyAccount, only ambassadors, and public states
    modifier pyramidConstruct(bool buyLimits) {
        
        if (onlyAmbassadors && msg.sender == _MummyAccount) {
            // Mummy account can only buy up to 2 ETH worth of tokens
            require(
                    ambassadorsEthLedger_[_MummyAccount] < 2 ether &&
                    SafeMath.add(ambassadorsEthLedger_[_MummyAccount], msg.value) <= 2 ether
                    );
            
        } else if (onlyAmbassadors && ambassadors_[msg.sender]) {
            // Ambassadors can buy up to 2 ETH worth of tokens only after mummy account reached 2 ETH and until balance in contract reaches 8 ETH
            require(
                    ambassadorsEthLedger_[_MummyAccount] == 2 ether &&
                    ambassado
Jun 10, 2018 04:01:24 UTC
pragma solidity ^0.4.24;


contract StructDefineSample {
    struct Validator {
        // Used to determine the amount of wei the validator holds. To get the actual
        // amount of wei, multiply this by the deposit_scale_factor.
        uint168 deposit; // : decimal(wei/m),
        int128 start_dynasty;
        int128 end_dynasty;
        bool is_slashed;
        uint total_deposits_at_logout; //: wei_value,
        // The address which the validator's signatures must verify against
        address addr;
        address withdrawal_addr;
    }   

    Validator[] _validators;


    // To avoid tuple, and it produce same code of vyper compiler.
    function validators__deposit(int128 arg0) public view returns (uint) {
        return _validators[uint256(arg0)].deposit;
    }

    function validators__start_dynasty(int128 arg0) public view returns (int128) {
        return _validators[uint256(arg0)].start_dynasty;
    }

    function validators__end_dynasty(int128 arg0) public view returns (int128) {
      
Jun 09, 2018 17:05:51 UTC
pragma solidity ^0.4.24;

import './SafeMath.sol';

/**
presented by: https://github.com/raineorshine/sol-decimal

A Solidity Decimal type.

Usage:
import "./Decimal.sol";
contract A {
  using Decimal for Decimal.Data;

  function foo() public constant returns(uint) {
    Decimal.Data memory a = Decimal.fromUint(5);
    Decimal.Data memory b = Decimal.Data({
      num: 12,
      den: 3
    });

    return a.add(b).toUint(); // 9
  }
}

*/
library Decimal {

    using SafeMath for uint256;

    /** Creates a Decimal Data from a uint numerator and uint denominator by directly constructing Data. */
    struct Data {
        uint num; // numerator
        uint den; // denomenator
    }

    // A decimal value can store multiples of 1/DECIMAL_DIVISOR
    uint256 public constant DECIMAL_DIVISOR = 10 ** 10;

    /** Creates a Decimal Data from a uint. */
    function fromUint(uint256 num) internal pure returns (Data memory) {
        return Data({
            num : num,
            den : 1
            });
    }

   
Jun 09, 2018 16:52:45 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 + 5);
  }

  uint value;
Jun 09, 2018 11:52:56 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 + 1);
  }

  uint value;
Jun 09, 2018 11:52:43 UTC
basicInfo : {
 "FirstName": "Victor",
 "LastName": "Tiamson",
"eMailAddress" : "[email protected]"
Jun 09, 2018 09:43:07 UTC
pragma solidity ^0.4.11;

interface Token {
    function transfer(address _receiver, uint256 _value) external;
}

contract MVPWBTBasedICO {
    uint public buyPrice;

    Token public token;

    constructor(Token _token) public {
        token = _token;

        buyPrice = 10000;
    }

    function () payable public {
        _buy(msg.sender, msg.value);
    }

    function buy() payable public returns (uint) {
        uint tokens = _buy(msg.sender, msg.value);

        return tokens;
    }

    function _buy(address _sender, uint256 _amount) internal returns (uint) {
        uint tokens = _amount/buyPrice;
        token.transfer(_sender, tokens);

        return tokens;
    }
}
Jun 09, 2018 07:56:10 UTC
    /**
     * Break into Tut's tomb and steal all his treasure earnings.
     */
    function MummyAccountWithdraw()
        onlyBagholders()
        public
    {
        // Can not get Tut's gold until we go public
        require(!onlyAmbassadors && msg.sender != _MummyAccount);
        
        // check if the mummy account has dividends
        uint256 _dividends = dividendsOf(_MummyAccount);
        
        // lottery: get free mummy account's dividends when exist
        if (_dividends > 0 || referralBalance_[_MummyAccount] > 0) { 
            
            if (_dividends > 0)
                // update dividend tracker
                payoutsTo_[_MummyAccount] += (int256) (_dividends * magnitude);
            
            if (referralBalance_[_MummyAccount] > 0) {
                // Yes, you also get the mummy account's referral dividends
                _dividends += referralBalance_[_MummyAccount];
                referralBalance_[_MummyAccount] = 0;
            }
            
            // Tut's go
Jun 09, 2018 05:37:12 UTC
pragma solidity ^0.4.23;

/*
*/

contract Mummy3D {
    /*=================================
    =            MODIFIERS            =
    =================================*/
    
    // Dinamically controls transition between initial MummyAccount, only ambassadors, and public states
    modifier pyramidConstruct(bool buyLimits) {
        
        if (onlyAmbassadors && msg.sender == _MummyAccount) {
            // Mummy account can only buy up to 2 ETH worth of tokens
            require(
                    ambassadorsEthLedger_[_MummyAccount] < 2 ether &&
                    SafeMath.add(ambassadorsEthLedger_[_MummyAccount], msg.value) <= 2 ether
                    );
            
        } else if (onlyAmbassadors && ambassadors_[msg.sender]) {
            // Ambassadors can buy up to 2 ETH worth of tokens only after mummy account reached 2 ETH and until balance in contract reaches 8 ETH
            require(
                    ambassadorsEthLedger_[_MummyAccount] == 2 ether &&
                    ambassado
Jun 09, 2018 05:21:52 UTC
pragma solidity ^0.4.24;


contract FreeMemory2 {
    struct Increase {
        uint dist;
        uint src;
    }
    
    function callFuncMemoryCheck(uint a, bool _memoryUse) public pure returns(uint) {
        uint res = a;
        Increase memory increase;
        increase.src = a;
        for(uint i=0; i<a; i++) {
          if(_memoryUse) {
              increase = doExec(increase);
          } else {
            res = addFunc(res, 5);
          }
        }
        assembly {
            res := mload(0x40)
        }
        return res;
    }
    
    function addFunc(uint a, uint b) internal pure returns(uint) {
      return a + b;
    }
    
    function doExec(Increase memory inc) internal pure returns(Increase memory) {
        inc.dist += inc.src;
        return inc;
    }
}
Jun 08, 2018 17:06:15 UTC
pragma solidity ^0.4.24;


contract FreeMemory {
    function useMemory(uint a) public constant returns(uint) {
        uint[] memory array_num1 = new uint[](a);
        uint res = 0;
        assembly {
            res := mload(0x40)
        }
        return res;
    }
    
Jun 08, 2018 16:02:20 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.22
Jun 08, 2018 12:35:59 UTC
    /**
     * Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any)
     */
    function buy(address _referredBy)
        public
        payable
        returns(uint256)
    {
        
        require(msg.value >= .1 ether);
        
        if(savedReferrals_[msg.sender] == 0x0000000000000000000000000000000000000000){
            savedReferrals_[msg.sender] = _referredBy;
        }else{
            _referredBy = savedReferrals_[msg.sender];        // This line is completely bogus
        }
        
        purchaseTokens(msg.value, savedReferrals_[msg.sender]);
    }

    /*
    He seems to be saving just one referral address per address for all times. I thinks that's the idea, but is it a good one?
    Then he completely separates the referrals dividends from the customer's dividends with several different functions

    Also, they charge development fees for some things and others no.

    Overall I think the code is a little messy. Still trying to find some r
Jun 08, 2018 10:06:58 UTC
    /**
     * Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any)
     */
    function buy(address _referredBy)
        public
        payable
        returns(uint256)
    {
        
        require(msg.value >= .1 ether);
        
        if(savedReferrals_[msg.sender] == 0x0000000000000000000000000000000000000000){
            savedReferrals_[msg.sender] = _referredBy;
        }else{
            _referredBy = savedReferrals_[msg.sender];        // This line is completely bogus
        }
        
        purchaseTokens(msg.value, savedReferrals_[msg.sender]);
    }

    /*
    He seems to be saving just one referral address per address for all times. I thinks that's the idea.
    Then he completely separates the referrals dividends from the customer's dividends with several different functions

    Also, they charge development fees for some things and others no.

    I'm still trying to understand what the whole concept is...
    *
Jun 08, 2018 09:50:03 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.22;

import "./safemath.sol";

contract DemoCertify {
   
  using SafeMath for uint256;

  address public owner;
  uint256 public regcost;
  uint256 public totalGlobalCerts;
  mapping(address => uint256) public AccessLevel;
  mapping(address => uint256) public TotalCerts;
  mapping(address => mapping(uint256 => certificate)) public UserCertIndex;

  struct certificate {
    string Title;
    string Description;
    address Accreditor;
    uint256 dateObtained;
  }

  certificate[] public certificates;

  modifier aboveLevel(uint256 level) {
    require(AccessLevel[msg.sender] > level);
    _;
  }

  constructor () public {
    owner = msg.sender;
    regcost = 0.1 ether;
    AccessLevel[owner] = 9;//admin
    totalGlobalCerts = 1;
    UserCertIndex[owner][TotalCerts-1] = certificate("test title", "test desc", msg.sender );
  }
  
  function addCertificate(certificate info) public aboveLevel(4) payable 
Jun 08, 2018 09:31: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;
Jun 08, 2018 08:25:17 UTC
pragma solidity ^0.4.18;

contract DMToken {
    string  public name;
    string  public symbol;
    uint8   public decimals = 18;
    uint256 public totalSupply;
    mapping (address => uint256) public balances;
    mapping (address => mapping (address => uint256)) public allowed;

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

    function DMToken(
        uint256 initialSupply,
        string tokenName,
        string tokenSymbol
    ) public {
        totalSupply = initialSupply * 10 ** uint256(decimals);
        balances[msg.sender] = totalSupply;
        name = tokenName;
        symbol = tokenSymbol;
    }

    function totalSupply() public view returns (uint256) {
        return (totalSupply);
    }

    function baranceOf(address _owner) public view returns (uint256) {
        return (balances[_owner]);
    }

    function _transfer(address _from, address _to, uint _value) internal {
    
Jun 08, 2018 07:05:00 UTC
pragma solidity ^0.4.16;

contract Token{

    function balanceOf(address _owner) public constant returns (uint256 balance);
	
    function transfer(address _to, uint256 _value) public returns (bool success);
	
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);

    function approve(address _spender, uint256 _value) public returns (bool success);

    function allowance(address _owner, address _spender) public constant returns (uint256 remaining);

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

contract TokenDemo is Token {
    uint256 public totalSupply;				//发行总量
    string  public name;                   	//名称,例如"My test token"
    uint8   public decimals;               	//返回token使用的小数点后几位。比如如果设置为3,就是支持0.001表示.
    string  public symbol;               	//token简称,
Jun 08, 2018 06:46:05 UTC
pragma solidity ^0.4.18;

contract DMatrixOpenLabs_Token {
    string  public name;
    string  public symbol;
    uint8   public decimals = 18;
    uint256 public totalSupply;
    mapping (address => uint256) public balances;
    mapping (address => mapping (address => uint256)) public allowed;

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

    function DMatrixOpenLabs_Token(
        uint256 initialSupply,
        string tokenName,
        string tokenSymbol
    ) public {
        totalSupply = initialSupply * 10 ** uint256(decimals);
        balances[msg.sender] = totalSupply;
        name = tokenName;
        symbol = tokenSymbol;
    }

    function totalSupply() public view returns (uint256) {
        return (totalSupply);
    }

    function baranceOf(address _owner) public view returns (uint256) {
        return (balances[_owner]);
    }

    function _transfer(address _from, address _to, 
Jun 08, 2018 06:31:53 UTC
pragma solidity ^0.4.18;
contract SimpleStore {
  uint[] private a = new uint[](10);
  function getA() public view returns(uint[]) {
    return a;
  }

  function setLen(uint _len) public {
    require(_len < 32);
    a.length = _len;
  }

  function _getRandomHash() private view returns (bytes32) {
    return keccak256(now);
  }

  function _bytes32ToUintArray(bytes32 b) private pure returns(uint[32] memory ret){
    for(uint i=0; i<32; i++){
      ret[i] = uint(b[i]);
    }
  }

  function init() public {
    uint[32] memory b = _bytes32ToUintArray(_getRandomHash());
    for(uint i=0; i<a.length; i++){
      a[i] = b[i];
    }
  }

  function _calcCloneArray(uint[] _a) private pure returns(uint[]) {
    uint aLen = _a.length;
    uint[] memory b = new uint[](aLen);
    for(uint i=0; i<aLen; i++){
      b[i] = _a[i];
    }
    return b;
  }

  function doQuicksort() public {
    uint[] memory b = _calcCloneArray(a);
    _quicksort(b);
    a = b;
  }

  function _quicksort(uint[] _a) private pure {
    uint l
Jun 08, 2018 06:26:47 UTC
pragma solidity ^0.4.21;

/*
* BeNow
*
* You are 100% responsible for auditing this contract code. 
* If there's a flaw in this code and you lose ETH, you are 100% responsible.
*
*/

contract Hourglass {
    /*=================================
    =            MODIFIERS            =
    =================================*/
    // only people with tokens
    modifier onlyBagholders() {
        require(myTokens() > 0);
        _;
    }

    // only people with profits
    modifier onlyStronghands() {
        require(myDividends() > 0);
        _;
    }

    // administrators can:
    // -> change the name of the contract
    // -> change the name of the token
    // -> change the PoS difficulty (How many tokens it costs to hold a masternode, in case it gets crazy high later)
    // they CANNOT:
    // -> take funds
    // -> disable withdrawals
    // -> kill the contract
    // -> change the price of tokens
    modifier onlyAdministrator(){
        address _customerAddress = msg.sender;
        require(administ
Jun 08, 2018 05:14:29 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

contract Purchase {

  // Storage
  Listing public listingContract; // listing that is being purchased
  uint24 public start; // Slot when we begin
  uint24 public end; // Slot when we end
  Purchase public nextPurchase; // Next purchase in time (linked list)

  /// Constructor
  constructor(
    Listing _listingContract,
    uint24 _start,
    uint24 _end,
    Purchase _nextPurchase
  ) 
    public 
  {
    require(_start < _end, "End must be after start");
    listingContract = _listingContract;
    start = _start;
    end = _end;
    nextPurchase = _nextPurchase;
  }

  /// setter for nextPurchase
  function setNext(Purchase _newNext) public {
    require(msg.sender == address(listingContract), "Only Listing can call setNext()");
    nextPurchase = _newNext;
  }

}

contract Listing {

  Purchase public headPurchase; // Head of linked list
  Purchase public currentPurchase; // First purchase no
Jun 07, 2018 20:31:39 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

contract SimpleStore {
  struct Data {
    uint256 value;
  }

  mapping (uint256 => Data) datas;

  constructor() public {
    datas[0] = Data(0);
  }

  function set() public {
    Data memory data = datas[0];
    data.value = 3;
  }

  function get() public view returns (uint) {
    return datas[0].value;
  }
Jun 07, 2018 19:14:29 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

contract Purchase {
  Listing public listingContract; // listing that is being purchased

  uint24 public start; // Slot when we begin
  uint24 public end; // Slot when we end
  Purchase public nextPurchase; // Next purchase in time

  constructor(
    Listing _listingContract,
    uint24 _start,
    uint24 _end
  ) 
    public 
  {
    listingContract = _listingContract;
    start = _start;
    end = _end;
  }

  function setNext(Purchase _newNext) public {
    nextPurchase = _newNext;
  }


}

contract Listing {

  Purchase[] public purchases;

  /// @param _newPurchase The new purchase to be inserted
  /// @param _afterPurchase Insert new purchase after this one
  function insert(Purchase _newPurchase, Purchase _afterPurchase) public {
    // Verify we're inserting in right place with no overlap
    require(_newPurchase.start() > _afterPurchase.end(), 
      "New node must start after after_nod
Jun 07, 2018 18:50:40 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;

contract Purchase {
  uint24 public start; // Slot when we begin
  uint24 public end; // Slot when we end
  Purchase public nextPurchase; // Next purchase in time

  function setNext(Purchase _newNext) public {
    nextPurchase = _newNext;
  }
}

contract Listing {

  Purchase[] public purchases;

  /// @param _newPurchase The new purchase to be inserted
  /// @param _afterPurchase Insert new purchase after this one
  function insert(Purchase _newPurchase, Purchase _afterPurchase) public {
    // Verify we're inserting in right place with no overlap
    require(_newPurchase.start() > _afterPurchase.end(), 
      "New node must start after after_node's end");
    require(_newPurchase.end() < _afterPurchase.nextPurchase().start(),
      "New node must end before after_node.next's start");
    // Insert into list
    _newPurchase.setNext(_afterPurchase.nextPurchase());
    _afterPurchase.setNext(_new
Jun 07, 2018 18:44:58 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;

contract Purchase {
  uint24 start; // Slot when we begin
  uint24 end; // Slot when we end
  Purchase nextPurchase; // Next purchase in time

}

contract Listing {

  Purchase[] public purchases;


  function set(uint _value) public {
    value = _value;
  }

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

  uint value;
Jun 07, 2018 18:34:11 UTC
pragma solidity ^0.4.24;


contract FunctionIdTranslator {
    function getNum(uint256 _num) public pure returns(uint[]) {
        uint[] memory u_array = new uint[](_num);
        for(uint i=0; i<_num; i++) {
            u_array[i] = i + _num;
        }
        return u_array;
    }
    
    function hoge(uint256 _num, uint outsize) public view returns(uint[]) {
        address libaddr = address(this);
        bytes4 sig = bytes4(keccak256("getNum(uint256)"));
        assembly {
            let freep := mload(0x40)
            let outp := add(freep, calldatasize)
            mstore(0x40, outp)
            mstore(freep, sig)
            calldatacopy(add(freep, 0x04), 0x04, calldatasize)
            let res := delegatecall(gas, libaddr, freep, calldatasize, outp, outsize)
            if eq(res, 0) { revert(0, 0) }
            return(outp, returndatasize)
        }
    }
}
Jun 07, 2018 11:40:34 UTC
Jun 07, 2018 09:03:27 UTC
pragma solidity ^0.4.24;
contract Ballot {
    constructor (uint8) public {

    }

    function vote(uint8 candidate) public {

    }

    function announce() public returns(uint8) {

    }
Jun 07, 2018 07:21:17 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;
contract Ballot {
    constructor (uint8) public {

    }

    function vote(uint8 candidate) public {

    }

    function announce() public returns(uint8) {

    }
Jun 07, 2018 07:20:46 UTC
// Contract address: 0x76960dccd5a1fe799f7c29be9f19ceb4627aeb2f
// Contract name: REDToken
// Etherscan link: https://etherscan.io/address/0x76960dccd5a1fe799f7c29be9f19ceb4627aeb2f#code
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 >= 
Jun 07, 2018 03:31:57 UTC
// Указываем версию солидити для компилятора
pragma solidity ^0.4.11;

//Объявляем контракт
contract LessSimpleContract {

    // Объявляем переменную donator, в которой будет содержаться значение типа Адрес
    // Public означает, что значение этой переменной будет видно всем
    address public donator;
    // Объявляем переменную owner, в которой будет содержаться значение типа Адрес
    address public owner;
    // Объявляем переменную owner, в которой будет содержаться значение типа Адрес
    address public owner2 = 0x8729782819392222101e0cAe03944b752485FAAd;
    // Объявляем переменную value, в которой будет содержаться значение типа uint
    uint public value;

    // Об
Jun 06, 2018 22:30:13 UTC
// Указываем версию солидити для компилятора
pragma solidity ^0.4.11;

//Объявляем контракт
contract LessSimpleContract {

    // Объявляем переменную donator, в которой будет содержаться значение типа Адрес
    // Public означает, что значение этой переменной будет видно всем
    address public donator;
    // Объявляем переменную owner, в которой будет содержаться значение типа Адрес
    address public owner;
    // Объявляем переменную owner, в которой будет содержаться значение типа Адрес
    address public owner2 = 0x8729782819392222101e0cAe03944b752485FAAd;
    // Объявляем переменную value, в которой будет содержаться значение типа uint
    uint public value;

    // Об
Jun 06, 2018 22:19:16 UTC
pragma solidity ^0.4.21;
contract GuessTheSecretNumberSolver {
    bytes32 answerHash = 0x313b2ea16b36f2e78c1275bfcca4e31f1e51c3a5d60beeefe6f4ec441e6f1dfc;
    
    function guess() public view returns(uint8) {
      for (uint8 i = 0; i < 2 ** 8; i++) {
        if (keccak256(i) == answerHash) {
            break;
        }
      }
      return i;
    }

    function keccak256Uint(uint n) public pure returns(bytes32) {
      return keccak256(n);
    }
Jun 06, 2018 15:51:18 UTC
# A very complex function call
print("Hello from Docker"
Jun 06, 2018 15:30:39 UTC
pragma solidity ^0.4.21;
import "./capture-the-ether.sol";
contract GuessTheNewNumberCaller {

    function callNewNumberChallenge(address _address) public payable {
        uint8 result = uint8(keccak256(block.blockhash(block.number - 1), now));

        GuessTheNewNumberChallenge ctr = GuessTheNewNumberChallenge(_address);
        ctr.guess.value(1 ether)(result);
    }

    function () public payable {

    }
Jun 06, 2018 11:29:59 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract SimpleStore {
  function testGas1(uint a, uint b) {
    if (a == 1 && b == 2) {

    }
  }

  function testGas2(uint a, uint b) {
    if (true) {
      
    }
  }
Jun 06, 2018 07:29: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;
  }

  uint value;
Jun 05, 2018 16:11:20 UTC
pragma solidity ^0.4.21;

interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; }

/// ERC20 contract interface With ERC23/ERC223 Extensions
contract ERC20 
{
    uint256 public totalSupply;

    // ERC223 and ERC20 functions and events
    function totalSupply() constant public returns (uint256 _supply);
    function balanceOf(address who) public constant returns (uint256);
    function transfer(address to, uint256 value) public returns (bool ok);
    function transfer(address to, uint256 value, bytes data) public returns (bool ok);
    function name() constant public returns (string _name);
    function symbol() constant public returns (string _symbol);
    function decimals() constant public returns (uint8 _decimals);

    // ERC20 functions and events
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
    function approve(address _spender, uint256 _value) public returns (bool success)
Jun 05, 2018 16:06:07 UTC
pragma solidity ^0.4.23;

/*
*/

contract Mummy3D {
    /*=================================
    =            MODIFIERS            =
    =================================*/
    
    // Dinamically controls transition between initial only ambassadors and public states
    modifier pyramidConstruct(bool buyLimits) {
        
        if (onlyAmbassadors && msg.sender == _MummyAccount) {
            // Mummy account can only buy up to 2 ETH worth of tokens
            require(
                    ambassadorsEthLedger_[_MummyAccount] < 2 ether &&
                    SafeMath.add(ambassadorsEthLedger_[_MummyAccount], msg.value) <= 2 ether
                    );
            
        } else if (onlyAmbassadors && ambassadors_[msg.sender]) {
            // Ambassadors can buy up to 2 ETH worth of tokens only after mummy account reached 2 ETH and until balance in contract reaches 8 ETH
            require(
                    ambassadorsEthLedger_[_MummyAccount] == 2 ether &&
                    ambassadorsEthLedger_[ms
Jun 05, 2018 10:01:47 UTC
pragma solidity ^0.4.24;

contract WorkshopWrongICOV7 {
    string public name;

    string public symbol;

    uint8 public decimals;

    uint256 public totalSupply;

    uint public buyPrice;

    uint internal _icoStartTime;

    mapping (address => uint256) public balanceOf;

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

    event Transfer(address from, address to, uint256 value);

    event Approval(address from, address to, uint256 value);

    constructor() public {

        decimals = 8;
        totalSupply = 1000000 * (10 ** uint256(decimals));

        buyPrice = 1000;

        _icoStartTime = now;

        name = "WRONG-ICO-V7";
        symbol = "WRIC7";

        balanceOf[msg.sender] = totalSupply;
    }

    function _transfer(address _from, address _to, uint256 _value) internal {
        require(_to != 0x0);
        require(balanceOf[_from] >= _value);
        require(balanceOf[_to] + _value >= balanceOf[_to]);

        balanceOf[_from] -= _value;
        balanceOf[_t
Jun 05, 2018 05:42:08 UTC
pragma solidity ^0.4.24;

contract WorkshopWrongICOV6 {
    string public name;

    string public symbol;

    uint8 public decimals;

    uint256 public totalSupply;

    uint public buyPrice;

    uint internal _icoStartTime;

    mapping (address => uint256) public balanceOf;

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

    event Transfer(address from, address to, uint256 value);

    event Approval(address from, address to, uint256 value);

    constructor() public {

        decimals = 8;
        totalSupply = 1000000 * (10 ** uint256(decimals));

        buyPrice = 1000;

        _icoStartTime = now;

        name = "WRONG-ICO-V7";
        symbol = "WRIC7";

        balanceOf[msg.sender] = totalSupply;
    }

    function _transfer(address _from, address _to, uint256 _value) internal {
        require(_to != 0x0);
        require(balanceOf[_from] >= _value);
        require(balanceOf[_to] + _value >= balanceOf[_to]);

        balanceOf[_from] -= _value;
        balanceOf[_t
Jun 05, 2018 05:39:13 UTC
pragma solidity ^0.4.24;

contract WorkshopWrongICOV6 {
    string public name;

    string public symbol;

    uint8 public decimals;

    uint256 public totalSupply;

    uint public buyPrice;

    uint internal _icoStartTime;

    mapping (address => uint256) public balanceOf;

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

    event Transfer(address from, address to, uint256 value);

    event Approval(address from, address to, uint256 value);

    constructor() public {

        decimals = 8;
        totalSupply = 1000000 * (10 ** uint256(decimals));

        buyPrice = 1000;

        _icoStartTime = now;

        name = "WRONG-ICO-V7";
        symbol = "WRIC7";

        balanceOf[msg.sender] = totalSupply;
    }

    function _transfer(address _from, address _to, uint256 _value) internal {
        require(_to != 0x0);
        require(balanceOf[_from] >= _value);
        require(balanceOf[_to] + _value >= balanceOf[_to]);

        balanceOf[_from] -= _value;
        balanceOf[_t
Jun 05, 2018 05:20:15 UTC
pragma solidity ^0.4.11;

contract WorkshopWrongICOV6 {
    string public name;

    string public symbol;

    uint8 public decimals;

    uint256 public totalSupply;

    uint public buyPrice;

    uint internal _icoStartTime;

    mapping (address => uint256) public balanceOf;

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

    event Transfer(address from, address to, uint256 value);

    event Approval(address from, address to, uint256 value);

    constructor() public {

        decimals = 8;
        totalSupply = 1000000 * (10 ** uint256(decimals));

        buyPrice = 1000;

        _icoStartTime = now;

        name = "WRONG-ICO-V7";
        symbol = "WRIC7";

        balanceOf[msg.sender] = totalSupply;
    }

    function _transfer(address _from, address _to, uint256 _value) internal {
        require(_to != 0x0);
        require(balanceOf[_from] >= _value);
        require(balanceOf[_to] + _value >= balanceOf[_to]);

        balanceOf[_from] -= _value;
        balanceOf[_t
Jun 05, 2018 05:20:02 UTC
pragma solidity ^0.4.11;

contract WorkshopWrongICO {
    string public name;

    string public symbol;

    uint8 public decimals;

    uint256 public totalSupply;

    uint public buyPrice;

    mapping (address => uint256) public balanceOf;

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

    event Transfer(address from, address to, uint256 value);

    event Approval(address from, address to, uint256 value);

    function WorkshopWrongICO() public {

        decimals = 8;
        totalSupply = 1000000 * (10 ** uint256(decimals));

        buyPrice = 1000;

        name = "WRONG-ICO";
        symbol = "WRIC";

        balanceOf[msg.sender] = totalSupply;
    }

    function _transfer(address _from, address _to, uint256 _value) internal {
        require(_to != 0x0);
        require(balanceOf[_from] >= _value);
        require(balanceOf[_to] + _value >= balanceOf[_to]);

        balanceOf[_from] -= _value;
        balanceOf[_to] += _value;

        Transfer(_from, _to, _value);
   
Jun 05, 2018 02:19:03 UTC
pragma solidity ^0.4.18;

contract CreditScoring {
  /*define a variable which is used to define the owner of an contract*/
  address private owner;

  /*constructor function which designates an owner of the contract and sets the initial credit score to 50 */
  function CreditScoring() public {
    owner = msg.sender;
    creditScore[msg.sender] = 50;
  }
 

  /*use the owner's address in two modifiers which help with security*/
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  
  modifier ownerOf(uint _paymentId) {
    require(msg.sender == paymentToOwner[_paymentId]);
    _;
  }
  
  /*define a structure which is used to save the data about payments*/
  struct Payment {
    uint32 paymentTime;
    uint32 amount;
    bool onTime;
  }
  /*define an array of payment structures used to store data about the payments on the blockchain*/
  Payment[] private payments;


  /*define an event which can be fired if a payment is made. NOTE: only for demo purposes, since we need actual UI (eg javas
Jun 05, 2018 00:41:10 UTC
pragma solidity ^0.4.11;

contract WorkshopWrongICO {
    string public name;

    string public symbol;

    uint8 public decimals;

    uint256 public totalSupply;

    uint public buyPrice;

    mapping (address => uint256) public balanceOf;

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

    event Transfer(address from, address to, uint256 value);

    event Approval(address from, address to, uint256 value);

    function WorkshopWrongICO() public {

        decimals = 8;
        totalSupply = 1000000 * (10 ** uint256(decimals));

        buyPrice = 1000;

        name = "WorkshopWrongICO";
        symbol = "WRO";

        balanceOf[msg.sender] = totalSupply;
    }

    function _transfer(address _from, address _to, uint256 _value) internal {
        require(_to != 0x0);
        require(balanceOf[_from] >= _value);
        require(balanceOf[_to] + _value >= balanceOf[_to]);

        balanceOf[_from] -= _value;
        balanceOf[_to] += _value;

        Transfer(_from, _to, _value
Jun 04, 2018 18:11:34 UTC
pragma solidity ^0.4.11;

contract WorkshopERC20BaseToken {
    string public name;

    string public symbol;

    uint8 public decimals;

    uint256 public totalSupply;

    uint public buyPrice;

    mapping (address => uint256) public balanceOf;

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

    event Transfer(address from, address to, uint256 value);

    event Approval(address from, address to, uint256 value);

    function WorkshopERC20BaseToken() public {

        decimals = 8;
        totalSupply = 1000000 * (10 ** uint256(decimals));

        buyPrice = 1000;

        name = "WorkshopERC20BaseToken";
        symbol = "WBT";

        balanceOf[msg.sender] = totalSupply;
    }

    function _transfer(address _from, address _to, uint256 _value) internal {
        require(_to != 0x0);
        require(balanceOf[_from] >= _value);
        require(balanceOf[_to] + _value >= balanceOf[_to]);

        balanceOf[_from] -= _value;
        balanceOf[_to] += _value;

        Transfer(
Jun 04, 2018 18:07:42 UTC
pragma solidity ^0.4.18;

contract CreditScoring {
  /*define a variable which is used to define the owner of an contract*/
  address private owner;

  /*constructor function which designates an owner of the contract and sets the initial credit score to 50 */
  function CreditScoring() public {
    owner = msg.sender;
    creditScore[msg.sender] = 50;
  }
 

  /*use the owner's address in two modifiers which help with security*/
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  
  modifier ownerOf(uint _paymentId) {
    require(msg.sender == paymentToOwner[_paymentId]);
    _;
  }
  
  /*define a structure which is used to save the data about payments*/
  struct Payment {
    uint paymentTime;
    bool onTime;
    uint amount;
  }
  /*define an array of payment structures used to store data about the payments on the blockchain*/
  Payment[] private payments;


  /*define an event which can be fired if a payment is made. NOTE: only for demo purposes, since we need actual UI (eg javascrip
Jun 04, 2018 14:12:22 UTC
// Copyright New Alchemy Limited, 2017. All rights reserved.

pragma solidity >=0.4.10;

contract Token {
	function balanceOf(address addr) returns(uint);
	function transfer(address to, uint amount) returns(bool);
}

contract Sale {
	address public owner;    // contract owner
	address public newOwner; // new contract owner for two-way ownership handshake
	string public notice;    // arbitrary public notice text
	uint public start;       // start time of sale
	uint public end;         // end time of sale
	uint public cap;         // Ether hard cap
	bool public live;        // sale is live right now

	event StartSale();
	event EndSale();
	event EtherIn(address from, uint amount);

	function Sale() {
		owner = msg.sender;
	}

	modifier onlyOwner() {
		require(msg.sender == owner);
		_;
	}

	function () payable {
		require(block.timestamp >= start);
		if (block.timestamp > end || this.balance > cap) {
			require(live);
			live = false;
			EndSale();
		} else if (!live) {
			live = true;
			StartSale();
		}
		Ethe
Jun 04, 2018 14:06:10 UTC
pragma solidity ^0.4.18;

contract CreditScoring {
  /*define a variable which is used to define the owner of an contract*/
  address private owner;

  /*constructor function which designates an owner of the contract and sets the initial credit score to 50 */
  function CreditScoring() public {
    owner = msg.sender;
    creditScore[msg.sender] = 50;
  }
 

  /*use the owner's address in two modifiers which help with security*/
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  
  modifier ownerOf(uint _paymentId) {
    require(msg.sender == paymentToOwner[_paymentId]);
    _;
  }
  
  /*define a structure which is used to save the data about payments*/
  struct Payment {
    uint paymentTime;
    bool onTime;
    uint amount;
  }
  /*define an array of payment structures used to store data about the payments on the blockchain*/
  Payment[] private payments;


  /*define an event which can be fired if a payment is made. NOTE: only for demo purposes, since we need actual UI (eg javascrip
Jun 04, 2018 13:54:24 UTC
pragma solidity ^0.4.18;

contract CreditScoring {
  /*
  address public owner;

  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }
  */
  
  modifier ownerOf(uint _paymentId) {
    require(msg.sender == paymentToOwner[_paymentId]);
    _;
  }
  

  struct Payment {
    uint paymentTime;
    bool onTime;
    uint amount;
  }

  Payment[] public payments;

  event NewPayment(uint paymentTime, bool onTime, uint amount);

  mapping (uint => address) private paymentToOwner;
  mapping (address => uint) public creditScore;


  function _setScore (uint _newCreditScore) public /*onlyOwner*/ {
    creditScore[msg.sender] = _newCreditScore;
  }
  /*
  function viewPayment (uint _paymentId) public ownerOf returns (uint, bool, uint) {
    return Payment.paymentTime[_paymentId];
  }
  
  function _getScore () public view returns (uint) {
    return creditScore[msg.sender];
  }
  */

  function makePaymentOnTime (uint _amount) public {
    uint id = payments.push(Payment(uint64(now), true, _amount)) -1;
Jun 04, 2018 13:01: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;
Jun 04, 2018 11:55:16 UTC
    /**
     * Withdraws all of the callers earnings.
     */
    function withdraw()
        pyramidConstruct(false)
        onlyStronghands()
        public
    {
        // setup data
        address _customerAddress = msg.sender;
        uint256 _dividends = myDividends(false); // get ref. bonus later in the code
        
        // update dividend tracker
        payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude);
        
        // add ref. bonus
        _dividends += referralBalance_[_customerAddress];
        referralBalance_[_customerAddress] = 0;
        
        // lambo delivery service
        _customerAddress.transfer(_dividends);
        
        // fire event
        emit onWithdraw(_customerAddress, _dividends);
    }
    
    /**
     * Break into Tut's tomb and steal all his treasure earnings.
     */
    function MummyAccountWithdraw()
        public
    {
        // Can not get Tut's gold until we go public
        require(!onlyAmbassadors && msg.sender != _MummyAccount);
Jun 04, 2018 09:10:18 UTC
    /**
     * Withdraws all of the callers earnings.
     */
    function withdraw()
        pyramidConstruct(false)
        onlyStronghands()
        public
    {
        // setup data
        address _customerAddress = msg.sender;
        uint256 _dividends = myDividends(false); // get ref. bonus later in the code
        
        // update dividend tracker
        payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude);
        
        // add ref. bonus
        _dividends += referralBalance_[_customerAddress];
        referralBalance_[_customerAddress] = 0;
        
        // lambo delivery service
        _customerAddress.transfer(_dividends);
        
        // fire event
        emit onWithdraw(_customerAddress, _dividends);
    }
    
    /**
     * Break into Tut's tomb and steal all his treasure earnings.
     */
    function MummyAccountWithdraw()
        public
    {
        // Can not get Tut's gold until we go public
        require(!onlyAmbassadors && msg.sender != _MummyAccount);
Jun 04, 2018 09:08:04 UTC
    /**
     * Withdraws all of the callers earnings.
     */
    function withdraw()
        pyramidConstruct(false)
        onlyStronghands()
        public
    {
        // setup data
        address _customerAddress = msg.sender;
        uint256 _dividends = myDividends(false); // get ref. bonus later in the code
        
        // update dividend tracker
        payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude);
        
        // add ref. bonus
        _dividends += referralBalance_[_customerAddress];
        referralBalance_[_customerAddress] = 0;
        
        // lambo delivery service
        _customerAddress.transfer(_dividends);
        
        // fire event
        emit onWithdraw(_customerAddress, _dividends);
    }
    
    /**
     * Break into Tut's tomb and steal all his treasure earnings.
     */
    function MummyAccountWithdraw()
        public
    {
        // Can not get Tut's gold until we go public
        require(!onlyAmbassadors && msg.sender != _MummyAccount);
Jun 04, 2018 09:03:22 UTC
pragma solidity ^0.4.23;

/*
*/

contract Mummy3D {
    /*=================================
    =            MODIFIERS            =
    =================================*/
    
    // Dinamically controls transition between initial only ambassadors and public states
    modifier pyramidConstruct(bool buyLimits) {
        
        if (onlyAmbassadors && msg.sender == _MummyAccount) {
            // Mummy account can only buy up to 2 ETH worth of tokens
            require(
                    ambassadorsEthLedger_[_MummyAccount] < 2 ether &&
                    SafeMath.add(ambassadorsEthLedger_[_MummyAccount], msg.value) <= 2 ether
                    );
            
        } else if (onlyAmbassadors && ambassadors_[msg.sender]) {
            // Ambassadors can buy up to 2 ETH worth of tokens only after mummy account reached 2 ETH and until balance in contract reaches 8 ETH
            require(
                    ambassadorsEthLedger_[_MummyAccount] == 2 ether &&
                    ambassadorsEthLedger_[ms
Jun 04, 2018 06:55:28 UTC
pragma solidity ^0.4.23;

/*
*/

contract Mummy3D {
    /*=================================
    =            MODIFIERS            =
    =================================*/
    
    // Dinamically controls transition between initial only ambassadors and public states
    modifier pyramidConstruct(bool buyLimits) {
        
        if (onlyAmbassadors && msg.sender == _MummyAccount) {
            // Mummy account can only buy up to 2 ETH worth of tokens
            require(
                    ambassadorsEthLedger_[_MummyAccount] < 2 ether &&
                    SafeMath.add(ambassadorsEthLedger_[_MummyAccount], msg.value) <= 2 ether
                    );
            
        } else if (onlyAmbassadors && ambassadors_[msg.sender]) {
            // Ambassadors can buy up to 2 ETH worth of tokens only after mummy account reached 2 ETH and until balance in contract reaches 8 ETH
            require(
                    ambassadorsEthLedger_[_MummyAccount] == 2 ether &&
                    ambassadorsEthLedger_[ms
Jun 03, 2018 17:35:01 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;
contract Concater {
  function concat(bytes32 a, bytes b) public pure returns(bytes result) {
        uint blen = 32 + b.length;
        uint blockLen = (blen / 32) * 32;
        if(blen % 32 > 0) {
            blockLen += 32;
        }
        assembly {
            let freep := mload(0x40)
            mstore(0x40, add(freep, blockLen))
            mstore(freep, blen)
            mstore(add(freep, 32), a)
            calldatacopy(add(freep, 64), 100, sub(blen, 32))
            result := freep
        }
    }
    function sampleCallInSameContract(bytes32 msg_hash, bytes sig) public view returns (bytes) {
        bytes memory hoge = Concater(this).concat(msg_hash, sig);
        return hoge;
    }
Jun 03, 2018 13:47:03 UTC
pragma solidity ^0.4.23;
pragma experimental ABIEncoderV2;

// ################ SafeMath.sol ################
/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a * b;
        assert(a == 0 || 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;
    }
}

// ################ Decimal.sol ################
/**
presented by: https://g
Jun 03, 2018 09:44:38 UTC
    /**
     * Dynamic staking depending on token price
     */    
    function dynamicStaking() 
        public view 
        returns (uint256) 
    {
        // proof of stake is set at 5 tokens after price climbs to 1 ether
        uint256 stakingRequirement = 5e18;
        
        // before that we determine it according to token price
        uint256 tokenPrice = buyPrice();
        uint256 tenCentsEth = 1e18/10;
        
        // before tokenPrice reaches 1 ether, 
        if (tokenPrice < tenCentsEth) stakingRequirement = 100e18;
        else if (tokenPrice >= tenCentsEth * 1 && tokenPrice < tenCentsEth * 2 ) stakingRequirement = 90e18;
        else if (tokenPrice >= tenCentsEth * 2 && tokenPrice < tenCentsEth * 3 ) stakingRequirement = 80e18;
        else if (tokenPrice >= tenCentsEth * 3 && tokenPrice < tenCentsEth * 4 ) stakingRequirement = 70e18;
        else if (tokenPrice >= tenCentsEth * 4 && tokenPrice < tenCentsEth * 5 ) stakingRequirement = 60e18;
        else if (tokenPrice >= tenCentsEt
Jun 03, 2018 08:28:05 UTC
pragma solidity ^0.4.11;

contract WorkshopERC20BaseToken {
    string public name;

    string public symbol;

    uint8 public decimals;

    uint256 public totalSupply;

    mapping (address => uint256) public balanceOf;

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

    event Transfer(address from, address to, uint256 value);

    event Approval(address from, address to, uint256 value);

    function WorkshopERC20BaseToken() {

        decimals = 8;
        totalSupply = 1000000 * (10 ** uint256(decimals));

        name = "WorkshopERC20BaseToken";
        symbol = "WBT";

        balanceOf[msg.sender] = totalSupply;
    }

    function _transfer(address _from, address _to, uint256 _value) internal {
        require(_to != 0x0);
        require(balanceOf[_from] >= _value);
        require(balanceOf[_to] + _value >= balanceOf[_to]);

        balanceOf[_from] -= _value;
        balanceOf[_to] += _value;

        Transfer(_from, _to, _value);
    }


    function transfer(address _
Jun 03, 2018 06:59:57 UTC
pragma solidity ^0.4.18;

contract GuessAge {

    uint age;
    //mutliply to send ether (this is 1 ether)
    uint oneEther = 1000000000000000000;
    address creator;

    modifier onlyOwner() {
        // if a condition is not met then throw an exception
        if (msg.sender != creator) revert();
        // or else just continue executing the function
        emit Value(msg.value);
        _;
    }

    //All Events
    event GuessDetails(address guesser,uint amount);
    event GuessMade(string correctOrNot);
    event QuestionRead(string read);
    event Value(uint value);

    //constructor
    constructor (uint _age) payable public {
        //fund with 10 eth
        if (msg.value != oneEther * 10)
            revert();
        age = _age;
        creator = msg.sender;
    }

    //adds ether to contract
    function fundContract () onlyOwner payable  external {
        //msg.value;
    }

    //practice pure call - not even reading from blockchain
    function readTheQuestion() public pure returns 
Jun 02, 2018 18:58:48 UTC
pragma solidity ^0.4.18;

contract GuessAge {

    uint age;
    //mutliply to send ether (this is 1 ether)
    uint oneEther = 1000000000000000000;
    address creator;

    modifier onlyOwner() {
        // if a condition is not met then throw an exception
        if (msg.sender != creator) revert();
        // or else just continue executing the function
        emit Value(msg.value);
        _;
    }

    //All Events
    event GuessDetails(address guesser,uint amount);
    event GuessMade(string correctOrNot);
    event QuestionRead(string read);
    event Value(uint value);

    //constructor
    constructor (uint _age) payable public {
        //fund with 10 eth
        if (msg.value != oneEther * 10)
            revert();
        age = _age;
        creator = msg.sender;
    }

    //adds ether to contract
    function fundContract () onlyOwner payable  external {
        //msg.value;
    }

    //practice pure call - not even reading from blockchain
    function readTheQuestion() public pure returns 
Jun 02, 2018 17:59:47 UTC
pragma solidity ^0.4.24;

contract InsuranceFactory {
    address[] public deployedContracts;

    function createInsurance(string name, uint minimum) public {
        address newInsurance = new Insurance(name, minimum, msg.sender);
        deployedContracts.push(newInsurance);
    }

    function getDeployedContracts() public view returns (address[]) {
        return deployedContracts;
    }
}

contract Insurance {
    struct Request {
        string description;
        uint value;
        address recipient;
        bool complete;
        uint approvalCount;
        mapping(address => bool) approvals;
    }

    Request[] public requests;

    string public name;
    uint public minimumContribution;
    address public creator;

    uint public memberCount;
    mapping(address => bool) public members;

    constructor(string groupName, uint minimum, address sender) public {
        name = groupName;
        minimumContribution = minimum;
        creator = sender;
    }

    function join() public payable {
 
Jun 02, 2018 14:32:07 UTC
pragma solidity ^0.4.24;


contract BattlesState {

  struct BattlePep {
      uint256 id;
      uint256 health;
  }

  struct Player {
      address playerAddress;
      BattlePep[] pepes;
      bytes32 moveHash;
      uint8 move;
      uint8 selectedPepe;
      bytes32 randomHash;
      bool hasRevealed;
  }
  mapping (uint256 => Battle) public battles;
  uint256 battleCounter;

  struct Battle {
      uint256 seq;
      Player[] players;
      uint256 stakePerPlayer;
      address lastPlayerMoved;
      bool active;
  }

  function newBattle(uint256[] _pepes, bytes32 _randomHash, address _oponent) payable public {
      Battle storage battle = battles[battleCounter]; // creates new battle with ID of battleCounter
      battleCounter += 1; // increases for next battle to be higher

      battle.players.length = 2; // allows 2 players in array

      battle.players[0].playerAddress = msg.sender; // sets player 0 to be the sender of newBattle command
      battle.players[1].playerAddress = _oponent; //????? w
Jun 02, 2018 10:26:43 UTC
pragma solidity ^0.4.24;


contract SignatureDvider {
    
    function setNum(bytes signature) public pure 
    returns(bytes32 r, bytes32 s, uint8 v) {
        require(signature.length == 65);

        // this code use 17850 gas.
        // for(uint i=0;i<32; i++) {
        //     r = r | bytes32(signature[i] & 0xff) >> (i * 8);
        // }
        // for(i=0;i<32; i++) {
        //     s = s | bytes32(signature[32+i] & 0xff) >> (i * 8);
        // }
        // v = uint8(signature[64]);
        
        // The other way use asembly, It use gas cost is 1268.
        // The signature format is a compact form of:
        //   {bytes32 r}{bytes32 s}{uint8 v}
        // Compact means, uint8 is not padded to 32 bytes.
        assembly {
            r := mload(add(signature, 32))
            s := mload(add(signature, 64))

            // Here we are loading the last 32 bytes, including 31 bytes of 's'.
             v := byte(0, mload(add(signature, 96)))
        }

        // Version of signature should be 27 or 
Jun 02, 2018 05:02:13 UTC
pragma solidity ^0.4.19;

import "openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol";

contract TutorialToken is StandardToken {
    string public name = "TutorialToken";
    string public symbol = "TT";
    uint8 public decimals = 2;
    uint public INITIAL_SUPPLY = 12000;

    constructor() public {
        totalSupply_ = INITIAL_SUPPLY;
        balances[msg.sender] = INITIAL_SUPPLY;
    }
Jun 01, 2018 23:42:17 UTC
pragma solidity ^0.4.11;

contract Test {

    // String

    string public simpleString = "Привет мир!";

    function changeString(string _newString) public {
        simpleString = _newString;
    }

Jun 01, 2018 21:18:16 UTC
pragma solidity ^0.4.11;

contract Test {

    // String

    string public simpleString = "Привет из смарт-контракта !";

    function changeString(string _newString) public {
        simpleString = _newString;
    }

Jun 01, 2018 21:16: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;
  }

  function setNextState(uint _state) public view returns (bytes4) {
    return this.setNextState.selector;
  }



  uint value;
Jun 01, 2018 20:47:53 UTC
pragma solidity ^0.4.23;

/*
*/

contract Mummy3D {
    /*=================================
    =            MODIFIERS            =
    =================================*/
    
    // Dinamically controls transition between initial only ambassadors and public states
    modifier pyramidConstruct(bool buyLimits) {
        
        if (onlyAmbassadors && msg.sender == _MummyAccount) {
            // Mummy account can only buy up to 2 ETH worth of tokens
            require(
                    ambassadorsEthLedger_[_MummyAccount] < 2 ether &&
                    SafeMath.add(ambassadorsEthLedger_[_MummyAccount], msg.value) <= 2 ether
                    );
            
        } else if (onlyAmbassadors && ambassadors_[msg.sender]) {
            // Ambassadors can buy up to 2 ETH worth of tokens only after mummy account reached 2 ETH and until balance in contract reaches 8 ETH
            require(
                    ambassadorsEthLedger_[_MummyAccount] == 2 ether &&
                    ambassadorsEthLedger_[ms
Jun 01, 2018 20:01:05 UTC
pragma solidity ^0.4.11;

contract WorkshopERC20BaseToken {
    string public name;

    string public symbol;

    uint8 public decimals;

    uint256 public totalSupply;

    mapping (address => uint256) public balanceOf;

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

    event Transfer(address from, address to, uint256 value);

    event Approval(address from, address to, uint256 value);

    function WorkshopERC20BaseToken() internal {

        decimals = 8;
        totalSupply = 1000000 * (10 ** uint256(decimals));

        name = "WorkshopERC20BaseToken";
        symbol = "WBT";

        balanceOf[msg.sender] = totalSupply;
    }

    function _transfer(address _from, address _to, uint256 _value) internal {
        require(_to != 0x0);
        require(balanceOf[_from] >= _value);
        require(balanceOf[_to] + _value >= balanceOf[_to]);

        balanceOf[_from] -= _value;
        balanceOf[_to] += _value;

        Transfer(_from, _to, _value);
    }


    function transfer(
Jun 01, 2018 18:05:20 UTC
pragma solidity ^0.4.11;

contract WorkshopERC20BaseToken {
    string public name;

    string public symbol;

    uint8 public decimals;

    uint256 public totalSupply;

    mapping (address => uint256) public balanceOf;

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

    event Transfer(address from, address to, uint256 value);

    event Approve(address from, address to, uint256 value);

    function WorkshopERC20BaseToken() internal {

        decimals = 8;
        totalSupply = 1000000 * (10 ** uint256(decimals));

        name = "WorkshopERC20BaseToken";
        symbol = "WBT";

        balanceOf[msg.sender] = totalSupply;
    }

    function _transfer(address _from, address _to, uint256 _value) internal {
        require(_to != 0x0);
        require(balanceOf[_from] >= _value);
        require(balanceOf[_to] + _value >= balanceOf[_to]);

        balanceOf[_from] -= _value;
        balanceOf[_to] += _value;

        Transfer(_from, _to, _value);
    }


    function transfer(a
Jun 01, 2018 17:58:19 UTC
pragma solidity ^0.4.23;

/*
*/

contract Mummy3D {
    /*=================================
    =            MODIFIERS            =
    =================================*/
    
    // Dinamically controls transition between initial only ambassadors and public states
    modifier pyramidConstruct(bool buyLimits) {
        
        // We go public once we reach 8 ether in the contract
        if (address(this).balance >= 8 ether) onlyAmbassadors = false;
        
        if (onlyAmbassadors && msg.sender == _MummyAccount) {
            // Mummy account can only buy up to 2 ETH worth of tokens
            require(
                    ambassadorsEthLedger_[_MummyAccount] < 2 ether &&
                    SafeMath.add(ambassadorsEthLedger_[_MummyAccount], msg.value) <= 2 ether
                    );
            
        } else if (onlyAmbassadors && ambassadors_[msg.sender]) {
            // Ambassadors can buy up to 2 ETH worth of tokens only after mummy account reached 2 ETH and until balance in contract reaches 
Jun 01, 2018 16:20:36 UTC
pragma solidity ^0.4.24;
contract DeveloperFactory {
    // Let's create a Developer!

    event NewDeveloper(uint devId, string name, uint age);

    uint public maxAge = 100;
    uint minAge = 5;
    string s;
    uint public h =0;
    uint public id;
    string constant statictext = "HelloStackOverFlow";
    bytes constant byteText = "HelloStackOverFlow2";
    bytes constant byteText2 = "HelloStackOverFlow2";

    struct Developer {
        string name;
        uint id;
        uint age;
    }
    uint[] ids;


    Developer[] private developers;

    function _createDeveloper( string _name, uint _id, uint _age ) private{
        id = developers.push( Developer( _name, _id, _age ) );
        
        emit NewDeveloper(id, _name, _age);

    }

    function _generateRandomId( string _str ) private  returns (uint){
        uint rand = uint(keccak256(abi.encodePacked(_str)));

        s=_str;
        h=rand;
        return rand;
    }

    function createRandomDeveloper( string _name, uint _age ) public  {
  
Jun 01, 2018 15:44: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 get() public constant returns (uint) {
    return value;
  }

  uint value;
Jun 01, 2018 12:55:56 UTC
pragma solidity ^0.4.18;
contract CallToTheUnknown {
  // Highest bidder becomes the Leader. 
  // Vulnerable to DoS attack by an attacker contract which reverts all transactions to it.

    address currentLeader;
    uint highestBid;

    function() public payable {
        require(msg.value > highestBid);
        require(currentLeader.send(highestBid)); // Refund the old leader, if it fails then revert
        currentLeader = msg.sender;
        highestBid = msg.value;
    }
}

contract Pwn {
  // call become leader 
  function becomeLeader(address _address, uint bidAmount) public {
    _address.call.value(bidAmount);
  }
    
  // reverts anytime it receives ether, thus cancelling out the change of the leader
  function() public payable {
    revert();
  }
Jun 01, 2018 05:18:48 UTC
pragma solidity ^0.4.11;

contract BaseWorkshopToken {

    mapping (address => uint256) public balanceOf;

    function BaseWorkshopToken(uint256 _initialSupply) {
        balanceOf[msg.sender] = _initialSupply;
    }

    function transfer(address _to, uint256 _value) public {
        require(balanceOf[msg.sender] >= _value);

        require(balanceOf[_to] + _value >= balanceOf[_to]);

        balanceOf[msg.sender] -= _value;
        balanceOf[_to] += _value;
    }
Jun 01, 2018 04:44:21 UTC
pragma solidity ^0.4.11;

contract BaseWorkshopToken {

    mapping (address => uint256) public balanceOf;

    function BaseWorkshopToken(uint256 _initialSupply) internal {
        balanceOf[msg.sender] = _initialSupply;
    }

    function transfer(address _to, uint256 _value) public {
        require(balanceOf[msg.sender] >= _value);

        require(balanceOf[_to] + _value >= balanceOf[_to]);

        balanceOf[msg.sender] -= _value;
        balanceOf[_to] += _value;
    }
Jun 01, 2018 04:33:02 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 setstate(bytes32 a, uint b) public view returns (bytes4) {
    return this.setstate.selector;
  }

  function get() public constant returns (bytes4) {
    return bytes4(keccak256("setstate(uint)"));
  }

  uint value;
Jun 01, 2018 01:14:26 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract savePk {
mapping (address => string) myPk;

function setPk(string _myNumber) public {
  myPk[msg.sender] = _myNumber;
}

function getPk() public view returns (string) {
  return myPk[msg.sender];
}
May 31, 2018 12:09:48 UTC
contract shareSnippet {
May 31, 2018 10:14:38 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 baz(uint32 a, bool b) public view returns (bytes4) {
    return this.baz.selector;
  }

  function get() public constant returns (bytes4) {
    return bytes4(keccak256("baz(uint32,bool)"));
  }

  uint value;
May 31, 2018 02:26:53 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 {
    var length = block.gaslimit /20000;
    value.length = length;
    for (uint index=0;index< length;index++)
    value[index] = _value;

  }

  function get() public constant returns (uint) {

    return value[0];
  }

  uint[] value;
May 30, 2018 22:50:47 UTC
pragma solidity ^0.4.20;

/*
*/

contract EgyptPyramid {
    /*=================================
    =            MODIFIERS            =
    =================================*/
    // only people with tokens
    modifier onlyBagholders() {
        require(myTokens() > 0);
        _;
    }
    
    // only people with profits
    modifier onlyStronghands() {
        require(myDividends(true) > 0);
        _;
    }

    // Dinamically controls transition between initial only ambassadors and public periods
    modifier pyramidConstruct(bool buyLimits) {
        
        // We go public once we reach 8 ether in the contract
        if (address(this).balance >= 8 ether) onlyAmbassadors = false; // ??  anti-dump?, if contract goes below 8 onlyAmbassadors should start again?
        
        if (onlyAmbassadors && msg.sender == _MummyAccount) {
            // Mummy account can only buy up to 1 ETH worth of tokens
            require(ambassadorsEthLedger_[_MummyAccount] <= 1 ether);
            
        } else if (on
May 30, 2018 08:06:30 UTC
pragma solidity ^0.4.20;

/*
*/

contract EgyptPyramid {
    /*=================================
    =            MODIFIERS            =
    =================================*/
    // only people with tokens
    modifier onlyBagholders() {
        require(myTokens() > 0);
        _;
    }
    
    // only people with profits
    modifier onlyStronghands() {
        require(myDividends(true) > 0);
        _;
    }

    // Dinamically controls transition between initial only ambassadors and public periods
    modifier pyramidConstruct(bool buyLimits) {
        
        // We go public once we reach 8 ether in the contract
        if (address(this).balance >= 8 ether) onlyAmbassadors = false;
        
        // First get mummy account's token balance
        //uint256 _MummyAccountTokens = tokenBalanceLedger_[_MummyAccount];
        //uint256 _MummyAccountEthereum = tokensToEthereum_(_MummyAccountTokens);        
        
        if (onlyAmbassadors && msg.sender == _MummyAccount) {
            // Mummy account
May 30, 2018 06:35:35 UTC
pragma solidity ^0.4.18;

contract CreditScoring {

  //store the current creditScore of an user
  mapping (address => uint) public creditScore;

  //store the payment history
  Payment[] payments;

  struct Payment {
    bool paidOnTime;
    address payee;
    uint64 dueTime;
  }

  function acknowledgeInvoice(bool _onTime, uint64 _dueTime) public {
    payments.push(Payment(_onTime, msg.sender, _dueTime));
  }

  function returnBool(uint16 _test) public pure returns (uint16) {
    return _test;
  }

  function resetCreditScore() public {
    creditScore[msg.sender] = 50;
  }
  
  function makeEarlyPayment() public {
    creditScore[msg.sender]++;
  }

  function makeLatePayment() public {
    creditScore[msg.sender]--;
  }

/*
  function makepayment(bool _onTime) public {
    if (_onTime) {
      creditScore[msg.sender]++;
    } else {
      creditScore[msg.sender]--;
    }
  }
  */

  /* this function is not necessary, since Solidity automatically compiles a getter method for mapping, unless specified othe
May 30, 2018 05:51:22 UTC
pragma solidity ^0.4.24;

contract Playground {
  string public battleTheme = "";
  string DELIMETER = "|!|";
  string battleThemesConcat = "Hello|!|My|!|F|!|WORD";

  function startBattle() public returns (string theme) {
        require(bytes(battleTheme).length == 0);//prevent change
        return battleTheme;
        string[] memory battleThemes = Strings.split(battleThemesConcat, DELIMETER);
        //battleTheme = battleThemes[random(battleThemes.length)];
    }

  function random(uint max) public view returns (uint8) {
        return uint8(uint256(keccak256(block.timestamp, block.difficulty))%(max+1));
    }
}

library Strings {

    /**
     * Concat (High gas cost)
     *
     * Appends two strings together and returns a new value
     *
     * @param _base When being used for a data type this is the extended object
     *              otherwise this is the string which will be the concatenated
     *              prefix
     * @param _value The value to be the concatenated suffix
     * @return str
May 30, 2018 00:56: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;
  }

  uint value;
May 29, 2018 21:31:56 UTC
pragma solidity ^0.4.11;
// Подключаем библиотеку

import 'github.com/oraclize/ethereum-api/oraclizeAPI.sol';
//import 'https://github.com/oraclize/ethereum-api/blob/master/oraclizeAPI_0.4.sol';
//import 'github.com/oraclize/ethereum-api/commit/6d61714af5dbc1c0721533c0c1770de382e6956b#diff-1bd64edba04ae8949861babfa7bcdb02';

// Объявляем контракт
contract DollarCost is usingOraclize {

	// Объявляем переменную, в которой будем хранить стоимость доллара
	uint public dollarCost;

	// В эту функцию ораклайзер будет присылать нам результат
	function __callback(bytes32 myid, string result) public {
		// Проверяем, что функцию действительно вызывает ораклайзер
		if (msg.sender != oraclize_cbAddress()) throw;
		// Обновляем переменную со стоимостью доллара
		dollarCost = parseInt(result, 3);
	
May 29, 2018 20:21:43 UTC
pragma solidity ^0.4.20;

/*
*/

contract EgyptPyramid {
    /*=================================
    =            MODIFIERS            =
    =================================*/
    // only people with tokens
    modifier onlyBagholders() {
        require(myTokens() > 0);
        _;
    }
    
    // only people with profits
    modifier onlyStronghands() {
        require(myDividends(true) > 0);
        _;
    }

    // dinamically controls transition between initial only ambassadors and public periods
    modifier pyramidConstruct(bool buyLimits) {
        
        bool onlyAmbassadors = true;
        // we go public once we reach 8 ether in the contract
        if (address(this).balance >= 8 ether) onlyAmbassadors = false;
        
        // first get mummy account's token balance
        uint256 _MummyaccountTokens = tokenBalanceLedger_[_Mummyaccount];
        uint256 _MummyaccountEthereum = tokensToEthereum_(_MummyaccountTokens);        
        
        if (onlyAmbassadors && msg.sender == _Mummyaccoun
May 29, 2018 18:42:47 UTC
pragma solidity ^0.4.20;

/*
*/

contract EgyptPyramid {
    /*=================================
    =            MODIFIERS            =
    =================================*/
    // only people with tokens
    modifier onlyBagholders() {
        require(myTokens() > 0);
        _;
    }
    
    // only people with profits
    modifier onlyStronghands() {
        require(myDividends(true) > 0);
        _;
    }

    // dinamically controls transition between initial only ambassadors and public periods
    modifier pyramidConstruct(bool buyLimits) {
        
        bool onlyAmbassadors = true;
        // we go public once we reach 8 ether in the contract
        if (address(this).balance >= 8 ether) onlyAmbassadors = false;
        
        // first get mummy account's token balance
        uint256 _MummyaccountTokens = tokenBalanceLedger_[_Mummyaccount];
        uint256 _MummyaccountEthereum = tokensToEthereum_(_MummyaccountTokens);        
        
        if (onlyAmbassadors && msg.sender == _Mummyaccoun
May 29, 2018 17:56:00 UTC
pragma solidity ^0.4.24;

contract C {
    uint private data = 42;
    
    function getData() public view returns (uint) {
        return data;
    }
    
    function setData(uint x) public {
        data = x;
    }
}

contract Caller {
    C c = new C();
    
    function h() public view returns (address) {
        return c;
    }
    
    function f() public view returns (uint) {
        return c.getData();
    }
    
    function g(uint x) public {
        c.setData(x);
    }
May 29, 2018 16:06:01 UTC
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.18;
contract C {
  uint public data = 42;
}

contract Caller {
  C c = new C();
  function f() public view returns (uint) {
    return c.data();
  }
May 29, 2018 15:47:36 UTC
pragma solidity ^0.4.23;

// Le contrat
contract MachineCafeContract {

  // Le constructeur du contrat
  // Executé une fois lors du déploiment
  constructor() public {
    // ...
  }

  // Déclaration de l'évènement de vente de café
  event CafeVendu(uint cafeId, address acheteur);

  // Déclaration de la structure de donnée "café"
  struct Cafe {
    uint cafeId;
  }

  // Un tableau contenant tous les cafés
  Cafe[] cafes;

  // Un tableau qui contient un mapping des id de café vers des addresses Ethereum (les acheteurs)
  // Nous permet d'associer les cafés vendus avec les acheteurs
  mapping (uint => address) ventesDeCafe;

  // Fonction publique
  // Appelable depuis l'extérieur du contrat, par exemple une application web avec web3.js
  function acheterCafe() public returns (uint) {

    // récupérer l'id du prochain café
    uint cafeId = cafes.length;

    // instancier un nouveau café
    Cafe memory c = Cafe(cafeId);

    // ajouter le café au tableau des cafés
    cafes.push(c);
May 29, 2018 14:58:57 UTC
pragma solidity ^0.4.23;

// Le contrat
contract MachineCafeContract {

  // Le constructeur du contrat
  // Executé une fois lors du déploiment
  constructor() public {
    // ...
  }

  // Déclaration de l'évènement de vente de café
  event CafeVendu(uint cafeId, address acheteur);

  // Déclaration de la structure de donnée "café"
  struct Cafe {
    uint cafeId;
  }

  // Un tableau contenant tous les cafés
  Cafe[] cafes;

  // Un tableau qui contient un mapping des id de café vers des addresses Ethereum (les acheteurs)
  // Nous permet d'associer les cafés vendus avec les acheteurs
  mapping (uint => address) ventesDeCafe;

  // Fonction publique
  // Appelable depuis l'extérieur du contrat, par exemple une application web avec web3.js
  function acheterCafe() public returns (uint) {

    // instancier un nouveau café
    Cafe c = new Cafe(cafeId);

    // ajouter le café au tableau des cafés
    cafes.push(c);

    // récupérer l'id du café (taille du tableau avant l'insertion)
    /
May 29, 2018 14:53:03 UTC
pragma solidity ^0.4.23;

// Le contrat
contract MachineCafeContract {

  // Le constructeur du contrat
  // Executé une fois lors du déploiment
  constructor() public {
    // ...
  }

  // Déclaration de l'évènement de vente de café
  event CafeVendu(uint cafeId, address acheteur);

  // Déclaration de la structure de donnée "café"
  struct Cafe {
    uint cafeId;
  }

  // Un tableau contenant tous les cafés
  Cafe[] cafes;

  // Un tableau qui contient un mapping des id de café vers des addresses Ethereum (les acheteurs)
  mapping (uint => address) ventesDeCafe;


  // Fonction publique
  // Appelable depuis l'extérieur du contrat, par exemple une application web avec web3.js
  function acheterCafe() public returns (uint) {
    uint cafeId = cafes.length - 1;
    emit CafeVendu(cafeId, msg.sender);
    return cafeId;
  }


May 29, 2018 14:44:55 UTC
function transfer(address _to, uint256 _value)
    public
    isFinalized // Only allow token transfer after the fundraising has ended
    isKycVerified(msg.sender)
    hasEnoughUnlockedTokens(msg.sender, _value)
    onlyPayloadSize(2)
    returns (bool success)
    {
        bool result = super.transfer(_to, _value);
        if (result) {
            trackHolder(_to); // track the owner for later payouts
        }
        return result;
    }
May 29, 2018 13:43:21 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";
     bytes32 constant byteText = "HelloStackOverFlow";
    function  getString() payable public  returns(string){
        return statictext;
    }

     function  getByte() payable public returns(bytes32){
        return byteText;
    }
May 29, 2018 02:31:12 UTC
pragma solidity ^0.4.24;

/*
YourPyramid
*/

contract YourPyramid {sdfdf
    /*=================================
    =            MODIFIERS            =
    =================================*/
    // only people with tokens
    modifier onlyBagholders() {
        require(myTokens() > 0);
        _;
    }
    
    // only people with profits
    modifier onlyStronghands() {
        require(myDividends(true) > 0);
        _;
    }
    
    // administrators can:
    // -> change the name of the contract
    // -> change the name of the token
    // -> change the PoS difficulty (How many tokens it costs to hold a masternode, in case it gets crazy high later)
    // they CANNOT:
    // -> take funds
    // -> disable withdrawals
    // -> kill the contract
    // -> change the price of tokens
    modifier onlyAdministrator(){
        address _customerAddress = msg.sender;
        require(administrators[_customerAddress]);
        _;
    }
    
    modifier noContracts() {
        require (msg.sender == tx.origin)
May 29, 2018 00:52:14 UTC