This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract Relay { | |
address public currentVersion; | |
address public owner; | |
modifier onlyOwner() { | |
if (msg.sender != owner) { | |
throw; | |
} | |
_ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.10; | |
contract Pausable { | |
bool public stopped = false; | |
address private owner; | |
modifier isAdmin() { | |
if(msg.sender != owner) { | |
revert(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract Relay { | |
address public currentVersion; | |
address public owner; | |
modifier onlyOwner() { | |
require(msg.sender == owner); | |
_; | |
} | |
function Relay(address initAddr) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This will not compile | |
pragma solidity ^0.4.0; | |
contract X {} | |
contract A is X {} | |
contract C is A, X {} | |
// This is ok |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Abstract contract for the full ERC 20 Token standard | |
// https://github.com/ethereum/EIPs/issues/20 | |
pragma solidity ^0.4.18; | |
contract EIP20Interface { | |
/* This is a slight change to the ERC20 base standard. | |
function totalSupply() constant returns (uint256 supply); | |
is replaced with: | |
uint256 public totalSupply; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// deployed to the Rinkeby network @ 0x4103e048515a5ebdf34b32ed7692254a16c6d184 | |
pragma solidity ^0.4.0; | |
contract SimpleStorage { | |
uint256 storedData; | |
uint256 public timesSet; | |
address public lastCaller; | |
event Updated(uint newValue); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.0; | |
contract GreeterA { | |
string greeting; | |
uint count; | |
address[] greeted; | |
function GreeterA(string _greeting) { | |
greeting = _greeting; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.0; | |
contract Unoptimized { | |
bool oftenTrue = true; | |
bool oftenFalse = false; | |
uint loops = 0; | |
string greeting; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.0; | |
contract Optimized { | |
bool oftenTrue = true; | |
bool oftenFalse = false; | |
uint loops = 0; | |
bytes32 constant statictext = "Hello world"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3Box is a social profiles network for web3. This post links my 3Box profile to my Github account! | |
✅ did:muport:Qma2o5oqaVY9hdyNKpdCfGCutgWiotrL9mN3aPWFjnZ8kN ✅ | |
Create your profile today to start building social connection and trust online. https://3box.io/ |