forked from ethereum/solidity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathabi_encode_conversions.sol
35 lines (33 loc) · 1.03 KB
/
abi_encode_conversions.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
interface testInterface {
function C(function (string memory) external) external;
function D(string calldata) external;
function E(string memory) external;
function F(address) external;
}
contract testContract {
function g(string calldata) external {}
function h(string memory) external {}
function i(string calldata str) external {
this.h(str);
this.g(str);
}
function j(string memory str) external {
this.h(str);
this.g(str);
}
function k(string memory str) external pure {
abi.encodeCall(testInterface.D, (str));
}
string s;
function main() external view {
abi.encodeCall(testInterface.C, (this.g));
abi.encodeCall(testInterface.C, (this.h));
abi.encodeCall(testInterface.D, (s));
abi.encodeCall(testInterface.E, (s));
abi.encodeCall(testInterface.F, (payable(address(0))));
abi.encodeCall(this.i, (s));
abi.encodeCall(this.j, (s));
}
}
// ----
// Warning 6133: (860-914): Statement has no effect.