Skip to content

Instantly share code, notes, and snippets.

@arkhaminferno
arkhaminferno / MultiNumberBettingV1.sol
Created September 30, 2019 21:01
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.5.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity ^0.5.1;
contract MultiNumberBettingV1{
uint8 loserCount;
uint8 winnerCount;
uint8[3] numArray;
constructor (uint8 _p,uint8 _p2, uint8 _p3) public{
numArray[0] = _p;
numArray[1] = _p2;
numArray[2] = _p3;
@arkhaminferno
arkhaminferno / OverflowandUnderflow.sol
Last active September 24, 2019 02: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=false&gist=
pragma solidity ^0.4.24;
contract OverflowandUnderflow{
function overflow() public pure returns(uint256){
uint256 max=2**256-1;
return max+1;
}
function underflow() public pure returns(uint256){
uint256 min=0;
@arkhaminferno
arkhaminferno / messenger.sol
Created September 24, 2019 01:17
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 Messenger{
address owner;
string[] messages;
constructor() public{
owner = msg.sender;
}