* Update contract pragmas to solidity 0.7 * Remove internal declaration on constructors * Reference SafeMath explicitely * Remove public constructor declaration from abstract contracts * Remove public constructor declaration from non-abstract contracts
41 lines
841 B
Solidity
41 lines
841 B
Solidity
// SPDX-License-Identifier: MIT
|
|
|
|
pragma solidity ^0.7.0;
|
|
|
|
contract CallReceiverMock {
|
|
|
|
event MockFunctionCalled();
|
|
|
|
uint256[] private _array;
|
|
|
|
function mockFunction() public payable returns (string memory) {
|
|
emit MockFunctionCalled();
|
|
|
|
return "0x1234";
|
|
}
|
|
|
|
function mockFunctionNonPayable() public returns (string memory) {
|
|
emit MockFunctionCalled();
|
|
|
|
return "0x1234";
|
|
}
|
|
|
|
function mockFunctionRevertsNoReason() public payable {
|
|
revert();
|
|
}
|
|
|
|
function mockFunctionRevertsReason() public payable {
|
|
revert("CallReceiverMock: reverting");
|
|
}
|
|
|
|
function mockFunctionThrows() public payable {
|
|
assert(false);
|
|
}
|
|
|
|
function mockFunctionOutOfGas() public payable {
|
|
for (uint256 i = 0; ; ++i) {
|
|
_array.push(i);
|
|
}
|
|
}
|
|
}
|