Add functionStaticCall and functionDelegateCall methods to Address library (#2333)
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
pragma solidity ^0.6.0;
|
||||
|
||||
contract CallReceiverMock {
|
||||
string public sharedAnswer;
|
||||
|
||||
event MockFunctionCalled();
|
||||
|
||||
@ -20,6 +21,10 @@ contract CallReceiverMock {
|
||||
return "0x1234";
|
||||
}
|
||||
|
||||
function mockStaticFunction() public pure returns (string memory) {
|
||||
return "0x1234";
|
||||
}
|
||||
|
||||
function mockFunctionRevertsNoReason() public payable {
|
||||
revert();
|
||||
}
|
||||
@ -37,4 +42,9 @@ contract CallReceiverMock {
|
||||
_array.push(i);
|
||||
}
|
||||
}
|
||||
|
||||
function mockFunctionWritesStorage() public returns (string memory) {
|
||||
sharedAnswer = "42";
|
||||
return "0x1234";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user