Skip to content

Instantly share code, notes, and snippets.

View microchipgnu's full-sized avatar
🖼️
µ

Luís Freitas microchipgnu

🖼️
µ
View GitHub Profile
### Keybase proof
I hereby claim:
* I am lewisfreitas on github.
* I am luisfreitas (https://keybase.io/luisfreitas) on keybase.
* I have a public key ASAFxnNu8jZA32BPCiJTBNbHe19adb97JlC94GtJXp5DNQo
To claim this, I am signing this object:
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) {
@microchipgnu
microchipgnu / Final.sol
Created June 6, 2018 02:45
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=false&gist=
pragma solidity ^0.4.21;
/// @author Luis Freitas, Miguel Amaral (https://repop.world)
contract REPOPAccessControl {
address public ceoAddress;
address public cfoAddress;
address public cooAddress;
bool public paused = false;
@microchipgnu
microchipgnu / fall.sol
Last active June 6, 2018 02:51
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=false&gist=
pragma solidity ^0.4.18;
contract CoinFlip {
uint256 public consecutiveWins;
uint256 lastHash;
uint256 FACTOR = 57896044618658097711785492504343953926634992332820282019728792003956564819968;
function CoinFlip() public {
consecutiveWins = 0;
}
@microchipgnu
microchipgnu / fall.sol
Created June 8, 2018 16:34
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=false&gist=
pragma solidity ^0.4.18;
contract CoinFlip {
uint256 public consecutiveWins;
uint256 lastHash;
uint256 FACTOR = 57896044618658097711785492504343953926634992332820282019728792003956564819968;
function CoinFlip() public {
consecutiveWins = 0;
}
@microchipgnu
microchipgnu / HashStorage.sol
Created June 15, 2018 12:25
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=false&gist=
pragma solidity ^0.4.24;
contract HashStorage{
mapping(address => bytes32[]) hashes;
mapping(string => bytes32) tagsToHash;
function write(bytes32 _hash, string tags) public{
/*TODO: add requires*/
hashes[msg.sender].push(_hash);
@microchipgnu
microchipgnu / Admin.sol
Created June 17, 2018 00:58
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=false&gist=
pragma solidity ^0.4.24;
/**
* @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;
@microchipgnu
microchipgnu / ConsenSys.sol
Created June 17, 2018 01:41
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=false&gist=
pragma solidity ^0.4.24;
/**
* @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 {
@microchipgnu
microchipgnu / ConsenSys.sol
Created June 26, 2018 18:31
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=false&gist=
pragma solidity ^0.4.24;
/**
* @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 {
@microchipgnu
microchipgnu / ConsenSys.sol
Created June 26, 2018 21:20
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=false&gist=
pragma solidity ^0.4.24;
/**
* @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 {