Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
51906bae
Commit
51906bae
authored
Aug 24, 2017
by
SylTi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor
parent
406004a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
CanReclaimToken.sol
contracts/ownership/CanReclaimToken.sol
+5
-5
CanReclaimToken.js
test/CanReclaimToken.js
+1
-1
No files found.
contracts/ownership/CanReclaimToken.sol
View file @
51906bae
...
...
@@ -13,12 +13,11 @@ contract CanReclaimToken is Ownable {
/**
* @dev Reclaim all ERC20Basic compatible tokens
* @param token
Addr 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);
}
}
\ No newline at end of file
test/CanReclaimToken.js
View file @
51906bae
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment