Verified contractExactBUSL-1.1
ConfigPanel
Address0x944a5618643c449f8d811cea68c2122a3fe4d705
- Balance
0 ETH
- Transactions
0
- Compiler
solc 0.8.36
- Same code
Only this contract
Details
- Compiler
- solc 0.8.36+commit.8a079791
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- cancun
- License
- BUSL-1.1
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,434,315
- Creation transaction
- 0x25e404ce18…3bf0bd2bc5
8 files
- src/platform/config/ConfigPanel.solmain11.26 KB
- lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/access/IAccessControl.sol3.34 KB
- lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/access/extensions/IAccessControlDefaultAdminRules.sol8.17 KB
- src/interfaces/IErrors.sol1.66 KB
- src/libs/ConfigKeys.sol4.3 KB
- src/libs/ConfigViews.sol2.32 KB
- src/platform/config/interfaces/IConfigPanel.sol9.77 KB
- src/platform/config/interfaces/IConfigRegistrar.sol9.77 KB
src/platform/config/ConfigPanel.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.36;
// solhint-disable-next-line max-line-length
import { IAccessControl } from "../../../lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/access/IAccessControl.sol";
import { ConfigKeys } from "../../libs/ConfigKeys.sol";
import { ConfigViews } from "../../libs/ConfigViews.sol";
import { IConfigPanel } from "./interfaces/IConfigPanel.sol";
import { IConfigRegistrar } from "./interfaces/IConfigRegistrar.sol";
/// @title Named compliance actions over a config registrar's pause, freeze and whitelist keys.
/// @author M0 Labs
contract ConfigPanel is IConfigPanel {
/* ============ Constants ============ */
/// @inheritdoc IConfigPanel
bytes32 public constant PAUSER_ROLE = ConfigKeys.PAUSER_ROLE;
/// @inheritdoc IConfigPanel
bytes32 public constant FREEZE_MANAGER_ROLE = ConfigKeys.FREEZE_MANAGER_ROLE;
/// @inheritdoc IConfigPanel
bytes32 public constant WHITELIST_MANAGER_ROLE = ConfigKeys.WHITELIST_MANAGER_ROLE;
/* ============ Immutables ============ */
/// @dev The registrar this panel reads its grants from and writes its state to.
IConfigRegistrar internal immutable _configRegistrar;
/* ============ Constructor ============ */
/// @notice Constructs the panel against a registrar that must grant it the three roles it declares.
/// @dev Reverts if `configRegistrar_` is the zero address.
/// @param configRegistrar_ The address of the registrar backing compliance state.
constructor(address configRegistrar_) {
if (configRegistrar_ == address(0)) revert ZeroConfigRegistrar();
_configRegistrar = IConfigRegistrar(configRegistrar_);
}
/* ============ Interactive Functions ============ */
/// @inheritdoc IConfigPanel
function pause() external {
_revertIfUnauthorizedGlobally(PAUSER_ROLE);
_setGlobalPause(true);
}
/// @inheritdoc IConfigPanel
function unpause() external {
_revertIfUnauthorizedGlobally(PAUSER_ROLE);
_setGlobalPause(false);
}
/// @inheritdoc IConfigPanel
function pause(address stablecoin) external {
_revertIfUnauthorized(stablecoin, PAUSER_ROLE);
_setStablecoinPause(stablecoin, true);
}
/// @inheritdoc IConfigPanel
function unpause(address stablecoin) external {
_revertIfUnauthorized(stablecoin, PAUSER_ROLE);
_setStablecoinPause(stablecoin, false);
}
/// @inheritdoc IConfigPanel
function pauseStablecoins(address[] calldata stablecoins) external {
_setStablecoinPauses(stablecoins, true);
}
/// @inheritdoc IConfigPanel
function unpauseStablecoins(address[] calldata stablecoins) external {
_setStablecoinPauses(stablecoins, false);
}
/// @inheritdoc IConfigPanel
function freeze(address account) external {
_revertIfUnauthorizedGlobally(FREEZE_MANAGER_ROLE);
_setGlobalFreeze(account, true);
}
/// @inheritdoc IConfigPanel
function freezeAccounts(address[] calldata accounts) external {
_revertIfUnauthorizedGlobally(FREEZE_MANAGER_ROLE);
for (uint256 i; i < accounts.length; ++i) {
_setGlobalFreeze(accounts[i], true);
}
}
/// @inheritdoc IConfigPanel
function unfreeze(address account) external {
_revertIfUnauthorizedGlobally(FREEZE_MANAGER_ROLE);
_setGlobalFreeze(account, false);
}
/// @inheritdoc IConfigPanel
function unfreezeAccounts(address[] calldata accounts) external {
_revertIfUnauthorizedGlobally(FREEZE_MANAGER_ROLE);
for (uint256 i; i < accounts.length; ++i) {
_setGlobalFreeze(accounts[i], false);
}
}
/// @inheritdoc IConfigPanel
function freeze(address stablecoin, address account) external {
_revertIfUnauthorized(stablecoin, FREEZE_MANAGER_ROLE);
_setStablecoinFreeze(stablecoin, account, true);
}
/// @inheritdoc IConfigPanel
function freezeAccounts(address stablecoin, address[] calldata accounts) external {
_revertIfUnauthorized(stablecoin, FREEZE_MANAGER_ROLE);
for (uint256 i; i < accounts.length; ++i) {
_setStablecoinFreeze(stablecoin, accounts[i], true);
}
}
/// @inheritdoc IConfigPanel
function unfreeze(address stablecoin, address account) external {
_revertIfUnauthorized(stablecoin, FREEZE_MANAGER_ROLE);
_setStablecoinFreeze(stablecoin, account, false);
}
/// @inheritdoc IConfigPanel
function unfreezeAccounts(address stablecoin, address[] calldata accounts) external {
_revertIfUnauthorized(stablecoin, FREEZE_MANAGER_ROLE);
for (uint256 i; i < accounts.length; ++i) {
_setStablecoinFreeze(stablecoin, accounts[i], false);
}
}
/// @inheritdoc IConfigPanel
function whitelist(address stablecoin, address account) external {
_revertIfUnauthorizedScoped(stablecoin, WHITELIST_MANAGER_ROLE);
_setStablecoinWhitelist(stablecoin, account, true);
}
/// @inheritdoc IConfigPanel
function whitelistAccounts(address stablecoin, address[] calldata accounts) external {
_revertIfUnauthorizedScoped(stablecoin, WHITELIST_MANAGER_ROLE);
for (uint256 i; i < accounts.length; ++i) {
_setStablecoinWhitelist(stablecoin, accounts[i], true);
}
}
/// @inheritdoc IConfigPanel
function unwhitelist(address stablecoin, address account) external {
_revertIfUnauthorizedScoped(stablecoin, WHITELIST_MANAGER_ROLE);
_setStablecoinWhitelist(stablecoin, account, false);
}
/// @inheritdoc IConfigPanel
function unwhitelistAccounts(address stablecoin, address[] calldata accounts) external {
_revertIfUnauthorizedScoped(stablecoin, WHITELIST_MANAGER_ROLE);
for (uint256 i; i < accounts.length; ++i) {
_setStablecoinWhitelist(stablecoin, accounts[i], false);
}
}
/* ============ View/Pure Functions ============ */
/// @inheritdoc IConfigPanel
function isPaused(address stablecoin) external view returns (bool) {
return ConfigViews.isPaused(_configRegistrar, stablecoin);
}
/// @inheritdoc IConfigPanel
function isFrozen(address stablecoin, address account) external view returns (bool) {
return ConfigViews.isFrozen(_configRegistrar, stablecoin, account);
}
/// @inheritdoc IConfigPanel
function isWhitelisted(address stablecoin, address account) external view returns (bool) {
return ConfigViews.isWhitelisted(_configRegistrar, stablecoin, account);
}
/// @inheritdoc IConfigPanel
function configRegistrar() external view returns (address) {
return address(_configRegistrar);
}
/* ============ Internal Interactive Functions ============ */
/// @dev Sets the global pause flag.
/// @param paused Whether every stablecoin backed by this panel is paused.
function _setGlobalPause(bool paused) internal {
if (!_configRegistrar.setGlobalFlag(ConfigKeys.PAUSE_FLAG, paused)) return;
emit GlobalPauseSet(paused);
}
/// @dev Sets a single stablecoin's pause flag.
/// @param stablecoin The stablecoin the flag applies to.
/// @param paused Whether the stablecoin is paused.
function _setStablecoinPause(address stablecoin, bool paused) internal {
if (!_configRegistrar.setStablecoinFlag(stablecoin, ConfigKeys.PAUSE_FLAG, paused)) return;
emit StablecoinPauseSet(stablecoin, paused);
}
/// @dev Sets the pause flag on several stablecoins.
/// Reverts if a caller holding only scoped grants lacks one for any stablecoin.
/// @param stablecoins The stablecoins to set the flag on.
/// @param paused Whether to pause or unpause them.
function _setStablecoinPauses(address[] calldata stablecoins, bool paused) internal {
bool authorizedGlobally = _configRegistrar.hasRole(PAUSER_ROLE, msg.sender);
for (uint256 i; i < stablecoins.length; ++i) {
if (!authorizedGlobally) _revertIfUnauthorizedScoped(stablecoins[i], PAUSER_ROLE);
_setStablecoinPause(stablecoins[i], paused);
}
}
/// @dev Sets an account's panel-wide freeze flag.
/// @param account The account the flag applies to.
/// @param frozen Whether the account is frozen across every stablecoin backed by this panel.
function _setGlobalFreeze(address account, bool frozen) internal {
if (!_configRegistrar.setGlobalListEntry(ConfigKeys.FREEZE_LIST, account, frozen)) return;
emit GlobalFreezeSet(account, frozen);
}
/// @dev Sets an account's freeze flag for one stablecoin.
/// @param stablecoin The stablecoin the flag applies to.
/// @param account The account the flag applies to.
/// @param frozen Whether the account is frozen for that stablecoin.
function _setStablecoinFreeze(address stablecoin, address account, bool frozen) internal {
if (!_configRegistrar.setStablecoinListEntry(stablecoin, ConfigKeys.FREEZE_LIST, account, frozen)) return;
emit StablecoinFreezeSet(stablecoin, account, frozen);
}
/// @dev Sets an account's whitelist entry for one stablecoin.
/// @param stablecoin The stablecoin the whitelist belongs to.
/// @param account The account the entry applies to.
/// @param whitelisted Whether the account is whitelisted for that stablecoin.
function _setStablecoinWhitelist(address stablecoin, address account, bool whitelisted) internal {
if (!_configRegistrar.setStablecoinListEntry(stablecoin, ConfigKeys.WHITELIST, account, whitelisted)) {
return;
}
emit StablecoinWhitelistSet(stablecoin, account, whitelisted);
}
/* ============ Internal View/Pure Functions ============ */
/// @dev Reverts unless the caller holds the role registrar-wide.
/// @param role The unscoped role identifier.
function _revertIfUnauthorizedGlobally(bytes32 role) internal view {
if (_configRegistrar.hasRole(role, msg.sender)) return;
revert IAccessControl.AccessControlUnauthorizedAccount(msg.sender, role);
}
/// @dev Reverts unless the caller holds the role scoped to the stablecoin; the plain id confers nothing.
/// @param stablecoin The stablecoin the call targets.
/// @param role The unscoped role identifier.
function _revertIfUnauthorizedScoped(address stablecoin, bytes32 role) internal view {
if (_configRegistrar.hasStablecoinRole(stablecoin, role, msg.sender)) return;
revert UnauthorizedForStablecoin(msg.sender, stablecoin, role);
}
/// @dev Reverts unless the caller holds the role registrar-wide or scoped to the stablecoin.
/// @param stablecoin The stablecoin the call targets.
/// @param role The unscoped role identifier.
function _revertIfUnauthorized(address stablecoin, bytes32 role) internal view {
if (_configRegistrar.hasRole(role, msg.sender)) return;
_revertIfUnauthorizedScoped(stablecoin, role);
}
}
lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/access/IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (access/IAccessControl.sol)
pragma solidity ^0.8.20;
/**
* @dev External interface of AccessControl declared to support ERC-165 detection.
*/
interface IAccessControl {
/**
* @dev The `account` is missing a role.
*/
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);
/**
* @dev The caller of a function is not the expected one.
*
* NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
*/
error AccessControlBadConfirmation();
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted to signal this.
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call. This account bears the admin role (for the granted role).
* Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `callerConfirmation`.
*/
function renounceRole(bytes32 role, address callerConfirmation) external;
}
lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/access/extensions/IAccessControlDefaultAdminRules.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (access/extensions/IAccessControlDefaultAdminRules.sol)
pragma solidity ^0.8.20;
import {IAccessControl} from "../IAccessControl.sol";
/**
* @dev External interface of AccessControlDefaultAdminRules declared to support ERC-165 detection.
*/
interface IAccessControlDefaultAdminRules is IAccessControl {
/**
* @dev The new default admin is not a valid default admin.
*/
error AccessControlInvalidDefaultAdmin(address defaultAdmin);
/**
* @dev At least one of the following rules was violated:
*
* - The `DEFAULT_ADMIN_ROLE` must only be managed by itself.
* - The `DEFAULT_ADMIN_ROLE` must only be held by one account at the time.
* - Any `DEFAULT_ADMIN_ROLE` transfer must be in two delayed steps.
*/
error AccessControlEnforcedDefaultAdminRules();
/**
* @dev The delay for transferring the default admin delay is enforced and
* the operation must wait until `schedule`.
*
* NOTE: `schedule` can be 0 indicating there's no transfer scheduled.
*/
error AccessControlEnforcedDefaultAdminDelay(uint48 schedule);
/**
* @dev Emitted when a {defaultAdmin} transfer is started, setting `newAdmin` as the next
* address to become the {defaultAdmin} by calling {acceptDefaultAdminTransfer} only after `acceptSchedule`
* passes.
*/
event DefaultAdminTransferScheduled(address indexed newAdmin, uint48 acceptSchedule);
/**
* @dev Emitted when a {pendingDefaultAdmin} is reset if it was never accepted, regardless of its schedule.
*/
event DefaultAdminTransferCanceled();
/**
* @dev Emitted when a {defaultAdminDelay} change is started, setting `newDelay` as the next
* delay to be applied between default admin transfer after `effectSchedule` has passed.
*/
event DefaultAdminDelayChangeScheduled(uint48 newDelay, uint48 effectSchedule);
/**
* @dev Emitted when a {pendingDefaultAdminDelay} is reset if its schedule didn't pass.
*/
event DefaultAdminDelayChangeCanceled();
/**
* @dev Returns the address of the current `DEFAULT_ADMIN_ROLE` holder.
*/
function defaultAdmin() external view returns (address);
/**
* @dev Returns a tuple of a `newAdmin` and an accept schedule.
*
* After the `schedule` passes, the `newAdmin` will be able to accept the {defaultAdmin} role
* by calling {acceptDefaultAdminTransfer}, completing the role transfer.
*
* A zero value only in `acceptSchedule` indicates no pending admin transfer.
*
* NOTE: A zero address `newAdmin` means that {defaultAdmin} is being renounced.
*/
function pendingDefaultAdmin() external view returns (address newAdmin, uint48 acceptSchedule);
/**
* @dev Returns the delay required to schedule the acceptance of a {defaultAdmin} transfer started.
*
* This delay will be added to the current timestamp when calling {beginDefaultAdminTransfer} to set
* the acceptance schedule.
*
* NOTE: If a delay change has been scheduled, it will take effect as soon as the schedule passes, making this
* function returns the new delay. See {changeDefaultAdminDelay}.
*/
function defaultAdminDelay() external view returns (uint48);
/**
* @dev Returns a tuple of `newDelay` and an effect schedule.
*
* After the `schedule` passes, the `newDelay` will get into effect immediately for every
* new {defaultAdmin} transfer started with {beginDefaultAdminTransfer}.
*
* A zero value only in `effectSchedule` indicates no pending delay change.
*
* NOTE: A zero value only for `newDelay` means that the next {defaultAdminDelay}
* will be zero after the effect schedule.
*/
function pendingDefaultAdminDelay() external view returns (uint48 newDelay, uint48 effectSchedule);
/**
* @dev Starts a {defaultAdmin} transfer by setting a {pendingDefaultAdmin} scheduled for acceptance
* after the current timestamp plus a {defaultAdminDelay}.
*
* Requirements:
*
* - Only can be called by the current {defaultAdmin}.
*
* Emits a DefaultAdminRoleChangeStarted event.
*/
function beginDefaultAdminTransfer(address newAdmin) external;
/**
* @dev Cancels a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}.
*
* A {pendingDefaultAdmin} not yet accepted can also be cancelled with this function.
*
* Requirements:
*
* - Only can be called by the current {defaultAdmin}.
*
* May emit a DefaultAdminTransferCanceled event.
*/
function cancelDefaultAdminTransfer() external;
/**
* @dev Completes a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}.
*
* After calling the function:
*
* - `DEFAULT_ADMIN_ROLE` should be granted to the caller.
* - `DEFAULT_ADMIN_ROLE` should be revoked from the previous holder.
* - {pendingDefaultAdmin} should be reset to zero values.
*
* Requirements:
*
* - Only can be called by the {pendingDefaultAdmin}'s `newAdmin`.
* - The {pendingDefaultAdmin}'s `acceptSchedule` should've passed.
*/
function acceptDefaultAdminTransfer() external;
/**
* @dev Initiates a {defaultAdminDelay} update by setting a {pendingDefaultAdminDelay} scheduled for getting
* into effect after the current timestamp plus a {defaultAdminDelay}.
*
* This function guarantees that any call to {beginDefaultAdminTransfer} done between the timestamp this
* method is called and the {pendingDefaultAdminDelay} effect schedule will use the current {defaultAdminDelay}
* set before calling.
*
* The {pendingDefaultAdminDelay}'s effect schedule is defined in a way that waiting until the schedule and then
* calling {beginDefaultAdminTransfer} with the new delay will take at least the same as another {defaultAdmin}
* complete transfer (including acceptance).
*
* The schedule is designed for two scenarios:
*
* - When the delay is changed for a larger one the schedule is `block.timestamp + newDelay` capped by
* {defaultAdminDelayIncreaseWait}.
* - When the delay is changed for a shorter one, the schedule is `block.timestamp + (current delay - new delay)`.
*
* A {pendingDefaultAdminDelay} that never got into effect will be canceled in favor of a new scheduled change.
*
* Requirements:
*
* - Only can be called by the current {defaultAdmin}.
*
* Emits a DefaultAdminDelayChangeScheduled event and may emit a DefaultAdminDelayChangeCanceled event.
*/
function changeDefaultAdminDelay(uint48 newDelay) external;
/**
* @dev Cancels a scheduled {defaultAdminDelay} change.
*
* Requirements:
*
* - Only can be called by the current {defaultAdmin}.
*
* May emit a DefaultAdminDelayChangeCanceled event.
*/
function rollbackDefaultAdminDelay() external;
/**
* @dev Maximum time in seconds for an increase to {defaultAdminDelay} (that is scheduled using {changeDefaultAdminDelay})
* to take effect. Default to 5 days.
*
* When the {defaultAdminDelay} is scheduled to be increased, it goes into effect after the new delay has passed with
* the purpose of giving enough time for reverting any accidental change (i.e. using milliseconds instead of seconds)
* that may lock the contract. However, to avoid excessive schedules, the wait is capped by this function and it can
* be overrode for a custom {defaultAdminDelay} increase scheduling.
*
* IMPORTANT: Make sure to add a reasonable amount of time while overriding this value, otherwise,
* there's a risk of setting a high new delay that goes into effect almost immediately without the
* possibility of human intervention in the case of an input error (eg. set milliseconds instead of seconds).
*/
function defaultAdminDelayIncreaseWait() external view returns (uint48);
}
src/interfaces/IErrors.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.36;
/// @title Error declarations shared by more than one interface.
/// @author M0 Labs
interface IErrors {
/* ============ Custom Errors ============ */
/// @notice Thrown when batched arrays have mismatched lengths.
error ArrayLengthMismatch();
/// @notice Thrown when a gateway-only function is called by an address other than the issuer gateway.
/// @param caller The address that attempted the call.
error NotIssuerGateway(address caller);
/// @notice Thrown when the caller holds the role neither registrar-wide nor scoped to the stablecoin.
/// @param account The address that attempted the call.
/// @param stablecoin The stablecoin the call targets.
/// @param role The unscoped role identifier the call requires.
error UnauthorizedForStablecoin(address account, address stablecoin, bytes32 role);
/// @notice Thrown when the account address is the zero address.
error ZeroAccount();
/// @notice Thrown when an operation that must move tokens is given a zero amount.
error ZeroAmount();
/// @notice Thrown when the config registrar address is the zero address.
error ZeroConfigRegistrar();
/// @notice Thrown when the issuer gateway address is the zero address.
error ZeroIssuerGateway();
/// @notice Thrown when the policy address is the zero address.
error ZeroPolicy();
/// @notice Thrown when the policy registry address is the zero address.
error ZeroPolicyRegistry();
/// @notice Thrown when the stablecoin address is the zero address.
error ZeroStablecoin();
}
src/libs/ConfigKeys.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.36;
/// @title The shared vocabulary of the config contracts: key derivations and the identifier catalog.
/// @author M0 Labs
/// @dev Append only: these values address registrar storage, so a changed one silently reads an empty key.
library ConfigKeys {
/* ============ Constants ============ */
/// @dev The storage key for a stablecoin's pause flag.
bytes32 internal constant PAUSE_FLAG = keccak256("PAUSE_FLAG");
/// @dev The storage key for the freeze list.
bytes32 internal constant FREEZE_LIST = keccak256("FREEZE_LIST");
/// @dev The storage key for the whitelist, which exists per stablecoin only.
bytes32 internal constant WHITELIST = keccak256("WHITELIST");
/// @dev Hashed with a flag identifier to produce that flag's manager role.
bytes32 internal constant FLAG_MANAGER_ROLE = keccak256("FLAG_MANAGER_ROLE");
/// @dev Hashed with a list identifier to produce that list's manager role.
bytes32 internal constant LIST_MANAGER_ROLE = keccak256("LIST_MANAGER_ROLE");
/// @dev The role that can pause and unpause stablecoins, globally or scoped to a stablecoin.
bytes32 internal constant PAUSER_ROLE = keccak256(abi.encode(FLAG_MANAGER_ROLE, PAUSE_FLAG));
/// @dev The role that can freeze and unfreeze accounts, globally or scoped to a stablecoin.
bytes32 internal constant FREEZE_MANAGER_ROLE = keccak256(abi.encode(LIST_MANAGER_ROLE, FREEZE_LIST));
/// @dev The role that can whitelist and unwhitelist accounts, scoped to a stablecoin.
bytes32 internal constant WHITELIST_MANAGER_ROLE = keccak256(abi.encode(LIST_MANAGER_ROLE, WHITELIST));
/// @dev The role that can claim a stablecoin's yield directly on the token, alongside the issuer gateway.
bytes32 internal constant CLAIMER_ROLE = keccak256("CLAIMER_ROLE");
/// @dev The role that can seize tokens from a stablecoin's frozen accounts.
bytes32 internal constant FORCED_TRANSFER_MANAGER_ROLE = keccak256("FORCED_TRANSFER_MANAGER_ROLE");
/// @dev The role that can grant and revoke a single stablecoin's scoped roles.
bytes32 internal constant STABLECOIN_ADMIN_ROLE = keccak256("STABLECOIN_ADMIN_ROLE");
/* ============ Internal View/Pure Functions ============ */
/// @dev Returns the identifier of a role scoped to one stablecoin.
/// @param stablecoin The stablecoin the role is scoped to.
/// @param role The unscoped role identifier.
/// @return The scoped role identifier.
function getStablecoinRole(address stablecoin, bytes32 role) internal pure returns (bytes32) {
return keccak256(abi.encode(stablecoin, role));
}
/// @dev Returns the identifier of the role that may write one flag.
/// @param flag The flag the role manages.
/// @return The flag manager role identifier.
function getFlagManagerRole(bytes32 flag) internal pure returns (bytes32) {
return keccak256(abi.encode(FLAG_MANAGER_ROLE, flag));
}
/// @dev Returns the identifier of the role that may write one list.
/// @param list The list the role manages.
/// @return The list manager role identifier.
function getListManagerRole(bytes32 list) internal pure returns (bytes32) {
return keccak256(abi.encode(LIST_MANAGER_ROLE, list));
}
/// @dev Returns the storage key for one of a stablecoin's values.
/// @param stablecoin The stablecoin the value belongs to, or the zero address for the panel-wide value.
/// @param key The value identifier.
/// @return The storage key.
function getValueKey(address stablecoin, bytes32 key) internal pure returns (bytes32) {
return keccak256(abi.encode(stablecoin, key));
}
/// @dev Returns the storage key for one account's entry in a stablecoin's list.
/// @param stablecoin The stablecoin the list belongs to, or the zero address for the panel-wide list.
/// @param list The list the entry belongs to.
/// @param account The account the entry applies to.
/// @return The storage key.
function getListKey(address stablecoin, bytes32 list, address account) internal pure returns (bytes32) {
return keccak256(abi.encode(stablecoin, list, account));
}
}
src/libs/ConfigViews.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.36;
import { IConfigRegistrar } from "../platform/config/interfaces/IConfigRegistrar.sol";
import { ConfigKeys } from "./ConfigKeys.sol";
/// @title The meaning of the registrar's compliance keys, read the same way by every consumer.
/// @author M0 Labs
library ConfigViews {
/* ============ Internal View/Pure Functions ============ */
/// @dev Returns whether the stablecoin is paused, registrar-wide or individually.
/// @param configRegistrar The registrar holding the compliance state.
/// @param stablecoin The stablecoin to check.
/// @return Whether the stablecoin is paused.
function isPaused(IConfigRegistrar configRegistrar, address stablecoin) internal view returns (bool) {
return
configRegistrar.isFlagSet(address(0), ConfigKeys.PAUSE_FLAG) ||
configRegistrar.isFlagSet(stablecoin, ConfigKeys.PAUSE_FLAG);
}
/// @dev Returns whether the account is frozen, registrar-wide or for the stablecoin.
/// @param configRegistrar The registrar holding the compliance state.
/// @param stablecoin The stablecoin the freeze applies to.
/// @param account The account to check.
/// @return Whether the account is frozen.
function isFrozen(
IConfigRegistrar configRegistrar,
address stablecoin,
address account
) internal view returns (bool) {
return
configRegistrar.isInList(address(0), ConfigKeys.FREEZE_LIST, account) ||
configRegistrar.isInList(stablecoin, ConfigKeys.FREEZE_LIST, account);
}
/// @dev Returns whether the account belongs to the stablecoin's whitelist.
/// Unlike pause and freeze, there is no registrar-wide tier to union with.
/// @param configRegistrar The registrar holding the compliance state.
/// @param stablecoin The stablecoin the whitelist belongs to.
/// @param account The account to check.
/// @return Whether the account is whitelisted.
function isWhitelisted(
IConfigRegistrar configRegistrar,
address stablecoin,
address account
) internal view returns (bool) {
return configRegistrar.isInList(stablecoin, ConfigKeys.WHITELIST, account);
}
}
src/platform/config/interfaces/IConfigPanel.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.36;
import { IErrors } from "../../../interfaces/IErrors.sol";
/// @title Named compliance actions over a config registrar's pause, freeze and whitelist keys.
/// @author M0 Labs
interface IConfigPanel is IErrors {
/* ============ Events ============ */
/// @notice Emitted when the global pause flag is set.
/// @param paused Whether every stablecoin backed by this panel is paused.
event GlobalPauseSet(bool paused);
/// @notice Emitted when a single stablecoin's pause flag is set.
/// @param stablecoin The stablecoin the flag applies to.
/// @param paused Whether the stablecoin is paused.
event StablecoinPauseSet(address indexed stablecoin, bool paused);
/// @notice Emitted when an account's panel-wide freeze flag is set.
/// @param account The account the flag applies to.
/// @param frozen Whether the account is frozen across every stablecoin backed by this panel.
event GlobalFreezeSet(address indexed account, bool frozen);
/// @notice Emitted when an account's freeze flag is set for a single stablecoin.
/// @param stablecoin The stablecoin the flag applies to.
/// @param account The account the flag applies to.
/// @param frozen Whether the account is frozen for that stablecoin.
event StablecoinFreezeSet(address indexed stablecoin, address indexed account, bool frozen);
/// @notice Emitted when an account's whitelist entry is set for a single stablecoin.
/// @param stablecoin The stablecoin the whitelist belongs to.
/// @param account The account the entry applies to.
/// @param whitelisted Whether the account is whitelisted for that stablecoin.
event StablecoinWhitelistSet(address indexed stablecoin, address indexed account, bool whitelisted);
/* ============ Custom Errors ============ */
/* ============ Interactive Functions ============ */
/// @notice Pauses every stablecoin backed by this panel.
/// @dev Restricted to `PAUSER_ROLE`.
function pause() external;
/// @notice Unpauses every stablecoin backed by this panel.
/// @dev Restricted to `PAUSER_ROLE`.
/// Per-stablecoin pause flags still apply.
function unpause() external;
/// @notice Pauses several stablecoins.
/// @dev Restricted to `PAUSER_ROLE`, held registrar-wide or scoped to each stablecoin.
/// Reverts if a caller holding only scoped grants lacks one for any stablecoin.
/// @param stablecoins The stablecoins to pause.
function pauseStablecoins(address[] calldata stablecoins) external;
/// @notice Unpauses several stablecoins.
/// @dev Restricted to `PAUSER_ROLE`, held registrar-wide or scoped to each stablecoin.
/// Reverts if a caller holding only scoped grants lacks one for any stablecoin.
/// The global pause flag still applies.
/// @param stablecoins The stablecoins to unpause.
function unpauseStablecoins(address[] calldata stablecoins) external;
/// @notice Pauses a single stablecoin.
/// @dev Restricted to `PAUSER_ROLE`, held registrar-wide or scoped to `stablecoin`.
/// @param stablecoin The stablecoin to pause.
function pause(address stablecoin) external;
/// @notice Unpauses a single stablecoin.
/// @dev Restricted to `PAUSER_ROLE`, held registrar-wide or scoped to `stablecoin`.
/// The global pause flag still applies.
/// @param stablecoin The stablecoin to unpause.
function unpause(address stablecoin) external;
/// @notice Freezes an account across every stablecoin backed by this panel.
/// @dev Restricted to `FREEZE_MANAGER_ROLE`.
/// @param account The account to freeze.
function freeze(address account) external;
/// @notice Freezes several accounts across every stablecoin backed by this panel.
/// @dev Restricted to `FREEZE_MANAGER_ROLE`.
/// Reverts if any account is the zero address.
/// @param accounts The accounts to freeze.
function freezeAccounts(address[] calldata accounts) external;
/// @notice Unfreezes an account across every stablecoin backed by this panel.
/// @dev Restricted to `FREEZE_MANAGER_ROLE`.
/// Per-stablecoin freeze flags still apply.
/// @param account The account to unfreeze.
function unfreeze(address account) external;
/// @notice Unfreezes several accounts across every stablecoin backed by this panel.
/// @dev Restricted to `FREEZE_MANAGER_ROLE`.
/// Per-stablecoin freeze flags still apply.
/// @param accounts The accounts to unfreeze.
function unfreezeAccounts(address[] calldata accounts) external;
/// @notice Freezes an account for a single stablecoin.
/// @dev Restricted to `FREEZE_MANAGER_ROLE`, held registrar-wide or scoped to `stablecoin`.
/// @param stablecoin The stablecoin the freeze applies to.
/// @param account The account to freeze.
function freeze(address stablecoin, address account) external;
/// @notice Freezes several accounts for a single stablecoin.
/// @dev Restricted to `FREEZE_MANAGER_ROLE`, held registrar-wide or scoped to `stablecoin`.
/// @param stablecoin The stablecoin the freeze applies to.
/// @param accounts The accounts to freeze.
function freezeAccounts(address stablecoin, address[] calldata accounts) external;
/// @notice Unfreezes an account for a single stablecoin.
/// @dev Restricted to `FREEZE_MANAGER_ROLE`, held registrar-wide or scoped to `stablecoin`.
/// The global freeze flag still applies.
/// @param stablecoin The stablecoin the freeze applies to.
/// @param account The account to unfreeze.
function unfreeze(address stablecoin, address account) external;
/// @notice Unfreezes several accounts for a single stablecoin.
/// @dev Restricted to `FREEZE_MANAGER_ROLE`, held registrar-wide or scoped to `stablecoin`.
/// The global freeze flag still applies.
/// @param stablecoin The stablecoin the freeze applies to.
/// @param accounts The accounts to unfreeze.
function unfreezeAccounts(address stablecoin, address[] calldata accounts) external;
/// @notice Whitelists an account for a single stablecoin.
/// @dev Restricted to `WHITELIST_MANAGER_ROLE` scoped to `stablecoin`.
/// @param stablecoin The stablecoin the whitelist belongs to.
/// @param account The account to whitelist.
function whitelist(address stablecoin, address account) external;
/// @notice Whitelists several accounts for a single stablecoin.
/// @dev Restricted to `WHITELIST_MANAGER_ROLE` scoped to `stablecoin`.
/// @param stablecoin The stablecoin the whitelist belongs to.
/// @param accounts The accounts to whitelist.
function whitelistAccounts(address stablecoin, address[] calldata accounts) external;
/// @notice Unwhitelists an account for a single stablecoin.
/// @dev Restricted to `WHITELIST_MANAGER_ROLE` scoped to `stablecoin`.
/// @param stablecoin The stablecoin the whitelist belongs to.
/// @param account The account to unwhitelist.
function unwhitelist(address stablecoin, address account) external;
/// @notice Unwhitelists several accounts for a single stablecoin.
/// @dev Restricted to `WHITELIST_MANAGER_ROLE` scoped to `stablecoin`.
/// @param stablecoin The stablecoin the whitelist belongs to.
/// @param accounts The accounts to unwhitelist.
function unwhitelistAccounts(address stablecoin, address[] calldata accounts) external;
/* ============ View/Pure Functions ============ */
/// @notice The registrar this panel reads its grants from and writes its state to.
function configRegistrar() external view returns (address);
/// @notice Returns whether the stablecoin is paused, registrar-wide or individually.
/// @param stablecoin The stablecoin to query.
/// @return Whether the stablecoin is paused, as its policy reads it.
function isPaused(address stablecoin) external view returns (bool);
/// @notice Returns whether the account is frozen, registrar-wide or for the stablecoin.
/// @param stablecoin The stablecoin the freeze would apply to.
/// @param account The account to query.
/// @return Whether the account is frozen.
function isFrozen(address stablecoin, address account) external view returns (bool);
/// @notice Returns whether the account belongs to the stablecoin's whitelist.
/// @dev Unlike pause and freeze, there is no registrar-wide tier to union with.
/// @param stablecoin The stablecoin the whitelist belongs to.
/// @param account The account to query.
/// @return Whether the account is whitelisted.
function isWhitelisted(address stablecoin, address account) external view returns (bool);
/// @notice The role that can pause and unpause stablecoins, globally or scoped to a stablecoin.
/// @dev Held plain it authorizes both tiers; held scoped, only that stablecoin.
function PAUSER_ROLE() external pure returns (bytes32);
/// @notice The role that can freeze and unfreeze accounts, globally or scoped to a stablecoin.
/// @dev Held plain it authorizes both tiers; held scoped, only that stablecoin.
function FREEZE_MANAGER_ROLE() external pure returns (bytes32);
/// @notice The role, scoped to a stablecoin, that can whitelist and unwhitelist accounts.
/// @dev Held plain it authorizes nothing here, unlike the pause and freeze roles.
function WHITELIST_MANAGER_ROLE() external pure returns (bytes32);
}
src/platform/config/interfaces/IConfigRegistrar.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.36;
// solhint-disable-next-line max-line-length
import { IAccessControlDefaultAdminRules } from "../../../../lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/access/extensions/IAccessControlDefaultAdminRules.sol";
import { IErrors } from "../../../interfaces/IErrors.sol";
/// @title The store of an issuer's compliance state and of every role that writes it.
/// @author M0 Labs
interface IConfigRegistrar is IAccessControlDefaultAdminRules, IErrors {
/* ============ Events ============ */
/// @notice Emitted when a registrar-wide flag is set.
/// @param flag The flag that was set.
/// @param set Whether the flag is now set.
event GlobalFlagSet(bytes32 indexed flag, bool set);
/// @notice Emitted when one stablecoin's flag is set.
/// @param stablecoin The stablecoin the flag applies to.
/// @param flag The flag that was set.
/// @param set Whether the flag is now set.
event StablecoinFlagSet(address indexed stablecoin, bytes32 indexed flag, bool set);
/// @notice Emitted when an account's membership of a registrar-wide list is set.
/// @param list The list the entry belongs to.
/// @param account The account the entry applies to.
/// @param included Whether the account belongs to the list.
event GlobalListEntrySet(bytes32 indexed list, address indexed account, bool included);
/// @notice Emitted when an account's membership of one stablecoin's list is set.
/// @param stablecoin The stablecoin the list belongs to.
/// @param list The list the entry belongs to.
/// @param account The account the entry applies to.
/// @param included Whether the account belongs to the list.
event StablecoinListEntrySet(
address indexed stablecoin,
bytes32 indexed list,
address indexed account,
bool included
);
/// @notice Emitted when a stablecoin-scoped role is granted, naming its parts.
/// @dev Emitted only by `grantStablecoinRole`, never by a raw `grantRole` of a scoped id.
/// @param stablecoin The stablecoin the role is scoped to.
/// @param role The unscoped role identifier.
/// @param account The account the role was granted to.
event StablecoinRoleGranted(address indexed stablecoin, bytes32 indexed role, address indexed account);
/// @notice Emitted when a stablecoin-scoped role is revoked, naming its parts.
/// @dev Emitted only by `revokeStablecoinRole`, never by a raw `revokeRole` of a scoped id.
/// @param stablecoin The stablecoin the role is scoped to.
/// @param role The unscoped role identifier.
/// @param account The account the role was revoked from.
event StablecoinRoleRevoked(address indexed stablecoin, bytes32 indexed role, address indexed account);
/* ============ Custom Errors ============ */
/// @notice Thrown when the panel handed to `initialize` reads a different registrar.
/// @param configPanel The panel that named another registrar.
error InvalidConfigPanel(address configPanel);
/// @notice Thrown when the flag identifier is the zero value.
error ZeroFlag();
/// @notice Thrown when the list identifier is the zero value.
error ZeroList();
/// @notice Thrown when the role identifier is the zero value.
error ZeroRole();
/* ============ Interactive Functions ============ */
/// @notice Sets a registrar-wide flag.
/// @dev Restricted to `getFlagManagerRole(flag)`, held registrar-wide.
/// @param flag The flag to set.
/// @param set Whether the flag applies.
/// @return Whether the stored value changed.
function setGlobalFlag(bytes32 flag, bool set) external returns (bool);
/// @notice Sets one stablecoin's flag.
/// @dev Restricted to `getFlagManagerRole(flag)`, held registrar-wide or scoped to `stablecoin`.
/// @param stablecoin The stablecoin the flag applies to.
/// @param flag The flag to set.
/// @param set Whether the flag applies.
/// @return Whether the stored value changed.
function setStablecoinFlag(address stablecoin, bytes32 flag, bool set) external returns (bool);
/// @notice Sets an account's membership of a registrar-wide list.
/// @dev Restricted to `getListManagerRole(list)`, held registrar-wide.
/// @param list The list the entry belongs to.
/// @param account The account the entry applies to.
/// @param included Whether the account belongs to the list.
/// @return Whether the stored value changed.
function setGlobalListEntry(bytes32 list, address account, bool included) external returns (bool);
/// @notice Sets an account's membership of one stablecoin's list.
/// @dev Restricted to `getListManagerRole(list)`, held registrar-wide or scoped to `stablecoin`.
/// @param stablecoin The stablecoin the list belongs to.
/// @param list The list the entry belongs to.
/// @param account The account the entry applies to.
/// @param included Whether the account belongs to the list.
/// @return Whether the stored value changed.
function setStablecoinListEntry(
address stablecoin,
bytes32 list,
address account,
bool included
) external returns (bool);
/// @notice Grants a stablecoin-scoped role to an account.
/// @dev Restricted to `DEFAULT_ADMIN_ROLE`, or to `STABLECOIN_ADMIN_ROLE` scoped to `stablecoin` except for
/// that role itself.
/// @param stablecoin The stablecoin the role is scoped to.
/// @param role The unscoped role identifier.
/// @param account The account to grant the role to.
function grantStablecoinRole(address stablecoin, bytes32 role, address account) external;
/// @notice Revokes a stablecoin-scoped role from an account.
/// @dev Restricted to `DEFAULT_ADMIN_ROLE`, or to `STABLECOIN_ADMIN_ROLE` scoped to `stablecoin` except for
/// that role itself.
/// @param stablecoin The stablecoin the role is scoped to.
/// @param role The unscoped role identifier.
/// @param account The account to revoke the role from.
function revokeStablecoinRole(address stablecoin, bytes32 role, address account) external;
/* ============ View/Pure Functions ============ */
/// @notice The value hashed with a flag identifier to produce that flag's manager role.
/// @dev A preimage, not a role: granting it confers nothing; grant `getFlagManagerRole(flag)`.
function FLAG_MANAGER_ROLE() external pure returns (bytes32);
/// @notice The value hashed with a list identifier to produce that list's manager role.
/// @dev A preimage, not a role: granting it confers nothing; grant `getListManagerRole(list)`.
function LIST_MANAGER_ROLE() external pure returns (bytes32);
/// @notice The role that can grant and revoke a single stablecoin's scoped roles.
/// @dev Granted only by `DEFAULT_ADMIN_ROLE`, scoped; a holder can self-grant its stablecoin's other roles.
function STABLECOIN_ADMIN_ROLE() external pure returns (bytes32);
/// @notice Returns the scoped role identifier for a stablecoin-scoped role.
/// @param stablecoin The stablecoin the role is scoped to.
/// @param role The unscoped role identifier.
/// @return The scoped role identifier, as carried by `RoleGranted` and `RoleRevoked`.
function getStablecoinRole(address stablecoin, bytes32 role) external pure returns (bytes32);
/// @notice Returns the identifier of the role that may write one flag.
/// @dev Held plain it writes both tiers; held via `getStablecoinRole`, one stablecoin only.
/// @param flag The flag the role manages.
/// @return The flag manager role identifier.
function getFlagManagerRole(bytes32 flag) external pure returns (bytes32);
/// @notice Returns the identifier of the role that may write one list.
/// @dev Held plain it writes both tiers; held via `getStablecoinRole`, one stablecoin only.
/// @param list The list the role manages.
/// @return The list manager role identifier.
function getListManagerRole(bytes32 list) external pure returns (bytes32);
/// @notice Returns whether an account holds a stablecoin-scoped role.
/// @param stablecoin The stablecoin the role is scoped to.
/// @param role The unscoped role identifier.
/// @param account The account to query.
/// @return Whether the account holds the scoped role.
function hasStablecoinRole(address stablecoin, bytes32 role, address account) external view returns (bool);
/// @notice Returns whether a flag is set for exactly one tier.
/// @dev Reads that tier alone, never the union of registrar-wide and scoped.
/// @param stablecoin The stablecoin to query, or the zero address for the registrar-wide flag.
/// @param flag The flag to query.
/// @return Whether the flag is set.
function isFlagSet(address stablecoin, bytes32 flag) external view returns (bool);
/// @notice Returns whether an account belongs to one tier's list.
/// @dev Reads that tier alone, never the union of registrar-wide and scoped.
/// @param stablecoin The stablecoin the list belongs to, or the zero address for the global list.
/// @param list The list to query.
/// @param account The account to query.
/// @return Whether the account belongs to the list.
function isInList(address stablecoin, bytes32 list, address account) external view returns (bool);
}
Compiler settingsShow
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"viaSSACFG": false,
"evmVersion": "cancun",
"remappings": [
"lib/common/lib/openzeppelin-contracts-upgradeable/:@openzeppelin/contracts/=lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
"lib/openzeppelin-foundry-upgrades/:@openzeppelin/contracts/=lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
"lib/common/:lib/common/lib/forge-std/=lib/forge-std/",
"lib/common/lib/safe-utils/:forge-std/=lib/forge-std/src/",
"lib/common/lib/safe-utils/:safe-smart-account/=lib/common/lib/safe-utils/lib/safe-smart-account/contracts/",
"lib/common/lib/safe-utils/:solidity-http/=lib/common/lib/safe-utils/lib/solidity-http/src/",
"lib/common/lib/safe-utils/lib/solidity-http/lib/solidity-stringutils/:ds-test/=lib/common/lib/safe-utils/lib/solidity-http/lib/solidity-stringutils/lib/ds-test/src/",
"lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:erc4626-tests/=lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/erc4626-tests/",
"lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:forge-std/=lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/src/",
"lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"lib/common/lib/safe-utils/lib/solidity-http/:solidity-stringutils/=lib/common/lib/safe-utils/lib/solidity-http/lib/solidity-stringutils/",
"lib/common/lib/safe-utils/lib/solidity-stringutils/:ds-test/=lib/common/lib/safe-utils/lib/solidity-stringutils/lib/ds-test/src/",
"lib/common/lib/openzeppelin-contracts-upgradeable/:erc4626-tests/=lib/common/lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"lib/common/lib/openzeppelin-contracts-upgradeable/:forge-std/=lib/common/lib/openzeppelin-contracts-upgradeable/lib/forge-std/src/",
"lib/common/lib/openzeppelin-contracts-upgradeable/:halmos-cheatcodes/=lib/common/lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
"lib/common/lib/openzeppelin-contracts-upgradeable/:openzeppelin-contracts/=lib/common/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/",
"lib/common/lib/openzeppelin-contracts/:erc4626-tests/=lib/common/lib/openzeppelin-contracts/lib/erc4626-tests/",
"lib/common/lib/openzeppelin-contracts/:forge-std/=lib/common/lib/openzeppelin-contracts/lib/forge-std/src/",
"lib/common/lib/openzeppelin-contracts/:halmos-cheatcodes/=lib/common/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"lib/common/lib/safe-utils/:solidity-stringutils/=lib/common/lib/safe-utils/lib/solidity-stringutils/src/",
"lib/common/:safe-smart-account/=lib/common/lib/safe-utils/lib/safe-smart-account/contracts/",
"lib/common/:forge-std/=lib/common/lib/forge-std/src/",
"lib/common/:openzeppelin-contracts/=lib/common/lib/openzeppelin-contracts/",
"lib/openzeppelin-foundry-upgrades/:forge-std/=lib/openzeppelin-foundry-upgrades/lib/forge-std/src/",
"@openzeppelin/contracts-upgradeable/=lib/common/lib/openzeppelin-contracts-upgradeable/contracts/",
"@openzeppelin/contracts/=lib/common/lib/openzeppelin-contracts/contracts/",
"common/=lib/common/",
"ds-test/=lib/common/lib/safe-utils/lib/solidity-stringutils/lib/ds-test/src/",
"erc4626-tests/=lib/common/lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"halmos-cheatcodes/=lib/common/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"openzeppelin-contracts-upgradeable/=lib/common/lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts/=lib/common/lib/openzeppelin-contracts/",
"openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/",
"safe-smart-account/=lib/common/lib/safe-utils/lib/safe-smart-account/",
"safe-utils/=lib/common/lib/safe-utils/src/",
"solidity-http/=lib/common/lib/safe-utils/lib/solidity-http/src/",
"solidity-stringutils/=lib/common/lib/safe-utils/lib/solidity-stringutils/"
],
"experimental": false
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.