Skip to content

Instantly share code, notes, and snippets.

View ElementalBrian's full-sized avatar

ElementalBrian ElementalBrian

View GitHub Profile
@ElementalBrian
ElementalBrian / Destroyable.sol
Created August 21, 2020 15:20
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.12+commit.7709ece9.js&optimize=false&gist=
import "./Ownable.sol";
pragma solidity 0.5.12;
contract Destroyable is Ownable{
function close() public onlyOwner { //onlyOwner is custom modifier
address payable ownerpayable = address(uint160(owner));
selfdestruct(ownerpayable); // `owner` is the owners address
}
}
@ElementalBrian
ElementalBrian / Destroyable.sol
Created August 20, 2020 19:13
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.12+commit.7709ece9.js&optimize=false&gist=
import "./Ownable.sol";
pragma solidity 0.5.12;
contract Destroyable is Ownable{
function close() public onlyOwner { //onlyOwner is custom modifier
address payable ownerpayable = address(uint160(owner));
selfdestruct(ownerpayable); // `owner` is the owners address
}
}
@ElementalBrian
ElementalBrian / Destroyable.sol
Created August 19, 2020 17:59
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.12+commit.7709ece9.js&optimize=false&gist=
import "./Ownable.sol";
pragma solidity 0.5.12;
contract Destroyable is Ownable{
function close() public onlyOwner { //onlyOwner is custom modifier
address payable ownerpayable = address(uint160(owner));
selfdestruct(ownerpayable); // `owner` is the owners address
}
}
@ElementalBrian
ElementalBrian / Destroyable.sol
Created August 19, 2020 16:55
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.12+commit.7709ece9.js&optimize=false&gist=
import "./Ownable.sol";
pragma solidity 0.5.12;
contract Destroyable is Ownable{
function close() public onlyOwner { //onlyOwner is custom modifier
address payable ownerpayable = address(uint160(owner));
selfdestruct(ownerpayable); // `owner` is the owners address
}
}
@ElementalBrian
ElementalBrian / Destroyable.sol
Created August 19, 2020 16:49
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.12+commit.7709ece9.js&optimize=false&gist=
pragma solidity 0.5.12;
contract Destroyable{
}