-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathMockTokenOrEther18.sol
76 lines (57 loc) · 2.42 KB
/
MockTokenOrEther18.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
67
68
69
70
71
72
73
74
75
76
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.13;
import "../token/types/TokenOrEther18.sol";
contract MockTokenOrEther18 {
function zero() external pure returns (TokenOrEther18) {
return TokenOrEther18Lib.ZERO;
}
function etherToken() external pure returns (TokenOrEther18) {
return TokenOrEther18Lib.ETHER;
}
function isZero(TokenOrEther18 token) external pure returns (bool) {
return TokenOrEther18Lib.isZero(token);
}
function isEther(TokenOrEther18 token) external pure returns (bool) {
return TokenOrEther18Lib.isEther(token);
}
function eq(TokenOrEther18 a, TokenOrEther18 b) external pure returns (bool) {
return TokenOrEther18Lib.eq(a, b);
}
function approve(TokenOrEther18 self, address grantee) external {
TokenOrEther18Lib.approve(self, grantee);
}
function approve(TokenOrEther18 self, address grantee, UFixed18 amount) external {
TokenOrEther18Lib.approve(self, grantee, amount);
}
function push(TokenOrEther18 self, address recipient) external {
TokenOrEther18Lib.push(self, recipient);
}
function push(TokenOrEther18 self, address recipient, UFixed18 amount) external {
TokenOrEther18Lib.push(self, recipient, amount);
}
function pull(TokenOrEther18 self, address benefactor, UFixed18 amount) external {
TokenOrEther18Lib.pull(self, benefactor, amount);
}
function pullTo(TokenOrEther18 self, address benefactor, address recipient, UFixed18 amount) external {
TokenOrEther18Lib.pullTo(self, benefactor, recipient, amount);
}
function name(TokenOrEther18 self) external view returns (string memory) {
return TokenOrEther18Lib.name(self);
}
function symbol(TokenOrEther18 self) external view returns (string memory) {
return TokenOrEther18Lib.symbol(self);
}
function balanceOf(TokenOrEther18 self) external view returns (UFixed18) {
return TokenOrEther18Lib.balanceOf(self);
}
function balanceOf(TokenOrEther18 self, address account) external view returns (UFixed18) {
return TokenOrEther18Lib.balanceOf(self, account);
}
function read(TokenOrEther18Storage slot) external view returns (TokenOrEther18) {
return slot.read();
}
function store(TokenOrEther18Storage slot, TokenOrEther18 value) external {
slot.store(value);
}
receive() external payable { }
}