Description:
Decentralized Finance (DeFi) protocol contract providing Factory, Oracle functionality.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
{{
"language": "Solidity",
"sources": {
"src/AccessRegistry.sol": {
"content": "// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.26;
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import {IAccessRegistry} from "./interfaces/IAccessRegistry.sol";
import {Errors} from "./libraries/Errors.sol";
/// @title Access Registry
/// @author luoyhang003
/// @notice Manages whitelist and blacklist for protocol access control.
/// @dev Uses OpenZeppelin AccessControl for role-based permissions.
contract AccessRegistry is IAccessRegistry, AccessControl {
/*//////////////////////////////////////////////////////////////////////////
STATE VARIABLES
//////////////////////////////////////////////////////////////////////////*/
/// @notice Role identifier for admin accounts.
/// @dev Calculated as keccak256("ADMIN_ROLE").
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
/// @notice Role identifier for operator accounts.
/// @dev Calculated as keccak256("OPERATOR_ROLE").
bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE");
/// @notice Whitelist mapping to track approved users.
/// @dev Address => true if whitelisted, false otherwise.
mapping(address => bool) private _whitelist;
/// @notice Blacklist mapping to track blocked users.
/// @dev Address => true if blacklisted, false otherwise.
mapping(address => bool) private _blacklist;
/// @notice Whether the whitelist mode is enabled.
/// @dev True if whitelist mode is enabled, false otherwise.
bool public isWhitelistEnabled = true;
/*//////////////////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////////////////*/
/// @notice Deploys the contract and assigns initial admin and operator roles.
/// @param _defaultAdmin Address to receive the DEFAULT_ADMIN_ROLE.
/// @param _admin Address to receive the ADMIN_ROLE.
/// @param _operator Address to receive the OPERATOR_ROLE.
constructor(address _defaultAdmin, address _admin, address _operator) {
if (_admin == address(0) || _operator == address(0))
revert Errors.ZeroAddress();
_grantRole(DEFAULT_ADMIN_ROLE, _defaultAdmin);
_grantRole(ADMIN_ROLE, _admin);
_grantRole(OPERATOR_ROLE, _operator);
}
/*//////////////////////////////////////////////////////////////////////////
VIEW FUNCTIONS
//////////////////////////////////////////////////////////////////////////*/
/// @notice Checks whether a given address is whitelisted
/// @param _account The address to check
/// @return True if the address is whitelisted, false otherwise
function isWhitelisted(address _account) external view returns (bool) {
return !isWhitelistEnabled || _whitelist[_account];
}
/// @notice Checks whether a given address is blacklisted
/// @param _account The address to check
/// @return True if the address is blacklisted, false otherwise
function isBlacklisted(address _account) external view returns (bool) {
return _blacklist[_account];
}
/*//////////////////////////////////////////////////////////////////////////
WHITELIST LOGIC
//////////////////////////////////////////////////////////////////////////*/
/// @notice Add multiple users to the whitelist.
/// @dev Only callable by accounts with OPERATOR_ROLE.
/// @param _users Array of addresses to be whitelisted.
function addWhitelist(
address[] memory _users
) external onlyRole(OPERATOR_ROLE) {
uint256 length = _users.length;
if (length == 0) revert Errors.InvalidArrayLength();
uint256 i;
for (i; i < length; i++) {
address _user = _users[i];
if (_blacklist[_user]) revert Errors.AlreadyBlacklisted();
_whitelist[_user] = true;
}
emit WhitelistAdded(_users);
}
/// @notice Remove multiple users from the whitelist.
/// @dev Only callable by accounts with OPERATOR_ROLE.
/// @param _users Array of addresses to be removed from whitelist.
function removeWhitelist(
address[] memory _users
) external onlyRole(OPERATOR_ROLE) {
uint256 length = _users.length;
if (length == 0) revert Errors.InvalidArrayLength();
uint256 i;
for (i; i < length; i++) {
address _user = _users[i];
delete _whitelist[_user];
}
emit WhitelistRemoved(_users);
}
/*//////////////////////////////////////////////////////////////////////////
BLACKLIST LOGIC
//////////////////////////////////////////////////////////////////////////*/
/// @notice Add multiple users to the blacklist.
/// @dev Only callable by accounts with OPERATOR_ROLE.
/// @param _users Array of addresses to be blacklisted.
function addBlacklist(
address[] memory _users
) external onlyRole(OPERATOR_ROLE) {
uint256 length = _users.length;
if (length == 0) revert Errors.InvalidArrayLength();
uint256 i;
for (i; i < length; i++) {
address _user = _users[i];
if (_user == address(0)) revert Errors.ZeroAddress();
if (_whitelist[_user]) revert Errors.AlreadyWhitelisted();
_blacklist[_user] = true;
}
emit BlacklistAdded(_users);
}
/// @notice Remove multiple users from the blacklist.
/// @dev Only callable by accounts with OPERATOR_ROLE.
/// @param _users Array of addresses to be removed from blacklist.
function removeBlacklist(
address[] memory _users
) external onlyRole(OPERATOR_ROLE) {
uint256 length = _users.length;
if (length == 0) revert Errors.InvalidArrayLength();
uint256 i;
for (i; i < length; i++) {
address _user = _users[i];
delete _blacklist[_user];
}
emit BlacklistRemoved(_users);
}
/*//////////////////////////////////////////////////////////////////////////
ADMIN FUNCTIONS
//////////////////////////////////////////////////////////////////////////*/
/// @notice Enables or disables the whitelist feature.
/// @dev Only callable by accounts with the ADMIN_ROLE.
/// @param _enabled Boolean flag - true to enable the whitelist, false to disable it.
function setWhitelistEnabled(bool _enabled) external onlyRole(ADMIN_ROLE) {
if (isWhitelistEnabled == _enabled) revert Errors.AlreadyInSameState();
isWhitelistEnabled = _enabled;
emit WhitelistToggled(_enabled);
}
}
"
},
"lib/openzeppelin-contracts/contracts/access/AccessControl.sol": {
"content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (access/AccessControl.sol)
pragma solidity ^0.8.20;
import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {IERC165, ERC165} from "../utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```solidity
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```solidity
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
* to enforce additional security measures for this role.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address account => bool) hasRole;
bytes32 adminRole;
}
mapping(bytes32 role => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with an {AccessControlUnauthorizedAccount} error including the required role.
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
/// @inheritdoc IERC165
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual returns (bool) {
return _roles[role].hasRole[account];
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
* is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
* is missing `role`.
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert AccessControlUnauthorizedAccount(account, role);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @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.
*
* May emit a {RoleGranted} event.
*/
function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleRevoked} event.
*/
function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @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 revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `callerConfirmation`.
*
* May emit a {RoleRevoked} event.
*/
function renounceRole(bytes32 role, address callerConfirmation) public virtual {
if (callerConfirmation != _msgSender()) {
revert AccessControlBadConfirmation();
}
_revokeRole(role, callerConfirmation);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
*
* Internal function without access restriction.
*
* May emit a {RoleGranted} event.
*/
function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
if (!hasRole(role, account)) {
_roles[role].hasRole[account] = true;
emit RoleGranted(role, account, _msgSender());
return true;
} else {
return false;
}
}
/**
* @dev Attempts to revoke `role` from `account` and returns a boolean indicating if `role` was revoked.
*
* Internal function without access restriction.
*
* May emit a {RoleRevoked} event.
*/
function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
if (hasRole(role, account)) {
_roles[role].hasRole[account] = false;
emit RoleRevoked(role, account, _msgSender());
return true;
} else {
return false;
}
}
}
"
},
"src/interfaces/IAccessRegistry.sol": {
"content": "// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.26;
/// @title IAccessRegistry
/// @author luoyhang003
/// @notice Interface for managing access control via whitelist and blacklist
/// @dev Provides events and view functions to track and query account permissions
interface IAccessRegistry {
/*//////////////////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////////////////*/
/// @notice Emitted when an array of users is added to the whitelist.
/// @param users An array of addresses added to the whitelist.
event WhitelistAdded(address[] users);
/// @notice Emitted when an array of users is added to the blacklist.
/// @param users An array of addresses added to the blacklist.
event BlacklistAdded(address[] users);
/// @notice Emitted when an array of users is removed from the whitelist.
/// @param users An array of addresses removed from the whitelist.
event WhitelistRemoved(address[] users);
/// @notice Emitted when an array of users is removed from the blacklist.
/// @param users An array of addresses removed from the blacklist.
event BlacklistRemoved(address[] users);
/// @notice Emitted when whitelist state changes
/// @param enabled The new whitelist state - true if enabled, false if disabled.
event WhitelistToggled(bool enabled);
/*//////////////////////////////////////////////////////////////////////////
VIEW FUNCTIONS
//////////////////////////////////////////////////////////////////////////*/
/// @notice Checks whether a given address is whitelisted
/// @param _account The address to check
/// @return True if the address is whitelisted, false otherwise
function isWhitelisted(address _account) external view returns (bool);
/// @notice Checks whether a given address is blacklisted
/// @param _account The address to check
/// @return True if the address is blacklisted, false otherwise
function isBlacklisted(address _account) external view returns (bool);
}
"
},
"src/libraries/Errors.sol": {
"content": "// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.26;
/// @title Errors Library
/// @author luoyhang003
/// @notice Centralized custom errors for all contracts in the protocol.
/// @dev Each error saves gas compared to revert strings. The @dev comment
/// also includes the corresponding 4-byte selector for debugging
/// and off-chain tooling.
library Errors {
/*//////////////////////////////////////////////////////////////////////////
GENERAL
//////////////////////////////////////////////////////////////////////////*/
/// @notice Thrown when array lengths do not match or are zero.
/// @dev Selector: 0x9d89020a
error InvalidArrayLength();
/// @notice Thrown when a provided address is zero.
/// @dev Selector: 0xd92e233d
error ZeroAddress();
/// @notice Thrown when a provided amount is zero.
/// @dev Selector: 0x1f2a2005
error ZeroAmount();
/// @notice Thrown when an index is out of bounds.
/// @dev Selector: 0x4e23d035
error IndexOutOfBounds();
/// @notice Thrown when a user is not whitelisted but tries to interact.
/// @dev Selector: 0x2ba75b25
error UserNotWhitelisted();
/// @notice Thrown when a token has invalid decimals (e.g., >18).
/// @dev Selector: 0xd25598a0
error InvalidDecimals();
/// @notice Thrown when an asset is not supported.
/// @dev Selector: 0x24a01144
error UnsupportedAsset();
/// @notice Thrown when trying to add an already added asset.
/// @dev Selector: 0x5ed26801
error AssetAlreadyAdded();
/// @notice Thrown when trying to remove an asset that was already removed.
/// @dev Selector: 0x422afd8f
error AssetAlreadyRemoved();
/// @notice Thrown when a common token address conflict with the vault token address.
/// @dev Selector: 0x8a7ea521
error ConflictiveToken();
/// @notice Thrown when an array is reach to the length limit.
/// @dev Selector: 0x951becfa
error ExceedArrayLengthLimit();
/*//////////////////////////////////////////////////////////////////////////
Token.sol
//////////////////////////////////////////////////////////////////////////*/
/// @notice Thrown when transfer is attempted by/for a blacklisted address.
/// @dev Selector: 0x6554e8c5
error TransferBlacklisted();
/*//////////////////////////////////////////////////////////////////////////
DepositVault.sol
//////////////////////////////////////////////////////////////////////////*/
/// @notice Thrown when deposits are paused.
/// @dev Selector: 0x35edea30
error DepositPaused();
/// @notice Thrown when a deposit exceeds per-token deposit cap.
/// @dev Selector: 0xcc60dc5b
error ExceedTokenDepositCap();
/// @notice Thrown when a deposit exceeds global deposit cap.
/// @dev Selector: 0x5054f250
error ExceedTotalDepositCap();
/// @notice Thrown when minting results in zero shares.
/// @dev Selector: 0x1d31001e
error MintZeroShare();
/// @notice Thrown when attempting to deposit zero assets.
/// @dev Selector: 0xd69b89cc
error DepositZeroAsset();
/// @notice Thrown when the oracle for an asset is invalid or missing.
/// @dev Selector: 0x9589a27d
error InvalidOracle();
/*//////////////////////////////////////////////////////////////////////////
WithdrawController.sol
//////////////////////////////////////////////////////////////////////////*/
/// @notice Thrown when withdrawals are paused.
/// @dev Selector: 0xe0a39803
error WithdrawPaused();
/// @notice Thrown when attempting to request withdrawal of zero shares.
/// @dev Selector: 0xef9c351b
error RequestZeroShare();
/// @notice Thrown when a withdrawal receipt has invalid status for the operation.
/// @dev Selector: 0x3bb3ba88
error InvalidReceiptStatus();
/// @notice Thrown when a caller is not the original withdrawal requester.
/// @dev Selector: 0xe39da59e
error NotRequester();
/// @notice Thrown when a caller is blacklisted.
/// @dev Selector: 0x473250af
error UserBlacklisted();
/*//////////////////////////////////////////////////////////////////////////
AssetsRouter.sol
//////////////////////////////////////////////////////////////////////////*/
/// @notice Thrown when a recipient is already added.
/// @dev Selector: 0xce2c4eb3
error RecipientAlreadyAdded();
/// @notice Thrown when a recipient is already removed.
/// @dev Selector: 0x1c7dcc84
error RecipientAlreadyRemoved();
/// @notice Thrown when attempting to set auto-route to its current state.
/// @dev Selector: 0xdf2e473d
error InvalidRouteEnabledStatus();
/// @notice Thrown when a non-registered recipient is used.
/// @dev Selector: 0xf29851db
error NotRouterRecipient();
/// @notice Thrown when attempting to remove the currently active recipient.
/// @dev Selector: 0xa453bd1b
error RemoveActiveRouter();
/// @notice Thrown when attempting to manual route the asstes when auto route is enabled.
/// @dev Selector: 0x92d56bf7
error AutoRouteEnabled();
/// @notice Thrown when setting the same router address.
/// @dev Selector: 0x23b920b6
error SameRouterAddress();
/*//////////////////////////////////////////////////////////////////////////
AccessRegistry.sol
//////////////////////////////////////////////////////////////////////////*/
/// @notice Thrown when trying to blacklist an already blacklisted user.
/// @dev Selector: 0xf53de75f
error AlreadyBlacklisted();
/// @notice Thrown when trying to whitelist an already whitelisted user.
/// @dev Selector: 0xb73e95e1
error AlreadyWhitelisted();
/// @notice Reverts when the requested state matches the current state.
/// @dev Selector: 0x3fbc93f3
error AlreadyInSameState();
/*//////////////////////////////////////////////////////////////////////////
OracleRegister.sol
//////////////////////////////////////////////////////////////////////////*/
/// @notice Thrown when an oracle is already registered for an asset.
/// @dev Selector: 0x652a449e
error OracleAlreadyAdded();
/// @notice Thrown when an oracle does not exist for an asset.
/// @dev Selector: 0x4dca4f7d
error OracleNotExist();
/// @notice Thrown when price deviation exceeds maximum allowed.
/// @dev Selector: 0x8774ad87
error ExceedMaxDeviation();
/// @notice Thrown when price updates are attempted too frequently.
/// @dev Selector: 0x8f46908a
error PriceUpdateTooFrequent();
/// @notice Thrown when a price validity period has expired.
/// @dev Selector: 0x7c9d063a
error PriceValidityExpired();
/// @notice Thrown when a price is zero.
/// @dev Selector: 0x10256287
error InvalidZeroPrice();
/*//////////////////////////////////////////////////////////////////////////
ParamRegister.sol
//////////////////////////////////////////////////////////////////////////*/
/// @notice Thrown when tolerance basis points exceed maximum deviation.
/// @dev Selector: 0xb8d855e2
error ExceedMaxDeviationBps();
/// @notice Thrown when price update interval is invalid.
/// @dev Selector: 0xfff67f52
error InvalidPriceUpdateInterval();
/// @notice Thrown when price validity duration exceeds allowed maximum.
/// @dev Selector: 0x6eca7e24
error PriceMaxValidityExceeded();
/// @notice Thrown when mint fee rate exceeds maximum allowed.
/// @dev Selector: 0x8f59faf8
error ExceedMaxMintFeeRate();
/// @notice Thrown when redeem fee rate exceeds maximum allowed.
/// @dev Selector: 0x86871089
error ExceedMaxRedeemFeeRate();
/*//////////////////////////////////////////////////////////////////////////
ChainlinkOracleFeed.sol
//////////////////////////////////////////////////////////////////////////*/
/// @notice Thrown when a reported price is invalid.
/// @dev Selector: 0x00bfc921
error InvalidPrice();
/// @notice Thrown when a reported price is stale.
/// @dev Selector: 0x19abf40e
error StalePrice();
/// @notice Thrown when a Chainlink round is incomplete.
/// @dev Selector: 0x8ad52bdd
error IncompleteRound();
}
"
},
"lib/openzeppelin-contracts/contracts/access/IAccessControl.sol": {
"content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (access/IAccessControl.sol)
pragma solidity >=0.8.4;
/**
* @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/openzeppelin-contracts/contracts/utils/Context.sol": {
"content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
"
},
"lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol": {
"content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/ERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*/
abstract contract ERC165 is IERC165 {
/// @inheritdoc IERC165
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
"
},
"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol": {
"content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)
pragma solidity >=0.4.16;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
"
}
},
"settings": {
"remappings": [
"@uniswap/v3-periphery/contracts/=lib/v3-periphery/contracts/",
"@chainlink/contracts/src/v0.8/=lib/chainlink-evm/contracts/src/v0.8/shared/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"chainlink-evm/=lib/chainlink-evm/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"v3-periphery/=lib/v3-periphery/contracts/"
],
"optimizer": {
"enabled": false,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "cancun",
"viaIR": false
}
}}
Submitted on: 2025-10-23 16:36:33
Comments
Log in to comment.
No comments yet.