-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathTestMaliciousERC20.sol
52 lines (41 loc) · 1.56 KB
/
TestMaliciousERC20.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.25;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "../../Pool.sol";
contract TestMaliciousERC20 {
/**************************************************************************/
/* Constants */
/**************************************************************************/
/**
* @notice Fixed point scale
*/
uint256 internal constant FIXED_POINT_SCALE = 1e18;
/**************************************************************************/
/* State */
/**************************************************************************/
/**
* @notice MetaStreet V2 Pool
*/
Pool internal _pool;
/**
* @notice Deposit tick
*/
uint128 internal _tick;
/**************************************************************************/
/* Constructor */
/**************************************************************************/
constructor(address pool_, uint128 tick_) {
_pool = Pool(pool_);
_tick = tick_;
}
/**************************************************************************/
/* IERC20 API */
/**************************************************************************/
function transfer(address to, uint256 value) public returns (bool) {
_pool.transfer(msg.sender, to, _tick, value);
return true;
}
}