Skip to content

Instantly share code, notes, and snippets.

@trapp
Last active May 26, 2016 11:35
Show Gist options
  • Save trapp/e09ff97a879e2251fa50c130ee06cbc9 to your computer and use it in GitHub Desktop.
Save trapp/e09ff97a879e2251fa50c130ee06cbc9 to your computer and use it in GitHub Desktop.
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