Skip to content

Instantly share code, notes, and snippets.

@silasdavis
Last active May 5, 2017 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save silasdavis/7f35cb31a255c18d2fc70eed1fa38211 to your computer and use it in GitHub Desktop.
Save silasdavis/7f35cb31a255c18d2fc70eed1fa38211 to your computer and use it in GitHub Desktop.
selfdestruct issue
  • test self destructing contracts
jobs:
- name: deployMortal
job:
deploy:
contract: mortal.sol
- name: callMortal
job:
call:
destination: $deployMortal
function: destroy
pragma solidity >=0.0.0;
import "./owned.sol";
contract mortal is owned {
function destroy() onlyOwner {
selfdestruct(owner);
}
}
pragma solidity >=0.0.0;
contract owned {
address owner;
modifier onlyOwner() {
if (msg.sender == owner) {
_;
}
}
function owned() {
owner = msg.sender;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment