Skip to content

Instantly share code, notes, and snippets.

@kyriediculous
Created April 5, 2018 07:14
Show Gist options
  • Save kyriediculous/61df91b0383a7af799181ab6e37cdadd to your computer and use it in GitHub Desktop.
Save kyriediculous/61df91b0383a7af799181ab6e37cdadd to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.19;
import './CMCEnabled.sol';
contract Storage is CMCEnabled {
uint public x;
function setX(uint _x) external isCMCEnabled("Storage") {
x = _x;
}
}
contract Controller is CMCEnabled {
function setX(uint _x) external isCMCEnabled("UserEntry") {
Storage(ContractProvider(CMC).contracts("Storage")).setX(_x);
}
}
contract UserEntry is CMCEnabled {
function setX(uint _x) external {
Controller(ContractProvider(CMC).contracts("Controller")).setX(_x);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment