safe-react/safe-contracts/build/contracts/SocialRecoveryModule.json

7317 lines
328 KiB
JSON
Raw Normal View History

2018-05-31 13:01:02 +00:00
{
"contractName": "SocialRecoveryModule",
"abi": [
{
"constant": true,
"inputs": [],
"name": "threshold",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "manager",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
}
],
"name": "isFriend",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_masterCopy",
"type": "address"
}
],
"name": "changeMasterCopy",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "NAME",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "bytes32"
},
{
"name": "",
"type": "address"
}
],
"name": "isConfirmed",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "uint256"
}
],
"name": "friends",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "bytes32"
}
],
"name": "isExecuted",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "VERSION",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_friends",
"type": "address[]"
},
{
"name": "_threshold",
"type": "uint8"
}
],
"name": "setup",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "dataHash",
"type": "bytes32"
}
],
"name": "confirmTransaction",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "prevOwner",
"type": "address"
},
{
"name": "oldOwner",
"type": "address"
},
{
"name": "newOwner",
"type": "address"
}
],
"name": "recoverAccess",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "dataHash",
"type": "bytes32"
}
],
"name": "isConfirmedByRequiredFriends",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "data",
"type": "bytes"
}
],
"name": "getDataHash",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b506117d0806100206000396000f3006080604052600436106100d0576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633cf5b309146100d557806342cde4e814610148578063481c6a751461017957806368125a1b146101d057806377231eaa1461022b57806379716e43146102ae5780637de7edef146102df5780639ca89d0d14610322578063a3f4df7e1461036b578063ae68b056146103fb578063b79ffaff14610480578063ce146828146104e9578063e52cb36a14610556578063ffa1ad741461059f575b600080fd5b3480156100e157600080fd5b5061014660048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290803560ff16906020019092919050505061062f565b005b34801561015457600080fd5b5061015d610994565b604051808260ff1660ff16815260200191505060405180910390f35b34801561018557600080fd5b5061018e6109a7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101dc57600080fd5b50610211600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109cd565b604051808215151515815260200191505060405180910390f35b34801561023757600080fd5b506102ac600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ed565b005b3480156102ba57600080fd5b506102dd6004803603810190808035600019169060200190929190505050610f9e565b005b3480156102eb57600080fd5b50610320600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611197565b005b34801561032e57600080fd5b50610351600480360381019080803560001916906020019092919050505061137a565b604051808215151515815260200191505060405180910390f35b34801561037757600080fd5b50610380611479565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103c05780820151818401526020810190506103a5565b50505050905090810190601f1680156103ed5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561040757600080fd5b50610462600480360381019080803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506114b2565b60405180826000191660001916815260200191505060405180910390f35b34801561048c57600080fd5b506104cf6004803603810190808035600019169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061151e565b604051808215151515815260200191505060405180910390f35b3480156104f557600080fd5b506105146004803603810190808035906020019092919050505061154d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561056257600080fd5b50610585600480360381019080803560001916906020019092919050505061158b565b604051808215151515815260200191505060405180910390f35b3480156105ab57600080fd5b506105b46115ab565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105f45780820151818401526020810190506105d9565b50505050905090810190601f1680156106215780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60008083518360ff16111515156106d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f5468726573686f6c642063616e6e6f742065786365656420667269656e64732081526020017f636f756e7400000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60028360ff1610151515610750576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4174206c65617374203220667269656e6473207265717569726564000000000081525060200191505060405180910390fd5b6107586115e4565b600091505b835182101561095c57838281518110151561077457fe5b90602001906020020151905060008173ffffffffffffffffffffffffffffffffffffffff161415151561080f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f
"deployedBytecode": "0x6080604052600436106100d0576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633cf5b309146100d557806342cde4e814610148578063481c6a751461017957806368125a1b146101d057806377231eaa1461022b57806379716e43146102ae5780637de7edef146102df5780639ca89d0d14610322578063a3f4df7e1461036b578063ae68b056146103fb578063b79ffaff14610480578063ce146828146104e9578063e52cb36a14610556578063ffa1ad741461059f575b600080fd5b3480156100e157600080fd5b5061014660048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290803560ff16906020019092919050505061062f565b005b34801561015457600080fd5b5061015d610994565b604051808260ff1660ff16815260200191505060405180910390f35b34801561018557600080fd5b5061018e6109a7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101dc57600080fd5b50610211600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109cd565b604051808215151515815260200191505060405180910390f35b34801561023757600080fd5b506102ac600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ed565b005b3480156102ba57600080fd5b506102dd6004803603810190808035600019169060200190929190505050610f9e565b005b3480156102eb57600080fd5b50610320600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611197565b005b34801561032e57600080fd5b50610351600480360381019080803560001916906020019092919050505061137a565b604051808215151515815260200191505060405180910390f35b34801561037757600080fd5b50610380611479565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103c05780820151818401526020810190506103a5565b50505050905090810190601f1680156103ed5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561040757600080fd5b50610462600480360381019080803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506114b2565b60405180826000191660001916815260200191505060405180910390f35b34801561048c57600080fd5b506104cf6004803603810190808035600019169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061151e565b604051808215151515815260200191505060405180910390f35b3480156104f557600080fd5b506105146004803603810190808035906020019092919050505061154d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561056257600080fd5b50610585600480360381019080803560001916906020019092919050505061158b565b604051808215151515815260200191505060405180910390f35b3480156105ab57600080fd5b506105b46115ab565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105f45780820151818401526020810190506105d9565b50505050905090810190601f1680156106215780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60008083518360ff16111515156106d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f5468726573686f6c642063616e6e6f742065786365656420667269656e64732081526020017f636f756e7400000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60028360ff1610151515610750576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4174206c65617374203220667269656e6473207265717569726564000000000081525060200191505060405180910390fd5b6107586115e4565b600091505b835182101561095c57838281518110151561077457fe5b90602001906020020151905060008173ffffffffffffffffffffffffffffffffffffffff161415151561080f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f496e76616c696420667269656e6420616464726573
"sourceMap": "306:3656:19:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;306:3656:19;;;;;;;",
"deployedSourceMap": "306:3656:19:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1216:638;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1216:638:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;460:22;;8:9:-1;5:2;;;30:1;27;20:12;5:2;460:22:19;;;;;;;;;;;;;;;;;;;;;;;;;;;262:28:7;;8:9:-1;5:2;;;30:1;27;20:12;5:2;262:28:7;;;;;;;;;;;;;;;;;;;;;;;;;;;583:41:19;;8:9:-1;5:2;;;30:1;27;20:12;5:2;583:41:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2510:625;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2510:625:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1967:210;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1967:210:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;626:248:5;;8:9:-1;5:2;;;30:1;27;20:12;5:2;626:248:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;3296:405:19;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3296:405:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;353:54;;8:9:-1;5:2;;;30:1;27;20:12;5:2;353:54:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;353:54:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3830:130;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3830:130:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;827:65;;8:9:-1;5:2;;;30:1;27;20:12;5:2;827:65:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;488:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;488:24:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;692:43;;8:9:-1;5:2;;;30:1;27;20:12;5:2;692:43:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;413:40;;8:9:-1;5:2;;;30:1;27;20:12;5:2;413:40:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;413:40:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1216:638;1511:9;1566:14;1320:8;:15;1306:10;:29;;;;1298:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1409:1;1395:10;:15;;;;1387:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1452:12;:10;:12::i;:::-;1523:1;1511:13;;1506:282;1530:8;:15;1526:1;:19;1506:282;;;1583:8;1592:1;1583:11;;;;;;;;;;;;;;;;;;1566:28;;1626:1;1616:6;:11;;;;1608:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1686:8;:16;1695:6;1686:16;;;;;;;;;;;;;;;;;;;;;;;;;1685:17;1677:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1773:4;1754:8;:16;1763:6;1754:16;;;;;;;;;;;;;;;;:23;;;;;;;;;;;;;;;;;;1547:3;;;;;;;1506:282;;;1807:8;1797:7;:18;;;;;;;;;;;;:::i;:::-;;1837:10;1825:9;;:22;;;;;;;;;;;;;;;;;;1216:638;;;;:::o;460:22::-;;;;;;;;;;;;;:::o;262:28:7:-;;;;;;;;;;;;;:::o;583:41:19:-;;;;;;;;;;;;;;;;;;;;;;:::o;2510:625::-;2636:17;2758:16;939:8;:20;948:10;939:20;;;;;;;;;;;;;;;;;;;;;;;;;931:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2718:9;2729:8;2739;2656:92;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2656:92:19;;;;;;;38:4:-1;29:7;25:18;67:10;61:17;96:58;199:8;192:4;186;182:15;179:29;167:10;160:49;0:215;;;2656:92:19;2636:112;;2777:17;2789:4;2777:11;:17::i;:::-;2758:36;;2813:10;:20;2824:8;2813:20;;;;;;;;;;;;;;;;;;;;;;;;;;;2812:21;2804:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2881:38;2910:8;2881:28;:38::i;:::-;2873:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2994:4;2971:10;:20;2982:8;2971:20;;;;;;;;;;;;;;;;;;:27;;;;;;;;;;;;;;;;;;3016:7;;;;;;;;;;;:33;;;3058:7;;;;;;;;;;;3068:1;3071:4;3077:19;3016:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;3016:81:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3016:81:19;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3016:81:19;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3016:81:19;;;;;;;;;;;;;;;;3008:120;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2510:625;;;;;:::o;1967:210::-;939:8;:20;948:10;939:20;;;;;;;;;;;;;;;;;;;;;;;;;931:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2070:10;:20;2081:8;2070:20;;;;;;;;;;;;;;;;;;;;;;;;;;;2069:21;2061:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2018-05-31 13:01:02 +00:00
"source": "pragma solidity 0.4.24;\nimport \"../Enum.sol\";\nimport \"../Module.sol\";\nimport \"../ModuleManager.sol\";\nimport \"../OwnerManager.sol\";\n\n\n/// @title Social Recovery Module - Allows to replace an owner without Safe confirmations if friends approve the replacement.\n/// @author Stefan George - <stefan@gnosis.pm>\ncontract SocialRecoveryModule is Module {\n\n string public constant NAME = \"Social Recovery Module\";\n string public constant VERSION = \"0.0.1\";\n\n uint8 public threshold;\n address[] public friends;\n\n // isFriend mapping maps friend's address to friend status.\n mapping (address => bool) public isFriend;\n // isExecuted mapping maps data hash to execution status.\n mapping (bytes32 => bool) public isExecuted;\n // isConfirmed mapping maps data hash to friend's address to confirmation status.\n mapping (bytes32 => mapping (address => bool)) public isConfirmed;\n\n modifier onlyFriend() {\n require(isFriend[msg.sender], \"Method can only be called by a friend\");\n _;\n }\n\n /// @dev Setup function sets initial storage of contract.\n /// @param _friends List of friends' addresses.\n /// @param _threshold Required number of friends to confirm replacement.\n function setup(address[] _friends, uint8 _threshold)\n public\n {\n require(_threshold <= _friends.length, \"Threshold cannot exceed friends count\");\n require(_threshold >= 2, \"At least 2 friends required\");\n setManager();\n // Set allowed friends.\n for (uint256 i = 0; i < _friends.length; i++) {\n address friend = _friends[i];\n require(friend != 0, \"Invalid friend address provided\");\n require(!isFriend[friend], \"Duplicate friend address provided\");\n isFriend[friend] = true;\n }\n friends = _friends;\n threshold = _threshold;\n }\n\n /// @dev Allows a friend to confirm a Safe transaction.\n /// @param dataHash Safe transaction hash.\n function confirmTransaction(bytes32 dataHash)\n public\n onlyFriend\n {\n require(!isExecuted[dataHash], \"Recovery already executed\");\n isConfirmed[dataHash][msg.sender] = true;\n }\n\n /// @dev Returns if Safe transaction is a valid owner replacement transaction.\n /// @param prevOwner Owner that pointed to the owner to be replaced in the linked list\n /// @param oldOwner Owner address to be replaced.\n /// @param newOwner New owner address.\n /// @return Returns if transaction can be executed.\n function recoverAccess(address prevOwner, address oldOwner, address newOwner)\n public\n onlyFriend\n {\n bytes memory data = abi.encodeWithSignature(\"swapOwner(address,address,address)\", prevOwner, oldOwner, newOwner);\n bytes32 dataHash = getDataHash(data);\n require(!isExecuted[dataHash], \"Recovery already executed\");\n require(isConfirmedByRequiredFriends(dataHash), \"Recovery has not enough confirmations\");\n isExecuted[dataHash] = true;\n require(manager.execTransactionFromModule(address(manager), 0, data, Enum.Operation.Call), \"Could not execute recovery\");\n }\n\n /// @dev Returns if Safe transaction is a valid owner replacement transaction.\n /// @param dataHash Data hash.\n /// @return Confirmation status.\n function isConfirmedByRequiredFriends(bytes32 dataHash)\n public\n view\n returns (bool)\n {\n uint256 confirmationCount;\n for (uint256 i = 0; i < friends.length; i++) {\n if (isConfirmed[dataHash][friends[i]])\n confirmationCount++;\n if (confirmationCount == threshold)\n return true;\n }\n return false;\n }\n\n /// @dev Returns hash of data encoding owner replacement.\n /// @param data Data payload.\n /// @return Data hash.\n function getDataHash(bytes data)\n public\n pure\n returns (bytes32)\n {\n return keccak256(
"sourcePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/modules/SocialRecoveryModule.sol",
"ast": {
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/modules/SocialRecoveryModule.sol",
"exportedSymbols": {
"SocialRecoveryModule": [
2344
2018-05-31 13:01:02 +00:00
]
},
"id": 2345,
2018-05-31 13:01:02 +00:00
"nodeType": "SourceUnit",
"nodes": [
{
"id": 2081,
2018-05-31 13:01:02 +00:00
"literals": [
"solidity",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:23:19"
2018-05-31 13:01:02 +00:00
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Enum.sol",
"file": "../Enum.sol",
"id": 2082,
2018-05-31 13:01:02 +00:00
"nodeType": "ImportDirective",
"scope": 2345,
2018-05-31 13:01:02 +00:00
"sourceUnit": 31,
"src": "24:21:19",
2018-05-31 13:01:02 +00:00
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Module.sol",
"file": "../Module.sol",
"id": 2083,
2018-05-31 13:01:02 +00:00
"nodeType": "ImportDirective",
"scope": 2345,
"sourceUnit": 733,
"src": "46:23:19",
2018-05-31 13:01:02 +00:00
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/ModuleManager.sol",
"file": "../ModuleManager.sol",
"id": 2084,
2018-05-31 13:01:02 +00:00
"nodeType": "ImportDirective",
"scope": 2345,
"sourceUnit": 1104,
"src": "70:30:19",
2018-05-31 13:01:02 +00:00
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/OwnerManager.sol",
"file": "../OwnerManager.sol",
"id": 2085,
2018-05-31 13:01:02 +00:00
"nodeType": "ImportDirective",
"scope": 2345,
"sourceUnit": 1514,
"src": "101:29:19",
2018-05-31 13:01:02 +00:00
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 2086,
2018-05-31 13:01:02 +00:00
"name": "Module",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 732,
"src": "339:6:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_contract$_Module_$732",
2018-05-31 13:01:02 +00:00
"typeString": "contract Module"
}
},
"id": 2087,
2018-05-31 13:01:02 +00:00
"nodeType": "InheritanceSpecifier",
"src": "339:6:19"
2018-05-31 13:01:02 +00:00
}
],
"contractDependencies": [
632,
732,
1663
2018-05-31 13:01:02 +00:00
],
"contractKind": "contract",
"documentation": "@title Social Recovery Module - Allows to replace an owner without Safe confirmations if friends approve the replacement.\n @author Stefan George - <stefan@gnosis.pm>",
"fullyImplemented": true,
"id": 2344,
2018-05-31 13:01:02 +00:00
"linearizedBaseContracts": [
2344,
732,
632,
1663
2018-05-31 13:01:02 +00:00
],
"name": "SocialRecoveryModule",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 2090,
2018-05-31 13:01:02 +00:00
"name": "NAME",
"nodeType": "VariableDeclaration",
"scope": 2344,
"src": "353:54:19",
2018-05-31 13:01:02 +00:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 2088,
2018-05-31 13:01:02 +00:00
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "353:6:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "536f6369616c205265636f76657279204d6f64756c65",
"id": 2089,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "383:24:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8f499aea563eae5544b16c9123d6c7c8537a7d9dd86296aa60c65de194207230",
"typeString": "literal_string \"Social Recovery Module\""
},
"value": "Social Recovery Module"
},
"visibility": "public"
},
{
"constant": true,
"id": 2093,
2018-05-31 13:01:02 +00:00
"name": "VERSION",
"nodeType": "VariableDeclaration",
"scope": 2344,
"src": "413:40:19",
2018-05-31 13:01:02 +00:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 2091,
2018-05-31 13:01:02 +00:00
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "413:6:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "302e302e31",
"id": 2092,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "446:7:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_ae209a0b48f21c054280f2455d32cf309387644879d9acbd8ffc199163811885",
"typeString": "literal_string \"0.0.1\""
},
"value": "0.0.1"
},
"visibility": "public"
},
{
"constant": false,
"id": 2095,
2018-05-31 13:01:02 +00:00
"name": "threshold",
"nodeType": "VariableDeclaration",
"scope": 2344,
"src": "460:22:19",
2018-05-31 13:01:02 +00:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 2094,
2018-05-31 13:01:02 +00:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "460:5:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 2098,
2018-05-31 13:01:02 +00:00
"name": "friends",
"nodeType": "VariableDeclaration",
"scope": 2344,
"src": "488:24:19",
2018-05-31 13:01:02 +00:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 2096,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "488:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 2097,
2018-05-31 13:01:02 +00:00
"length": null,
"nodeType": "ArrayTypeName",
"src": "488:9:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 2102,
2018-05-31 13:01:02 +00:00
"name": "isFriend",
"nodeType": "VariableDeclaration",
"scope": 2344,
"src": "583:41:19",
2018-05-31 13:01:02 +00:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"typeName": {
"id": 2101,
2018-05-31 13:01:02 +00:00
"keyType": {
"id": 2099,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "592:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "583:25:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
"id": 2100,
2018-05-31 13:01:02 +00:00
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "603:4:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 2106,
2018-05-31 13:01:02 +00:00
"name": "isExecuted",
"nodeType": "VariableDeclaration",
"scope": 2344,
"src": "692:43:19",
2018-05-31 13:01:02 +00:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
},
"typeName": {
"id": 2105,
2018-05-31 13:01:02 +00:00
"keyType": {
"id": 2103,
2018-05-31 13:01:02 +00:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "701:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "692:25:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
},
"valueType": {
"id": 2104,
2018-05-31 13:01:02 +00:00
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "712:4:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 2112,
2018-05-31 13:01:02 +00:00
"name": "isConfirmed",
"nodeType": "VariableDeclaration",
"scope": 2344,
"src": "827:65:19",
2018-05-31 13:01:02 +00:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$",
"typeString": "mapping(bytes32 => mapping(address => bool))"
},
"typeName": {
"id": 2111,
2018-05-31 13:01:02 +00:00
"keyType": {
"id": 2107,
2018-05-31 13:01:02 +00:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "836:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "827:46:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$",
"typeString": "mapping(bytes32 => mapping(address => bool))"
},
"valueType": {
"id": 2110,
2018-05-31 13:01:02 +00:00
"keyType": {
"id": 2108,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "856:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "847:25:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
"id": 2109,
2018-05-31 13:01:02 +00:00
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "867:4:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 2123,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "921:98:19",
2018-05-31 13:01:02 +00:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2115,
2018-05-31 13:01:02 +00:00
"name": "isFriend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2102,
"src": "939:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 2118,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2116,
2018-05-31 13:01:02 +00:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2700,
"src": "948:3:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2117,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "948:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "939:20:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4d6574686f642063616e206f6e6c792062652063616c6c6564206279206120667269656e64",
"id": 2119,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "961:39:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b1b9fb59ab33eb5ed22c2a9ea6a84e946973f30df026a85494e13c73883cce0a",
"typeString": "literal_string \"Method can only be called by a friend\""
},
"value": "Method can only be called by a friend"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_b1b9fb59ab33eb5ed22c2a9ea6a84e946973f30df026a85494e13c73883cce0a",
"typeString": "literal_string \"Method can only be called by a friend\""
}
],
"id": 2114,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "931:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2120,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "931:70:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2121,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "931:70:19"
2018-05-31 13:01:02 +00:00
},
{
"id": 2122,
2018-05-31 13:01:02 +00:00
"nodeType": "PlaceholderStatement",
"src": "1011:1:19"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": null,
"id": 2124,
2018-05-31 13:01:02 +00:00
"name": "onlyFriend",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 2113,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "918:2:19"
2018-05-31 13:01:02 +00:00
},
"src": "899:120:19",
2018-05-31 13:01:02 +00:00
"visibility": "internal"
},
{
"body": {
"id": 2198,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "1288:566:19",
2018-05-31 13:01:02 +00:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2136,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2133,
2018-05-31 13:01:02 +00:00
"name": "_threshold",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2129,
"src": "1306:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2134,
2018-05-31 13:01:02 +00:00
"name": "_friends",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2127,
"src": "1320:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 2135,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1320:15:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1306:29:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "5468726573686f6c642063616e6e6f742065786365656420667269656e647320636f756e74",
"id": 2137,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1337:39:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8268a65eab991df6bae5d0e671467a9ef945396e4d495dc52153cedea41ef257",
"typeString": "literal_string \"Threshold cannot exceed friends count\""
},
"value": "Threshold cannot exceed friends count"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8268a65eab991df6bae5d0e671467a9ef945396e4d495dc52153cedea41ef257",
"typeString": "literal_string \"Threshold cannot exceed friends count\""
}
],
"id": 2132,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "1298:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2138,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1298:79:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2139,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1298:79:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 2143,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2141,
2018-05-31 13:01:02 +00:00
"name": "_threshold",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2129,
"src": "1395:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "32",
"id": 2142,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1409:1:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "1395:15:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4174206c65617374203220667269656e6473207265717569726564",
"id": 2144,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1412:29:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_2dca24eb5124987015b2480219c9ac2baf747f0e8ae6537e9852d3e3b2773773",
"typeString": "literal_string \"At least 2 friends required\""
},
"value": "At least 2 friends required"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_2dca24eb5124987015b2480219c9ac2baf747f0e8ae6537e9852d3e3b2773773",
"typeString": "literal_string \"At least 2 friends required\""
}
],
"id": 2140,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "1387:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2145,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1387:55:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2146,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1387:55:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 2147,
2018-05-31 13:01:02 +00:00
"name": "setManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 731,
"src": "1452:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 2148,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1452:12:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2149,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1452:12:19"
2018-05-31 13:01:02 +00:00
},
{
"body": {
"id": 2188,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "1552:236:19",
2018-05-31 13:01:02 +00:00
"statements": [
{
"assignments": [
2162
2018-05-31 13:01:02 +00:00
],
"declarations": [
{
"constant": false,
"id": 2162,
2018-05-31 13:01:02 +00:00
"name": "friend",
"nodeType": "VariableDeclaration",
"scope": 2199,
"src": "1566:14:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2161,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1566:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2166,
2018-05-31 13:01:02 +00:00
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2163,
2018-05-31 13:01:02 +00:00
"name": "_friends",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2127,
"src": "1583:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 2165,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2164,
2018-05-31 13:01:02 +00:00
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2151,
"src": "1592:1:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1583:11:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1566:28:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2170,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2168,
2018-05-31 13:01:02 +00:00
"name": "friend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2162,
"src": "1616:6:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2169,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1626:1:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1616:11:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "496e76616c696420667269656e6420616464726573732070726f7669646564",
"id": 2171,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1629:33:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_5d50911068dfec2dd53f3e08d7dec23b50affd69b91cf3e5d1e699c56bca7a55",
"typeString": "literal_string \"Invalid friend address provided\""
},
"value": "Invalid friend address provided"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_5d50911068dfec2dd53f3e08d7dec23b50affd69b91cf3e5d1e699c56bca7a55",
"typeString": "literal_string \"Invalid friend address provided\""
}
],
"id": 2167,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "1608:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2172,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1608:55:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2173,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1608:55:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2178,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "1685:17:19",
2018-05-31 13:01:02 +00:00
"subExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2175,
2018-05-31 13:01:02 +00:00
"name": "isFriend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2102,
"src": "1686:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 2177,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2176,
2018-05-31 13:01:02 +00:00
"name": "friend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2162,
"src": "1695:6:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1686:16:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4475706c696361746520667269656e6420616464726573732070726f7669646564",
"id": 2179,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1704:35:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_78a0468a6f4bfa8018f886880a93f836f50f407cd02c2e42c43779f87d3af4d3",
"typeString": "literal_string \"Duplicate friend address provided\""
},
"value": "Duplicate friend address provided"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_78a0468a6f4bfa8018f886880a93f836f50f407cd02c2e42c43779f87d3af4d3",
"typeString": "literal_string \"Duplicate friend address provided\""
}
],
"id": 2174,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "1677:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2180,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1677:63:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2181,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1677:63:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"id": 2186,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2182,
2018-05-31 13:01:02 +00:00
"name": "isFriend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2102,
"src": "1754:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 2184,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2183,
2018-05-31 13:01:02 +00:00
"name": "friend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2162,
"src": "1763:6:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1754:16:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2185,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1773:4:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "1754:23:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2187,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1754:23:19"
2018-05-31 13:01:02 +00:00
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2157,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2154,
2018-05-31 13:01:02 +00:00
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2151,
"src": "1526:1:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2155,
2018-05-31 13:01:02 +00:00
"name": "_friends",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2127,
"src": "1530:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 2156,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1530:15:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1526:19:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2189,
2018-05-31 13:01:02 +00:00
"initializationExpression": {
"assignments": [
2151
2018-05-31 13:01:02 +00:00
],
"declarations": [
{
"constant": false,
"id": 2151,
2018-05-31 13:01:02 +00:00
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 2199,
"src": "1511:9:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2150,
2018-05-31 13:01:02 +00:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1511:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2153,
2018-05-31 13:01:02 +00:00
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 2152,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1523:1:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1511:13:19"
2018-05-31 13:01:02 +00:00
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 2159,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1547:3:19",
2018-05-31 13:01:02 +00:00
"subExpression": {
"argumentTypes": null,
"id": 2158,
2018-05-31 13:01:02 +00:00
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2151,
"src": "1547:1:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2160,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1547:3:19"
2018-05-31 13:01:02 +00:00
},
"nodeType": "ForStatement",
"src": "1506:282:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"id": 2192,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2190,
2018-05-31 13:01:02 +00:00
"name": "friends",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2098,
"src": "1797:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2191,
2018-05-31 13:01:02 +00:00
"name": "_friends",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2127,
"src": "1807:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"src": "1797:18:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2193,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1797:18:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"id": 2196,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2194,
2018-05-31 13:01:02 +00:00
"name": "threshold",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2095,
"src": "1825:9:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2195,
2018-05-31 13:01:02 +00:00
"name": "_threshold",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2129,
"src": "1837:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "1825:22:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 2197,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1825:22:19"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": "@dev Setup function sets initial storage of contract.\n @param _friends List of friends' addresses.\n @param _threshold Required number of friends to confirm replacement.",
"id": 2199,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "setup",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2130,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2127,
2018-05-31 13:01:02 +00:00
"name": "_friends",
"nodeType": "VariableDeclaration",
"scope": 2199,
"src": "1231:18:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 2125,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1231:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 2126,
2018-05-31 13:01:02 +00:00
"length": null,
"nodeType": "ArrayTypeName",
"src": "1231:9:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2129,
2018-05-31 13:01:02 +00:00
"name": "_threshold",
"nodeType": "VariableDeclaration",
"scope": 2199,
"src": "1251:16:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 2128,
2018-05-31 13:01:02 +00:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1251:5:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1230:38:19"
2018-05-31 13:01:02 +00:00
},
"payable": false,
"returnParameters": {
"id": 2131,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "1288:0:19"
2018-05-31 13:01:02 +00:00
},
"scope": 2344,
"src": "1216:638:19",
2018-05-31 13:01:02 +00:00
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2223,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "2051:126:19",
2018-05-31 13:01:02 +00:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2210,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "2069:21:19",
2018-05-31 13:01:02 +00:00
"subExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2207,
2018-05-31 13:01:02 +00:00
"name": "isExecuted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2106,
"src": "2070:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
}
},
"id": 2209,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2208,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2201,
"src": "2081:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2070:20:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "5265636f7665727920616c7265616479206578656375746564",
"id": 2211,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2092:27:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c2f19da1619c37eda5c6f4f3abcc466ec30065da4e2523bb6c81cc850dedac38",
"typeString": "literal_string \"Recovery already executed\""
},
"value": "Recovery already executed"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c2f19da1619c37eda5c6f4f3abcc466ec30065da4e2523bb6c81cc850dedac38",
"typeString": "literal_string \"Recovery already executed\""
}
],
"id": 2206,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "2061:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2212,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2061:59:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2213,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "2061:59:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"id": 2221,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2214,
2018-05-31 13:01:02 +00:00
"name": "isConfirmed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2112,
"src": "2130:11:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$",
"typeString": "mapping(bytes32 => mapping(address => bool))"
}
},
"id": 2218,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2215,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2201,
"src": "2142:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2130:21:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 2219,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2216,
2018-05-31 13:01:02 +00:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2700,
"src": "2152:3:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2217,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2152:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2130:33:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2220,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2166:4:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "2130:40:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2222,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "2130:40:19"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": "@dev Allows a friend to confirm a Safe transaction.\n @param dataHash Safe transaction hash.",
"id": 2224,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 2204,
2018-05-31 13:01:02 +00:00
"modifierName": {
"argumentTypes": null,
"id": 2203,
2018-05-31 13:01:02 +00:00
"name": "onlyFriend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2124,
"src": "2036:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "2036:10:19"
2018-05-31 13:01:02 +00:00
}
],
"name": "confirmTransaction",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2202,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2201,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "VariableDeclaration",
"scope": 2224,
"src": "1995:16:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 2200,
2018-05-31 13:01:02 +00:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1995:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1994:18:19"
2018-05-31 13:01:02 +00:00
},
"payable": false,
"returnParameters": {
"id": 2205,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "2051:0:19"
2018-05-31 13:01:02 +00:00
},
"scope": 2344,
"src": "1967:210:19",
2018-05-31 13:01:02 +00:00
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2287,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "2626:509:19",
2018-05-31 13:01:02 +00:00
"statements": [
{
"assignments": [
2236
2018-05-31 13:01:02 +00:00
],
"declarations": [
{
"constant": false,
"id": 2236,
2018-05-31 13:01:02 +00:00
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 2288,
"src": "2636:17:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2235,
2018-05-31 13:01:02 +00:00
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2636:5:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2244,
2018-05-31 13:01:02 +00:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "737761704f776e657228616464726573732c616464726573732c6164647265737329",
"id": 2239,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2680:36:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_e318b52b9bee2870ac7ee0af86866eb2e8f9569b34de6028eb487e7983ba6df8",
"typeString": "literal_string \"swapOwner(address,address,address)\""
},
"value": "swapOwner(address,address,address)"
},
{
"argumentTypes": null,
"id": 2240,
2018-05-31 13:01:02 +00:00
"name": "prevOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2226,
"src": "2718:9:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2241,
2018-05-31 13:01:02 +00:00
"name": "oldOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2228,
"src": "2729:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2242,
2018-05-31 13:01:02 +00:00
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2230,
"src": "2739:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_e318b52b9bee2870ac7ee0af86866eb2e8f9569b34de6028eb487e7983ba6df8",
"typeString": "literal_string \"swapOwner(address,address,address)\""
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"id": 2237,
2018-05-31 13:01:02 +00:00
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2687,
"src": "2656:3:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 2238,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "encodeWithSignature",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2656:23:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (string memory) pure returns (bytes memory)"
}
},
"id": 2243,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2656:92:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2636:112:19"
2018-05-31 13:01:02 +00:00
},
{
"assignments": [
2246
2018-05-31 13:01:02 +00:00
],
"declarations": [
{
"constant": false,
"id": 2246,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "VariableDeclaration",
"scope": 2288,
"src": "2758:16:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 2245,
2018-05-31 13:01:02 +00:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "2758:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2250,
2018-05-31 13:01:02 +00:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2248,
2018-05-31 13:01:02 +00:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2236,
"src": "2789:4:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 2247,
2018-05-31 13:01:02 +00:00
"name": "getDataHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2343,
"src": "2777:11:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 2249,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2777:17:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2758:36:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2255,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "2812:21:19",
2018-05-31 13:01:02 +00:00
"subExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2252,
2018-05-31 13:01:02 +00:00
"name": "isExecuted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2106,
"src": "2813:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
}
},
"id": 2254,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2253,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2246,
"src": "2824:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2813:20:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "5265636f7665727920616c7265616479206578656375746564",
"id": 2256,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2835:27:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c2f19da1619c37eda5c6f4f3abcc466ec30065da4e2523bb6c81cc850dedac38",
"typeString": "literal_string \"Recovery already executed\""
},
"value": "Recovery already executed"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c2f19da1619c37eda5c6f4f3abcc466ec30065da4e2523bb6c81cc850dedac38",
"typeString": "literal_string \"Recovery already executed\""
}
],
"id": 2251,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "2804:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2257,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2804:59:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2258,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "2804:59:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2261,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2246,
"src": "2910:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 2260,
2018-05-31 13:01:02 +00:00
"name": "isConfirmedByRequiredFriends",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2331,
"src": "2881:28:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$",
"typeString": "function (bytes32) view returns (bool)"
}
},
"id": 2262,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2881:38:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "5265636f7665727920686173206e6f7420656e6f75676820636f6e6669726d6174696f6e73",
"id": 2263,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2921:39:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_cb12b81371f920ba15a762526f9a95cbe925aecb372a64dbeac8ce5c02e0c0e8",
"typeString": "literal_string \"Recovery has not enough confirmations\""
},
"value": "Recovery has not enough confirmations"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_cb12b81371f920ba15a762526f9a95cbe925aecb372a64dbeac8ce5c02e0c0e8",
"typeString": "literal_string \"Recovery has not enough confirmations\""
}
],
"id": 2259,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "2873:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2264,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2873:88:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2265,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "2873:88:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"id": 2270,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2266,
2018-05-31 13:01:02 +00:00
"name": "isExecuted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2106,
"src": "2971:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
}
},
"id": 2268,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2267,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2246,
"src": "2982:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2971:20:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2269,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2994:4:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "2971:27:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2271,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "2971:27:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2276,
2018-05-31 13:01:02 +00:00
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 697,
"src": "3058:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$1103",
2018-05-31 13:01:02 +00:00
"typeString": "contract ModuleManager"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ModuleManager_$1103",
2018-05-31 13:01:02 +00:00
"typeString": "contract ModuleManager"
}
],
"id": 2275,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3050:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 2277,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3050:16:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2278,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3068:1:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
{
"argumentTypes": null,
"id": 2279,
2018-05-31 13:01:02 +00:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2236,
"src": "3071:4:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2280,
2018-05-31 13:01:02 +00:00
"name": "Enum",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 30,
"src": "3077:4:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Enum_$30_$",
"typeString": "type(contract Enum)"
}
},
"id": 2281,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "Operation",
"nodeType": "MemberAccess",
"referencedDeclaration": 29,
"src": "3077:14:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Operation_$29_$",
"typeString": "type(enum Enum.Operation)"
}
},
"id": 2282,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "Call",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3077:19:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$29",
"typeString": "enum Enum.Operation"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_enum$_Operation_$29",
"typeString": "enum Enum.Operation"
}
],
"expression": {
"argumentTypes": null,
"id": 2273,
2018-05-31 13:01:02 +00:00
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 697,
"src": "3016:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$1103",
2018-05-31 13:01:02 +00:00
"typeString": "contract ModuleManager"
}
},
"id": 2274,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "execTransactionFromModule",
"nodeType": "MemberAccess",
"referencedDeclaration": 930,
"src": "3016:33:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_enum$_Operation_$29_$returns$_t_bool_$",
"typeString": "function (address,uint256,bytes memory,enum Enum.Operation) external returns (bool)"
}
},
"id": 2283,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3016:81:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "436f756c64206e6f742065786563757465207265636f76657279",
"id": 2284,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3099:28:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3515587d60c3ee9920dfa4bee22a25e99aacbb3cec35d7cbe6c839f5b9ffdff1",
"typeString": "literal_string \"Could not execute recovery\""
},
"value": "Could not execute recovery"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3515587d60c3ee9920dfa4bee22a25e99aacbb3cec35d7cbe6c839f5b9ffdff1",
"typeString": "literal_string \"Could not execute recovery\""
}
],
"id": 2272,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "3008:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2285,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3008:120:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2286,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "3008:120:19"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": "@dev Returns if Safe transaction is a valid owner replacement transaction.\n @param prevOwner Owner that pointed to the owner to be replaced in the linked list\n @param oldOwner Owner address to be replaced.\n @param newOwner New owner address.\n @return Returns if transaction can be executed.",
"id": 2288,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 2233,
2018-05-31 13:01:02 +00:00
"modifierName": {
"argumentTypes": null,
"id": 2232,
2018-05-31 13:01:02 +00:00
"name": "onlyFriend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2124,
"src": "2611:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "2611:10:19"
2018-05-31 13:01:02 +00:00
}
],
"name": "recoverAccess",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2231,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2226,
2018-05-31 13:01:02 +00:00
"name": "prevOwner",
"nodeType": "VariableDeclaration",
"scope": 2288,
"src": "2533:17:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2225,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2533:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2228,
2018-05-31 13:01:02 +00:00
"name": "oldOwner",
"nodeType": "VariableDeclaration",
"scope": 2288,
"src": "2552:16:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2227,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2552:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2230,
2018-05-31 13:01:02 +00:00
"name": "newOwner",
"nodeType": "VariableDeclaration",
"scope": 2288,
"src": "2570:16:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2229,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2570:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2532:55:19"
2018-05-31 13:01:02 +00:00
},
"payable": false,
"returnParameters": {
"id": 2234,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "2626:0:19"
2018-05-31 13:01:02 +00:00
},
"scope": 2344,
"src": "2510:625:19",
2018-05-31 13:01:02 +00:00
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2330,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "3407:294:19",
2018-05-31 13:01:02 +00:00
"statements": [
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 2296,
2018-05-31 13:01:02 +00:00
"name": "confirmationCount",
"nodeType": "VariableDeclaration",
"scope": 2331,
"src": "3417:25:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2295,
2018-05-31 13:01:02 +00:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3417:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2297,
2018-05-31 13:01:02 +00:00
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "3417:25:19"
2018-05-31 13:01:02 +00:00
},
{
"body": {
"id": 2326,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "3497:176:19",
2018-05-31 13:01:02 +00:00
"statements": [
{
"condition": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2309,
2018-05-31 13:01:02 +00:00
"name": "isConfirmed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2112,
"src": "3515:11:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$",
"typeString": "mapping(bytes32 => mapping(address => bool))"
}
},
"id": 2311,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2310,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2290,
"src": "3527:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3515:21:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 2315,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2312,
2018-05-31 13:01:02 +00:00
"name": "friends",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2098,
"src": "3537:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2314,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2313,
2018-05-31 13:01:02 +00:00
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2299,
"src": "3545:1:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3537:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3515:33:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2319,
2018-05-31 13:01:02 +00:00
"nodeType": "IfStatement",
"src": "3511:74:19",
2018-05-31 13:01:02 +00:00
"trueBody": {
"expression": {
"argumentTypes": null,
"id": 2317,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "3566:19:19",
2018-05-31 13:01:02 +00:00
"subExpression": {
"argumentTypes": null,
"id": 2316,
2018-05-31 13:01:02 +00:00
"name": "confirmationCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2296,
"src": "3566:17:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2318,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "3566:19:19"
2018-05-31 13:01:02 +00:00
}
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2322,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2320,
2018-05-31 13:01:02 +00:00
"name": "confirmationCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2296,
"src": "3603:17:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2321,
2018-05-31 13:01:02 +00:00
"name": "threshold",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2095,
"src": "3624:9:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "3603:30:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2325,
2018-05-31 13:01:02 +00:00
"nodeType": "IfStatement",
"src": "3599:63:19",
2018-05-31 13:01:02 +00:00
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2323,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3658:4:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 2294,
"id": 2324,
2018-05-31 13:01:02 +00:00
"nodeType": "Return",
"src": "3651:11:19"
2018-05-31 13:01:02 +00:00
}
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2305,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2302,
2018-05-31 13:01:02 +00:00
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2299,
"src": "3472:1:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2303,
2018-05-31 13:01:02 +00:00
"name": "friends",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2098,
"src": "3476:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2304,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3476:14:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3472:18:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2327,
2018-05-31 13:01:02 +00:00
"initializationExpression": {
"assignments": [
2299
2018-05-31 13:01:02 +00:00
],
"declarations": [
{
"constant": false,
"id": 2299,
2018-05-31 13:01:02 +00:00
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 2331,
"src": "3457:9:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2298,
2018-05-31 13:01:02 +00:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3457:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2301,
2018-05-31 13:01:02 +00:00
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 2300,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3469:1:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "3457:13:19"
2018-05-31 13:01:02 +00:00
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 2307,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "3492:3:19",
2018-05-31 13:01:02 +00:00
"subExpression": {
"argumentTypes": null,
"id": 2306,
2018-05-31 13:01:02 +00:00
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2299,
"src": "3492:1:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2308,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "3492:3:19"
2018-05-31 13:01:02 +00:00
},
"nodeType": "ForStatement",
"src": "3452:221:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2328,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3689:5:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 2294,
"id": 2329,
2018-05-31 13:01:02 +00:00
"nodeType": "Return",
"src": "3682:12:19"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": "@dev Returns if Safe transaction is a valid owner replacement transaction.\n @param dataHash Data hash.\n @return Confirmation status.",
"id": 2331,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "isConfirmedByRequiredFriends",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2291,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2290,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "VariableDeclaration",
"scope": 2331,
"src": "3334:16:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 2289,
2018-05-31 13:01:02 +00:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "3334:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3333:18:19"
2018-05-31 13:01:02 +00:00
},
"payable": false,
"returnParameters": {
"id": 2294,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2293,
2018-05-31 13:01:02 +00:00
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2331,
"src": "3397:4:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2292,
2018-05-31 13:01:02 +00:00
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "3397:4:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3396:6:19"
2018-05-31 13:01:02 +00:00
},
"scope": 2344,
"src": "3296:405:19",
2018-05-31 13:01:02 +00:00
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2342,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "3921:39:19",
2018-05-31 13:01:02 +00:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2339,
2018-05-31 13:01:02 +00:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2333,
"src": "3948:4:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 2338,
2018-05-31 13:01:02 +00:00
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2694,
"src": "3938:9:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$",
"typeString": "function () pure returns (bytes32)"
}
},
"id": 2340,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3938:15:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"functionReturnParameters": 2337,
"id": 2341,
2018-05-31 13:01:02 +00:00
"nodeType": "Return",
"src": "3931:22:19"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": "@dev Returns hash of data encoding owner replacement.\n @param data Data payload.\n @return Data hash.",
"id": 2343,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getDataHash",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2334,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2333,
2018-05-31 13:01:02 +00:00
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 2343,
"src": "3851:10:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2332,
2018-05-31 13:01:02 +00:00
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "3851:5:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3850:12:19"
2018-05-31 13:01:02 +00:00
},
"payable": false,
"returnParameters": {
"id": 2337,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2336,
2018-05-31 13:01:02 +00:00
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2343,
"src": "3908:7:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 2335,
2018-05-31 13:01:02 +00:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "3908:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3907:9:19"
2018-05-31 13:01:02 +00:00
},
"scope": 2344,
"src": "3830:130:19",
2018-05-31 13:01:02 +00:00
"stateMutability": "pure",
"superFunction": null,
"visibility": "public"
}
],
"scope": 2345,
"src": "306:3656:19"
2018-05-31 13:01:02 +00:00
}
],
"src": "0:3963:19"
2018-05-31 13:01:02 +00:00
},
"legacyAST": {
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/modules/SocialRecoveryModule.sol",
"exportedSymbols": {
"SocialRecoveryModule": [
2344
2018-05-31 13:01:02 +00:00
]
},
"id": 2345,
2018-05-31 13:01:02 +00:00
"nodeType": "SourceUnit",
"nodes": [
{
"id": 2081,
2018-05-31 13:01:02 +00:00
"literals": [
"solidity",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:23:19"
2018-05-31 13:01:02 +00:00
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Enum.sol",
"file": "../Enum.sol",
"id": 2082,
2018-05-31 13:01:02 +00:00
"nodeType": "ImportDirective",
"scope": 2345,
2018-05-31 13:01:02 +00:00
"sourceUnit": 31,
"src": "24:21:19",
2018-05-31 13:01:02 +00:00
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/Module.sol",
"file": "../Module.sol",
"id": 2083,
2018-05-31 13:01:02 +00:00
"nodeType": "ImportDirective",
"scope": 2345,
"sourceUnit": 733,
"src": "46:23:19",
2018-05-31 13:01:02 +00:00
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/ModuleManager.sol",
"file": "../ModuleManager.sol",
"id": 2084,
2018-05-31 13:01:02 +00:00
"nodeType": "ImportDirective",
"scope": 2345,
"sourceUnit": 1104,
"src": "70:30:19",
2018-05-31 13:01:02 +00:00
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/apanizo/git/gnosis/safe-contracts/contracts/OwnerManager.sol",
"file": "../OwnerManager.sol",
"id": 2085,
2018-05-31 13:01:02 +00:00
"nodeType": "ImportDirective",
"scope": 2345,
"sourceUnit": 1514,
"src": "101:29:19",
2018-05-31 13:01:02 +00:00
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 2086,
2018-05-31 13:01:02 +00:00
"name": "Module",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 732,
"src": "339:6:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_contract$_Module_$732",
2018-05-31 13:01:02 +00:00
"typeString": "contract Module"
}
},
"id": 2087,
2018-05-31 13:01:02 +00:00
"nodeType": "InheritanceSpecifier",
"src": "339:6:19"
2018-05-31 13:01:02 +00:00
}
],
"contractDependencies": [
632,
732,
1663
2018-05-31 13:01:02 +00:00
],
"contractKind": "contract",
"documentation": "@title Social Recovery Module - Allows to replace an owner without Safe confirmations if friends approve the replacement.\n @author Stefan George - <stefan@gnosis.pm>",
"fullyImplemented": true,
"id": 2344,
2018-05-31 13:01:02 +00:00
"linearizedBaseContracts": [
2344,
732,
632,
1663
2018-05-31 13:01:02 +00:00
],
"name": "SocialRecoveryModule",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 2090,
2018-05-31 13:01:02 +00:00
"name": "NAME",
"nodeType": "VariableDeclaration",
"scope": 2344,
"src": "353:54:19",
2018-05-31 13:01:02 +00:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 2088,
2018-05-31 13:01:02 +00:00
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "353:6:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "536f6369616c205265636f76657279204d6f64756c65",
"id": 2089,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "383:24:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8f499aea563eae5544b16c9123d6c7c8537a7d9dd86296aa60c65de194207230",
"typeString": "literal_string \"Social Recovery Module\""
},
"value": "Social Recovery Module"
},
"visibility": "public"
},
{
"constant": true,
"id": 2093,
2018-05-31 13:01:02 +00:00
"name": "VERSION",
"nodeType": "VariableDeclaration",
"scope": 2344,
"src": "413:40:19",
2018-05-31 13:01:02 +00:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory",
"typeString": "string"
},
"typeName": {
"id": 2091,
2018-05-31 13:01:02 +00:00
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "413:6:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "302e302e31",
"id": 2092,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "446:7:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_ae209a0b48f21c054280f2455d32cf309387644879d9acbd8ffc199163811885",
"typeString": "literal_string \"0.0.1\""
},
"value": "0.0.1"
},
"visibility": "public"
},
{
"constant": false,
"id": 2095,
2018-05-31 13:01:02 +00:00
"name": "threshold",
"nodeType": "VariableDeclaration",
"scope": 2344,
"src": "460:22:19",
2018-05-31 13:01:02 +00:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 2094,
2018-05-31 13:01:02 +00:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "460:5:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 2098,
2018-05-31 13:01:02 +00:00
"name": "friends",
"nodeType": "VariableDeclaration",
"scope": 2344,
"src": "488:24:19",
2018-05-31 13:01:02 +00:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 2096,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "488:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 2097,
2018-05-31 13:01:02 +00:00
"length": null,
"nodeType": "ArrayTypeName",
"src": "488:9:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 2102,
2018-05-31 13:01:02 +00:00
"name": "isFriend",
"nodeType": "VariableDeclaration",
"scope": 2344,
"src": "583:41:19",
2018-05-31 13:01:02 +00:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"typeName": {
"id": 2101,
2018-05-31 13:01:02 +00:00
"keyType": {
"id": 2099,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "592:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "583:25:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
"id": 2100,
2018-05-31 13:01:02 +00:00
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "603:4:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 2106,
2018-05-31 13:01:02 +00:00
"name": "isExecuted",
"nodeType": "VariableDeclaration",
"scope": 2344,
"src": "692:43:19",
2018-05-31 13:01:02 +00:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
},
"typeName": {
"id": 2105,
2018-05-31 13:01:02 +00:00
"keyType": {
"id": 2103,
2018-05-31 13:01:02 +00:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "701:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "692:25:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
},
"valueType": {
"id": 2104,
2018-05-31 13:01:02 +00:00
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "712:4:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 2112,
2018-05-31 13:01:02 +00:00
"name": "isConfirmed",
"nodeType": "VariableDeclaration",
"scope": 2344,
"src": "827:65:19",
2018-05-31 13:01:02 +00:00
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$",
"typeString": "mapping(bytes32 => mapping(address => bool))"
},
"typeName": {
"id": 2111,
2018-05-31 13:01:02 +00:00
"keyType": {
"id": 2107,
2018-05-31 13:01:02 +00:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "836:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "827:46:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$",
"typeString": "mapping(bytes32 => mapping(address => bool))"
},
"valueType": {
"id": 2110,
2018-05-31 13:01:02 +00:00
"keyType": {
"id": 2108,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "856:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "847:25:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
"id": 2109,
2018-05-31 13:01:02 +00:00
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "867:4:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 2123,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "921:98:19",
2018-05-31 13:01:02 +00:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2115,
2018-05-31 13:01:02 +00:00
"name": "isFriend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2102,
"src": "939:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 2118,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2116,
2018-05-31 13:01:02 +00:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2700,
"src": "948:3:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2117,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "948:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "939:20:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4d6574686f642063616e206f6e6c792062652063616c6c6564206279206120667269656e64",
"id": 2119,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "961:39:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b1b9fb59ab33eb5ed22c2a9ea6a84e946973f30df026a85494e13c73883cce0a",
"typeString": "literal_string \"Method can only be called by a friend\""
},
"value": "Method can only be called by a friend"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_b1b9fb59ab33eb5ed22c2a9ea6a84e946973f30df026a85494e13c73883cce0a",
"typeString": "literal_string \"Method can only be called by a friend\""
}
],
"id": 2114,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "931:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2120,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "931:70:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2121,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "931:70:19"
2018-05-31 13:01:02 +00:00
},
{
"id": 2122,
2018-05-31 13:01:02 +00:00
"nodeType": "PlaceholderStatement",
"src": "1011:1:19"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": null,
"id": 2124,
2018-05-31 13:01:02 +00:00
"name": "onlyFriend",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 2113,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "918:2:19"
2018-05-31 13:01:02 +00:00
},
"src": "899:120:19",
2018-05-31 13:01:02 +00:00
"visibility": "internal"
},
{
"body": {
"id": 2198,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "1288:566:19",
2018-05-31 13:01:02 +00:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2136,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2133,
2018-05-31 13:01:02 +00:00
"name": "_threshold",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2129,
"src": "1306:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2134,
2018-05-31 13:01:02 +00:00
"name": "_friends",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2127,
"src": "1320:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 2135,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1320:15:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1306:29:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "5468726573686f6c642063616e6e6f742065786365656420667269656e647320636f756e74",
"id": 2137,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1337:39:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8268a65eab991df6bae5d0e671467a9ef945396e4d495dc52153cedea41ef257",
"typeString": "literal_string \"Threshold cannot exceed friends count\""
},
"value": "Threshold cannot exceed friends count"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8268a65eab991df6bae5d0e671467a9ef945396e4d495dc52153cedea41ef257",
"typeString": "literal_string \"Threshold cannot exceed friends count\""
}
],
"id": 2132,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "1298:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2138,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1298:79:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2139,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1298:79:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"id": 2143,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2141,
2018-05-31 13:01:02 +00:00
"name": "_threshold",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2129,
"src": "1395:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "32",
"id": 2142,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1409:1:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "1395:15:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4174206c65617374203220667269656e6473207265717569726564",
"id": 2144,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1412:29:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_2dca24eb5124987015b2480219c9ac2baf747f0e8ae6537e9852d3e3b2773773",
"typeString": "literal_string \"At least 2 friends required\""
},
"value": "At least 2 friends required"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_2dca24eb5124987015b2480219c9ac2baf747f0e8ae6537e9852d3e3b2773773",
"typeString": "literal_string \"At least 2 friends required\""
}
],
"id": 2140,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "1387:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2145,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1387:55:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2146,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1387:55:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 2147,
2018-05-31 13:01:02 +00:00
"name": "setManager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 731,
"src": "1452:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 2148,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1452:12:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2149,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1452:12:19"
2018-05-31 13:01:02 +00:00
},
{
"body": {
"id": 2188,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "1552:236:19",
2018-05-31 13:01:02 +00:00
"statements": [
{
"assignments": [
2162
2018-05-31 13:01:02 +00:00
],
"declarations": [
{
"constant": false,
"id": 2162,
2018-05-31 13:01:02 +00:00
"name": "friend",
"nodeType": "VariableDeclaration",
"scope": 2199,
"src": "1566:14:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2161,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1566:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2166,
2018-05-31 13:01:02 +00:00
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2163,
2018-05-31 13:01:02 +00:00
"name": "_friends",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2127,
"src": "1583:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 2165,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2164,
2018-05-31 13:01:02 +00:00
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2151,
"src": "1592:1:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1583:11:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1566:28:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2170,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2168,
2018-05-31 13:01:02 +00:00
"name": "friend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2162,
"src": "1616:6:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2169,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1626:1:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1616:11:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "496e76616c696420667269656e6420616464726573732070726f7669646564",
"id": 2171,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1629:33:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_5d50911068dfec2dd53f3e08d7dec23b50affd69b91cf3e5d1e699c56bca7a55",
"typeString": "literal_string \"Invalid friend address provided\""
},
"value": "Invalid friend address provided"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_5d50911068dfec2dd53f3e08d7dec23b50affd69b91cf3e5d1e699c56bca7a55",
"typeString": "literal_string \"Invalid friend address provided\""
}
],
"id": 2167,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "1608:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2172,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1608:55:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2173,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1608:55:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2178,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "1685:17:19",
2018-05-31 13:01:02 +00:00
"subExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2175,
2018-05-31 13:01:02 +00:00
"name": "isFriend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2102,
"src": "1686:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 2177,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2176,
2018-05-31 13:01:02 +00:00
"name": "friend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2162,
"src": "1695:6:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1686:16:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4475706c696361746520667269656e6420616464726573732070726f7669646564",
"id": 2179,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1704:35:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_78a0468a6f4bfa8018f886880a93f836f50f407cd02c2e42c43779f87d3af4d3",
"typeString": "literal_string \"Duplicate friend address provided\""
},
"value": "Duplicate friend address provided"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_78a0468a6f4bfa8018f886880a93f836f50f407cd02c2e42c43779f87d3af4d3",
"typeString": "literal_string \"Duplicate friend address provided\""
}
],
"id": 2174,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "1677:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2180,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1677:63:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2181,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1677:63:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"id": 2186,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2182,
2018-05-31 13:01:02 +00:00
"name": "isFriend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2102,
"src": "1754:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 2184,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2183,
2018-05-31 13:01:02 +00:00
"name": "friend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2162,
"src": "1763:6:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1754:16:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2185,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1773:4:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "1754:23:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2187,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1754:23:19"
2018-05-31 13:01:02 +00:00
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2157,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2154,
2018-05-31 13:01:02 +00:00
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2151,
"src": "1526:1:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2155,
2018-05-31 13:01:02 +00:00
"name": "_friends",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2127,
"src": "1530:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 2156,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1530:15:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1526:19:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2189,
2018-05-31 13:01:02 +00:00
"initializationExpression": {
"assignments": [
2151
2018-05-31 13:01:02 +00:00
],
"declarations": [
{
"constant": false,
"id": 2151,
2018-05-31 13:01:02 +00:00
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 2199,
"src": "1511:9:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2150,
2018-05-31 13:01:02 +00:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1511:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2153,
2018-05-31 13:01:02 +00:00
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 2152,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1523:1:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1511:13:19"
2018-05-31 13:01:02 +00:00
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 2159,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1547:3:19",
2018-05-31 13:01:02 +00:00
"subExpression": {
"argumentTypes": null,
"id": 2158,
2018-05-31 13:01:02 +00:00
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2151,
"src": "1547:1:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2160,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1547:3:19"
2018-05-31 13:01:02 +00:00
},
"nodeType": "ForStatement",
"src": "1506:282:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"id": 2192,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2190,
2018-05-31 13:01:02 +00:00
"name": "friends",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2098,
"src": "1797:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2191,
2018-05-31 13:01:02 +00:00
"name": "_friends",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2127,
"src": "1807:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"src": "1797:18:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2193,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1797:18:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"id": 2196,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2194,
2018-05-31 13:01:02 +00:00
"name": "threshold",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2095,
"src": "1825:9:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2195,
2018-05-31 13:01:02 +00:00
"name": "_threshold",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2129,
"src": "1837:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "1825:22:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 2197,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "1825:22:19"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": "@dev Setup function sets initial storage of contract.\n @param _friends List of friends' addresses.\n @param _threshold Required number of friends to confirm replacement.",
"id": 2199,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "setup",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2130,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2127,
2018-05-31 13:01:02 +00:00
"name": "_friends",
"nodeType": "VariableDeclaration",
"scope": 2199,
"src": "1231:18:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 2125,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1231:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 2126,
2018-05-31 13:01:02 +00:00
"length": null,
"nodeType": "ArrayTypeName",
"src": "1231:9:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2129,
2018-05-31 13:01:02 +00:00
"name": "_threshold",
"nodeType": "VariableDeclaration",
"scope": 2199,
"src": "1251:16:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 2128,
2018-05-31 13:01:02 +00:00
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "1251:5:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1230:38:19"
2018-05-31 13:01:02 +00:00
},
"payable": false,
"returnParameters": {
"id": 2131,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "1288:0:19"
2018-05-31 13:01:02 +00:00
},
"scope": 2344,
"src": "1216:638:19",
2018-05-31 13:01:02 +00:00
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2223,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "2051:126:19",
2018-05-31 13:01:02 +00:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2210,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "2069:21:19",
2018-05-31 13:01:02 +00:00
"subExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2207,
2018-05-31 13:01:02 +00:00
"name": "isExecuted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2106,
"src": "2070:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
}
},
"id": 2209,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2208,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2201,
"src": "2081:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2070:20:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "5265636f7665727920616c7265616479206578656375746564",
"id": 2211,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2092:27:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c2f19da1619c37eda5c6f4f3abcc466ec30065da4e2523bb6c81cc850dedac38",
"typeString": "literal_string \"Recovery already executed\""
},
"value": "Recovery already executed"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c2f19da1619c37eda5c6f4f3abcc466ec30065da4e2523bb6c81cc850dedac38",
"typeString": "literal_string \"Recovery already executed\""
}
],
"id": 2206,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "2061:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2212,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2061:59:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2213,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "2061:59:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"id": 2221,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2214,
2018-05-31 13:01:02 +00:00
"name": "isConfirmed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2112,
"src": "2130:11:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$",
"typeString": "mapping(bytes32 => mapping(address => bool))"
}
},
"id": 2218,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2215,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2201,
"src": "2142:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2130:21:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 2219,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2216,
2018-05-31 13:01:02 +00:00
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2700,
"src": "2152:3:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2217,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2152:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2130:33:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2220,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2166:4:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "2130:40:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2222,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "2130:40:19"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": "@dev Allows a friend to confirm a Safe transaction.\n @param dataHash Safe transaction hash.",
"id": 2224,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 2204,
2018-05-31 13:01:02 +00:00
"modifierName": {
"argumentTypes": null,
"id": 2203,
2018-05-31 13:01:02 +00:00
"name": "onlyFriend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2124,
"src": "2036:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "2036:10:19"
2018-05-31 13:01:02 +00:00
}
],
"name": "confirmTransaction",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2202,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2201,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "VariableDeclaration",
"scope": 2224,
"src": "1995:16:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 2200,
2018-05-31 13:01:02 +00:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1995:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1994:18:19"
2018-05-31 13:01:02 +00:00
},
"payable": false,
"returnParameters": {
"id": 2205,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "2051:0:19"
2018-05-31 13:01:02 +00:00
},
"scope": 2344,
"src": "1967:210:19",
2018-05-31 13:01:02 +00:00
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2287,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "2626:509:19",
2018-05-31 13:01:02 +00:00
"statements": [
{
"assignments": [
2236
2018-05-31 13:01:02 +00:00
],
"declarations": [
{
"constant": false,
"id": 2236,
2018-05-31 13:01:02 +00:00
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 2288,
"src": "2636:17:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2235,
2018-05-31 13:01:02 +00:00
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2636:5:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2244,
2018-05-31 13:01:02 +00:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "737761704f776e657228616464726573732c616464726573732c6164647265737329",
"id": 2239,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2680:36:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_e318b52b9bee2870ac7ee0af86866eb2e8f9569b34de6028eb487e7983ba6df8",
"typeString": "literal_string \"swapOwner(address,address,address)\""
},
"value": "swapOwner(address,address,address)"
},
{
"argumentTypes": null,
"id": 2240,
2018-05-31 13:01:02 +00:00
"name": "prevOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2226,
"src": "2718:9:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2241,
2018-05-31 13:01:02 +00:00
"name": "oldOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2228,
"src": "2729:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2242,
2018-05-31 13:01:02 +00:00
"name": "newOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2230,
"src": "2739:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_e318b52b9bee2870ac7ee0af86866eb2e8f9569b34de6028eb487e7983ba6df8",
"typeString": "literal_string \"swapOwner(address,address,address)\""
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"id": 2237,
2018-05-31 13:01:02 +00:00
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2687,
"src": "2656:3:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 2238,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "encodeWithSignature",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "2656:23:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (string memory) pure returns (bytes memory)"
}
},
"id": 2243,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2656:92:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2636:112:19"
2018-05-31 13:01:02 +00:00
},
{
"assignments": [
2246
2018-05-31 13:01:02 +00:00
],
"declarations": [
{
"constant": false,
"id": 2246,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "VariableDeclaration",
"scope": 2288,
"src": "2758:16:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 2245,
2018-05-31 13:01:02 +00:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "2758:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2250,
2018-05-31 13:01:02 +00:00
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2248,
2018-05-31 13:01:02 +00:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2236,
"src": "2789:4:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 2247,
2018-05-31 13:01:02 +00:00
"name": "getDataHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2343,
"src": "2777:11:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 2249,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2777:17:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2758:36:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2255,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "2812:21:19",
2018-05-31 13:01:02 +00:00
"subExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2252,
2018-05-31 13:01:02 +00:00
"name": "isExecuted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2106,
"src": "2813:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
}
},
"id": 2254,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2253,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2246,
"src": "2824:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "2813:20:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "5265636f7665727920616c7265616479206578656375746564",
"id": 2256,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2835:27:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c2f19da1619c37eda5c6f4f3abcc466ec30065da4e2523bb6c81cc850dedac38",
"typeString": "literal_string \"Recovery already executed\""
},
"value": "Recovery already executed"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c2f19da1619c37eda5c6f4f3abcc466ec30065da4e2523bb6c81cc850dedac38",
"typeString": "literal_string \"Recovery already executed\""
}
],
"id": 2251,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "2804:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2257,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2804:59:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2258,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "2804:59:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2261,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2246,
"src": "2910:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 2260,
2018-05-31 13:01:02 +00:00
"name": "isConfirmedByRequiredFriends",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2331,
"src": "2881:28:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$",
"typeString": "function (bytes32) view returns (bool)"
}
},
"id": 2262,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2881:38:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "5265636f7665727920686173206e6f7420656e6f75676820636f6e6669726d6174696f6e73",
"id": 2263,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2921:39:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_cb12b81371f920ba15a762526f9a95cbe925aecb372a64dbeac8ce5c02e0c0e8",
"typeString": "literal_string \"Recovery has not enough confirmations\""
},
"value": "Recovery has not enough confirmations"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_cb12b81371f920ba15a762526f9a95cbe925aecb372a64dbeac8ce5c02e0c0e8",
"typeString": "literal_string \"Recovery has not enough confirmations\""
}
],
"id": 2259,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "2873:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2264,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2873:88:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2265,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "2873:88:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"id": 2270,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2266,
2018-05-31 13:01:02 +00:00
"name": "isExecuted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2106,
"src": "2971:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
}
},
"id": 2268,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2267,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2246,
"src": "2982:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "2971:20:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2269,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2994:4:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "2971:27:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2271,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "2971:27:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2276,
2018-05-31 13:01:02 +00:00
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 697,
"src": "3058:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$1103",
2018-05-31 13:01:02 +00:00
"typeString": "contract ModuleManager"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ModuleManager_$1103",
2018-05-31 13:01:02 +00:00
"typeString": "contract ModuleManager"
}
],
"id": 2275,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3050:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 2277,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3050:16:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2278,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3068:1:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
{
"argumentTypes": null,
"id": 2279,
2018-05-31 13:01:02 +00:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2236,
"src": "3071:4:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2280,
2018-05-31 13:01:02 +00:00
"name": "Enum",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 30,
"src": "3077:4:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Enum_$30_$",
"typeString": "type(contract Enum)"
}
},
"id": 2281,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "Operation",
"nodeType": "MemberAccess",
"referencedDeclaration": 29,
"src": "3077:14:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_type$_t_enum$_Operation_$29_$",
"typeString": "type(enum Enum.Operation)"
}
},
"id": 2282,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberName": "Call",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3077:19:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_enum$_Operation_$29",
"typeString": "enum Enum.Operation"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_enum$_Operation_$29",
"typeString": "enum Enum.Operation"
}
],
"expression": {
"argumentTypes": null,
"id": 2273,
2018-05-31 13:01:02 +00:00
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 697,
"src": "3016:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_contract$_ModuleManager_$1103",
2018-05-31 13:01:02 +00:00
"typeString": "contract ModuleManager"
}
},
"id": 2274,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "execTransactionFromModule",
"nodeType": "MemberAccess",
"referencedDeclaration": 930,
"src": "3016:33:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_enum$_Operation_$29_$returns$_t_bool_$",
"typeString": "function (address,uint256,bytes memory,enum Enum.Operation) external returns (bool)"
}
},
"id": 2283,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3016:81:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "436f756c64206e6f742065786563757465207265636f76657279",
"id": 2284,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3099:28:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3515587d60c3ee9920dfa4bee22a25e99aacbb3cec35d7cbe6c839f5b9ffdff1",
"typeString": "literal_string \"Could not execute recovery\""
},
"value": "Could not execute recovery"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3515587d60c3ee9920dfa4bee22a25e99aacbb3cec35d7cbe6c839f5b9ffdff1",
"typeString": "literal_string \"Could not execute recovery\""
}
],
"id": 2272,
2018-05-31 13:01:02 +00:00
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
2703,
2704
2018-05-31 13:01:02 +00:00
],
"referencedDeclaration": 2704,
"src": "3008:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2285,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3008:120:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2286,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "3008:120:19"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": "@dev Returns if Safe transaction is a valid owner replacement transaction.\n @param prevOwner Owner that pointed to the owner to be replaced in the linked list\n @param oldOwner Owner address to be replaced.\n @param newOwner New owner address.\n @return Returns if transaction can be executed.",
"id": 2288,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 2233,
2018-05-31 13:01:02 +00:00
"modifierName": {
"argumentTypes": null,
"id": 2232,
2018-05-31 13:01:02 +00:00
"name": "onlyFriend",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2124,
"src": "2611:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "2611:10:19"
2018-05-31 13:01:02 +00:00
}
],
"name": "recoverAccess",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2231,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2226,
2018-05-31 13:01:02 +00:00
"name": "prevOwner",
"nodeType": "VariableDeclaration",
"scope": 2288,
"src": "2533:17:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2225,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2533:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2228,
2018-05-31 13:01:02 +00:00
"name": "oldOwner",
"nodeType": "VariableDeclaration",
"scope": 2288,
"src": "2552:16:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2227,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2552:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2230,
2018-05-31 13:01:02 +00:00
"name": "newOwner",
"nodeType": "VariableDeclaration",
"scope": 2288,
"src": "2570:16:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2229,
2018-05-31 13:01:02 +00:00
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2570:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2532:55:19"
2018-05-31 13:01:02 +00:00
},
"payable": false,
"returnParameters": {
"id": 2234,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [],
"src": "2626:0:19"
2018-05-31 13:01:02 +00:00
},
"scope": 2344,
"src": "2510:625:19",
2018-05-31 13:01:02 +00:00
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2330,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "3407:294:19",
2018-05-31 13:01:02 +00:00
"statements": [
{
"assignments": [],
"declarations": [
{
"constant": false,
"id": 2296,
2018-05-31 13:01:02 +00:00
"name": "confirmationCount",
"nodeType": "VariableDeclaration",
"scope": 2331,
"src": "3417:25:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2295,
2018-05-31 13:01:02 +00:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3417:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2297,
2018-05-31 13:01:02 +00:00
"initialValue": null,
"nodeType": "VariableDeclarationStatement",
"src": "3417:25:19"
2018-05-31 13:01:02 +00:00
},
{
"body": {
"id": 2326,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "3497:176:19",
2018-05-31 13:01:02 +00:00
"statements": [
{
"condition": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2309,
2018-05-31 13:01:02 +00:00
"name": "isConfirmed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2112,
"src": "3515:11:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_mapping$_t_address_$_t_bool_$_$",
"typeString": "mapping(bytes32 => mapping(address => bool))"
}
},
"id": 2311,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2310,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2290,
"src": "3527:8:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3515:21:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 2315,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2312,
2018-05-31 13:01:02 +00:00
"name": "friends",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2098,
"src": "3537:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2314,
2018-05-31 13:01:02 +00:00
"indexExpression": {
"argumentTypes": null,
"id": 2313,
2018-05-31 13:01:02 +00:00
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2299,
"src": "3545:1:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3537:10:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "3515:33:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2319,
2018-05-31 13:01:02 +00:00
"nodeType": "IfStatement",
"src": "3511:74:19",
2018-05-31 13:01:02 +00:00
"trueBody": {
"expression": {
"argumentTypes": null,
"id": 2317,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "3566:19:19",
2018-05-31 13:01:02 +00:00
"subExpression": {
"argumentTypes": null,
"id": 2316,
2018-05-31 13:01:02 +00:00
"name": "confirmationCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2296,
"src": "3566:17:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2318,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "3566:19:19"
2018-05-31 13:01:02 +00:00
}
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2322,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2320,
2018-05-31 13:01:02 +00:00
"name": "confirmationCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2296,
"src": "3603:17:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2321,
2018-05-31 13:01:02 +00:00
"name": "threshold",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2095,
"src": "3624:9:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "3603:30:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2325,
2018-05-31 13:01:02 +00:00
"nodeType": "IfStatement",
"src": "3599:63:19",
2018-05-31 13:01:02 +00:00
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2323,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3658:4:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 2294,
"id": 2324,
2018-05-31 13:01:02 +00:00
"nodeType": "Return",
"src": "3651:11:19"
2018-05-31 13:01:02 +00:00
}
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2305,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2302,
2018-05-31 13:01:02 +00:00
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2299,
"src": "3472:1:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2303,
2018-05-31 13:01:02 +00:00
"name": "friends",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2098,
"src": "3476:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2304,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3476:14:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3472:18:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2327,
2018-05-31 13:01:02 +00:00
"initializationExpression": {
"assignments": [
2299
2018-05-31 13:01:02 +00:00
],
"declarations": [
{
"constant": false,
"id": 2299,
2018-05-31 13:01:02 +00:00
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 2331,
"src": "3457:9:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2298,
2018-05-31 13:01:02 +00:00
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3457:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2301,
2018-05-31 13:01:02 +00:00
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 2300,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3469:1:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "3457:13:19"
2018-05-31 13:01:02 +00:00
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 2307,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "3492:3:19",
2018-05-31 13:01:02 +00:00
"subExpression": {
"argumentTypes": null,
"id": 2306,
2018-05-31 13:01:02 +00:00
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2299,
"src": "3492:1:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2308,
2018-05-31 13:01:02 +00:00
"nodeType": "ExpressionStatement",
"src": "3492:3:19"
2018-05-31 13:01:02 +00:00
},
"nodeType": "ForStatement",
"src": "3452:221:19"
2018-05-31 13:01:02 +00:00
},
{
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2328,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3689:5:19",
2018-05-31 13:01:02 +00:00
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 2294,
"id": 2329,
2018-05-31 13:01:02 +00:00
"nodeType": "Return",
"src": "3682:12:19"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": "@dev Returns if Safe transaction is a valid owner replacement transaction.\n @param dataHash Data hash.\n @return Confirmation status.",
"id": 2331,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "isConfirmedByRequiredFriends",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2291,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2290,
2018-05-31 13:01:02 +00:00
"name": "dataHash",
"nodeType": "VariableDeclaration",
"scope": 2331,
"src": "3334:16:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 2289,
2018-05-31 13:01:02 +00:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "3334:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3333:18:19"
2018-05-31 13:01:02 +00:00
},
"payable": false,
"returnParameters": {
"id": 2294,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2293,
2018-05-31 13:01:02 +00:00
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2331,
"src": "3397:4:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 2292,
2018-05-31 13:01:02 +00:00
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "3397:4:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3396:6:19"
2018-05-31 13:01:02 +00:00
},
"scope": 2344,
"src": "3296:405:19",
2018-05-31 13:01:02 +00:00
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2342,
2018-05-31 13:01:02 +00:00
"nodeType": "Block",
"src": "3921:39:19",
2018-05-31 13:01:02 +00:00
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2339,
2018-05-31 13:01:02 +00:00
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2333,
"src": "3948:4:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 2338,
2018-05-31 13:01:02 +00:00
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2694,
"src": "3938:9:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$",
"typeString": "function () pure returns (bytes32)"
}
},
"id": 2340,
2018-05-31 13:01:02 +00:00
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3938:15:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"functionReturnParameters": 2337,
"id": 2341,
2018-05-31 13:01:02 +00:00
"nodeType": "Return",
"src": "3931:22:19"
2018-05-31 13:01:02 +00:00
}
]
},
"documentation": "@dev Returns hash of data encoding owner replacement.\n @param data Data payload.\n @return Data hash.",
"id": 2343,
2018-05-31 13:01:02 +00:00
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "getDataHash",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2334,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2333,
2018-05-31 13:01:02 +00:00
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 2343,
"src": "3851:10:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2332,
2018-05-31 13:01:02 +00:00
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "3851:5:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3850:12:19"
2018-05-31 13:01:02 +00:00
},
"payable": false,
"returnParameters": {
"id": 2337,
2018-05-31 13:01:02 +00:00
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2336,
2018-05-31 13:01:02 +00:00
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2343,
"src": "3908:7:19",
2018-05-31 13:01:02 +00:00
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 2335,
2018-05-31 13:01:02 +00:00
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "3908:7:19",
2018-05-31 13:01:02 +00:00
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3907:9:19"
2018-05-31 13:01:02 +00:00
},
"scope": 2344,
"src": "3830:130:19",
2018-05-31 13:01:02 +00:00
"stateMutability": "pure",
"superFunction": null,
"visibility": "public"
}
],
"scope": 2345,
"src": "306:3656:19"
2018-05-31 13:01:02 +00:00
}
],
"src": "0:3963:19"
2018-05-31 13:01:02 +00:00
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {
2018-06-15 09:08:51 +00:00
"4": {
"events": {},
"links": {},
"address": "0xf6dc186ef518dfecabd521bf747b36954b07e623",
"transactionHash": "0x9ced12659bf1ee6ea54926b65432e20ce5170a5b2ba2f5a803f082683225169b"
},
"1529327661534": {
"events": {},
"links": {},
"address": "0x2678fd36b9e8cda27b473a3ff6f79749644ffd0a",
"transactionHash": "0x03a01cb2c328fbcab8f5d76e3553275e442885ade5c41dff35fea15e6647c72c"
2018-06-15 09:08:51 +00:00
},
"1529333415702": {
2018-05-31 13:01:02 +00:00
"events": {},
"links": {},
"address": "0x9d6575ea466550e050f4c08eff7075ab099db8f6",
"transactionHash": "0x8c0dc99f8f345ac15f129ef0e98e60a7fde3975cf8b77fbb9f0b1e75eae34c30"
2018-06-22 08:44:49 +00:00
},
"1529652204341": {
"events": {},
"links": {},
"address": "0xdfcdce812f5f001cdd35506bfb01cc02e31ae5a2",
"transactionHash": "0x6c40a3712932d0e03f4a6f0ad0f39be479bac35533935534577070e087245a52"
2018-05-31 13:01:02 +00:00
}
},
"schemaVersion": "2.0.0",
2018-06-22 08:44:49 +00:00
"updatedAt": "2018-06-22T07:24:16.270Z"
2018-05-31 13:01:02 +00:00
}