@safe-global/safe-contracts
Version:
Ethereum multisig contract
1 lines • 596 kB
JSON
{"id":"219fe4dd27b39a00c7d2b9bbf4142ff6","_format":"hh-sol-build-info-1","solcVersion":"0.6.12","solcLongVersion":"0.6.12+commit.27d51765","input":{"language":"Solidity","sources":{"@gnosis.pm/mock-contract/contracts/MockContract.sol":{"content":"pragma solidity ^0.6.0;\n\ninterface MockInterface {\n\t/**\n\t * @dev After calling this method, the mock will return `response` when it is called\n\t * with any calldata that is not mocked more specifically below\n\t * (e.g. using givenMethodReturn).\n\t * @param response ABI encoded response that will be returned if method is invoked\n\t */\n\tfunction givenAnyReturn(bytes calldata response) external;\n\tfunction givenAnyReturnBool(bool response) external;\n\tfunction givenAnyReturnUint(uint response) external;\n\tfunction givenAnyReturnAddress(address response) external;\n\n\tfunction givenAnyRevert() external;\n\tfunction givenAnyRevertWithMessage(string calldata message) external;\n\tfunction givenAnyRunOutOfGas() external;\n\n\t/**\n\t * @dev After calling this method, the mock will return `response` when the given\n\t * methodId is called regardless of arguments. If the methodId and arguments\n\t * are mocked more specifically (using `givenMethodAndArguments`) the latter\n\t * will take precedence.\n\t * @param method ABI encoded methodId. It is valid to pass full calldata (including arguments). The mock will extract the methodId from it\n\t * @param response ABI encoded response that will be returned if method is invoked\n\t */\n\tfunction givenMethodReturn(bytes calldata method, bytes calldata response) external;\n\tfunction givenMethodReturnBool(bytes calldata method, bool response) external;\n\tfunction givenMethodReturnUint(bytes calldata method, uint response) external;\n\tfunction givenMethodReturnAddress(bytes calldata method, address response) external;\n\n\tfunction givenMethodRevert(bytes calldata method) external;\n\tfunction givenMethodRevertWithMessage(bytes calldata method, string calldata message) external;\n\tfunction givenMethodRunOutOfGas(bytes calldata method) external;\n\n\t/**\n\t * @dev After calling this method, the mock will return `response` when the given\n\t * methodId is called with matching arguments. These exact calldataMocks will take\n\t * precedence over all other calldataMocks.\n\t * @param call ABI encoded calldata (methodId and arguments)\n\t * @param response ABI encoded response that will be returned if contract is invoked with calldata\n\t */\n\tfunction givenCalldataReturn(bytes calldata call, bytes calldata response) external;\n\tfunction givenCalldataReturnBool(bytes calldata call, bool response) external;\n\tfunction givenCalldataReturnUint(bytes calldata call, uint response) external;\n\tfunction givenCalldataReturnAddress(bytes calldata call, address response) external;\n\n\tfunction givenCalldataRevert(bytes calldata call) external;\n\tfunction givenCalldataRevertWithMessage(bytes calldata call, string calldata message) external;\n\tfunction givenCalldataRunOutOfGas(bytes calldata call) external;\n\n\t/**\n\t * @dev Returns the number of times anything has been called on this mock since last reset\n\t */\n\tfunction invocationCount() external returns (uint);\n\n\t/**\n\t * @dev Returns the number of times the given method has been called on this mock since last reset\n\t * @param method ABI encoded methodId. It is valid to pass full calldata (including arguments). The mock will extract the methodId from it\n\t */\n\tfunction invocationCountForMethod(bytes calldata method) external returns (uint);\n\n\t/**\n\t * @dev Returns the number of times this mock has been called with the exact calldata since last reset.\n\t * @param call ABI encoded calldata (methodId and arguments)\n\t */\n\tfunction invocationCountForCalldata(bytes calldata call) external returns (uint);\n\n\t/**\n\t * @dev Resets all mocked methods and invocation counts.\n\t */\n\t function reset() external;\n}\n\n/**\n * Implementation of the MockInterface.\n */\ncontract MockContract is MockInterface {\n\tenum MockType { Return, Revert, OutOfGas }\n\t\n\tbytes32 public constant MOCKS_LIST_START = hex\"01\";\n\tbytes public constant MOCKS_LIST_END = \"0xff\";\n\tbytes32 public constant MOCKS_LIST_END_HASH = keccak256(MOCKS_LIST_END);\n\tbytes4 public constant SENTINEL_ANY_MOCKS = hex\"01\";\n\tbytes public constant DEFAULT_FALLBACK_VALUE = abi.encode(false);\n\n\t// A linked list allows easy iteration and inclusion checks\n\tmapping(bytes32 => bytes) calldataMocks;\n\tmapping(bytes => MockType) calldataMockTypes;\n\tmapping(bytes => bytes) calldataExpectations;\n\tmapping(bytes => string) calldataRevertMessage;\n\tmapping(bytes32 => uint) calldataInvocations;\n\n\tmapping(bytes4 => bytes4) methodIdMocks;\n\tmapping(bytes4 => MockType) methodIdMockTypes;\n\tmapping(bytes4 => bytes) methodIdExpectations;\n\tmapping(bytes4 => string) methodIdRevertMessages;\n\tmapping(bytes32 => uint) methodIdInvocations;\n\n\tMockType fallbackMockType;\n\tbytes fallbackExpectation = DEFAULT_FALLBACK_VALUE;\n\tstring fallbackRevertMessage;\n\tuint invocations;\n\tuint resetCount;\n\n\tconstructor() public {\n\t\tcalldataMocks[MOCKS_LIST_START] = MOCKS_LIST_END;\n\t\tmethodIdMocks[SENTINEL_ANY_MOCKS] = SENTINEL_ANY_MOCKS;\n\t}\n\n\tfunction trackCalldataMock(bytes memory call) private {\n\t\tbytes32 callHash = keccak256(call);\n\t\tif (calldataMocks[callHash].length == 0) {\n\t\t\tcalldataMocks[callHash] = calldataMocks[MOCKS_LIST_START];\n\t\t\tcalldataMocks[MOCKS_LIST_START] = call;\n\t\t}\n\t}\n\n\tfunction trackMethodIdMock(bytes4 methodId) private {\n\t\tif (methodIdMocks[methodId] == 0x0) {\n\t\t\tmethodIdMocks[methodId] = methodIdMocks[SENTINEL_ANY_MOCKS];\n\t\t\tmethodIdMocks[SENTINEL_ANY_MOCKS] = methodId;\n\t\t}\n\t}\n\n\tfunction _givenAnyReturn(bytes memory response) internal {\n\t\tfallbackMockType = MockType.Return;\n\t\tfallbackExpectation = response;\n\t}\n\n\tfunction givenAnyReturn(bytes calldata response) override external {\n\t\t_givenAnyReturn(response);\n\t}\n\n\tfunction givenAnyReturnBool(bool response) override external {\n\t\tuint flag = response ? 1 : 0;\n\t\t_givenAnyReturn(uintToBytes(flag));\n\t}\n\n\tfunction givenAnyReturnUint(uint response) override external {\n\t\t_givenAnyReturn(uintToBytes(response));\t\n\t}\n\n\tfunction givenAnyReturnAddress(address response) override external {\n\t\t_givenAnyReturn(uintToBytes(uint(response)));\n\t}\n\n\tfunction givenAnyRevert() override external {\n\t\tfallbackMockType = MockType.Revert;\n\t\tfallbackRevertMessage = \"\";\n\t}\n\n\tfunction givenAnyRevertWithMessage(string calldata message) override external {\n\t\tfallbackMockType = MockType.Revert;\n\t\tfallbackRevertMessage = message;\n\t}\n\n\tfunction givenAnyRunOutOfGas() override external {\n\t\tfallbackMockType = MockType.OutOfGas;\n\t}\n\n\tfunction _givenCalldataReturn(bytes memory call, bytes memory response) private {\n\t\tcalldataMockTypes[call] = MockType.Return;\n\t\tcalldataExpectations[call] = response;\n\t\ttrackCalldataMock(call);\n\t}\n\n\tfunction givenCalldataReturn(bytes calldata call, bytes calldata response) override external {\n\t\t_givenCalldataReturn(call, response);\n\t}\n\n\tfunction givenCalldataReturnBool(bytes calldata call, bool response) override external {\n\t\tuint flag = response ? 1 : 0;\n\t\t_givenCalldataReturn(call, uintToBytes(flag));\n\t}\n\n\tfunction givenCalldataReturnUint(bytes calldata call, uint response) override external {\n\t\t_givenCalldataReturn(call, uintToBytes(response));\n\t}\n\n\tfunction givenCalldataReturnAddress(bytes calldata call, address response) override external {\n\t\t_givenCalldataReturn(call, uintToBytes(uint(response)));\n\t}\n\n\tfunction _givenMethodReturn(bytes memory call, bytes memory response) private {\n\t\tbytes4 method = bytesToBytes4(call);\n\t\tmethodIdMockTypes[method] = MockType.Return;\n\t\tmethodIdExpectations[method] = response;\n\t\ttrackMethodIdMock(method);\t\t\n\t}\n\n\tfunction givenMethodReturn(bytes calldata call, bytes calldata response) override external {\n\t\t_givenMethodReturn(call, response);\n\t}\n\n\tfunction givenMethodReturnBool(bytes calldata call, bool response) override external {\n\t\tuint flag = response ? 1 : 0;\n\t\t_givenMethodReturn(call, uintToBytes(flag));\n\t}\n\n\tfunction givenMethodReturnUint(bytes calldata call, uint response) override external {\n\t\t_givenMethodReturn(call, uintToBytes(response));\n\t}\n\n\tfunction givenMethodReturnAddress(bytes calldata call, address response) override external {\n\t\t_givenMethodReturn(call, uintToBytes(uint(response)));\n\t}\n\n\tfunction givenCalldataRevert(bytes calldata call) override external {\n\t\tcalldataMockTypes[call] = MockType.Revert;\n\t\tcalldataRevertMessage[call] = \"\";\n\t\ttrackCalldataMock(call);\n\t}\n\n\tfunction givenMethodRevert(bytes calldata call) override external {\n\t\tbytes4 method = bytesToBytes4(call);\n\t\tmethodIdMockTypes[method] = MockType.Revert;\n\t\ttrackMethodIdMock(method);\t\t\n\t}\n\n\tfunction givenCalldataRevertWithMessage(bytes calldata call, string calldata message) override external {\n\t\tcalldataMockTypes[call] = MockType.Revert;\n\t\tcalldataRevertMessage[call] = message;\n\t\ttrackCalldataMock(call);\n\t}\n\n\tfunction givenMethodRevertWithMessage(bytes calldata call, string calldata message) override external {\n\t\tbytes4 method = bytesToBytes4(call);\n\t\tmethodIdMockTypes[method] = MockType.Revert;\n\t\tmethodIdRevertMessages[method] = message;\n\t\ttrackMethodIdMock(method);\t\t\n\t}\n\n\tfunction givenCalldataRunOutOfGas(bytes calldata call) override external {\n\t\tcalldataMockTypes[call] = MockType.OutOfGas;\n\t\ttrackCalldataMock(call);\n\t}\n\n\tfunction givenMethodRunOutOfGas(bytes calldata call) override external {\n\t\tbytes4 method = bytesToBytes4(call);\n\t\tmethodIdMockTypes[method] = MockType.OutOfGas;\n\t\ttrackMethodIdMock(method);\t\n\t}\n\n\tfunction invocationCount() override external returns (uint) {\n\t\treturn invocations;\n\t}\n\n\tfunction invocationCountForMethod(bytes calldata call) override external returns (uint) {\n\t\tbytes4 method = bytesToBytes4(call);\n\t\treturn methodIdInvocations[keccak256(abi.encodePacked(resetCount, method))];\n\t}\n\n\tfunction invocationCountForCalldata(bytes calldata call) override external returns (uint) {\n\t\treturn calldataInvocations[keccak256(abi.encodePacked(resetCount, call))];\n\t}\n\n\tfunction reset() override external {\n\t\t// Reset all exact calldataMocks\n\t\tbytes memory nextMock = calldataMocks[MOCKS_LIST_START];\n\t\tbytes32 mockHash = keccak256(nextMock);\n\t\t// We cannot compary bytes\n\t\twhile(mockHash != MOCKS_LIST_END_HASH) {\n\t\t\t// Reset all mock maps\n\t\t\tcalldataMockTypes[nextMock] = MockType.Return;\n\t\t\tcalldataExpectations[nextMock] = hex\"\";\n\t\t\tcalldataRevertMessage[nextMock] = \"\";\n\t\t\t// Set next mock to remove\n\t\t\tnextMock = calldataMocks[mockHash];\n\t\t\t// Remove from linked list\n\t\t\tcalldataMocks[mockHash] = \"\";\n\t\t\t// Update mock hash\n\t\t\tmockHash = keccak256(nextMock);\n\t\t}\n\t\t// Clear list\n\t\tcalldataMocks[MOCKS_LIST_START] = MOCKS_LIST_END;\n\n\t\t// Reset all any calldataMocks\n\t\tbytes4 nextAnyMock = methodIdMocks[SENTINEL_ANY_MOCKS];\n\t\twhile(nextAnyMock != SENTINEL_ANY_MOCKS) {\n\t\t\tbytes4 currentAnyMock = nextAnyMock;\n\t\t\tmethodIdMockTypes[currentAnyMock] = MockType.Return;\n\t\t\tmethodIdExpectations[currentAnyMock] = hex\"\";\n\t\t\tmethodIdRevertMessages[currentAnyMock] = \"\";\n\t\t\tnextAnyMock = methodIdMocks[currentAnyMock];\n\t\t\t// Remove from linked list\n\t\t\tmethodIdMocks[currentAnyMock] = 0x0;\n\t\t}\n\t\t// Clear list\n\t\tmethodIdMocks[SENTINEL_ANY_MOCKS] = SENTINEL_ANY_MOCKS;\n\n\t\tfallbackExpectation = DEFAULT_FALLBACK_VALUE;\n\t\tfallbackMockType = MockType.Return;\n\t\tinvocations = 0;\n\t\tresetCount += 1;\n\t}\n\n\tfunction useAllGas() private {\n\t\twhile(true) {\n\t\t\tbool s;\n\t\t\tassembly {\n\t\t\t\t//expensive call to EC multiply contract\n\t\t\t\ts := call(sub(gas(), 2000), 6, 0, 0x0, 0xc0, 0x0, 0x60)\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction bytesToBytes4(bytes memory b) private pure returns (bytes4) {\n\t\tbytes4 out;\n\t\tfor (uint i = 0; i < 4; i++) {\n\t\t\tout |= bytes4(b[i] & 0xFF) >> (i * 8);\n\t\t}\n\t\treturn out;\n\t}\n\n\tfunction uintToBytes(uint256 x) private pure returns (bytes memory b) {\n\t\tb = new bytes(32);\n\t\tassembly { mstore(add(b, 32), x) }\n\t}\n\n\tfunction updateInvocationCount(bytes4 methodId, bytes memory originalMsgData) public {\n\t\trequire(msg.sender == address(this), \"Can only be called from the contract itself\");\n\t\tinvocations += 1;\n\t\tmethodIdInvocations[keccak256(abi.encodePacked(resetCount, methodId))] += 1;\n\t\tcalldataInvocations[keccak256(abi.encodePacked(resetCount, originalMsgData))] += 1;\n\t}\n\n\tfallback () payable external {\n\t\tbytes4 methodId;\n\t\tassembly {\n\t\t\tmethodId := calldataload(0)\n\t\t}\n\n\t\t// First, check exact matching overrides\n\t\tif (calldataMockTypes[msg.data] == MockType.Revert) {\n\t\t\trevert(calldataRevertMessage[msg.data]);\n\t\t}\n\t\tif (calldataMockTypes[msg.data] == MockType.OutOfGas) {\n\t\t\tuseAllGas();\n\t\t}\n\t\tbytes memory result = calldataExpectations[msg.data];\n\n\t\t// Then check method Id overrides\n\t\tif (result.length == 0) {\n\t\t\tif (methodIdMockTypes[methodId] == MockType.Revert) {\n\t\t\t\trevert(methodIdRevertMessages[methodId]);\n\t\t\t}\n\t\t\tif (methodIdMockTypes[methodId] == MockType.OutOfGas) {\n\t\t\t\tuseAllGas();\n\t\t\t}\n\t\t\tresult = methodIdExpectations[methodId];\n\t\t}\n\n\t\t// Last, use the fallback override\n\t\tif (result.length == 0) {\n\t\t\tif (fallbackMockType == MockType.Revert) {\n\t\t\t\trevert(fallbackRevertMessage);\n\t\t\t}\n\t\t\tif (fallbackMockType == MockType.OutOfGas) {\n\t\t\t\tuseAllGas();\n\t\t\t}\n\t\t\tresult = fallbackExpectation;\n\t\t}\n\n\t\t// Record invocation as separate call so we don't rollback in case we are called with STATICCALL\n\t\t(, bytes memory r) = address(this).call{gas: 100000}(abi.encodeWithSignature(\"updateInvocationCount(bytes4,bytes)\", methodId, msg.data));\n\t\tassert(r.length == 0);\n\t\t\n\t\tassembly {\n\t\t\treturn(add(0x20, result), mload(result))\n\t\t}\n\t}\n}\n"},"contracts/test/Token.sol":{"content":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.6.0 <0.7.0;\nimport \"@gnosis.pm/mock-contract/contracts/MockContract.sol\";\n\ninterface Token {\n function transfer(address _to, uint256 value) external returns (bool);\n}\n"}},"settings":{"optimizer":{"enabled":false,"runs":200},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata","devdoc","userdoc","storageLayout","evm.gasEstimates"],"":["ast"]}},"metadata":{"useLiteralContent":true}}},"output":{"errors":[{"component":"general","errorCode":"1878","formattedMessage":"@gnosis.pm/mock-contract/contracts/MockContract.sol: Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing \"SPDX-License-Identifier: <SPDX-License>\" to each source file. Use \"SPDX-License-Identifier: UNLICENSED\" for non-open-source code. Please see https://spdx.org for more information.\n","message":"SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing \"SPDX-License-Identifier: <SPDX-License>\" to each source file. Use \"SPDX-License-Identifier: UNLICENSED\" for non-open-source code. Please see https://spdx.org for more information.","severity":"warning","sourceLocation":{"end":-1,"file":"@gnosis.pm/mock-contract/contracts/MockContract.sol","start":-1},"type":"Warning"},{"component":"general","errorCode":"3628","formattedMessage":"@gnosis.pm/mock-contract/contracts/MockContract.sol:78:1: Warning: This contract has a payable fallback function, but no receive ether function. Consider adding a receive ether function.\ncontract MockContract is MockInterface {\n^ (Relevant source part starts here and spans across multiple lines).\n@gnosis.pm/mock-contract/contracts/MockContract.sol:328:2: The payable fallback function is defined here.\n\tfallback () payable external {\n ^ (Relevant source part starts here and spans across multiple lines).\n","message":"This contract has a payable fallback function, but no receive ether function. Consider adding a receive ether function.","secondarySourceLocations":[{"end":13100,"file":"@gnosis.pm/mock-contract/contracts/MockContract.sol","message":"The payable fallback function is defined here.","start":11828}],"severity":"warning","sourceLocation":{"end":13102,"file":"@gnosis.pm/mock-contract/contracts/MockContract.sol","start":3610},"type":"Warning"}],"sources":{"@gnosis.pm/mock-contract/contracts/MockContract.sol":{"ast":{"absolutePath":"@gnosis.pm/mock-contract/contracts/MockContract.sol","exportedSymbols":{"MockContract":[1208],"MockInterface":[152]},"id":1209,"license":null,"nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.6",".0"],"nodeType":"PragmaDirective","src":"0:23:0"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"interface","documentation":null,"fullyImplemented":false,"id":152,"linearizedBaseContracts":[152],"name":"MockInterface","nodeType":"ContractDefinition","nodes":[{"body":null,"documentation":{"id":2,"nodeType":"StructuredDocumentation","src":"52:279:0","text":" @dev After calling this method, the mock will return `response` when it is called\n with any calldata that is not mocked more specifically below\n (e.g. using givenMethodReturn).\n @param response ABI encoded response that will be returned if method is invoked"},"functionSelector":"d6fe9778","id":7,"implemented":false,"kind":"function","modifiers":[],"name":"givenAnyReturn","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":5,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"response","nodeType":"VariableDeclaration","overrides":null,"scope":7,"src":"357:23:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":3,"name":"bytes","nodeType":"ElementaryTypeName","src":"357:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"356:25:0"},"returnParameters":{"id":6,"nodeType":"ParameterList","parameters":[],"src":"390:0:0"},"scope":152,"src":"333:58:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"36ff0ee5","id":12,"implemented":false,"kind":"function","modifiers":[],"name":"givenAnyReturnBool","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":10,"nodeType":"ParameterList","parameters":[{"constant":false,"id":9,"mutability":"mutable","name":"response","nodeType":"VariableDeclaration","overrides":null,"scope":12,"src":"421:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":8,"name":"bool","nodeType":"ElementaryTypeName","src":"421:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"420:15:0"},"returnParameters":{"id":11,"nodeType":"ParameterList","parameters":[],"src":"444:0:0"},"scope":152,"src":"393:52:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"af21ac78","id":17,"implemented":false,"kind":"function","modifiers":[],"name":"givenAnyReturnUint","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":15,"nodeType":"ParameterList","parameters":[{"constant":false,"id":14,"mutability":"mutable","name":"response","nodeType":"VariableDeclaration","overrides":null,"scope":17,"src":"475:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":13,"name":"uint","nodeType":"ElementaryTypeName","src":"475:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"474:15:0"},"returnParameters":{"id":16,"nodeType":"ParameterList","parameters":[],"src":"498:0:0"},"scope":152,"src":"447:52:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"682b4797","id":22,"implemented":false,"kind":"function","modifiers":[],"name":"givenAnyReturnAddress","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":20,"nodeType":"ParameterList","parameters":[{"constant":false,"id":19,"mutability":"mutable","name":"response","nodeType":"VariableDeclaration","overrides":null,"scope":22,"src":"532:16:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":18,"name":"address","nodeType":"ElementaryTypeName","src":"532:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"531:18:0"},"returnParameters":{"id":21,"nodeType":"ParameterList","parameters":[],"src":"558:0:0"},"scope":152,"src":"501:58:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"e211b8a5","id":25,"implemented":false,"kind":"function","modifiers":[],"name":"givenAnyRevert","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":23,"nodeType":"ParameterList","parameters":[],"src":"585:2:0"},"returnParameters":{"id":24,"nodeType":"ParameterList","parameters":[],"src":"596:0:0"},"scope":152,"src":"562:35:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"87abab65","id":30,"implemented":false,"kind":"function","modifiers":[],"name":"givenAnyRevertWithMessage","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":28,"nodeType":"ParameterList","parameters":[{"constant":false,"id":27,"mutability":"mutable","name":"message","nodeType":"VariableDeclaration","overrides":null,"scope":30,"src":"634:23:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_string_calldata_ptr","typeString":"string"},"typeName":{"id":26,"name":"string","nodeType":"ElementaryTypeName","src":"634:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"}],"src":"633:25:0"},"returnParameters":{"id":29,"nodeType":"ParameterList","parameters":[],"src":"667:0:0"},"scope":152,"src":"599:69:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"3956dc6b","id":33,"implemented":false,"kind":"function","modifiers":[],"name":"givenAnyRunOutOfGas","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":31,"nodeType":"ParameterList","parameters":[],"src":"698:2:0"},"returnParameters":{"id":32,"nodeType":"ParameterList","parameters":[],"src":"709:0:0"},"scope":152,"src":"670:40:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":{"id":34,"nodeType":"StructuredDocumentation","src":"713:497:0","text":" @dev After calling this method, the mock will return `response` when the given\n methodId is called regardless of arguments. If the methodId and arguments\n are mocked more specifically (using `givenMethodAndArguments`) the latter\n will take precedence.\n @param method ABI encoded methodId. It is valid to pass full calldata (including arguments). The mock will extract the methodId from it\n @param response ABI encoded response that will be returned if method is invoked"},"functionSelector":"c6ee167f","id":41,"implemented":false,"kind":"function","modifiers":[],"name":"givenMethodReturn","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":39,"nodeType":"ParameterList","parameters":[{"constant":false,"id":36,"mutability":"mutable","name":"method","nodeType":"VariableDeclaration","overrides":null,"scope":41,"src":"1239:21:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":35,"name":"bytes","nodeType":"ElementaryTypeName","src":"1239:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"},{"constant":false,"id":38,"mutability":"mutable","name":"response","nodeType":"VariableDeclaration","overrides":null,"scope":41,"src":"1262:23:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":37,"name":"bytes","nodeType":"ElementaryTypeName","src":"1262:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"1238:48:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[],"src":"1295:0:0"},"scope":152,"src":"1212:84:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"6f400756","id":48,"implemented":false,"kind":"function","modifiers":[],"name":"givenMethodReturnBool","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":46,"nodeType":"ParameterList","parameters":[{"constant":false,"id":43,"mutability":"mutable","name":"method","nodeType":"VariableDeclaration","overrides":null,"scope":48,"src":"1329:21:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":42,"name":"bytes","nodeType":"ElementaryTypeName","src":"1329:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"},{"constant":false,"id":45,"mutability":"mutable","name":"response","nodeType":"VariableDeclaration","overrides":null,"scope":48,"src":"1352:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":44,"name":"bool","nodeType":"ElementaryTypeName","src":"1352:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"1328:38:0"},"returnParameters":{"id":47,"nodeType":"ParameterList","parameters":[],"src":"1375:0:0"},"scope":152,"src":"1298:78:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"f5afa9c1","id":55,"implemented":false,"kind":"function","modifiers":[],"name":"givenMethodReturnUint","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":53,"nodeType":"ParameterList","parameters":[{"constant":false,"id":50,"mutability":"mutable","name":"method","nodeType":"VariableDeclaration","overrides":null,"scope":55,"src":"1409:21:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":49,"name":"bytes","nodeType":"ElementaryTypeName","src":"1409:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"},{"constant":false,"id":52,"mutability":"mutable","name":"response","nodeType":"VariableDeclaration","overrides":null,"scope":55,"src":"1432:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":51,"name":"uint","nodeType":"ElementaryTypeName","src":"1432:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1408:38:0"},"returnParameters":{"id":54,"nodeType":"ParameterList","parameters":[],"src":"1455:0:0"},"scope":152,"src":"1378:78:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"cf11ff5d","id":62,"implemented":false,"kind":"function","modifiers":[],"name":"givenMethodReturnAddress","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":60,"nodeType":"ParameterList","parameters":[{"constant":false,"id":57,"mutability":"mutable","name":"method","nodeType":"VariableDeclaration","overrides":null,"scope":62,"src":"1492:21:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":56,"name":"bytes","nodeType":"ElementaryTypeName","src":"1492:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"},{"constant":false,"id":59,"mutability":"mutable","name":"response","nodeType":"VariableDeclaration","overrides":null,"scope":62,"src":"1515:16:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":58,"name":"address","nodeType":"ElementaryTypeName","src":"1515:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"1491:41:0"},"returnParameters":{"id":61,"nodeType":"ParameterList","parameters":[],"src":"1541:0:0"},"scope":152,"src":"1458:84:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"aa788c55","id":67,"implemented":false,"kind":"function","modifiers":[],"name":"givenMethodRevert","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":65,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64,"mutability":"mutable","name":"method","nodeType":"VariableDeclaration","overrides":null,"scope":67,"src":"1572:21:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":63,"name":"bytes","nodeType":"ElementaryTypeName","src":"1572:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"1571:23:0"},"returnParameters":{"id":66,"nodeType":"ParameterList","parameters":[],"src":"1603:0:0"},"scope":152,"src":"1545:59:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"9a1dc86b","id":74,"implemented":false,"kind":"function","modifiers":[],"name":"givenMethodRevertWithMessage","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":72,"nodeType":"ParameterList","parameters":[{"constant":false,"id":69,"mutability":"mutable","name":"method","nodeType":"VariableDeclaration","overrides":null,"scope":74,"src":"1644:21:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":68,"name":"bytes","nodeType":"ElementaryTypeName","src":"1644:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"},{"constant":false,"id":71,"mutability":"mutable","name":"message","nodeType":"VariableDeclaration","overrides":null,"scope":74,"src":"1667:23:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_string_calldata_ptr","typeString":"string"},"typeName":{"id":70,"name":"string","nodeType":"ElementaryTypeName","src":"1667:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"}],"src":"1643:48:0"},"returnParameters":{"id":73,"nodeType":"ParameterList","parameters":[],"src":"1700:0:0"},"scope":152,"src":"1606:95:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"68ab6f2f","id":79,"implemented":false,"kind":"function","modifiers":[],"name":"givenMethodRunOutOfGas","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":77,"nodeType":"ParameterList","parameters":[{"constant":false,"id":76,"mutability":"mutable","name":"method","nodeType":"VariableDeclaration","overrides":null,"scope":79,"src":"1735:21:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":75,"name":"bytes","nodeType":"ElementaryTypeName","src":"1735:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"1734:23:0"},"returnParameters":{"id":78,"nodeType":"ParameterList","parameters":[],"src":"1766:0:0"},"scope":152,"src":"1703:64:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":{"id":80,"nodeType":"StructuredDocumentation","src":"1770:382:0","text":" @dev After calling this method, the mock will return `response` when the given\n methodId is called with matching arguments. These exact calldataMocks will take\n precedence over all other calldataMocks.\n @param call ABI encoded calldata (methodId and arguments)\n @param response ABI encoded response that will be returned if contract is invoked with calldata"},"functionSelector":"61936594","id":87,"implemented":false,"kind":"function","modifiers":[],"name":"givenCalldataReturn","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":85,"nodeType":"ParameterList","parameters":[{"constant":false,"id":82,"mutability":"mutable","name":"call","nodeType":"VariableDeclaration","overrides":null,"scope":87,"src":"2183:19:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":81,"name":"bytes","nodeType":"ElementaryTypeName","src":"2183:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"},{"constant":false,"id":84,"mutability":"mutable","name":"response","nodeType":"VariableDeclaration","overrides":null,"scope":87,"src":"2204:23:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":83,"name":"bytes","nodeType":"ElementaryTypeName","src":"2204:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"2182:46:0"},"returnParameters":{"id":86,"nodeType":"ParameterList","parameters":[],"src":"2237:0:0"},"scope":152,"src":"2154:84:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"5a3855ab","id":94,"implemented":false,"kind":"function","modifiers":[],"name":"givenCalldataReturnBool","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":92,"nodeType":"ParameterList","parameters":[{"constant":false,"id":89,"mutability":"mutable","name":"call","nodeType":"VariableDeclaration","overrides":null,"scope":94,"src":"2273:19:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":88,"name":"bytes","nodeType":"ElementaryTypeName","src":"2273:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"},{"constant":false,"id":91,"mutability":"mutable","name":"response","nodeType":"VariableDeclaration","overrides":null,"scope":94,"src":"2294:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":90,"name":"bool","nodeType":"ElementaryTypeName","src":"2294:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"value":null,"visibility":"internal"}],"src":"2272:36:0"},"returnParameters":{"id":93,"nodeType":"ParameterList","parameters":[],"src":"2317:0:0"},"scope":152,"src":"2240:78:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"d73ca0ac","id":101,"implemented":false,"kind":"function","modifiers":[],"name":"givenCalldataReturnUint","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":99,"nodeType":"ParameterList","parameters":[{"constant":false,"id":96,"mutability":"mutable","name":"call","nodeType":"VariableDeclaration","overrides":null,"scope":101,"src":"2353:19:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":95,"name":"bytes","nodeType":"ElementaryTypeName","src":"2353:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"},{"constant":false,"id":98,"mutability":"mutable","name":"response","nodeType":"VariableDeclaration","overrides":null,"scope":101,"src":"2374:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":97,"name":"uint","nodeType":"ElementaryTypeName","src":"2374:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2352:36:0"},"returnParameters":{"id":100,"nodeType":"ParameterList","parameters":[],"src":"2397:0:0"},"scope":152,"src":"2320:78:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"b3901f29","id":108,"implemented":false,"kind":"function","modifiers":[],"name":"givenCalldataReturnAddress","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":106,"nodeType":"ParameterList","parameters":[{"constant":false,"id":103,"mutability":"mutable","name":"call","nodeType":"VariableDeclaration","overrides":null,"scope":108,"src":"2436:19:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":102,"name":"bytes","nodeType":"ElementaryTypeName","src":"2436:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"},{"constant":false,"id":105,"mutability":"mutable","name":"response","nodeType":"VariableDeclaration","overrides":null,"scope":108,"src":"2457:16:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":104,"name":"address","nodeType":"ElementaryTypeName","src":"2457:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"2435:39:0"},"returnParameters":{"id":107,"nodeType":"ParameterList","parameters":[],"src":"2483:0:0"},"scope":152,"src":"2400:84:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"eb861f69","id":113,"implemented":false,"kind":"function","modifiers":[],"name":"givenCalldataRevert","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":111,"nodeType":"ParameterList","parameters":[{"constant":false,"id":110,"mutability":"mutable","name":"call","nodeType":"VariableDeclaration","overrides":null,"scope":113,"src":"2516:19:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":109,"name":"bytes","nodeType":"ElementaryTypeName","src":"2516:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"2515:21:0"},"returnParameters":{"id":112,"nodeType":"ParameterList","parameters":[],"src":"2545:0:0"},"scope":152,"src":"2487:59:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"9eaeed75","id":120,"implemented":false,"kind":"function","modifiers":[],"name":"givenCalldataRevertWithMessage","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":118,"nodeType":"ParameterList","parameters":[{"constant":false,"id":115,"mutability":"mutable","name":"call","nodeType":"VariableDeclaration","overrides":null,"scope":120,"src":"2588:19:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":114,"name":"bytes","nodeType":"ElementaryTypeName","src":"2588:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"},{"constant":false,"id":117,"mutability":"mutable","name":"message","nodeType":"VariableDeclaration","overrides":null,"scope":120,"src":"2609:23:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_string_calldata_ptr","typeString":"string"},"typeName":{"id":116,"name":"string","nodeType":"ElementaryTypeName","src":"2609:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"}],"src":"2587:46:0"},"returnParameters":{"id":119,"nodeType":"ParameterList","parameters":[],"src":"2642:0:0"},"scope":152,"src":"2548:95:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":null,"functionSelector":"21fed4d6","id":125,"implemented":false,"kind":"function","modifiers":[],"name":"givenCalldataRunOutOfGas","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":123,"nodeType":"ParameterList","parameters":[{"constant":false,"id":122,"mutability":"mutable","name":"call","nodeType":"VariableDeclaration","overrides":null,"scope":125,"src":"2679:19:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":121,"name":"bytes","nodeType":"ElementaryTypeName","src":"2679:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"2678:21:0"},"returnParameters":{"id":124,"nodeType":"ParameterList","parameters":[],"src":"2708:0:0"},"scope":152,"src":"2645:64:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":{"id":126,"nodeType":"StructuredDocumentation","src":"2712:100:0","text":" @dev Returns the number of times anything has been called on this mock since last reset"},"functionSelector":"0a20119f","id":131,"implemented":false,"kind":"function","modifiers":[],"name":"invocationCount","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":127,"nodeType":"ParameterList","parameters":[],"src":"2838:2:0"},"returnParameters":{"id":130,"nodeType":"ParameterList","parameters":[{"constant":false,"id":129,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","overrides":null,"scope":131,"src":"2859:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":128,"name":"uint","nodeType":"ElementaryTypeName","src":"2859:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2858:6:0"},"scope":152,"src":"2814:51:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":{"id":132,"nodeType":"StructuredDocumentation","src":"2868:248:0","text":" @dev Returns the number of times the given method has been called on this mock since last reset\n @param method ABI encoded methodId. It is valid to pass full calldata (including arguments). The mock will extract the methodId from it"},"functionSelector":"4937c4f6","id":139,"implemented":false,"kind":"function","modifiers":[],"name":"invocationCountForMethod","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":135,"nodeType":"ParameterList","parameters":[{"constant":false,"id":134,"mutability":"mutable","name":"method","nodeType":"VariableDeclaration","overrides":null,"scope":139,"src":"3152:21:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":133,"name":"bytes","nodeType":"ElementaryTypeName","src":"3152:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"3151:23:0"},"returnParameters":{"id":138,"nodeType":"ParameterList","parameters":[{"constant":false,"id":137,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","overrides":null,"scope":139,"src":"3193:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":136,"name":"uint","nodeType":"ElementaryTypeName","src":"3193:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3192:6:0"},"scope":152,"src":"3118:81:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":{"id":140,"nodeType":"StructuredDocumentation","src":"3202:175:0","text":" @dev Returns the number of times this mock has been called with the exact calldata since last reset.\n @param call ABI encoded calldata (methodId and arguments)"},"functionSelector":"586984a4","id":147,"implemented":false,"kind":"function","modifiers":[],"name":"invocationCountForCalldata","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":143,"nodeType":"ParameterList","parameters":[{"constant":false,"id":142,"mutability":"mutable","name":"call","nodeType":"VariableDeclaration","overrides":null,"scope":147,"src":"3415:19:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_bytes_calldata_ptr","typeString":"bytes"},"typeName":{"id":141,"name":"bytes","nodeType":"ElementaryTypeName","src":"3415:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"value":null,"visibility":"internal"}],"src":"3414:21:0"},"returnParameters":{"id":146,"nodeType":"ParameterList","parameters":[{"constant":false,"id":145,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","overrides":null,"scope":147,"src":"3454:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":144,"name":"uint","nodeType":"ElementaryTypeName","src":"3454:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3453:6:0"},"scope":152,"src":"3379:81:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":null,"documentation":{"id":148,"nodeType":"StructuredDocumentation","src":"3463:66:0","text":" @dev Resets all mocked methods and invocation counts."},"functionSelector":"d826f88f","id":151,"implemented":false,"kind":"function","modifiers":[],"name":"reset","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":149,"nodeType":"ParameterList","parameters":[],"src":"3546:2:0"},"returnParameters":{"id":150,"nodeType":"ParameterList","parameters":[],"src":"3557:0:0"},"scope":152,"src":"3532:26:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"}],"scope":1209,"src":"25:3535:0"},{"abstract":false,"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":154,"name":"MockInterface","nodeType":"UserDefinedTypeName","referencedDeclaration":152,"src":"3635:13:0","typeDescriptions":{"typeIdentifier":"t_contract$_MockInterface_$152","typeString":"contract MockInterface"}},"id":155,"nodeType":"InheritanceSpecifier","src":"3635:13:0"}],"contractDependencies":[152],"contractKind":"contract","documentation":{"id":153,"nodeType":"StructuredDocumentation","src":"3562:47:0","text":" Implementation of the MockInterface."},"fullyImplemented":true,"id":1208,"linearizedBaseContracts":[1208,152],"name":"MockContract","nodeType":"ContractDefinition","nodes":[{"canonicalName":"MockContract.MockType","id":159,"members":[{"id":156,"name":"Return","nodeType":"EnumValue","src":"3668:6:0"},{"id":157,"name":"Revert","nodeType":"EnumValue","src":"3676:6:0"},{"id":158,"name":"OutOfGas","nodeType":"EnumValue","src":"3684:8:0"}],"name":"MockType","nodeType":"EnumDefinition","src":"3652:42:0"},{"constant":true,"functionSelector":"67aad04a","id":162,"mutability":"constant","name":"MOCKS_LIST_START","nodeType":"VariableDeclaration","overrides":null,"scope":1208,"src":"3698:50:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":160,"name":"bytes32","nodeType":"ElementaryTypeName","src":"3698:7:0","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"value":{"argumentTypes":null,"hexValue":"01","id":161,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"3741:7:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_5fe7f977e71dba2ea1a68e21057beebb9be2ac30c6410aa38d4f3fbe41dcffd2","typeString":"literal_string \"\u0001\""},"value":"\u0001"},"visibility":"public"},{"constant":true,"functionSelector":"7cd96ee4","id":165,"mutability":"constant","name":"MOCKS_LIST_END","nodeType":"VariableDeclaration","overrides":null,"scope":1208,"src":"3751:45:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes"},"typeName":{"id":163,"name":"bytes","nodeType":"ElementaryTypeName","src":"3751:5:0","typeDescriptions":{"