Skip to content

Instantly share code, notes, and snippets.

View rohitsethii's full-sized avatar

Rohit Sethi rohitsethii

  • India
  • 01:39 (UTC +05:30)
View GitHub Profile
@rohitsethii
rohitsethii / Booking.sol
Created October 19, 2018 05:15
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
pragma solidity ^0.4.24;
import "./TokenERC20.sol";
import "./SafeMath.sol";
contract Booking {
uint bookingId;
address propertyOwner;
address user;
@rohitsethii
rohitsethii / 1.sol
Created September 13, 2018 11:11
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=true&gist=
/*Problem Statement #1
Write a Roulette Contract, which will implement following features:
• At max, 5 players can involve in one game.
• Each player will choose a number in range of 0-4
• One number can be selected by only one player and one player can select only one number.
• While choosing a number, player will put some ETH in it. (MIN: 0.5 ETH, MAX: 5ETH)
• As soon fifth player provides the choice of numbe, roulette will spin to find a random number.
(To find random number, use : previous_block_number % 5 )
• Winner (as per random number calculation) will get all ETH inserted by players
*/
@rohitsethii
rohitsethii / Rose.sol
Created September 2, 2018 09:59
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.20+commit.3155dd80.js&optimize=true&gist=
pragma solidity ^0.4.8;
contract MyToken {
/* Public variables of the token */
//string public standard = 'Token 0.1';
//string public name="Rose";
//string public symbol="ROS";
//uint8 public decimals=18;
uint256 public totalSupply;
/* This creates an array with all balances */