refactor
This commit is contained in:
@ -13,12 +13,11 @@ contract CanReclaimToken is Ownable {
|
||||
|
||||
/**
|
||||
* @dev Reclaim all ERC20Basic compatible tokens
|
||||
* @param tokenAddr address The address of the token contract
|
||||
* @param token ERC20Basic The address of the token contract
|
||||
*/
|
||||
function reclaimToken(address tokenAddr) external onlyOwner {
|
||||
ERC20Basic tokenInst = ERC20Basic(tokenAddr);
|
||||
uint256 balance = tokenInst.balanceOf(this);
|
||||
tokenInst.transfer(owner, balance);
|
||||
function reclaimToken(ERC20Basic token) external onlyOwner {
|
||||
uint256 balance = token.balanceOf(this);
|
||||
token.transfer(owner, balance);
|
||||
}
|
||||
|
||||
}
|
||||
@ -8,7 +8,7 @@ contract('CanReclaimToken', function(accounts) {
|
||||
let token = null;
|
||||
let canReclaimToken = null;
|
||||
|
||||
beforeEach(async () => {
|
||||
beforeEach(async function() {
|
||||
// Create contract and token
|
||||
token = await BasicTokenMock.new(accounts[0], 100);
|
||||
canReclaimToken = await CanReclaimToken.new();
|
||||
|
||||
Reference in New Issue
Block a user