This repository was archived by the owner on May 9, 2024. It is now read-only.
File tree 3 files changed +2
-25
lines changed
3 files changed +2
-25
lines changed Original file line number Diff line number Diff line change @@ -13,17 +13,6 @@ import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol";
13
13
contract ERC20Safe {
14
14
using SafeMath for uint256 ;
15
15
16
- /**
17
- @notice Used to transfer tokens into the safe to fund proposals.
18
- @param tokenAddress Address of ERC20 to transfer.
19
- @param owner Address of current token owner.
20
- @param amount Amount of tokens to transfer.
21
- */
22
- function fundERC20 (address tokenAddress , address owner , uint256 amount ) public {
23
- IERC20 erc20 = IERC20 (tokenAddress);
24
- _safeTransferFrom (erc20, owner, address (this ), amount);
25
- }
26
-
27
16
/**
28
17
@notice Used to gain custody of deposited token.
29
18
@param tokenAddress Address of ERC20 to transfer.
Original file line number Diff line number Diff line change @@ -12,17 +12,6 @@ import "./ERC721MinterBurnerPauser.sol";
12
12
contract ERC721Safe {
13
13
using SafeMath for uint256 ;
14
14
15
- /**
16
- @notice Used to transfer tokens into the safe to fund proposals.
17
- @param tokenAddress Address of ERC721 to transfer.
18
- @param owner Address of current token owner.
19
- @param tokenID ID of token to transfer.
20
- */
21
- function fundERC721 (address tokenAddress , address owner , uint tokenID ) public {
22
- IERC721 erc721 = IERC721 (tokenAddress);
23
- erc721.transferFrom (owner, address (this ), tokenID);
24
- }
25
-
26
15
/**
27
16
@notice Used to gain custoday of deposited token.
28
17
@param tokenAddress Address of ERC721 to transfer.
Original file line number Diff line number Diff line change @@ -174,9 +174,8 @@ contract('Bridge - [admin]', async accounts => {
174
174
await ERC20MintableInstance . mint ( tokenOwner , numTokens ) ;
175
175
ownerBalance = await ERC20MintableInstance . balanceOf ( tokenOwner ) ;
176
176
assert . equal ( ownerBalance , numTokens ) ;
177
-
178
- await ERC20MintableInstance . approve ( ERC20HandlerInstance . address , numTokens ) ;
179
- await ERC20HandlerInstance . fundERC20 ( ERC20MintableInstance . address , tokenOwner , numTokens ) ;
177
+
178
+ await ERC20MintableInstance . transfer ( ERC20HandlerInstance . address , numTokens ) ;
180
179
ownerBalance = await ERC20MintableInstance . balanceOf ( tokenOwner ) ;
181
180
assert . equal ( ownerBalance , 0 ) ;
182
181
handlerBalance = await ERC20MintableInstance . balanceOf ( ERC20HandlerInstance . address ) ;
You can’t perform that action at this time.
0 commit comments