@safe-global/safe-contracts
Version:
Ethereum multisig contract
1 lines • 113 kB
JSON
{"id":"ce3547e64aa1b2653be58547eacb785a","_format":"hh-sol-build-info-1","solcVersion":"0.7.6","solcLongVersion":"0.7.6+commit.7338295f","input":{"language":"Solidity","sources":{"contracts/libraries/SafeMigration.sol":{"content":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\nimport {SafeStorage} from \"../libraries/SafeStorage.sol\";\n\ninterface ISafe {\n function setFallbackHandler(address handler) external;\n}\n\n/**\n * @title Migration Contract for Safe Upgrade\n * @notice This is a generic contract that facilitates Safe and SafeL2 proxy contracts to migrate their singleton address.\n * The supported target Safe version is immutable and set in the constructor during the deployment of the contract.\n * This contract also supports migration with fallback handler update.\n * @author @safe-global/safe-protocol\n * @dev IMPORTANT: The library is intended to be used with the Safe standard proxy that stores the singleton address\n * at the storage slot 0. Use at your own risk with custom proxy implementations. The contract will allow invocations\n * to the migration functions only via delegatecall.\n */\ncontract SafeMigration is SafeStorage {\n /**\n * @notice Address of this contract\n */\n address public immutable MIGRATION_SINGLETON;\n /**\n * @notice Address of the Safe Singleton implementation\n */\n address public immutable SAFE_SINGLETON;\n /**\n * @notice Address of the Safe Singleton (L2) implementation\n */\n address public immutable SAFE_L2_SINGLETON;\n /**\n * @notice Address of the Fallback Handler\n */\n address public immutable SAFE_FALLBACK_HANDLER;\n\n /**\n * @notice Event indicating a change of a singleton address. Named master copy here for legacy reasons.\n * @param singleton New master copy address\n */\n event ChangedMasterCopy(address singleton);\n\n /**\n * @notice Modifier to make a function callable via delegatecall only.\n * If the function is called via a regular call, it will revert.\n */\n modifier onlyDelegateCall() {\n require(address(this) != MIGRATION_SINGLETON, \"Migration should only be called via delegatecall\");\n _;\n }\n\n /**\n * @notice Constructor\n * @param safeSingleton Address of the Safe Singleton implementation\n * @param safeL2Singleton Address of the SafeL2 Singleton implementation\n * @param fallbackHandler Address of the fallback handler implementation\n */\n constructor(address safeSingleton, address safeL2Singleton, address fallbackHandler) {\n MIGRATION_SINGLETON = address(this);\n\n require(hasCode(safeSingleton), \"Safe Singleton is not deployed\");\n require(hasCode(safeL2Singleton), \"Safe Singleton (L2) is not deployed\");\n require(hasCode(fallbackHandler), \"fallback handler is not deployed\");\n\n SAFE_SINGLETON = safeSingleton;\n SAFE_L2_SINGLETON = safeL2Singleton;\n SAFE_FALLBACK_HANDLER = fallbackHandler;\n }\n\n /**\n * @notice Migrate the Safe contract to a new Safe Singleton implementation.\n */\n function migrateSingleton() public onlyDelegateCall {\n singleton = SAFE_SINGLETON;\n emit ChangedMasterCopy(SAFE_SINGLETON);\n }\n\n /**\n * @notice Migrate to Safe Singleton and set the fallback handler. This function is intended to be used when migrating\n * a Safe to a version which also requires updating fallback handler.\n */\n function migrateWithFallbackHandler() external onlyDelegateCall {\n migrateSingleton();\n ISafe(address(this)).setFallbackHandler(SAFE_FALLBACK_HANDLER);\n }\n\n /**\n * @notice Migrate the Safe contract to a new Safe Singleton (L2) implementation.\n */\n function migrateL2Singleton() public onlyDelegateCall {\n singleton = SAFE_L2_SINGLETON;\n emit ChangedMasterCopy(SAFE_L2_SINGLETON);\n }\n\n /**\n * @notice Migrate to Safe Singleton (L2) and set the fallback handler. This function is intended to be used when migrating\n * a Safe to a version which also requires updating fallback handler.\n */\n function migrateL2WithFallbackHandler() external onlyDelegateCall {\n migrateL2Singleton();\n ISafe(address(this)).setFallbackHandler(SAFE_FALLBACK_HANDLER);\n }\n\n /**\n * @notice Checks whether an account has code.\n * @param account The address of the account to be checked.\n * @return A boolean value indicating whether the address has code (true) or not (false).\n * @dev This function relies on the `extcodesize` assembly opcode to determine whether an address has code.\n * It does not reliably determine whether or not an address is a smart contract or an EOA.\n */\n function hasCode(address account) internal view returns (bool) {\n uint256 size;\n /* solhint-disable no-inline-assembly */\n /// @solidity memory-safe-assembly\n assembly {\n size := extcodesize(account)\n }\n /* solhint-enable no-inline-assembly */\n\n return size > 0;\n }\n}\n"},"contracts/libraries/SafeStorage.sol":{"content":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n * @title SafeStorage - Storage layout of the Safe contracts to be used in libraries.\n * @dev Should be always the first base contract of a library that is used with a Safe.\n * @author Richard Meissner - @rmeissner\n */\ncontract SafeStorage {\n // From /common/Singleton.sol\n address internal singleton;\n // From /common/ModuleManager.sol\n mapping(address => address) internal modules;\n // From /common/OwnerManager.sol\n mapping(address => address) internal owners;\n uint256 internal ownerCount;\n uint256 internal threshold;\n\n // From /Safe.sol\n uint256 internal nonce;\n bytes32 internal _deprecatedDomainSeparator;\n mapping(bytes32 => uint256) internal signedMessages;\n mapping(address => mapping(bytes32 => uint256)) internal approvedHashes;\n}\n"}},"settings":{"optimizer":{"enabled":false,"runs":200},"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata","devdoc","userdoc","storageLayout","evm.gasEstimates"],"":["ast"]}},"metadata":{"useLiteralContent":true}}},"output":{"sources":{"contracts/libraries/SafeMigration.sol":{"ast":{"absolutePath":"contracts/libraries/SafeMigration.sol","exportedSymbols":{"ISafe":[9],"SafeMigration":[183],"SafeStorage":[215]},"id":184,"license":"LGPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.7",".0","<","0.9",".0"],"nodeType":"PragmaDirective","src":"42:31:0"},{"absolutePath":"contracts/libraries/SafeStorage.sol","file":"../libraries/SafeStorage.sol","id":3,"nodeType":"ImportDirective","scope":184,"sourceUnit":216,"src":"75:57:0","symbolAliases":[{"foreign":{"id":2,"name":"SafeStorage","nodeType":"Identifier","overloadedDeclarations":[],"src":"83:11:0","typeDescriptions":{}}}],"unitAlias":""},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"interface","fullyImplemented":false,"id":9,"linearizedBaseContracts":[9],"name":"ISafe","nodeType":"ContractDefinition","nodes":[{"functionSelector":"f08a0323","id":8,"implemented":false,"kind":"function","modifiers":[],"name":"setFallbackHandler","nodeType":"FunctionDefinition","parameters":{"id":6,"nodeType":"ParameterList","parameters":[{"constant":false,"id":5,"mutability":"mutable","name":"handler","nodeType":"VariableDeclaration","scope":8,"src":"184:15:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4,"name":"address","nodeType":"ElementaryTypeName","src":"184:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"183:17:0"},"returnParameters":{"id":7,"nodeType":"ParameterList","parameters":[],"src":"209:0:0"},"scope":9,"src":"156:54:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"}],"scope":184,"src":"134:78:0"},{"abstract":false,"baseContracts":[{"baseName":{"id":11,"name":"SafeStorage","nodeType":"UserDefinedTypeName","referencedDeclaration":215,"src":"956:11:0","typeDescriptions":{"typeIdentifier":"t_contract$_SafeStorage_$215","typeString":"contract SafeStorage"}},"id":12,"nodeType":"InheritanceSpecifier","src":"956:11:0"}],"contractDependencies":[215],"contractKind":"contract","documentation":{"id":10,"nodeType":"StructuredDocumentation","src":"214:715:0","text":" @title Migration Contract for Safe Upgrade\n @notice This is a generic contract that facilitates Safe and SafeL2 proxy contracts to migrate their singleton address.\n The supported target Safe version is immutable and set in the constructor during the deployment of the contract.\n This contract also supports migration with fallback handler update.\n @author @safe-global/safe-protocol\n @dev IMPORTANT: The library is intended to be used with the Safe standard proxy that stores the singleton address\n at the storage slot 0. Use at your own risk with custom proxy implementations. The contract will allow invocations\n to the migration functions only via delegatecall."},"fullyImplemented":true,"id":183,"linearizedBaseContracts":[183,215],"name":"SafeMigration","nodeType":"ContractDefinition","nodes":[{"constant":false,"documentation":{"id":13,"nodeType":"StructuredDocumentation","src":"974:51:0","text":" @notice Address of this contract"},"functionSelector":"72f7a956","id":15,"mutability":"immutable","name":"MIGRATION_SINGLETON","nodeType":"VariableDeclaration","scope":183,"src":"1030:44:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":14,"name":"address","nodeType":"ElementaryTypeName","src":"1030:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"public"},{"constant":false,"documentation":{"id":16,"nodeType":"StructuredDocumentation","src":"1080:71:0","text":" @notice Address of the Safe Singleton implementation"},"functionSelector":"caa12add","id":18,"mutability":"immutable","name":"SAFE_SINGLETON","nodeType":"VariableDeclaration","scope":183,"src":"1156:39:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":17,"name":"address","nodeType":"ElementaryTypeName","src":"1156:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"public"},{"constant":false,"documentation":{"id":19,"nodeType":"StructuredDocumentation","src":"1201:76:0","text":" @notice Address of the Safe Singleton (L2) implementation"},"functionSelector":"9bf47d6e","id":21,"mutability":"immutable","name":"SAFE_L2_SINGLETON","nodeType":"VariableDeclaration","scope":183,"src":"1282:42:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":20,"name":"address","nodeType":"ElementaryTypeName","src":"1282:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"public"},{"constant":false,"documentation":{"id":22,"nodeType":"StructuredDocumentation","src":"1330:58:0","text":" @notice Address of the Fallback Handler"},"functionSelector":"0d7101f7","id":24,"mutability":"immutable","name":"SAFE_FALLBACK_HANDLER","nodeType":"VariableDeclaration","scope":183,"src":"1393:46:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":23,"name":"address","nodeType":"ElementaryTypeName","src":"1393:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"public"},{"anonymous":false,"documentation":{"id":25,"nodeType":"StructuredDocumentation","src":"1446:167:0","text":" @notice Event indicating a change of a singleton address. Named master copy here for legacy reasons.\n @param singleton New master copy address"},"id":29,"name":"ChangedMasterCopy","nodeType":"EventDefinition","parameters":{"id":28,"nodeType":"ParameterList","parameters":[{"constant":false,"id":27,"indexed":false,"mutability":"mutable","name":"singleton","nodeType":"VariableDeclaration","scope":29,"src":"1642:17:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":26,"name":"address","nodeType":"ElementaryTypeName","src":"1642:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"1641:19:0"},"src":"1618:43:0"},{"body":{"id":43,"nodeType":"Block","src":"1855:125:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":38,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"arguments":[{"id":35,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"1881:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMigration_$183","typeString":"contract SafeMigration"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_SafeMigration_$183","typeString":"contract SafeMigration"}],"id":34,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"1873:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":33,"name":"address","nodeType":"ElementaryTypeName","src":"1873:7:0","typeDescriptions":{}}},"id":36,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1873:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"id":37,"name":"MIGRATION_SINGLETON","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":15,"src":"1890:19:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1873:36:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"hexValue":"4d6967726174696f6e2073686f756c64206f6e6c792062652063616c6c6564207669612064656c656761746563616c6c","id":39,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"1911:50:0","typeDescriptions":{"typeIdentifier":"t_stringliteral_15b78a1f3b6f5ce8c19eea2b0f8fa49566744e4d89b92aecbfade8f18a1e41e8","typeString":"literal_string \"Migration should only be called via delegatecall\""},"value":"Migration should only be called via delegatecall"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_15b78a1f3b6f5ce8c19eea2b0f8fa49566744e4d89b92aecbfade8f18a1e41e8","typeString":"literal_string \"Migration should only be called via delegatecall\""}],"id":32,"name":"require","nodeType":"Identifier","overloadedDeclarations":[-18,-18],"referencedDeclaration":-18,"src":"1865:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":40,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1865:97:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":41,"nodeType":"ExpressionStatement","src":"1865:97:0"},{"id":42,"nodeType":"PlaceholderStatement","src":"1972:1:0"}]},"documentation":{"id":30,"nodeType":"StructuredDocumentation","src":"1667:155:0","text":" @notice Modifier to make a function callable via delegatecall only.\n If the function is called via a regular call, it will revert."},"id":44,"name":"onlyDelegateCall","nodeType":"ModifierDefinition","parameters":{"id":31,"nodeType":"ParameterList","parameters":[],"src":"1852:2:0"},"src":"1827:153:0","virtual":false,"visibility":"internal"},{"body":{"id":94,"nodeType":"Block","src":"2341:424:0","statements":[{"expression":{"id":59,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":54,"name":"MIGRATION_SINGLETON","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":15,"src":"2351:19:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"arguments":[{"id":57,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"2381:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMigration_$183","typeString":"contract SafeMigration"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_SafeMigration_$183","typeString":"contract SafeMigration"}],"id":56,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2373:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":55,"name":"address","nodeType":"ElementaryTypeName","src":"2373:7:0","typeDescriptions":{}}},"id":58,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2373:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2351:35:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":60,"nodeType":"ExpressionStatement","src":"2351:35:0"},{"expression":{"arguments":[{"arguments":[{"id":63,"name":"safeSingleton","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":47,"src":"2413:13:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":62,"name":"hasCode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":182,"src":"2405:7:0","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_address_$returns$_t_bool_$","typeString":"function (address) view returns (bool)"}},"id":64,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2405:22:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"hexValue":"536166652053696e676c65746f6e206973206e6f74206465706c6f796564","id":65,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"2429:32:0","typeDescriptions":{"typeIdentifier":"t_stringliteral_84ee59d9bf234c2cb66d69a964e961a87aec9510a8c27d39b9ecfe326eed7e59","typeString":"literal_string \"Safe Singleton is not deployed\""},"value":"Safe Singleton is not deployed"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_84ee59d9bf234c2cb66d69a964e961a87aec9510a8c27d39b9ecfe326eed7e59","typeString":"literal_string \"Safe Singleton is not deployed\""}],"id":61,"name":"require","nodeType":"Identifier","overloadedDeclarations":[-18,-18],"referencedDeclaration":-18,"src":"2397:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":66,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2397:65:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":67,"nodeType":"ExpressionStatement","src":"2397:65:0"},{"expression":{"arguments":[{"arguments":[{"id":70,"name":"safeL2Singleton","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":49,"src":"2488:15:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":69,"name":"hasCode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":182,"src":"2480:7:0","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_address_$returns$_t_bool_$","typeString":"function (address) view returns (bool)"}},"id":71,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2480:24:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"hexValue":"536166652053696e676c65746f6e20284c3229206973206e6f74206465706c6f796564","id":72,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"2506:37:0","typeDescriptions":{"typeIdentifier":"t_stringliteral_75f997a654aa76af6a944dffc0f255b9298b56b5accadff398c2fefbe7d955b6","typeString":"literal_string \"Safe Singleton (L2) is not deployed\""},"value":"Safe Singleton (L2) is not deployed"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_75f997a654aa76af6a944dffc0f255b9298b56b5accadff398c2fefbe7d955b6","typeString":"literal_string \"Safe Singleton (L2) is not deployed\""}],"id":68,"name":"require","nodeType":"Identifier","overloadedDeclarations":[-18,-18],"referencedDeclaration":-18,"src":"2472:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":73,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2472:72:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":74,"nodeType":"ExpressionStatement","src":"2472:72:0"},{"expression":{"arguments":[{"arguments":[{"id":77,"name":"fallbackHandler","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":51,"src":"2570:15:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":76,"name":"hasCode","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":182,"src":"2562:7:0","typeDescriptions":{"typeIdentifier":"t_function_internal_view$_t_address_$returns$_t_bool_$","typeString":"function (address) view returns (bool)"}},"id":78,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2562:24:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"hexValue":"66616c6c6261636b2068616e646c6572206973206e6f74206465706c6f796564","id":79,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"2588:34:0","typeDescriptions":{"typeIdentifier":"t_stringliteral_6f0fe446fb242d0b587e8b9c3b2c5278d07e700afc37d42ab36ece4018a3c496","typeString":"literal_string \"fallback handler is not deployed\""},"value":"fallback handler is not deployed"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_6f0fe446fb242d0b587e8b9c3b2c5278d07e700afc37d42ab36ece4018a3c496","typeString":"literal_string \"fallback handler is not deployed\""}],"id":75,"name":"require","nodeType":"Identifier","overloadedDeclarations":[-18,-18],"referencedDeclaration":-18,"src":"2554:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":80,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2554:69:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":81,"nodeType":"ExpressionStatement","src":"2554:69:0"},{"expression":{"id":84,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":82,"name":"SAFE_SINGLETON","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"2634:14:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":83,"name":"safeSingleton","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":47,"src":"2651:13:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2634:30:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":85,"nodeType":"ExpressionStatement","src":"2634:30:0"},{"expression":{"id":88,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":86,"name":"SAFE_L2_SINGLETON","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":21,"src":"2674:17:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":87,"name":"safeL2Singleton","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":49,"src":"2694:15:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2674:35:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":89,"nodeType":"ExpressionStatement","src":"2674:35:0"},{"expression":{"id":92,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":90,"name":"SAFE_FALLBACK_HANDLER","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"2719:21:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":91,"name":"fallbackHandler","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":51,"src":"2743:15:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2719:39:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":93,"nodeType":"ExpressionStatement","src":"2719:39:0"}]},"documentation":{"id":45,"nodeType":"StructuredDocumentation","src":"1986:265:0","text":" @notice Constructor\n @param safeSingleton Address of the Safe Singleton implementation\n @param safeL2Singleton Address of the SafeL2 Singleton implementation\n @param fallbackHandler Address of the fallback handler implementation"},"id":95,"implemented":true,"kind":"constructor","modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":52,"nodeType":"ParameterList","parameters":[{"constant":false,"id":47,"mutability":"mutable","name":"safeSingleton","nodeType":"VariableDeclaration","scope":95,"src":"2268:21:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":46,"name":"address","nodeType":"ElementaryTypeName","src":"2268:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"},{"constant":false,"id":49,"mutability":"mutable","name":"safeL2Singleton","nodeType":"VariableDeclaration","scope":95,"src":"2291:23:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":48,"name":"address","nodeType":"ElementaryTypeName","src":"2291:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"},{"constant":false,"id":51,"mutability":"mutable","name":"fallbackHandler","nodeType":"VariableDeclaration","scope":95,"src":"2316:23:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":50,"name":"address","nodeType":"ElementaryTypeName","src":"2316:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"2267:73:0"},"returnParameters":{"id":53,"nodeType":"ParameterList","parameters":[],"src":"2341:0:0"},"scope":183,"src":"2256:509:0","stateMutability":"nonpayable","virtual":false,"visibility":"public"},{"body":{"id":109,"nodeType":"Block","src":"2920:91:0","statements":[{"expression":{"id":103,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":101,"name":"singleton","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"2930:9:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":102,"name":"SAFE_SINGLETON","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"2942:14:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"2930:26:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":104,"nodeType":"ExpressionStatement","src":"2930:26:0"},{"eventCall":{"arguments":[{"id":106,"name":"SAFE_SINGLETON","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"2989:14:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":105,"name":"ChangedMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":29,"src":"2971:17:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$returns$__$","typeString":"function (address)"}},"id":107,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2971:33:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":108,"nodeType":"EmitStatement","src":"2966:38:0"}]},"documentation":{"id":96,"nodeType":"StructuredDocumentation","src":"2771:92:0","text":" @notice Migrate the Safe contract to a new Safe Singleton implementation."},"functionSelector":"f6682ab0","id":110,"implemented":true,"kind":"function","modifiers":[{"id":99,"modifierName":{"id":98,"name":"onlyDelegateCall","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":44,"src":"2903:16:0","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"2903:16:0"}],"name":"migrateSingleton","nodeType":"FunctionDefinition","parameters":{"id":97,"nodeType":"ParameterList","parameters":[],"src":"2893:2:0"},"returnParameters":{"id":100,"nodeType":"ParameterList","parameters":[],"src":"2920:0:0"},"scope":183,"src":"2868:143:0","stateMutability":"nonpayable","virtual":false,"visibility":"public"},{"body":{"id":129,"nodeType":"Block","src":"3302:107:0","statements":[{"expression":{"arguments":[],"expression":{"argumentTypes":[],"id":116,"name":"migrateSingleton","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":110,"src":"3312:16:0","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":117,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3312:18:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":118,"nodeType":"ExpressionStatement","src":"3312:18:0"},{"expression":{"arguments":[{"id":126,"name":"SAFE_FALLBACK_HANDLER","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"3380:21:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"arguments":[{"arguments":[{"id":122,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"3354:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMigration_$183","typeString":"contract SafeMigration"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_SafeMigration_$183","typeString":"contract SafeMigration"}],"id":121,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3346:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":120,"name":"address","nodeType":"ElementaryTypeName","src":"3346:7:0","typeDescriptions":{}}},"id":123,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3346:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":119,"name":"ISafe","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":9,"src":"3340:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_ISafe_$9_$","typeString":"type(contract ISafe)"}},"id":124,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3340:20:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_contract$_ISafe_$9","typeString":"contract ISafe"}},"id":125,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"setFallbackHandler","nodeType":"MemberAccess","referencedDeclaration":8,"src":"3340:39:0","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$returns$__$","typeString":"function (address) external"}},"id":127,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3340:62:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":128,"nodeType":"ExpressionStatement","src":"3340:62:0"}]},"documentation":{"id":111,"nodeType":"StructuredDocumentation","src":"3017:216:0","text":" @notice Migrate to Safe Singleton and set the fallback handler. This function is intended to be used when migrating\n a Safe to a version which also requires updating fallback handler."},"functionSelector":"ed007fc6","id":130,"implemented":true,"kind":"function","modifiers":[{"id":114,"modifierName":{"id":113,"name":"onlyDelegateCall","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":44,"src":"3285:16:0","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"3285:16:0"}],"name":"migrateWithFallbackHandler","nodeType":"FunctionDefinition","parameters":{"id":112,"nodeType":"ParameterList","parameters":[],"src":"3273:2:0"},"returnParameters":{"id":115,"nodeType":"ParameterList","parameters":[],"src":"3302:0:0"},"scope":183,"src":"3238:171:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":{"id":144,"nodeType":"Block","src":"3571:97:0","statements":[{"expression":{"id":138,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":136,"name":"singleton","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":188,"src":"3581:9:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":137,"name":"SAFE_L2_SINGLETON","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":21,"src":"3593:17:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"3581:29:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":139,"nodeType":"ExpressionStatement","src":"3581:29:0"},{"eventCall":{"arguments":[{"id":141,"name":"SAFE_L2_SINGLETON","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":21,"src":"3643:17:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":140,"name":"ChangedMasterCopy","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":29,"src":"3625:17:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$returns$__$","typeString":"function (address)"}},"id":142,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3625:36:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":143,"nodeType":"EmitStatement","src":"3620:41:0"}]},"documentation":{"id":131,"nodeType":"StructuredDocumentation","src":"3415:97:0","text":" @notice Migrate the Safe contract to a new Safe Singleton (L2) implementation."},"functionSelector":"07f464a4","id":145,"implemented":true,"kind":"function","modifiers":[{"id":134,"modifierName":{"id":133,"name":"onlyDelegateCall","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":44,"src":"3554:16:0","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"3554:16:0"}],"name":"migrateL2Singleton","nodeType":"FunctionDefinition","parameters":{"id":132,"nodeType":"ParameterList","parameters":[],"src":"3544:2:0"},"returnParameters":{"id":135,"nodeType":"ParameterList","parameters":[],"src":"3571:0:0"},"scope":183,"src":"3517:151:0","stateMutability":"nonpayable","virtual":false,"visibility":"public"},{"body":{"id":164,"nodeType":"Block","src":"3966:109:0","statements":[{"expression":{"arguments":[],"expression":{"argumentTypes":[],"id":151,"name":"migrateL2Singleton","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":145,"src":"3976:18:0","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$__$returns$__$","typeString":"function ()"}},"id":152,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3976:20:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":153,"nodeType":"ExpressionStatement","src":"3976:20:0"},{"expression":{"arguments":[{"id":161,"name":"SAFE_FALLBACK_HANDLER","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"4046:21:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"arguments":[{"arguments":[{"id":157,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"4020:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMigration_$183","typeString":"contract SafeMigration"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_SafeMigration_$183","typeString":"contract SafeMigration"}],"id":156,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"4012:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":155,"name":"address","nodeType":"ElementaryTypeName","src":"4012:7:0","typeDescriptions":{}}},"id":158,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4012:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"id":154,"name":"ISafe","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":9,"src":"4006:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_ISafe_$9_$","typeString":"type(contract ISafe)"}},"id":159,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4006:20:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_contract$_ISafe_$9","typeString":"contract ISafe"}},"id":160,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"setFallbackHandler","nodeType":"MemberAccess","referencedDeclaration":8,"src":"4006:39:0","typeDescriptions":{"typeIdentifier":"t_function_external_nonpayable$_t_address_$returns$__$","typeString":"function (address) external"}},"id":162,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4006:62:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":163,"nodeType":"ExpressionStatement","src":"4006:62:0"}]},"documentation":{"id":146,"nodeType":"StructuredDocumentation","src":"3674:221:0","text":" @notice Migrate to Safe Singleton (L2) and set the fallback handler. This function is intended to be used when migrating\n a Safe to a version which also requires updating fallback handler."},"functionSelector":"68cb3d94","id":165,"implemented":true,"kind":"function","modifiers":[{"id":149,"modifierName":{"id":148,"name":"onlyDelegateCall","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":44,"src":"3949:16:0","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"3949:16:0"}],"name":"migrateL2WithFallbackHandler","nodeType":"FunctionDefinition","parameters":{"id":147,"nodeType":"ParameterList","parameters":[],"src":"3937:2:0"},"returnParameters":{"id":150,"nodeType":"ParameterList","parameters":[],"src":"3966:0:0"},"scope":183,"src":"3900:175:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":{"id":181,"nodeType":"Block","src":"4576:265:0","statements":[{"assignments":[174],"declarations":[{"constant":false,"id":174,"mutability":"mutable","name":"size","nodeType":"VariableDeclaration","scope":181,"src":"4586:12:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":173,"name":"uint256","nodeType":"ElementaryTypeName","src":"4586:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":175,"nodeType":"VariableDeclarationStatement","src":"4586:12:0"},{"AST":{"nodeType":"YulBlock","src":"4709:52:0","statements":[{"nodeType":"YulAssignment","src":"4723:28:0","value":{"arguments":[{"name":"account","nodeType":"YulIdentifier","src":"4743:7:0"}],"functionName":{"name":"extcodesize","nodeType":"YulIdentifier","src":"4731:11:0"},"nodeType":"YulFunctionCall","src":"4731:20:0"},"variableNames":[{"name":"size","nodeType":"YulIdentifier","src":"4723:4:0"}]}]},"evmVersion":"istanbul","externalReferences":[{"declaration":168,"isOffset":false,"isSlot":false,"src":"4743:7:0","valueSize":1},{"declaration":174,"isOffset":false,"isSlot":false,"src":"4723:4:0","valueSize":1}],"id":176,"nodeType":"InlineAssembly","src":"4700:61:0"},{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":179,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":177,"name":"size","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":174,"src":"4826:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"hexValue":"30","id":178,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4833:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4826:8:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":172,"id":180,"nodeType":"Return","src":"4819:15:0"}]},"documentation":{"id":166,"nodeType":"StructuredDocumentation","src":"4081:427:0","text":" @notice Checks whether an account has code.\n @param account The address of the account to be checked.\n @return A boolean value indicating whether the address has code (true) or not (false).\n @dev This function relies on the `extcodesize` assembly opcode to determine whether an address has code.\n It does not reliably determine whether or not an address is a smart contract or an EOA."},"id":182,"implemented":true,"kind":"function","modifiers":[],"name":"hasCode","nodeType":"FunctionDefinition","parameters":{"id":169,"nodeType":"ParameterList","parameters":[{"constant":false,"id":168,"mutability":"mutable","name":"account","nodeType":"VariableDeclaration","scope":182,"src":"4530:15:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":167,"name":"address","nodeType":"ElementaryTypeName","src":"4530:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"4529:17:0"},"returnParameters":{"id":172,"nodeType":"ParameterList","parameters":[{"constant":false,"id":171,"mutability":"mutable","name":"","nodeType":"VariableDeclaration","scope":182,"src":"4570:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":170,"name":"bool","nodeType":"ElementaryTypeName","src":"4570:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"4569:6:0"},"scope":183,"src":"4513:328:0","stateMutability":"view","virtual":false,"visibility":"internal"}],"scope":184,"src":"930:3913:0"}],"src":"42:4802:0"},"id":0},"contracts/libraries/SafeStorage.sol":{"ast":{"absolutePath":"contracts/libraries/SafeStorage.sol","exportedSymbols":{"SafeStorage":[215]},"id":216,"license":"LGPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":185,"literals":["solidity",">=","0.7",".0","<","0.9",".0"],"nodeType":"PragmaDirective","src":"42:31:1"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":{"id":186,"nodeType":"StructuredDocumentation","src":"75:222:1","text":" @title SafeStorage - Storage layout of the Safe contracts to be used in libraries.\n @dev Should be always the first base contract of a library that is used with a Safe.\n @author Richard Meissner - @rmeissner"},"fullyImplemented":true,"id":215,"linearizedBaseContracts":[215],"name":"SafeStorage","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":188,"mutability":"mutable","name":"singleton","nodeType":"VariableDeclaration","scope":215,"src":"359:26:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":187,"name":"address","nodeType":"ElementaryTypeName","src":"359:7:1","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"},{"constant":false,"id":192,"mutability":"mutable","name":"modules","nodeType":"VariableDeclaration","scope":215,"src":"429:44:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_address_$","typeString":"mapping(address => address)"},"typeName":{"id":191,"keyType":{"id":189,"name":"address","nodeType":"ElementaryTypeName","src":"437:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"429:27:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_address_$","typeString":"mapping(address => address)"},"valueType":{"id":190,"name":"address","nodeType":"ElementaryTypeName","src":"448:7:1","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}},"visibility":"internal"},{"constant":false,"id":196,"mutability":"mutable","name":"owners","nodeType":"VariableDeclaration","scope":215,"src":"516:43:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_address_$","typeString":"mapping(address => address)"},"typeName":{"id":195,"keyType":{"id":193,"name":"address","nodeType":"ElementaryTypeName","src":"524:7:1","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"516:27:1","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_address_$","typeString":"mapping(address => address)"},"valueType":{"id":194,"name":"address","nodeType":"ElementaryTypeName","src":"535:7:1","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}},"visibility":"internal"},{"constant":false,"id":198,"mutability":"mutable","name":"ownerCount","nodeType":"VariableDeclaration","scope":215,"src":"565:27:1","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":197,"name":"uint256","nodeType":"ElementaryTypeName","src":"565:7:1","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":200,"mutability":"mutable","name":"threshold","nodeType":"VariableDeclaration","scope":215,"src":"598:26:1","st