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.8; // Enable Optimization | |
/** | |
* Multi owned events. | |
*/ | |
contract MultiOwnedEvents { | |
// EVENTS | |
// this contract only has six types of events: it can accept a confirmation, in which case | |
// we record owner and operation (hash) alongside it. | |
event Confirmation(address owner, bytes32 operation); |
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.8; | |
contract Versionable { | |
event VersionChanged(Versionable version); | |
Versionable public /* FIXME internal*/ currentVersion; | |
bool internal isInit; | |
address private owner; | |
/** |
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.8; | |
/** | |
* Interface shared by Proxy, ContractV1 and ContractV2. | |
*/ | |
contract Interface { | |
/** return uint, depend of the current version. */ | |
function doSomething() constant returns(uint); | |
} |
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.8; | |
/** | |
* Interface shared by Proxy, ContractV1 and ContractV2. | |
*/ | |
contract Interface { | |
/** return uint, depend of the current version. */ | |
function doSomething() constant returns(uint); | |
} |
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.8; | |
/** | |
* Interface shared by Proxy, ContractV1 and ContractV2. | |
*/ | |
contract Interface { | |
/** return uint, depend of the current version. */ | |
function doSomething() constant returns(uint); | |
} |
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.8; | |
// -- Technical contract | |
/** | |
* Database contract. | |
* Use to share the state between v1 and v2. | |
*/ | |
contract ContractDB { | |
/** Generic map. */ | |
mapping(string => uint) map; |
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.8; | |
/** | |
* The version 1 of the contract. | |
* The attr is initialized to 1000. | |
* The method doSomething() return attr + version = 1001 | |
*/ | |
contract ContractV1 { | |
uint constant private version=1; | |
uint public attr=1000; |