Cipher-Zero/contracts/modules/common/artifacts/build-info/866bb00c4b81ec804e7613fe71237ae5.json
2024-09-01 23:29:11 +03:00

6306 lines
211 KiB
JSON

{
"id": "866bb00c4b81ec804e7613fe71237ae5",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.3",
"solcLongVersion": "0.8.3+commit.8d00100c",
"input": {
"language": "Solidity",
"sources": {
"contracts/modules/common/Utils.sol": {
"content": "\r\n// SPDX-License-Identifier: GPL-3.0-only\r\npragma solidity ^0.8.3;\r\n\r\n/**\r\n * @title Utils\r\n * @notice Common utility methods used by modules.\r\n */\r\nlibrary Utils {\r\n\r\n // ERC20, ERC721 & ERC1155 transfers & approvals\r\n bytes4 private constant ERC20_TRANSFER = bytes4(keccak256(\"transfer(address,uint256)\"));\r\n bytes4 private constant ERC20_APPROVE = bytes4(keccak256(\"approve(address,uint256)\"));\r\n bytes4 private constant ERC721_SET_APPROVAL_FOR_ALL = bytes4(keccak256(\"setApprovalForAll(address,bool)\"));\r\n bytes4 private constant ERC721_TRANSFER_FROM = bytes4(keccak256(\"transferFrom(address,address,uint256)\"));\r\n bytes4 private constant ERC721_SAFE_TRANSFER_FROM = bytes4(keccak256(\"safeTransferFrom(address,address,uint256)\"));\r\n bytes4 private constant ERC721_SAFE_TRANSFER_FROM_BYTES = bytes4(keccak256(\"safeTransferFrom(address,address,uint256,bytes)\"));\r\n bytes4 private constant ERC1155_SAFE_TRANSFER_FROM = bytes4(keccak256(\"safeTransferFrom(address,address,uint256,uint256,bytes)\"));\r\n\r\n bytes4 private constant OWNER_SIG = 0x8da5cb5b;\r\n /**\r\n * @notice Helper method to recover the signer at a given position from a list of concatenated signatures.\r\n * @param _signedHash The signed hash\r\n * @param _signatures The concatenated signatures.\r\n * @param _index The index of the signature to recover.\r\n */\r\n function recoverSigner(bytes32 _signedHash, bytes memory _signatures, uint _index) internal pure returns (address) {\r\n uint8 v;\r\n bytes32 r;\r\n bytes32 s;\r\n // we jump 32 (0x20) as the first slot of bytes contains the length\r\n // we jump 65 (0x41) per signature\r\n // for v we load 32 bytes ending with v (the first 31 come from s) then apply a mask\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n r := mload(add(_signatures, add(0x20,mul(0x41,_index))))\r\n s := mload(add(_signatures, add(0x40,mul(0x41,_index))))\r\n v := and(mload(add(_signatures, add(0x41,mul(0x41,_index)))), 0xff)\r\n }\r\n require(v == 27 || v == 28, \"Utils: bad v value in signature\");\r\n\r\n address recoveredAddress = ecrecover(_signedHash, v, r, s);\r\n require(recoveredAddress != address(0), \"Utils: ecrecover returned 0\");\r\n return recoveredAddress;\r\n }\r\n\r\n /**\r\n * @notice Helper method to recover the spender from a contract call. \r\n * The method returns the contract unless the call is to a standard method of a ERC20/ERC721/ERC1155 token\r\n * in which case the spender is recovered from the data.\r\n * @param _to The target contract.\r\n * @param _data The data payload.\r\n */\r\n function recoverSpender(address _to, bytes memory _data) internal pure returns (address spender) {\r\n if(_data.length >= 68) {\r\n bytes4 methodId;\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n methodId := mload(add(_data, 0x20))\r\n }\r\n if(\r\n methodId == ERC20_TRANSFER ||\r\n methodId == ERC20_APPROVE ||\r\n methodId == ERC721_SET_APPROVAL_FOR_ALL) \r\n {\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n spender := mload(add(_data, 0x24))\r\n }\r\n return spender;\r\n }\r\n if(\r\n methodId == ERC721_TRANSFER_FROM ||\r\n methodId == ERC721_SAFE_TRANSFER_FROM ||\r\n methodId == ERC721_SAFE_TRANSFER_FROM_BYTES ||\r\n methodId == ERC1155_SAFE_TRANSFER_FROM)\r\n {\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n spender := mload(add(_data, 0x44))\r\n }\r\n return spender;\r\n }\r\n }\r\n\r\n spender = _to;\r\n }\r\n\r\n /**\r\n * @notice Helper method to parse data and extract the method signature.\r\n */\r\n function functionPrefix(bytes memory _data) internal pure returns (bytes4 prefix) {\r\n require(_data.length >= 4, \"Utils: Invalid functionPrefix\");\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n prefix := mload(add(_data, 0x20))\r\n }\r\n }\r\n\r\n /**\r\n * @notice Checks if an address is a contract.\r\n * @param _addr The address.\r\n */\r\n function isContract(address _addr) internal view returns (bool) {\r\n uint32 size;\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n size := extcodesize(_addr)\r\n }\r\n return (size > 0);\r\n }\r\n\r\n /**\r\n * @notice Checks if an address is a guardian or an account authorised to sign on behalf of a smart-contract guardian\r\n * given a list of guardians.\r\n * @param _guardians the list of guardians\r\n * @param _guardian the address to test\r\n * @return true and the list of guardians minus the found guardian upon success, false and the original list of guardians if not found.\r\n */\r\n function isGuardianOrGuardianSigner(address[] memory _guardians, address _guardian) internal view returns (bool, address[] memory) {\r\n if (_guardians.length == 0 || _guardian == address(0)) {\r\n return (false, _guardians);\r\n }\r\n bool isFound = false;\r\n address[] memory updatedGuardians = new address[](_guardians.length - 1);\r\n uint256 index = 0;\r\n for (uint256 i = 0; i < _guardians.length; i++) {\r\n if (!isFound) {\r\n // check if _guardian is an account guardian\r\n if (_guardian == _guardians[i]) {\r\n isFound = true;\r\n continue;\r\n }\r\n // check if _guardian is the owner of a smart contract guardian\r\n if (isContract(_guardians[i]) && isGuardianOwner(_guardians[i], _guardian)) {\r\n isFound = true;\r\n continue;\r\n }\r\n }\r\n if (index < updatedGuardians.length) {\r\n updatedGuardians[index] = _guardians[i];\r\n index++;\r\n }\r\n }\r\n return isFound ? (true, updatedGuardians) : (false, _guardians);\r\n }\r\n\r\n /**\r\n * @notice Checks if an address is the owner of a guardian contract.\r\n * The method does not revert if the call to the owner() method consumes more then 25000 gas.\r\n * @param _guardian The guardian contract\r\n * @param _owner The owner to verify.\r\n */\r\n function isGuardianOwner(address _guardian, address _owner) internal view returns (bool) {\r\n address owner = address(0);\r\n\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n let ptr := mload(0x40)\r\n mstore(ptr,OWNER_SIG)\r\n let result := staticcall(25000, _guardian, ptr, 0x20, ptr, 0x20)\r\n if eq(result, 1) {\r\n owner := mload(ptr)\r\n }\r\n }\r\n return owner == _owner;\r\n }\r\n\r\n /**\r\n * @notice Returns ceil(a / b).\r\n */\r\n function ceil(uint256 a, uint256 b) internal pure returns (uint256) {\r\n uint256 c = a / b;\r\n if (a % b == 0) {\r\n return c;\r\n } else {\r\n return c + 1;\r\n }\r\n }\r\n}\r\n"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
},
"remappings": []
}
},
"output": {
"contracts": {
"contracts/modules/common/Utils.sol": {
"Utils": {
"abi": [],
"devdoc": {
"kind": "dev",
"methods": {},
"title": "Utils",
"version": 1
},
"evm": {
"assembly": " /* \"contracts/modules/common/Utils.sol\":150:7337 library Utils {\r... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \"contracts/modules/common/Utils.sol\":150:7337 library Utils {\r... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212200b0cd285c451bce55ef41522918e5efc1964d64e8754e10520894154c7c20fbe64736f6c63430008030033\n}\n",
"bytecode": {
"generatedSources": [],
"linkReferences": {},
"object": "60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200b0cd285c451bce55ef41522918e5efc1964d64e8754e10520894154c7c20fbe64736f6c63430008030033",
"opcodes": "PUSH1 0x56 PUSH1 0x50 PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x43 JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SIGNEXTEND 0xC 0xD2 DUP6 0xC4 MLOAD 0xBC 0xE5 0x5E DELEGATECALL ISZERO 0x22 SWAP2 DUP15 0x5E 0xFC NOT PUSH5 0xD64E8754E1 SDIV KECCAK256 DUP10 COINBASE SLOAD 0xC7 0xC2 0xF 0xBE PUSH5 0x736F6C6343 STOP ADDMOD SUB STOP CALLER ",
"sourceMap": "150:7187:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200b0cd285c451bce55ef41522918e5efc1964d64e8754e10520894154c7c20fbe64736f6c63430008030033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SIGNEXTEND 0xC 0xD2 DUP6 0xC4 MLOAD 0xBC 0xE5 0x5E DELEGATECALL ISZERO 0x22 SWAP2 DUP15 0x5E 0xFC NOT PUSH5 0xD64E8754E1 SDIV KECCAK256 DUP10 COINBASE SLOAD 0xC7 0xC2 0xF 0xBE PUSH5 0x736F6C6343 STOP ADDMOD SUB STOP CALLER ",
"sourceMap": "150:7187:0:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17200",
"executionCost": "97",
"totalCost": "17297"
},
"internal": {
"ceil(uint256,uint256)": "infinite",
"functionPrefix(bytes memory)": "infinite",
"isContract(address)": "infinite",
"isGuardianOrGuardianSigner(address[] memory,address)": "infinite",
"isGuardianOwner(address,address)": "infinite",
"recoverSigner(bytes32,bytes memory,uint256)": "infinite",
"recoverSpender(address,bytes memory)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 150,
"end": 7337,
"name": "PUSH #[$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 150,
"end": 7337,
"name": "PUSH [$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 150,
"end": 7337,
"name": "PUSH",
"source": 0,
"value": "B"
},
{
"begin": 150,
"end": 7337,
"name": "DUP3",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "DUP3",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "DUP3",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "CODECOPY",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "DUP1",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "MLOAD",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 150,
"end": 7337,
"name": "BYTE",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 150,
"end": 7337,
"name": "EQ",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "PUSH [tag]",
"source": 0,
"value": "1"
},
{
"begin": 150,
"end": 7337,
"name": "JUMPI",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "PUSH",
"source": 0,
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
},
{
"begin": 150,
"end": 7337,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 150,
"end": 7337,
"name": "MSTORE",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 150,
"end": 7337,
"name": "PUSH",
"source": 0,
"value": "4"
},
{
"begin": 150,
"end": 7337,
"name": "MSTORE",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "PUSH",
"source": 0,
"value": "24"
},
{
"begin": 150,
"end": 7337,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 150,
"end": 7337,
"name": "REVERT",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "tag",
"source": 0,
"value": "1"
},
{
"begin": 150,
"end": 7337,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "ADDRESS",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 150,
"end": 7337,
"name": "MSTORE",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 150,
"end": 7337,
"name": "DUP2",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "MSTORE8",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "DUP3",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "DUP2",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "RETURN",
"source": 0
}
],
".data": {
"0": {
".auxdata": "a26469706673582212200b0cd285c451bce55ef41522918e5efc1964d64e8754e10520894154c7c20fbe64736f6c63430008030033",
".code": [
{
"begin": 150,
"end": 7337,
"name": "PUSHDEPLOYADDRESS",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "ADDRESS",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "EQ",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "PUSH",
"source": 0,
"value": "80"
},
{
"begin": 150,
"end": 7337,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 150,
"end": 7337,
"name": "MSTORE",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 150,
"end": 7337,
"name": "DUP1",
"source": 0
},
{
"begin": 150,
"end": 7337,
"name": "REVERT",
"source": 0
}
]
}
}
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.3+commit.8d00100c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"title\":\"Utils\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Common utility methods used by modules.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/modules/common/Utils.sol\":\"Utils\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/modules/common/Utils.sol\":{\"keccak256\":\"0xab8d2e664994be92e96975e096bc0b645ba269e427da41f831da8e32c14c5e1a\",\"license\":\"GPL-3.0-only\",\"urls\":[\"bzz-raw://8527e8479295fdf80c3a98c32882c32d62a6c1be72121005f59e1112d5e0ebca\",\"dweb:/ipfs/QmRMq7kMQ4oxjSSK9vz6LFbC1EHFpeGSe6ZjA8iL2t9ABK\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"notice": "Common utility methods used by modules.",
"version": 1
}
}
}
},
"sources": {
"contracts/modules/common/Utils.sol": {
"ast": {
"absolutePath": "contracts/modules/common/Utils.sol",
"exportedSymbols": {
"Utils": [
396
]
},
"id": 397,
"license": "GPL-3.0-only",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"^",
"0.8",
".3"
],
"nodeType": "PragmaDirective",
"src": "44:23:0"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 2,
"nodeType": "StructuredDocumentation",
"src": "71:77:0",
"text": " @title Utils\n @notice Common utility methods used by modules."
},
"fullyImplemented": true,
"id": 396,
"linearizedBaseContracts": [
396
],
"name": "Utils",
"nameLocation": "158:5:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 10,
"mutability": "constant",
"name": "ERC20_TRANSFER",
"nameLocation": "251:14:0",
"nodeType": "VariableDeclaration",
"scope": 396,
"src": "227:87:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 3,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "227:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"arguments": [
{
"arguments": [
{
"hexValue": "7472616e7366657228616464726573732c75696e7432353629",
"id": 7,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "285:27:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
"typeString": "literal_string \"transfer(address,uint256)\""
},
"value": "transfer(address,uint256)"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
"typeString": "literal_string \"transfer(address,uint256)\""
}
],
"id": 6,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967288,
"src": "275:9:0",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 8,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "275:38:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 5,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "268:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes4_$",
"typeString": "type(bytes4)"
},
"typeName": {
"id": 4,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "268:6:0",
"typeDescriptions": {}
}
},
"id": 9,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "268:46:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "private"
},
{
"constant": true,
"id": 18,
"mutability": "constant",
"name": "ERC20_APPROVE",
"nameLocation": "345:13:0",
"nodeType": "VariableDeclaration",
"scope": 396,
"src": "321:85:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 11,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "321:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"arguments": [
{
"arguments": [
{
"hexValue": "617070726f766528616464726573732c75696e7432353629",
"id": 15,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "378:26:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_095ea7b334ae44009aa867bfb386f5c3b4b443ac6f0ee573fa91c4608fbadfba",
"typeString": "literal_string \"approve(address,uint256)\""
},
"value": "approve(address,uint256)"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_095ea7b334ae44009aa867bfb386f5c3b4b443ac6f0ee573fa91c4608fbadfba",
"typeString": "literal_string \"approve(address,uint256)\""
}
],
"id": 14,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967288,
"src": "368:9:0",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 16,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "368:37:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 13,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "361:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes4_$",
"typeString": "type(bytes4)"
},
"typeName": {
"id": 12,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "361:6:0",
"typeDescriptions": {}
}
},
"id": 17,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "361:45:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "private"
},
{
"constant": true,
"id": 26,
"mutability": "constant",
"name": "ERC721_SET_APPROVAL_FOR_ALL",
"nameLocation": "437:27:0",
"nodeType": "VariableDeclaration",
"scope": 396,
"src": "413:106:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 19,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "413:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"arguments": [
{
"arguments": [
{
"hexValue": "736574417070726f76616c466f72416c6c28616464726573732c626f6f6c29",
"id": 23,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "484:33:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_a22cb4651ab9570f89bb516380c40ce76762284fb1f21337ceaf6adab99e7d4a",
"typeString": "literal_string \"setApprovalForAll(address,bool)\""
},
"value": "setApprovalForAll(address,bool)"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_a22cb4651ab9570f89bb516380c40ce76762284fb1f21337ceaf6adab99e7d4a",
"typeString": "literal_string \"setApprovalForAll(address,bool)\""
}
],
"id": 22,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967288,
"src": "474:9:0",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 24,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "474:44:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 21,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "467:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes4_$",
"typeString": "type(bytes4)"
},
"typeName": {
"id": 20,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "467:6:0",
"typeDescriptions": {}
}
},
"id": 25,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "467:52:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "private"
},
{
"constant": true,
"id": 34,
"mutability": "constant",
"name": "ERC721_TRANSFER_FROM",
"nameLocation": "550:20:0",
"nodeType": "VariableDeclaration",
"scope": 396,
"src": "526:105:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 27,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "526:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"arguments": [
{
"arguments": [
{
"hexValue": "7472616e7366657246726f6d28616464726573732c616464726573732c75696e7432353629",
"id": 31,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "590:39:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_23b872dd7302113369cda2901243429419bec145408fa8b352b3dd92b66c680b",
"typeString": "literal_string \"transferFrom(address,address,uint256)\""
},
"value": "transferFrom(address,address,uint256)"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_23b872dd7302113369cda2901243429419bec145408fa8b352b3dd92b66c680b",
"typeString": "literal_string \"transferFrom(address,address,uint256)\""
}
],
"id": 30,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967288,
"src": "580:9:0",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 32,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "580:50:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 29,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "573:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes4_$",
"typeString": "type(bytes4)"
},
"typeName": {
"id": 28,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "573:6:0",
"typeDescriptions": {}
}
},
"id": 33,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "573:58:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "private"
},
{
"constant": true,
"id": 42,
"mutability": "constant",
"name": "ERC721_SAFE_TRANSFER_FROM",
"nameLocation": "662:25:0",
"nodeType": "VariableDeclaration",
"scope": 396,
"src": "638:114:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 35,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "638:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"arguments": [
{
"arguments": [
{
"hexValue": "736166655472616e7366657246726f6d28616464726573732c616464726573732c75696e7432353629",
"id": 39,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "707:43:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_42842e0eb38857a7775b4e7364b2775df7325074d088e7fb39590cd6281184ed",
"typeString": "literal_string \"safeTransferFrom(address,address,uint256)\""
},
"value": "safeTransferFrom(address,address,uint256)"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_42842e0eb38857a7775b4e7364b2775df7325074d088e7fb39590cd6281184ed",
"typeString": "literal_string \"safeTransferFrom(address,address,uint256)\""
}
],
"id": 38,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967288,
"src": "697:9:0",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 40,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "697:54:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 37,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "690:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes4_$",
"typeString": "type(bytes4)"
},
"typeName": {
"id": 36,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "690:6:0",
"typeDescriptions": {}
}
},
"id": 41,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "690:62:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "private"
},
{
"constant": true,
"id": 50,
"mutability": "constant",
"name": "ERC721_SAFE_TRANSFER_FROM_BYTES",
"nameLocation": "783:31:0",
"nodeType": "VariableDeclaration",
"scope": 396,
"src": "759:126:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 43,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "759:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"arguments": [
{
"arguments": [
{
"hexValue": "736166655472616e7366657246726f6d28616464726573732c616464726573732c75696e743235362c627974657329",
"id": 47,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "834:49:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b88d4fde60196325a28bb7f99a2582e0b46de55b18761e960c14ad7a32099465",
"typeString": "literal_string \"safeTransferFrom(address,address,uint256,bytes)\""
},
"value": "safeTransferFrom(address,address,uint256,bytes)"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_b88d4fde60196325a28bb7f99a2582e0b46de55b18761e960c14ad7a32099465",
"typeString": "literal_string \"safeTransferFrom(address,address,uint256,bytes)\""
}
],
"id": 46,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967288,
"src": "824:9:0",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 48,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "824:60:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 45,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "817:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes4_$",
"typeString": "type(bytes4)"
},
"typeName": {
"id": 44,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "817:6:0",
"typeDescriptions": {}
}
},
"id": 49,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "817:68:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "private"
},
{
"constant": true,
"id": 58,
"mutability": "constant",
"name": "ERC1155_SAFE_TRANSFER_FROM",
"nameLocation": "916:26:0",
"nodeType": "VariableDeclaration",
"scope": 396,
"src": "892:129:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 51,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "892:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"arguments": [
{
"arguments": [
{
"hexValue": "736166655472616e7366657246726f6d28616464726573732c616464726573732c75696e743235362c75696e743235362c627974657329",
"id": 55,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "962:57:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_f242432a01954b0e0efb67e72c9b3b8ed77690657780385b256ac9aba0e35f0b",
"typeString": "literal_string \"safeTransferFrom(address,address,uint256,uint256,bytes)\""
},
"value": "safeTransferFrom(address,address,uint256,uint256,bytes)"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_f242432a01954b0e0efb67e72c9b3b8ed77690657780385b256ac9aba0e35f0b",
"typeString": "literal_string \"safeTransferFrom(address,address,uint256,uint256,bytes)\""
}
],
"id": 54,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967288,
"src": "952:9:0",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 56,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "952:68:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 53,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "945:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes4_$",
"typeString": "type(bytes4)"
},
"typeName": {
"id": 52,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "945:6:0",
"typeDescriptions": {}
}
},
"id": 57,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "945:76:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "private"
},
{
"constant": true,
"id": 61,
"mutability": "constant",
"name": "OWNER_SIG",
"nameLocation": "1054:9:0",
"nodeType": "VariableDeclaration",
"scope": 396,
"src": "1030:46:0",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 59,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "1030:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": {
"hexValue": "30783864613563623562",
"id": 60,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1066:10:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_2376452955_by_1",
"typeString": "int_const 2376452955"
},
"value": "0x8da5cb5b"
},
"visibility": "private"
},
{
"body": {
"id": 115,
"nodeType": "Block",
"src": "1483:849:0",
"statements": [
{
"assignments": [
74
],
"declarations": [
{
"constant": false,
"id": 74,
"mutability": "mutable",
"name": "v",
"nameLocation": "1500:1:0",
"nodeType": "VariableDeclaration",
"scope": 115,
"src": "1494:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 73,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1494:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
}
],
"id": 75,
"nodeType": "VariableDeclarationStatement",
"src": "1494:7:0"
},
{
"assignments": [
77
],
"declarations": [
{
"constant": false,
"id": 77,
"mutability": "mutable",
"name": "r",
"nameLocation": "1520:1:0",
"nodeType": "VariableDeclaration",
"scope": 115,
"src": "1512:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 76,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1512:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"id": 78,
"nodeType": "VariableDeclarationStatement",
"src": "1512:9:0"
},
{
"assignments": [
80
],
"declarations": [
{
"constant": false,
"id": 80,
"mutability": "mutable",
"name": "s",
"nameLocation": "1540:1:0",
"nodeType": "VariableDeclaration",
"scope": 115,
"src": "1532:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 79,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1532:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"id": 81,
"nodeType": "VariableDeclarationStatement",
"src": "1532:9:0"
},
{
"AST": {
"nodeType": "YulBlock",
"src": "1833:233:0",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1848:56:0",
"value": {
"arguments": [
{
"arguments": [
{
"name": "_signatures",
"nodeType": "YulIdentifier",
"src": "1863:11:0"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1880:4:0",
"type": "",
"value": "0x20"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1889:4:0",
"type": "",
"value": "0x41"
},
{
"name": "_index",
"nodeType": "YulIdentifier",
"src": "1894:6:0"
}
],
"functionName": {
"name": "mul",
"nodeType": "YulIdentifier",
"src": "1885:3:0"
},
"nodeType": "YulFunctionCall",
"src": "1885:16:0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1876:3:0"
},
"nodeType": "YulFunctionCall",
"src": "1876:26:0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1859:3:0"
},
"nodeType": "YulFunctionCall",
"src": "1859:44:0"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "1853:5:0"
},
"nodeType": "YulFunctionCall",
"src": "1853:51:0"
},
"variableNames": [
{
"name": "r",
"nodeType": "YulIdentifier",
"src": "1848:1:0"
}
]
},
{
"nodeType": "YulAssignment",
"src": "1918:56:0",
"value": {
"arguments": [
{
"arguments": [
{
"name": "_signatures",
"nodeType": "YulIdentifier",
"src": "1933:11:0"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1950:4:0",
"type": "",
"value": "0x40"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1959:4:0",
"type": "",
"value": "0x41"
},
{
"name": "_index",
"nodeType": "YulIdentifier",
"src": "1964:6:0"
}
],
"functionName": {
"name": "mul",
"nodeType": "YulIdentifier",
"src": "1955:3:0"
},
"nodeType": "YulFunctionCall",
"src": "1955:16:0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1946:3:0"
},
"nodeType": "YulFunctionCall",
"src": "1946:26:0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1929:3:0"
},
"nodeType": "YulFunctionCall",
"src": "1929:44:0"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "1923:5:0"
},
"nodeType": "YulFunctionCall",
"src": "1923:51:0"
},
"variableNames": [
{
"name": "s",
"nodeType": "YulIdentifier",
"src": "1918:1:0"
}
]
},
{
"nodeType": "YulAssignment",
"src": "1988:67:0",
"value": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "_signatures",
"nodeType": "YulIdentifier",
"src": "2007:11:0"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2024:4:0",
"type": "",
"value": "0x41"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2033:4:0",
"type": "",
"value": "0x41"
},
{
"name": "_index",
"nodeType": "YulIdentifier",
"src": "2038:6:0"
}
],
"functionName": {
"name": "mul",
"nodeType": "YulIdentifier",
"src": "2029:3:0"
},
"nodeType": "YulFunctionCall",
"src": "2029:16:0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2020:3:0"
},
"nodeType": "YulFunctionCall",
"src": "2020:26:0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2003:3:0"
},
"nodeType": "YulFunctionCall",
"src": "2003:44:0"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "1997:5:0"
},
"nodeType": "YulFunctionCall",
"src": "1997:51:0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2050:4:0",
"type": "",
"value": "0xff"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "1993:3:0"
},
"nodeType": "YulFunctionCall",
"src": "1993:62:0"
},
"variableNames": [
{
"name": "v",
"nodeType": "YulIdentifier",
"src": "1988:1:0"
}
]
}
]
},
"evmVersion": "istanbul",
"externalReferences": [
{
"declaration": 68,
"isOffset": false,
"isSlot": false,
"src": "1894:6:0",
"valueSize": 1
},
{
"declaration": 68,
"isOffset": false,
"isSlot": false,
"src": "1964:6:0",
"valueSize": 1
},
{
"declaration": 68,
"isOffset": false,
"isSlot": false,
"src": "2038:6:0",
"valueSize": 1
},
{
"declaration": 66,
"isOffset": false,
"isSlot": false,
"src": "1863:11:0",
"valueSize": 1
},
{
"declaration": 66,
"isOffset": false,
"isSlot": false,
"src": "1933:11:0",
"valueSize": 1
},
{
"declaration": 66,
"isOffset": false,
"isSlot": false,
"src": "2007:11:0",
"valueSize": 1
},
{
"declaration": 77,
"isOffset": false,
"isSlot": false,
"src": "1848:1:0",
"valueSize": 1
},
{
"declaration": 80,
"isOffset": false,
"isSlot": false,
"src": "1918:1:0",
"valueSize": 1
},
{
"declaration": 74,
"isOffset": false,
"isSlot": false,
"src": "1988:1:0",
"valueSize": 1
}
],
"id": 82,
"nodeType": "InlineAssembly",
"src": "1824:242:0"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 90,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 86,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 84,
"name": "v",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 74,
"src": "2084:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "3237",
"id": 85,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2089:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_27_by_1",
"typeString": "int_const 27"
},
"value": "27"
},
"src": "2084:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 89,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 87,
"name": "v",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 74,
"src": "2095:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "3238",
"id": 88,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2100:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_28_by_1",
"typeString": "int_const 28"
},
"value": "28"
},
"src": "2095:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "2084:18:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "5574696c733a2062616420762076616c756520696e207369676e6174757265",
"id": 91,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2104:33:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_7b1721fe0aaf743b9305fe15a0f33e4340fd8f2f381ed528958407db4955cdaf",
"typeString": "literal_string \"Utils: bad v value in signature\""
},
"value": "Utils: bad v value in signature"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_7b1721fe0aaf743b9305fe15a0f33e4340fd8f2f381ed528958407db4955cdaf",
"typeString": "literal_string \"Utils: bad v value in signature\""
}
],
"id": 83,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "2076:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 92,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2076:62:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 93,
"nodeType": "ExpressionStatement",
"src": "2076:62:0"
},
{
"assignments": [
95
],
"declarations": [
{
"constant": false,
"id": 95,
"mutability": "mutable",
"name": "recoveredAddress",
"nameLocation": "2159:16:0",
"nodeType": "VariableDeclaration",
"scope": 115,
"src": "2151:24:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 94,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2151:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"id": 102,
"initialValue": {
"arguments": [
{
"id": 97,
"name": "_signedHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 64,
"src": "2188:11:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"id": 98,
"name": "v",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 74,
"src": "2201:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
{
"id": 99,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 77,
"src": "2204:1:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"id": 100,
"name": "s",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 80,
"src": "2207:1:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 96,
"name": "ecrecover",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967290,
"src": "2178:9:0",
"typeDescriptions": {
"typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$",
"typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)"
}
},
"id": 101,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2178:31:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2151:58:0"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 109,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 104,
"name": "recoveredAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 95,
"src": "2228:16:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"arguments": [
{
"hexValue": "30",
"id": 107,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2256:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 106,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2248:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 105,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2248:7:0",
"typeDescriptions": {}
}
},
"id": 108,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2248:10:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "2228:30:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "5574696c733a2065637265636f7665722072657475726e65642030",
"id": 110,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2260:29:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_1e61173026323a7dc3b2e720c64aa00fcbc359dd0371ef3691d3f97795a20207",
"typeString": "literal_string \"Utils: ecrecover returned 0\""
},
"value": "Utils: ecrecover returned 0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_1e61173026323a7dc3b2e720c64aa00fcbc359dd0371ef3691d3f97795a20207",
"typeString": "literal_string \"Utils: ecrecover returned 0\""
}
],
"id": 103,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "2220:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 111,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2220:70:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 112,
"nodeType": "ExpressionStatement",
"src": "2220:70:0"
},
{
"expression": {
"id": 113,
"name": "recoveredAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 95,
"src": "2308:16:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"functionReturnParameters": 72,
"id": 114,
"nodeType": "Return",
"src": "2301:23:0"
}
]
},
"documentation": {
"id": 62,
"nodeType": "StructuredDocumentation",
"src": "1083:279:0",
"text": " @notice Helper method to recover the signer at a given position from a list of concatenated signatures.\n @param _signedHash The signed hash\n @param _signatures The concatenated signatures.\n @param _index The index of the signature to recover."
},
"id": 116,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "recoverSigner",
"nameLocation": "1377:13:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 69,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 64,
"mutability": "mutable",
"name": "_signedHash",
"nameLocation": "1399:11:0",
"nodeType": "VariableDeclaration",
"scope": 116,
"src": "1391:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 63,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1391:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 66,
"mutability": "mutable",
"name": "_signatures",
"nameLocation": "1425:11:0",
"nodeType": "VariableDeclaration",
"scope": 116,
"src": "1412:24:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 65,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1412:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 68,
"mutability": "mutable",
"name": "_index",
"nameLocation": "1443:6:0",
"nodeType": "VariableDeclaration",
"scope": 116,
"src": "1438:11:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 67,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1438:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1390:60:0"
},
"returnParameters": {
"id": 72,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 71,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 116,
"src": "1474:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 70,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1474:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1473:9:0"
},
"scope": 396,
"src": "1368:964:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 176,
"nodeType": "Block",
"src": "2778:1142:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 129,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 126,
"name": "_data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 121,
"src": "2792:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 127,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"src": "2792:12:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"hexValue": "3638",
"id": 128,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2808:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_68_by_1",
"typeString": "int_const 68"
},
"value": "68"
},
"src": "2792:18:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 171,
"nodeType": "IfStatement",
"src": "2789:1098:0",
"trueBody": {
"id": 170,
"nodeType": "Block",
"src": "2812:1075:0",
"statements": [
{
"assignments": [
131
],
"declarations": [
{
"constant": false,
"id": 131,
"mutability": "mutable",
"name": "methodId",
"nameLocation": "2834:8:0",
"nodeType": "VariableDeclaration",
"scope": 170,
"src": "2827:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 130,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "2827:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
}
],
"id": 132,
"nodeType": "VariableDeclarationStatement",
"src": "2827:15:0"
},
{
"AST": {
"nodeType": "YulBlock",
"src": "2927:69:0",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2946:35:0",
"value": {
"arguments": [
{
"arguments": [
{
"name": "_data",
"nodeType": "YulIdentifier",
"src": "2968:5:0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2975:4:0",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2964:3:0"
},
"nodeType": "YulFunctionCall",
"src": "2964:16:0"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "2958:5:0"
},
"nodeType": "YulFunctionCall",
"src": "2958:23:0"
},
"variableNames": [
{
"name": "methodId",
"nodeType": "YulIdentifier",
"src": "2946:8:0"
}
]
}
]
},
"evmVersion": "istanbul",
"externalReferences": [
{
"declaration": 121,
"isOffset": false,
"isSlot": false,
"src": "2968:5:0",
"valueSize": 1
},
{
"declaration": 131,
"isOffset": false,
"isSlot": false,
"src": "2946:8:0",
"valueSize": 1
}
],
"id": 133,
"nodeType": "InlineAssembly",
"src": "2918:78:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 144,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 140,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"id": 136,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 134,
"name": "methodId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 131,
"src": "3031:8:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 135,
"name": "ERC20_TRANSFER",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10,
"src": "3043:14:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"src": "3031:26:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"id": 139,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 137,
"name": "methodId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 131,
"src": "3078:8:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 138,
"name": "ERC20_APPROVE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18,
"src": "3090:13:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"src": "3078:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "3031:72:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"id": 143,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 141,
"name": "methodId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 131,
"src": "3124:8:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 142,
"name": "ERC721_SET_APPROVAL_FOR_ALL",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 26,
"src": "3136:27:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"src": "3124:39:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "3031:132:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 149,
"nodeType": "IfStatement",
"src": "3010:386:0",
"trueBody": {
"id": 148,
"nodeType": "Block",
"src": "3179:217:0",
"statements": [
{
"AST": {
"nodeType": "YulBlock",
"src": "3272:76:0",
"statements": [
{
"nodeType": "YulAssignment",
"src": "3295:34:0",
"value": {
"arguments": [
{
"arguments": [
{
"name": "_data",
"nodeType": "YulIdentifier",
"src": "3316:5:0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3323:4:0",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3312:3:0"
},
"nodeType": "YulFunctionCall",
"src": "3312:16:0"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "3306:5:0"
},
"nodeType": "YulFunctionCall",
"src": "3306:23:0"
},
"variableNames": [
{
"name": "spender",
"nodeType": "YulIdentifier",
"src": "3295:7:0"
}
]
}
]
},
"evmVersion": "istanbul",
"externalReferences": [
{
"declaration": 121,
"isOffset": false,
"isSlot": false,
"src": "3316:5:0",
"valueSize": 1
},
{
"declaration": 124,
"isOffset": false,
"isSlot": false,
"src": "3295:7:0",
"valueSize": 1
}
],
"id": 145,
"nodeType": "InlineAssembly",
"src": "3263:85:0"
},
{
"expression": {
"id": 146,
"name": "spender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 124,
"src": "3373:7:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"functionReturnParameters": 125,
"id": 147,
"nodeType": "Return",
"src": "3366:14:0"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 164,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 160,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 156,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"id": 152,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 150,
"name": "methodId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 131,
"src": "3431:8:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 151,
"name": "ERC721_TRANSFER_FROM",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 34,
"src": "3443:20:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"src": "3431:32:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"id": 155,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 153,
"name": "methodId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 131,
"src": "3484:8:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 154,
"name": "ERC721_SAFE_TRANSFER_FROM",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 42,
"src": "3496:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"src": "3484:37:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "3431:90:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"id": 159,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 157,
"name": "methodId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 131,
"src": "3542:8:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 158,
"name": "ERC721_SAFE_TRANSFER_FROM_BYTES",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 50,
"src": "3554:31:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"src": "3542:43:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "3431:154:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"id": 163,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 161,
"name": "methodId",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 131,
"src": "3606:8:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 162,
"name": "ERC1155_SAFE_TRANSFER_FROM",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 58,
"src": "3618:26:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"src": "3606:38:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "3431:213:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 169,
"nodeType": "IfStatement",
"src": "3410:466:0",
"trueBody": {
"id": 168,
"nodeType": "Block",
"src": "3659:217:0",
"statements": [
{
"AST": {
"nodeType": "YulBlock",
"src": "3752:76:0",
"statements": [
{
"nodeType": "YulAssignment",
"src": "3775:34:0",
"value": {
"arguments": [
{
"arguments": [
{
"name": "_data",
"nodeType": "YulIdentifier",
"src": "3796:5:0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3803:4:0",
"type": "",
"value": "0x44"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3792:3:0"
},
"nodeType": "YulFunctionCall",
"src": "3792:16:0"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "3786:5:0"
},
"nodeType": "YulFunctionCall",
"src": "3786:23:0"
},
"variableNames": [
{
"name": "spender",
"nodeType": "YulIdentifier",
"src": "3775:7:0"
}
]
}
]
},
"evmVersion": "istanbul",
"externalReferences": [
{
"declaration": 121,
"isOffset": false,
"isSlot": false,
"src": "3796:5:0",
"valueSize": 1
},
{
"declaration": 124,
"isOffset": false,
"isSlot": false,
"src": "3775:7:0",
"valueSize": 1
}
],
"id": 165,
"nodeType": "InlineAssembly",
"src": "3743:85:0"
},
{
"expression": {
"id": 166,
"name": "spender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 124,
"src": "3853:7:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"functionReturnParameters": 125,
"id": 167,
"nodeType": "Return",
"src": "3846:14:0"
}
]
}
}
]
}
},
{
"expression": {
"id": 174,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 172,
"name": "spender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 124,
"src": "3899:7:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"id": 173,
"name": "_to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "3909:3:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "3899:13:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 175,
"nodeType": "ExpressionStatement",
"src": "3899:13:0"
}
]
},
"documentation": {
"id": 117,
"nodeType": "StructuredDocumentation",
"src": "2340:335:0",
"text": " @notice Helper method to recover the spender from a contract call. \n The method returns the contract unless the call is to a standard method of a ERC20/ERC721/ERC1155 token\n in which case the spender is recovered from the data.\n @param _to The target contract.\n @param _data The data payload."
},
"id": 177,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "recoverSpender",
"nameLocation": "2690:14:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 122,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 119,
"mutability": "mutable",
"name": "_to",
"nameLocation": "2713:3:0",
"nodeType": "VariableDeclaration",
"scope": 177,
"src": "2705:11:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 118,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2705:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 121,
"mutability": "mutable",
"name": "_data",
"nameLocation": "2731:5:0",
"nodeType": "VariableDeclaration",
"scope": 177,
"src": "2718:18:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 120,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2718:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "2704:33:0"
},
"returnParameters": {
"id": 125,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 124,
"mutability": "mutable",
"name": "spender",
"nameLocation": "2769:7:0",
"nodeType": "VariableDeclaration",
"scope": 177,
"src": "2761:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 123,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2761:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "2760:17:0"
},
"scope": 396,
"src": "2681:1239:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 194,
"nodeType": "Block",
"src": "4104:213:0",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 189,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 186,
"name": "_data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 180,
"src": "4123:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 187,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"src": "4123:12:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"hexValue": "34",
"id": 188,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4139:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "4123:17:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "5574696c733a20496e76616c69642066756e6374696f6e507265666978",
"id": 190,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4142:31:0",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_2dda89e2cabdc9c0ce0b6525524e38d4adcfab28168ed59be64ef16283d6c1ab",
"typeString": "literal_string \"Utils: Invalid functionPrefix\""
},
"value": "Utils: Invalid functionPrefix"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_2dda89e2cabdc9c0ce0b6525524e38d4adcfab28168ed59be64ef16283d6c1ab",
"typeString": "literal_string \"Utils: Invalid functionPrefix\""
}
],
"id": 185,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "4115:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 191,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4115:59:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 192,
"nodeType": "ExpressionStatement",
"src": "4115:59:0"
},
{
"AST": {
"nodeType": "YulBlock",
"src": "4251:59:0",
"statements": [
{
"nodeType": "YulAssignment",
"src": "4266:33:0",
"value": {
"arguments": [
{
"arguments": [
{
"name": "_data",
"nodeType": "YulIdentifier",
"src": "4286:5:0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4293:4:0",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4282:3:0"
},
"nodeType": "YulFunctionCall",
"src": "4282:16:0"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "4276:5:0"
},
"nodeType": "YulFunctionCall",
"src": "4276:23:0"
},
"variableNames": [
{
"name": "prefix",
"nodeType": "YulIdentifier",
"src": "4266:6:0"
}
]
}
]
},
"evmVersion": "istanbul",
"externalReferences": [
{
"declaration": 180,
"isOffset": false,
"isSlot": false,
"src": "4286:5:0",
"valueSize": 1
},
{
"declaration": 183,
"isOffset": false,
"isSlot": false,
"src": "4266:6:0",
"valueSize": 1
}
],
"id": 193,
"nodeType": "InlineAssembly",
"src": "4242:68:0"
}
]
},
"documentation": {
"id": 178,
"nodeType": "StructuredDocumentation",
"src": "3928:88:0",
"text": " @notice Helper method to parse data and extract the method signature."
},
"id": 195,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "functionPrefix",
"nameLocation": "4031:14:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 181,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 180,
"mutability": "mutable",
"name": "_data",
"nameLocation": "4059:5:0",
"nodeType": "VariableDeclaration",
"scope": 195,
"src": "4046:18:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 179,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "4046:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "4045:20:0"
},
"returnParameters": {
"id": 184,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 183,
"mutability": "mutable",
"name": "prefix",
"nameLocation": "4096:6:0",
"nodeType": "VariableDeclaration",
"scope": 195,
"src": "4089:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 182,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "4089:6:0",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"visibility": "internal"
}
],
"src": "4088:15:0"
},
"scope": 396,
"src": "4022:295:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 212,
"nodeType": "Block",
"src": "4490:186:0",
"statements": [
{
"assignments": [
204
],
"declarations": [
{
"constant": false,
"id": 204,
"mutability": "mutable",
"name": "size",
"nameLocation": "4508:4:0",
"nodeType": "VariableDeclaration",
"scope": 212,
"src": "4501:11:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"typeName": {
"id": 203,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "4501:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"visibility": "internal"
}
],
"id": 205,
"nodeType": "VariableDeclarationStatement",
"src": "4501:11:0"
},
{
"AST": {
"nodeType": "YulBlock",
"src": "4589:52:0",
"statements": [
{
"nodeType": "YulAssignment",
"src": "4604:26:0",
"value": {
"arguments": [
{
"name": "_addr",
"nodeType": "YulIdentifier",
"src": "4624:5:0"
}
],
"functionName": {
"name": "extcodesize",
"nodeType": "YulIdentifier",
"src": "4612:11:0"
},
"nodeType": "YulFunctionCall",
"src": "4612:18:0"
},
"variableNames": [
{
"name": "size",
"nodeType": "YulIdentifier",
"src": "4604:4:0"
}
]
}
]
},
"evmVersion": "istanbul",
"externalReferences": [
{
"declaration": 198,
"isOffset": false,
"isSlot": false,
"src": "4624:5:0",
"valueSize": 1
},
{
"declaration": 204,
"isOffset": false,
"isSlot": false,
"src": "4604:4:0",
"valueSize": 1
}
],
"id": 206,
"nodeType": "InlineAssembly",
"src": "4580:61:0"
},
{
"expression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
},
"id": 209,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 207,
"name": "size",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 204,
"src": "4659:4:0",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 208,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4666:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "4659:8:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 210,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "4658:10:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 202,
"id": 211,
"nodeType": "Return",
"src": "4651:17:0"
}
]
},
"documentation": {
"id": 196,
"nodeType": "StructuredDocumentation",
"src": "4325:95:0",
"text": " @notice Checks if an address is a contract.\n @param _addr The address."
},
"id": 213,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isContract",
"nameLocation": "4435:10:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 199,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 198,
"mutability": "mutable",
"name": "_addr",
"nameLocation": "4454:5:0",
"nodeType": "VariableDeclaration",
"scope": 213,
"src": "4446:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 197,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4446:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "4445:15:0"
},
"returnParameters": {
"id": 202,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 201,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 213,
"src": "4484:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 200,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "4484:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "4483:6:0"
},
"scope": 396,
"src": "4426:250:0",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 340,
"nodeType": "Block",
"src": "5219:1070:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 237,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 230,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 227,
"name": "_guardians",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 217,
"src": "5234:10:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 228,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"src": "5234:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 229,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5255:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "5234:22:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 236,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 231,
"name": "_guardian",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 219,
"src": "5260:9:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"arguments": [
{
"hexValue": "30",
"id": 234,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5281:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 233,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "5273:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 232,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5273:7:0",
"typeDescriptions": {}
}
},
"id": 235,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5273:10:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "5260:23:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "5234:49:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 243,
"nodeType": "IfStatement",
"src": "5230:108:0",
"trueBody": {
"id": 242,
"nodeType": "Block",
"src": "5285:53:0",
"statements": [
{
"expression": {
"components": [
{
"hexValue": "66616c7365",
"id": 238,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5308:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"id": 239,
"name": "_guardians",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 217,
"src": "5315:10:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
}
],
"id": 240,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "5307:19:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_array$_t_address_$dyn_memory_ptr_$",
"typeString": "tuple(bool,address[] memory)"
}
},
"functionReturnParameters": 226,
"id": 241,
"nodeType": "Return",
"src": "5300:26:0"
}
]
}
},
{
"assignments": [
245
],
"declarations": [
{
"constant": false,
"id": 245,
"mutability": "mutable",
"name": "isFound",
"nameLocation": "5353:7:0",
"nodeType": "VariableDeclaration",
"scope": 340,
"src": "5348:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 244,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "5348:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"id": 247,
"initialValue": {
"hexValue": "66616c7365",
"id": 246,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5363:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"nodeType": "VariableDeclarationStatement",
"src": "5348:20:0"
},
{
"assignments": [
252
],
"declarations": [
{
"constant": false,
"id": 252,
"mutability": "mutable",
"name": "updatedGuardians",
"nameLocation": "5396:16:0",
"nodeType": "VariableDeclaration",
"scope": 340,
"src": "5379:33:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 250,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5379:7:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 251,
"nodeType": "ArrayTypeName",
"src": "5379:9:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"visibility": "internal"
}
],
"id": 261,
"initialValue": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 259,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 256,
"name": "_guardians",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 217,
"src": "5429:10:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 257,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"src": "5429:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"hexValue": "31",
"id": 258,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5449:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "5429:21:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 255,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "5415:13:0",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$",
"typeString": "function (uint256) pure returns (address[] memory)"
},
"typeName": {
"baseType": {
"id": 253,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5419:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 254,
"nodeType": "ArrayTypeName",
"src": "5419:9:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
}
},
"id": 260,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5415:36:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "5379:72:0"
},
{
"assignments": [
263
],
"declarations": [
{
"constant": false,
"id": 263,
"mutability": "mutable",
"name": "index",
"nameLocation": "5470:5:0",
"nodeType": "VariableDeclaration",
"scope": 340,
"src": "5462:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 262,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5462:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 265,
"initialValue": {
"hexValue": "30",
"id": 264,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5478:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "5462:17:0"
},
{
"body": {
"id": 329,
"nodeType": "Block",
"src": "5538:670:0",
"statements": [
{
"condition": {
"id": 278,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "5557:8:0",
"subExpression": {
"id": 277,
"name": "isFound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 245,
"src": "5558:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 311,
"nodeType": "IfStatement",
"src": "5553:493:0",
"trueBody": {
"id": 310,
"nodeType": "Block",
"src": "5567:479:0",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 283,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 279,
"name": "_guardian",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 219,
"src": "5652:9:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"baseExpression": {
"id": 280,
"name": "_guardians",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 217,
"src": "5665:10:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 282,
"indexExpression": {
"id": 281,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 267,
"src": "5676:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "5665:13:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "5652:26:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 290,
"nodeType": "IfStatement",
"src": "5648:120:0",
"trueBody": {
"id": 289,
"nodeType": "Block",
"src": "5680:88:0",
"statements": [
{
"expression": {
"id": 286,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 284,
"name": "isFound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 245,
"src": "5703:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"hexValue": "74727565",
"id": 285,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5713:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "5703:14:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 287,
"nodeType": "ExpressionStatement",
"src": "5703:14:0"
},
{
"id": 288,
"nodeType": "Continue",
"src": "5740:8:0"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 302,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [
{
"baseExpression": {
"id": 292,
"name": "_guardians",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 217,
"src": "5882:10:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 294,
"indexExpression": {
"id": 293,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 267,
"src": "5893:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "5882:13:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 291,
"name": "isContract",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 213,
"src": "5871:10:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
"typeString": "function (address) view returns (bool)"
}
},
"id": 295,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5871:25:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"arguments": [
{
"baseExpression": {
"id": 297,
"name": "_guardians",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 217,
"src": "5916:10:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 299,
"indexExpression": {
"id": 298,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 267,
"src": "5927:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "5916:13:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 300,
"name": "_guardian",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 219,
"src": "5931:9:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 296,
"name": "isGuardianOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 364,
"src": "5900:15:0",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_bool_$",
"typeString": "function (address,address) view returns (bool)"
}
},
"id": 301,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5900:41:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "5871:70:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 309,
"nodeType": "IfStatement",
"src": "5867:164:0",
"trueBody": {
"id": 308,
"nodeType": "Block",
"src": "5943:88:0",
"statements": [
{
"expression": {
"id": 305,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 303,
"name": "isFound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 245,
"src": "5966:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"hexValue": "74727565",
"id": 304,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5976:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "5966:14:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 306,
"nodeType": "ExpressionStatement",
"src": "5966:14:0"
},
{
"id": 307,
"nodeType": "Continue",
"src": "6003:8:0"
}
]
}
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 315,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 312,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 263,
"src": "6064:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"expression": {
"id": 313,
"name": "updatedGuardians",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 252,
"src": "6072:16:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 314,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"src": "6072:23:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "6064:31:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 328,
"nodeType": "IfStatement",
"src": "6060:137:0",
"trueBody": {
"id": 327,
"nodeType": "Block",
"src": "6097:100:0",
"statements": [
{
"expression": {
"id": 322,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"id": 316,
"name": "updatedGuardians",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 252,
"src": "6116:16:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 318,
"indexExpression": {
"id": 317,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 263,
"src": "6133:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "6116:23:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"baseExpression": {
"id": 319,
"name": "_guardians",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 217,
"src": "6142:10:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 321,
"indexExpression": {
"id": 320,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 267,
"src": "6153:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "6142:13:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "6116:39:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 323,
"nodeType": "ExpressionStatement",
"src": "6116:39:0"
},
{
"expression": {
"id": 325,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "6174:7:0",
"subExpression": {
"id": 324,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 263,
"src": "6174:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 326,
"nodeType": "ExpressionStatement",
"src": "6174:7:0"
}
]
}
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 273,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 270,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 267,
"src": "5510:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"expression": {
"id": 271,
"name": "_guardians",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 217,
"src": "5514:10:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 272,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"src": "5514:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "5510:21:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 330,
"initializationExpression": {
"assignments": [
267
],
"declarations": [
{
"constant": false,
"id": 267,
"mutability": "mutable",
"name": "i",
"nameLocation": "5503:1:0",
"nodeType": "VariableDeclaration",
"scope": 330,
"src": "5495:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 266,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5495:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 269,
"initialValue": {
"hexValue": "30",
"id": 268,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "5507:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "5495:13:0"
},
"loopExpression": {
"expression": {
"id": 275,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "5533:3:0",
"subExpression": {
"id": 274,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 267,
"src": "5533:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 276,
"nodeType": "ExpressionStatement",
"src": "5533:3:0"
},
"nodeType": "ForStatement",
"src": "5490:718:0"
},
{
"expression": {
"condition": {
"id": 331,
"name": "isFound",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 245,
"src": "6225:7:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseExpression": {
"components": [
{
"hexValue": "66616c7365",
"id": 335,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6263:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"id": 336,
"name": "_guardians",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 217,
"src": "6270:10:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
}
],
"id": 337,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "6262:19:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_array$_t_address_$dyn_memory_ptr_$",
"typeString": "tuple(bool,address[] memory)"
}
},
"id": 338,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "Conditional",
"src": "6225:56:0",
"trueExpression": {
"components": [
{
"hexValue": "74727565",
"id": 332,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6236:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"id": 333,
"name": "updatedGuardians",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 252,
"src": "6242:16:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
}
],
"id": 334,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "6235:24:0",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_array$_t_address_$dyn_memory_ptr_$",
"typeString": "tuple(bool,address[] memory)"
}
},
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_array$_t_address_$dyn_memory_ptr_$",
"typeString": "tuple(bool,address[] memory)"
}
},
"functionReturnParameters": 226,
"id": 339,
"nodeType": "Return",
"src": "6218:63:0"
}
]
},
"documentation": {
"id": 214,
"nodeType": "StructuredDocumentation",
"src": "4684:398:0",
"text": " @notice Checks if an address is a guardian or an account authorised to sign on behalf of a smart-contract guardian\n given a list of guardians.\n @param _guardians the list of guardians\n @param _guardian the address to test\n @return true and the list of guardians minus the found guardian upon success, false and the original list of guardians if not found."
},
"id": 341,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isGuardianOrGuardianSigner",
"nameLocation": "5097:26:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 220,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 217,
"mutability": "mutable",
"name": "_guardians",
"nameLocation": "5141:10:0",
"nodeType": "VariableDeclaration",
"scope": 341,
"src": "5124:27:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 215,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5124:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 216,
"nodeType": "ArrayTypeName",
"src": "5124:9:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 219,
"mutability": "mutable",
"name": "_guardian",
"nameLocation": "5161:9:0",
"nodeType": "VariableDeclaration",
"scope": 341,
"src": "5153:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 218,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5153:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "5123:48:0"
},
"returnParameters": {
"id": 226,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 222,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 341,
"src": "5195:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 221,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "5195:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 225,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 341,
"src": "5201:16:0",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 223,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5201:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 224,
"nodeType": "ArrayTypeName",
"src": "5201:9:0",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"visibility": "internal"
}
],
"src": "5194:24:0"
},
"scope": 396,
"src": "5088:1201:0",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 363,
"nodeType": "Block",
"src": "6662:401:0",
"statements": [
{
"assignments": [
352
],
"declarations": [
{
"constant": false,
"id": 352,
"mutability": "mutable",
"name": "owner",
"nameLocation": "6681:5:0",
"nodeType": "VariableDeclaration",
"scope": 363,
"src": "6673:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 351,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6673:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"id": 357,
"initialValue": {
"arguments": [
{
"hexValue": "30",
"id": 355,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6697:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 354,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "6689:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": {
"id": 353,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6689:7:0",
"typeDescriptions": {}
}
},
"id": 356,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6689:10:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6673:26:0"
},
{
"AST": {
"nodeType": "YulBlock",
"src": "6778:245:0",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "6793:22:0",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "6810:4:0",
"type": "",
"value": "0x40"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "6804:5:0"
},
"nodeType": "YulFunctionCall",
"src": "6804:11:0"
},
"variables": [
{
"name": "ptr",
"nodeType": "YulTypedName",
"src": "6797:3:0",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "ptr",
"nodeType": "YulIdentifier",
"src": "6836:3:0"
},
{
"name": "OWNER_SIG",
"nodeType": "YulIdentifier",
"src": "6840:9:0"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "6829:6:0"
},
"nodeType": "YulFunctionCall",
"src": "6829:21:0"
},
"nodeType": "YulExpressionStatement",
"src": "6829:21:0"
},
{
"nodeType": "YulVariableDeclaration",
"src": "6864:64:0",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "6889:5:0",
"type": "",
"value": "25000"
},
{
"name": "_guardian",
"nodeType": "YulIdentifier",
"src": "6896:9:0"
},
{
"name": "ptr",
"nodeType": "YulIdentifier",
"src": "6907:3:0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "6912:4:0",
"type": "",
"value": "0x20"
},
{
"name": "ptr",
"nodeType": "YulIdentifier",
"src": "6918:3:0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "6923:4:0",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "staticcall",
"nodeType": "YulIdentifier",
"src": "6878:10:0"
},
"nodeType": "YulFunctionCall",
"src": "6878:50:0"
},
"variables": [
{
"name": "result",
"nodeType": "YulTypedName",
"src": "6868:6:0",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "6959:53:0",
"statements": [
{
"nodeType": "YulAssignment",
"src": "6978:19:0",
"value": {
"arguments": [
{
"name": "ptr",
"nodeType": "YulIdentifier",
"src": "6993:3:0"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "6987:5:0"
},
"nodeType": "YulFunctionCall",
"src": "6987:10:0"
},
"variableNames": [
{
"name": "owner",
"nodeType": "YulIdentifier",
"src": "6978:5:0"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "result",
"nodeType": "YulIdentifier",
"src": "6948:6:0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "6956:1:0",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "6945:2:0"
},
"nodeType": "YulFunctionCall",
"src": "6945:13:0"
},
"nodeType": "YulIf",
"src": "6942:2:0"
}
]
},
"evmVersion": "istanbul",
"externalReferences": [
{
"declaration": 61,
"isOffset": false,
"isSlot": false,
"src": "6840:9:0",
"valueSize": 1
},
{
"declaration": 344,
"isOffset": false,
"isSlot": false,
"src": "6896:9:0",
"valueSize": 1
},
{
"declaration": 352,
"isOffset": false,
"isSlot": false,
"src": "6978:5:0",
"valueSize": 1
}
],
"id": 358,
"nodeType": "InlineAssembly",
"src": "6769:254:0"
},
{
"expression": {
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 361,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 359,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 352,
"src": "7040:5:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 360,
"name": "_owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 346,
"src": "7049:6:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "7040:15:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 350,
"id": 362,
"nodeType": "Return",
"src": "7033:22:0"
}
]
},
"documentation": {
"id": 342,
"nodeType": "StructuredDocumentation",
"src": "6297:270:0",
"text": " @notice Checks if an address is the owner of a guardian contract.\n The method does not revert if the call to the owner() method consumes more then 25000 gas.\n @param _guardian The guardian contract\n @param _owner The owner to verify."
},
"id": 364,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isGuardianOwner",
"nameLocation": "6582:15:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 347,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 344,
"mutability": "mutable",
"name": "_guardian",
"nameLocation": "6606:9:0",
"nodeType": "VariableDeclaration",
"scope": 364,
"src": "6598:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 343,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6598:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 346,
"mutability": "mutable",
"name": "_owner",
"nameLocation": "6625:6:0",
"nodeType": "VariableDeclaration",
"scope": 364,
"src": "6617:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 345,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6617:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "6597:35:0"
},
"returnParameters": {
"id": 350,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 349,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 364,
"src": "6656:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 348,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "6656:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "6655:6:0"
},
"scope": 396,
"src": "6573:490:0",
"stateMutability": "view",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 394,
"nodeType": "Block",
"src": "7192:142:0",
"statements": [
{
"assignments": [
375
],
"declarations": [
{
"constant": false,
"id": 375,
"mutability": "mutable",
"name": "c",
"nameLocation": "7211:1:0",
"nodeType": "VariableDeclaration",
"scope": 394,
"src": "7203:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 374,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7203:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 379,
"initialValue": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 378,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 376,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 367,
"src": "7215:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"id": 377,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 369,
"src": "7219:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7215:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "7203:17:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 384,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 382,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 380,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 367,
"src": "7235:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"id": 381,
"name": "b",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 369,
"src": "7239:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7235:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 383,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7244:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "7235:10:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 392,
"nodeType": "Block",
"src": "7288:39:0",
"statements": [
{
"expression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 390,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 388,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 375,
"src": "7310:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "31",
"id": 389,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7314:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "7310:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 373,
"id": 391,
"nodeType": "Return",
"src": "7303:12:0"
}
]
},
"id": 393,
"nodeType": "IfStatement",
"src": "7231:96:0",
"trueBody": {
"id": 387,
"nodeType": "Block",
"src": "7247:35:0",
"statements": [
{
"expression": {
"id": 385,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 375,
"src": "7269:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 373,
"id": 386,
"nodeType": "Return",
"src": "7262:8:0"
}
]
}
}
]
},
"documentation": {
"id": 365,
"nodeType": "StructuredDocumentation",
"src": "7071:47:0",
"text": " @notice Returns ceil(a / b)."
},
"id": 395,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "ceil",
"nameLocation": "7133:4:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 370,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 367,
"mutability": "mutable",
"name": "a",
"nameLocation": "7146:1:0",
"nodeType": "VariableDeclaration",
"scope": 395,
"src": "7138:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 366,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7138:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 369,
"mutability": "mutable",
"name": "b",
"nameLocation": "7157:1:0",
"nodeType": "VariableDeclaration",
"scope": 395,
"src": "7149:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 368,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7149:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "7137:22:0"
},
"returnParameters": {
"id": 373,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 372,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 395,
"src": "7183:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 371,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7183:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "7182:9:0"
},
"scope": 396,
"src": "7124:210:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 397,
"src": "150:7187:0"
}
],
"src": "44:7295:0"
},
"id": 0
}
}
}
}