编译器
0.8.19+commit.7dd6d404
文件 1 的 14:AddressProvider.sol
pragma solidity 0.8.19;
import {IAddressProviderService} from "interfaces/IAddressProviderService.sol";
import {Constants} from "src/core/Constants.sol";
contract AddressProvider is Constants {
error RegistryAlreadyExists();
error AddressProviderUnsupported();
error NotGovernance(address);
error NotPendingGovernance(address);
error NullAddress();
event RegistryInitialised(address indexed registry, bytes32 indexed key);
event AuthorizedAddressInitialised(address indexed authorizedAddress, bytes32 indexed key);
event GovernanceTransferRequested(address indexed previousGovernance, address indexed newGovernance);
event GovernanceTransferred(address indexed previousGovernance, address indexed newGovernance);
address public governance;
address public pendingGovernance;
mapping(bytes32 => address) internal authorizedAddresses;
mapping(bytes32 => address) internal registries;
constructor(address _governance, address walletRegistry, address policyRegistry, address executorRegistry) {
_notNull(_governance);
governance = _governance;
_notNull(walletRegistry);
_notNull(policyRegistry);
_notNull(executorRegistry);
registries[_WALLET_REGISTRY_HASH] = walletRegistry;
registries[_POLICY_REGISTRY_HASH] = policyRegistry;
registries[_EXECUTOR_REGISTRY_HASH] = executorRegistry;
}
function setGovernance(address _newGovernance) external {
_notNull(_newGovernance);
_onlyGov();
emit GovernanceTransferRequested(governance, _newGovernance);
pendingGovernance = _newGovernance;
}
function acceptGovernance() external {
if (msg.sender != pendingGovernance) {
revert NotPendingGovernance(msg.sender);
}
emit GovernanceTransferred(governance, msg.sender);
governance = msg.sender;
delete pendingGovernance;
}
function setAuthorizedAddress(bytes32 _key, address _authorizedAddress, bool _overrideCheck) external {
_onlyGov();
_notNull(_authorizedAddress);
if (!_overrideCheck) {
if (_authorizedAddress.code.length != 0) _ensureAddressProvider(_authorizedAddress);
}
authorizedAddresses[_key] = _authorizedAddress;
emit AuthorizedAddressInitialised(_authorizedAddress, _key);
}
function setRegistry(bytes32 _key, address _registry) external {
_onlyGov();
_ensureAddressProvider(_registry);
if (registries[_key] != address(0)) revert RegistryAlreadyExists();
registries[_key] = _registry;
emit RegistryInitialised(_registry, _key);
}
function getAuthorizedAddress(bytes32 _key) external view returns (address) {
return authorizedAddresses[_key];
}
function getRegistry(bytes32 _key) external view returns (address) {
return registries[_key];
}
function _ensureAddressProvider(address _newAddress) internal view {
if (IAddressProviderService(_newAddress).addressProviderTarget() != address(this)) {
revert AddressProviderUnsupported();
}
}
function _onlyGov() internal view {
if (msg.sender != governance) revert NotGovernance(msg.sender);
}
function _notNull(address addr) internal pure {
if (addr == address(0)) revert NullAddress();
}
}
文件 2 的 14:AddressProviderService.sol
pragma solidity 0.8.19;
import {IAddressProviderService} from "../../interfaces/IAddressProviderService.sol";
import {AddressProvider} from "../core/AddressProvider.sol";
import {Constants} from "./Constants.sol";
abstract contract AddressProviderService is IAddressProviderService, Constants {
error InvalidAddressProvider();
error NotGovernance(address);
error InvalidAddress();
AddressProvider public immutable addressProvider;
address public immutable walletRegistry;
address public immutable policyRegistry;
address public immutable executorRegistry;
constructor(address _addressProvider) {
if (_addressProvider == address(0)) revert InvalidAddressProvider();
addressProvider = AddressProvider(_addressProvider);
walletRegistry = addressProvider.getRegistry(_WALLET_REGISTRY_HASH);
policyRegistry = addressProvider.getRegistry(_POLICY_REGISTRY_HASH);
executorRegistry = addressProvider.getRegistry(_EXECUTOR_REGISTRY_HASH);
_notNull(walletRegistry);
_notNull(policyRegistry);
_notNull(executorRegistry);
}
function addressProviderTarget() external view override returns (address) {
return address(addressProvider);
}
function _getAuthorizedAddress(bytes32 _key) internal view returns (address authorizedAddress) {
authorizedAddress = addressProvider.getAuthorizedAddress(_key);
_notNull(authorizedAddress);
}
function _notNull(address _addr) internal pure {
if (_addr == address(0)) revert InvalidAddress();
}
}
文件 3 的 14:Constants.sol
pragma solidity 0.8.19;
abstract contract Constants {
bytes32 internal constant _EXECUTOR_REGISTRY_HASH = bytes32(uint256(keccak256("console.core.ExecutorRegistry")) - 1);
bytes32 internal constant _WALLET_REGISTRY_HASH = bytes32(uint256(keccak256("console.core.WalletRegistry")) - 1);
bytes32 internal constant _POLICY_REGISTRY_HASH = bytes32(uint256(keccak256("console.core.PolicyRegistry")) - 1);
bytes32 internal constant _EXECUTOR_PLUGIN_HASH = bytes32(uint256(keccak256("console.core.ExecutorPlugin")) - 1);
bytes32 internal constant _CONSOLE_FALLBACK_HANDLER_HASH =
bytes32(uint256(keccak256("console.core.FallbackHandler")) - 1);
bytes32 internal constant _SAFE_FALLBACK_HANDLER_HASH = bytes32(uint256(keccak256("safe.FallbackHandler")) - 1);
bytes32 internal constant _SAFE_MULTI_SEND_HASH = bytes32(uint256(keccak256("safe.MultiSend")) - 1);
bytes32 internal constant _SAFE_PROXY_FACTORY_HASH = bytes32(uint256(keccak256("safe.ProxyFactory")) - 1);
bytes32 internal constant _SAFE_SINGLETON_HASH = bytes32(uint256(keccak256("safe.Singleton")) - 1);
bytes32 internal constant _POLICY_VALIDATOR_HASH = bytes32(uint256(keccak256("console.core.PolicyValidator")) - 1);
bytes32 internal constant _SAFE_DEPLOYER_HASH = bytes32(uint256(keccak256("console.core.SafeDeployer")) - 1);
bytes32 internal constant _SAFE_ENABLER_HASH = bytes32(uint256(keccak256("console.core.SafeEnabler")) - 1);
bytes32 internal constant _SAFE_MODERATOR_HASH = bytes32(uint256(keccak256("console.core.SafeModerator")) - 1);
bytes32 internal constant _SAFE_MODERATOR_OVERRIDABLE_HASH =
bytes32(uint256(keccak256("console.core.SafeModeratorOverridable")) - 1);
bytes32 internal constant _TRANSACTION_VALIDATOR_HASH =
bytes32(uint256(keccak256("console.core.TransactionValidator")) - 1);
bytes32 internal constant _CONSOLE_OP_BUILDER_HASH =
bytes32(uint256(keccak256("console.core.ConsoleOpBuilder")) - 1);
bytes32 internal constant _EXECUTION_BLOCKER_HASH = bytes32(uint256(keccak256("console.core.ExecutionBlocker")) - 1);
bytes32 internal constant _POLICY_AUTHENTICATOR_HASH =
bytes32(uint256(keccak256("console.roles.PolicyAuthenticator")) - 1);
}
文件 4 的 14:IAddressProviderService.sol
pragma solidity 0.8.19;
interface IAddressProviderService {
function addressProviderTarget() external view returns (address);
}
文件 5 的 14:IERC165.sol
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
文件 6 的 14:ISafeMultiSend.sol
pragma solidity >=0.7.0 <0.9.0;
interface ISafeMultiSend {
function multiSend(bytes memory transactions) external payable;
}
文件 7 的 14:ISafeProxyFactory.sol
pragma solidity >=0.7.0 <0.9.0;
interface ISafeProxyFactory {
event ProxyCreation(address proxy, address singleton);
function calculateCreateProxyWithNonceAddress(address _singleton, bytes memory initializer, uint256 saltNonce)
external
returns (address proxy);
function createProxy(address singleton, bytes memory data) external returns (address proxy);
function createProxyWithCallback(address _singleton, bytes memory initializer, uint256 saltNonce, address callback)
external
returns (address proxy);
function createProxyWithNonce(address _singleton, bytes memory initializer, uint256 saltNonce)
external
returns (address proxy);
function proxyCreationCode() external pure returns (bytes memory);
function proxyRuntimeCode() external pure returns (bytes memory);
}
文件 8 的 14:ISafeWallet.sol
pragma solidity 0.8.19;
import {IERC165} from "openzeppelin-contracts/utils/introspection/IERC165.sol";
contract Enum {
enum Operation {
Call,
DelegateCall
}
}
interface ISafeWallet {
function execTransactionFromModule(address to, uint256 value, bytes calldata data, Enum.Operation operation)
external
returns (bool success);
function execTransactionFromModuleReturnData(address to, uint256 value, bytes memory data, Enum.Operation operation)
external
returns (bool success, bytes memory returnData);
function getStorageAt(uint256 offset, uint256 length) external view returns (bytes memory);
function isOwner(address owner) external view returns (bool);
function nonce() external view returns (uint256);
function getThreshold() external view returns (uint256);
function isModuleEnabled(address module) external view returns (bool);
function enableModule(address module) external;
function disableModule(address prevModule, address module) external;
function removeOwner(address prevOwner, address owner, uint256 _threshold) external;
function swapOwner(address prevOwner, address oldOwner, address newOwner) external;
function getOwners() external view returns (address[] memory);
function approveHash(bytes32 hashToApprove) external;
function signedMessages(bytes32 _dataHash) external returns (uint256 _signatures);
function execTransaction(
address to,
uint256 value,
bytes calldata data,
Enum.Operation operation,
uint256 safeTxGas,
uint256 baseGas,
uint256 gasPrice,
address gasToken,
address payable refundReceiver,
bytes memory signatures
) external payable returns (bool);
function setup(
address[] memory _owners,
uint256 _threshold,
address to,
bytes memory data,
address fallbackHandler,
address paymentToken,
uint256 payment,
address paymentReceiver
) external;
function addOwnerWithThreshold(address owner, uint256 _threshold) external;
function domainSeparator() external view returns (bytes32);
function setFallbackHandler(address _fallbackHandler) external;
function setGuard(address guard) external;
function encodeTransactionData(
address to,
uint256 value,
bytes calldata data,
Enum.Operation operation,
uint256 safeTxGas,
uint256 baseGas,
uint256 gasPrice,
address gasToken,
address refundReceiver,
uint256 _nonce
) external view returns (bytes memory);
}
interface Guard is IERC165 {
function checkTransaction(
address to,
uint256 value,
bytes memory data,
Enum.Operation operation,
uint256 safeTxGas,
uint256 baseGas,
uint256 gasPrice,
address gasToken,
address payable refundReceiver,
bytes memory signatures,
address msgSender
) external;
function checkAfterExecution(bytes32 txHash, bool success) external;
}
文件 9 的 14:PolicyRegistry.sol
pragma solidity 0.8.19;
import {AddressProviderService} from "src/core/AddressProviderService.sol";
import {WalletRegistry} from "src/core/registries/WalletRegistry.sol";
contract PolicyRegistry is AddressProviderService {
error PolicyCommitInvalid();
error UnauthorizedPolicyUpdate();
event UpdatedPolicyCommit(address indexed account, bytes32 policyCommit, bytes32 oldPolicyCommit);
mapping(address account => bytes32 policyCommit) public commitments;
constructor(address _addressProvider) AddressProviderService(_addressProvider) {}
function updatePolicy(address account, bytes32 policyCommit) external {
if (policyCommit == bytes32(0)) {
revert PolicyCommitInvalid();
}
bytes32 currentCommit = commitments[account];
if (
currentCommit == bytes32(0)
&& msg.sender == AddressProviderService._getAuthorizedAddress(_SAFE_DEPLOYER_HASH)
) {
} else {
if (WalletRegistry(walletRegistry).subAccountToWallet(account) == msg.sender) {
} else if (msg.sender == account && WalletRegistry(walletRegistry).isWallet(msg.sender)) {
} else {
revert UnauthorizedPolicyUpdate();
}
}
_updatePolicy(account, policyCommit, currentCommit);
}
function _updatePolicy(address account, bytes32 policyCommit, bytes32 oldPolicyCommit) internal {
emit UpdatedPolicyCommit(account, policyCommit, oldPolicyCommit);
commitments[account] = policyCommit;
}
}
文件 10 的 14:ReentrancyGuard.sol
pragma solidity ^0.8.0;
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
_status = _ENTERED;
}
function _nonReentrantAfter() private {
_status = _NOT_ENTERED;
}
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}
文件 11 的 14:SafeDeployer.sol
pragma solidity 0.8.19;
import {ReentrancyGuard} from "openzeppelin-contracts/security/ReentrancyGuard.sol";
import {AddressProviderService} from "../core/AddressProviderService.sol";
import {WalletRegistry} from "../core/registries/WalletRegistry.sol";
import {PolicyRegistry} from "../core/registries/PolicyRegistry.sol";
import {ISafeProxyFactory} from "../../interfaces/external/ISafeProxyFactory.sol";
import {ISafeWallet} from "../../interfaces/external/ISafeWallet.sol";
import {Types, SafeHelper} from "../libraries/SafeHelper.sol";
import {ISafeMultiSend} from "../../interfaces/external/ISafeMultiSend.sol";
contract SafeDeployer is AddressProviderService, ReentrancyGuard {
string public constant VERSION = "1";
bytes32 internal constant _SAFE_CREATION_FAILURE_REASON =
0xd7c71a0bdd2eb2834ad042153c811dd478e4ee2324e3003b9522e03e7b3735dc;
event SafeProxyCreationFailure(address indexed singleton, uint256 indexed nonce, bytes initializer);
event ConsoleAccountDeployed(address indexed consoleAddress);
event SubAccountDeployed(address indexed subAccountAddress, address indexed consoleAddress);
event PreComputeAccount(address[] indexed owners, uint256 indexed threshold);
error InvalidCommitment();
error NotWallet();
error PreComputedAccount(address addr);
error SafeProxyCreationFailed();
constructor(address _addressProvider) AddressProviderService(_addressProvider) {}
mapping(bytes32 ownersHash => uint256 count) public ownerSafeCount;
function deployConsoleAccount(address[] calldata _owners, uint256 _threshold, bytes32 _policyCommit, bytes32 _salt)
external
nonReentrant
returns (address _safe)
{
bool _policyHashValid = _policyCommit != bytes32(0);
_safe = _createSafe(_owners, _setupConsoleAccount(_owners, _threshold, _policyHashValid), _salt);
if (_policyHashValid) {
PolicyRegistry(policyRegistry).updatePolicy(_safe, _policyCommit);
}
emit ConsoleAccountDeployed(_safe);
}
function deploySubAccount(address[] calldata _owners, uint256 _threshold, bytes32 _policyCommit, bytes32 _salt)
external
nonReentrant
returns (address _subAcc)
{
if (_policyCommit == bytes32(0)) revert InvalidCommitment();
if (!WalletRegistry(walletRegistry).isWallet(msg.sender)) revert NotWallet();
_subAcc = _createSafe(_owners, _setupSubAccount(_owners, _threshold), _salt);
WalletRegistry(walletRegistry).registerSubAccount(msg.sender, _subAcc);
PolicyRegistry(policyRegistry).updatePolicy(_subAcc, _policyCommit);
emit SubAccountDeployed(_subAcc, msg.sender);
}
function _setupConsoleAccount(address[] memory _owners, uint256 _threshold, bool _policyHashValid)
private
view
returns (bytes memory)
{
address fallbackHandler;
Types.Executable[] memory txns;
if (_policyHashValid) {
txns = new Types.Executable[](2);
fallbackHandler = AddressProviderService._getAuthorizedAddress(_CONSOLE_FALLBACK_HANDLER_HASH);
txns[1] = Types.Executable({
callType: Types.CallType.DELEGATECALL,
target: AddressProviderService._getAuthorizedAddress(_SAFE_ENABLER_HASH),
value: 0,
data: abi.encodeCall(
ISafeWallet.setGuard, (AddressProviderService._getAuthorizedAddress(_SAFE_MODERATOR_OVERRIDABLE_HASH))
)
});
} else {
txns = new Types.Executable[](1);
fallbackHandler = AddressProviderService._getAuthorizedAddress(_SAFE_FALLBACK_HANDLER_HASH);
}
txns[0] = Types.Executable({
callType: Types.CallType.CALL,
target: walletRegistry,
value: 0,
data: abi.encodeCall(WalletRegistry.registerWallet, ())
});
return abi.encodeCall(
ISafeWallet.setup,
(
_owners,
_threshold,
AddressProviderService._getAuthorizedAddress(_SAFE_MULTI_SEND_HASH),
abi.encodeCall(ISafeMultiSend.multiSend, (SafeHelper._packMultisendTxns(txns))),
fallbackHandler,
address(0),
0,
address(0)
)
);
}
function _setupSubAccount(address[] memory _owners, uint256 _threshold) private view returns (bytes memory) {
address safeEnabler = AddressProviderService._getAuthorizedAddress(_SAFE_ENABLER_HASH);
Types.Executable[] memory txns = new Types.Executable[](2);
txns[0] = Types.Executable({
callType: Types.CallType.DELEGATECALL,
target: safeEnabler,
value: 0,
data: abi.encodeCall(ISafeWallet.enableModule, (msg.sender))
});
txns[1] = Types.Executable({
callType: Types.CallType.DELEGATECALL,
target: safeEnabler,
value: 0,
data: abi.encodeCall(ISafeWallet.setGuard, (AddressProviderService._getAuthorizedAddress(_SAFE_MODERATOR_HASH)))
});
return abi.encodeCall(
ISafeWallet.setup,
(
_owners,
_threshold,
AddressProviderService._getAuthorizedAddress(_SAFE_MULTI_SEND_HASH),
abi.encodeCall(ISafeMultiSend.multiSend, (SafeHelper._packMultisendTxns(txns))),
AddressProviderService._getAuthorizedAddress(_CONSOLE_FALLBACK_HANDLER_HASH),
address(0),
0,
address(0)
)
);
}
function _createSafe(address[] calldata _owners, bytes memory _initializer, bytes32 _salt)
private
returns (address _safe)
{
address safeProxyFactory = AddressProviderService._getAuthorizedAddress(_SAFE_PROXY_FACTORY_HASH);
address safeSingleton = AddressProviderService._getAuthorizedAddress(_SAFE_SINGLETON_HASH);
bytes32 ownersHash = keccak256(abi.encode(_owners));
do {
uint256 nonce = _genNonce(ownersHash, _salt);
try ISafeProxyFactory(safeProxyFactory).createProxyWithNonce(safeSingleton, _initializer, nonce) returns (
address _deployedSafe
) {
_safe = _deployedSafe;
} catch Error(string memory reason) {
if (keccak256(bytes(reason)) != _SAFE_CREATION_FAILURE_REASON) {
revert SafeProxyCreationFailed();
}
emit SafeProxyCreationFailure(safeSingleton, nonce, _initializer);
} catch {
revert SafeProxyCreationFailed();
}
} while (_safe == address(0));
}
function _genNonce(bytes32 _ownersHash, bytes32 _salt) private returns (uint256) {
return uint256(keccak256(abi.encodePacked(_ownersHash, ownerSafeCount[_ownersHash]++, _salt, VERSION)));
}
}
文件 12 的 14:SafeHelper.sol
pragma solidity 0.8.19;
import {Enum, ISafeWallet} from "interfaces/external/ISafeWallet.sol";
import {Types} from "interfaces/Types.sol";
library SafeHelper {
error InvalidMultiSendInput();
error UnableToParseOperation();
uint256 internal constant _GUARD_STORAGE_SLOT =
33528237782592280163068556224972516439282563014722366175641814928123294921928;
uint256 internal constant _FALLBACK_HANDLER_STORAGE_SLOT =
49122629484629529244014240937346711770925847994644146912111677022347558721749;
bytes32 internal constant _GUARD_REMOVAL_CALLDATA_HASH =
0xc0e2c16ecb99419a40dd8b9c0b339b27acebd27c481a28cd606927aeb86f5079;
bytes32 internal constant _FALLBACK_REMOVAL_CALLDATA_HASH =
0x5bdf8c44c012c1347b2b15694dc5cc39b899eb99e32614676b7661001be925b7;
function _packMultisendTxns(Types.Executable[] memory _txns) internal pure returns (bytes memory packedTxns) {
uint256 len = _txns.length;
if (len == 0) revert InvalidMultiSendInput();
uint256 i = 0;
do {
uint8 call = uint8(_parseOperationEnum(_txns[i].callType));
uint256 calldataLength = _txns[i].data.length;
bytes memory encodedTxn = abi.encodePacked(
bytes1(call), bytes20(_txns[i].target), bytes32(_txns[i].value), bytes32(calldataLength), _txns[i].data
);
if (i != 0) {
packedTxns = abi.encodePacked(packedTxns, encodedTxn);
} else {
packedTxns = encodedTxn;
}
unchecked {
++i;
}
} while (i < len);
}
function _getGuard(address safe) internal view returns (address) {
bytes memory guardAddress = ISafeWallet(safe).getStorageAt(_GUARD_STORAGE_SLOT, 1);
return address(uint160(uint256(bytes32(guardAddress))));
}
function _getFallbackHandler(address safe) internal view returns (address) {
bytes memory fallbackHandlerAddress = ISafeWallet(safe).getStorageAt(_FALLBACK_HANDLER_STORAGE_SLOT, 1);
return address(uint160(uint256(bytes32(fallbackHandlerAddress))));
}
function _parseOperationEnum(Types.CallType callType) internal pure returns (Enum.Operation operation) {
if (callType == Types.CallType.DELEGATECALL) {
operation = Enum.Operation.DelegateCall;
} else if (callType == Types.CallType.CALL) {
operation = Enum.Operation.Call;
} else {
revert UnableToParseOperation();
}
}
}
文件 13 的 14:Types.sol
pragma solidity 0.8.19;
interface Types {
enum CallType {
CALL,
DELEGATECALL,
STATICCALL
}
struct Executable {
CallType callType;
address target;
uint256 value;
bytes data;
}
struct TokenRequest {
address token;
uint256 amount;
}
}
文件 14 的 14:WalletRegistry.sol
pragma solidity 0.8.19;
import {AddressProviderService} from "../AddressProviderService.sol";
contract WalletRegistry is AddressProviderService {
error AlreadyRegistered();
error InvalidSender();
error IsSubAccount();
event RegisterWallet(address indexed wallet);
event RegisterSubAccount(address indexed wallet, address indexed subAccount);
mapping(address subAccount => address wallet) public subAccountToWallet;
mapping(address wallet => address[] subAccountList) public walletToSubAccountList;
mapping(address => bool) public isWallet;
constructor(address _addressProvider) AddressProviderService(_addressProvider) {}
function registerWallet() external {
if (isWallet[msg.sender]) revert AlreadyRegistered();
if (subAccountToWallet[msg.sender] != address(0)) revert IsSubAccount();
isWallet[msg.sender] = true;
emit RegisterWallet(msg.sender);
}
function registerSubAccount(address _wallet, address _subAccount) external {
if (msg.sender != AddressProviderService._getAuthorizedAddress(_SAFE_DEPLOYER_HASH)) revert InvalidSender();
if (subAccountToWallet[_subAccount] != address(0) || isWallet[_subAccount]) revert AlreadyRegistered();
subAccountToWallet[_subAccount] = _wallet;
walletToSubAccountList[_wallet].push(_subAccount);
emit RegisterSubAccount(_wallet, _subAccount);
}
function getSubAccountsForWallet(address _wallet) external view returns (address[] memory) {
return walletToSubAccountList[_wallet];
}
}
{
"compilationTarget": {
"src/core/SafeDeployer.sol": "SafeDeployer"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 20000
},
"remappings": [
":ds-test/=lib/forge-std/lib/ds-test/src/",
":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
":forge-std/=lib/forge-std/src/",
":openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
":openzeppelin/=lib/openzeppelin-contracts/contracts/",
":safe-contracts/=lib/safe-contracts/contracts/",
":solady/=lib/solady/src/",
":solidity-bytes-utils/=lib/solidity-bytes-utils/contracts/",
":solmate/=lib/solady/lib/solmate/src/"
]
}
[{"inputs":[{"internalType":"address","name":"_addressProvider","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidAddressProvider","type":"error"},{"inputs":[],"name":"InvalidCommitment","type":"error"},{"inputs":[],"name":"InvalidMultiSendInput","type":"error"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"NotGovernance","type":"error"},{"inputs":[],"name":"NotWallet","type":"error"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"PreComputedAccount","type":"error"},{"inputs":[],"name":"SafeProxyCreationFailed","type":"error"},{"inputs":[],"name":"UnableToParseOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"consoleAddress","type":"address"}],"name":"ConsoleAccountDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address[]","name":"owners","type":"address[]"},{"indexed":true,"internalType":"uint256","name":"threshold","type":"uint256"}],"name":"PreComputeAccount","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"singleton","type":"address"},{"indexed":true,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"initializer","type":"bytes"}],"name":"SafeProxyCreationFailure","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"subAccountAddress","type":"address"},{"indexed":true,"internalType":"address","name":"consoleAddress","type":"address"}],"name":"SubAccountDeployed","type":"event"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"addressProvider","outputs":[{"internalType":"contract AddressProvider","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"addressProviderTarget","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_owners","type":"address[]"},{"internalType":"uint256","name":"_threshold","type":"uint256"},{"internalType":"bytes32","name":"_policyCommit","type":"bytes32"},{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"deployConsoleAccount","outputs":[{"internalType":"address","name":"_safe","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_owners","type":"address[]"},{"internalType":"uint256","name":"_threshold","type":"uint256"},{"internalType":"bytes32","name":"_policyCommit","type":"bytes32"},{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"deploySubAccount","outputs":[{"internalType":"address","name":"_subAcc","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"executorRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"ownersHash","type":"bytes32"}],"name":"ownerSafeCount","outputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"policyRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"walletRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]