-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathMockToken6.sol
66 lines (50 loc) · 1.89 KB
/
MockToken6.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.13;
import "../token/types/Token6.sol";
contract MockToken6 {
function zero() external pure returns (Token6) {
return Token6Lib.ZERO;
}
function isZero(Token6 token) external pure returns (bool) {
return Token6Lib.isZero(token);
}
function eq(Token6 a, Token6 b) external pure returns (bool) {
return Token6Lib.eq(a, b);
}
function approve(Token6 self, address grantee) external {
Token6Lib.approve(self, grantee);
}
function approve(Token6 self, address grantee, UFixed6 amount) external {
Token6Lib.approve(self, grantee, amount);
}
function push(Token6 self, address recipient) external {
Token6Lib.push(self, recipient);
}
function push(Token6 self, address recipient, UFixed6 amount) external {
Token6Lib.push(self, recipient, amount);
}
function pull(Token6 self, address benefactor, UFixed6 amount) external {
Token6Lib.pull(self, benefactor, amount);
}
function pullTo(Token6 self, address benefactor, address recipient, UFixed6 amount) external {
Token6Lib.pullTo(self, benefactor, recipient, amount);
}
function name(Token6 self) external view returns (string memory) {
return Token6Lib.name(self);
}
function symbol(Token6 self) external view returns (string memory) {
return Token6Lib.symbol(self);
}
function balanceOf(Token6 self) external view returns (UFixed6) {
return Token6Lib.balanceOf(self);
}
function balanceOf(Token6 self, address account) external view returns (UFixed6) {
return Token6Lib.balanceOf(self, account);
}
function read(Token6Storage slot) external view returns (Token6) {
return slot.read();
}
function store(Token6Storage slot, Token6 value) external {
slot.store(value);
}
}