Last active
May 26, 2016 11:35
-
-
Save trapp/e09ff97a879e2251fa50c130ee06cbc9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import "owned"; | |
contract TokenProxy is owned { | |
modifier noEther() {if (msg.value > 0) throw; _} | |
event TokenTransfer(address indexed tokenAddress, address indexed to, uint256 value); | |
function () noEther { | |
} | |
function transferToken(address tokenAddress, address to, uint256 value) onlyowner noEther { | |
TokenInterface token = TokenInterface(tokenAddress); | |
token.transfer(to, value); | |
TokenTransfer(tokenAddress, to, value); | |
} | |
} | |
contract TokenInterface { | |
function transfer(address _to, uint256 _amount) returns (bool success); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment