Skip to content

← Back to contracts

Morpho Vaults V2

Code

v2.0 repository

Introduction to principles

Caps structure

struct Caps {
    uint256 allocation;
    uint128 absoluteCap;
    uint128 relativeCap;
}
NameTypeDescription
allocationuint256The current amount of assets allocated to this id.
absoluteCapuint128The maximum amount of assets that can be allocated to this id.
relativeCapuint128The maximum percentage of total assets that can be allocated to this id, scaled by 1e18.

id, idData, and data

Allocation targets are identified by id = keccak256(abi.encode(marketId)). When allocating or setting caps, you pass the raw data (e.g., abi.encode(marketId)). When querying allocations or caps, you must compute and pass the id hash. The vault does not provide a helper function to compute id - you must calculate it off-chain or in your contract.

Throughout the vault contract, you'll encounter three related concepts for identifying allocation targets:

data / idData

  • Raw bytes: Protocol-specific data that identifies where funds are allocated
  • For Morpho adapters: This is typically the bytes32 market ID encoded as bytes
  • Example: abi.encode(marketId) where marketId is the Morpho market identifier

id

  • Computed hash: id = keccak256(idData)
  • Purpose: Used as the unique key in the vault's storage mappings to track allocations and caps
  • Type: bytes32

Function usage patterns

  • Setting caps: Functions like increaseAbsoluteCap take idData (raw bytes) as input
  • Allocating: Functions like allocate take data (raw bytes) as input
  • Querying: Functions like allocation, absoluteCap, relativeCap take id (keccak256 hash) as input

This design allows the vault to work with any adapter and allocation target, as long as they can be identified by bytes-encoded data.

Function Selectors

A function selector is a bytes4 value that uniquely identifies a function in a smart contract. It's the first 4 bytes of the keccak256 hash of the function's signature.

What are they used for in the vault? Selectors are used for timelock management. The curator can configure different timelock durations for different functions, or permanently abdicate the ability to call specific functions. Functions like timelock(bytes4 selector), abdicated(bytes4 selector), increaseTimelock(bytes4 selector, ...), and decreaseTimelock(bytes4 selector, ...) use selectors to identify which function's settings to modify.

Important notes:
  • The function signature must include parameter types but not parameter names or return types
  • Example: "setPerformanceFee(uint256)" not "setPerformanceFee(uint256 newFee)"
  • Selectors are always exactly 4 bytes (shown as 10 characters in hex: 0x + 8 hex digits)

External Functions


deposit

function deposit(uint256 assets, address onBehalf) external returns (uint256)

Deposits assets of the underlying token to mint vault shares for onBehalf.

Parameters:

NameTypeDescription
assetsuint256The amount of the underlying asset to deposit.
onBehalfaddressThe recipient of the minted vault shares.

Return Values:

NameTypeDescription
sharesuint256The amount of vault shares minted.

mint

function mint(uint256 shares, address onBehalf) external returns (uint256)

Mints exactly shares vault shares for onBehalf by depositing the required amount of the underlying token.

Parameters:

NameTypeDescription
sharesuint256The exact amount of shares to mint.
onBehalfaddressThe recipient of the minted vault shares.

Return Values:

NameTypeDescription
assetsuint256The amount of the underlying asset deposited.

withdraw

function withdraw(uint256 assets, address receiver, address onBehalf) public returns (uint256)

Withdraws assets of the underlying token by burning shares from onBehalf and sends them to receiver.

Parameters:

NameTypeDescription
assetsuint256The amount of the underlying asset to withdraw.
receiveraddressThe recipient of the withdrawn assets.
onBehalfaddressThe owner of the shares to be burned. msg.sender must be approved.

Return Values:

NameTypeDescription
sharesuint256The amount of vault shares burned.

redeem

function redeem(uint256 shares, address receiver, address onBehalf) external returns (uint256)

Burns exactly shares vault shares from onBehalf and sends the corresponding amount of underlying assets to receiver.

Parameters:

NameTypeDescription
sharesuint256The exact amount of shares to burn.
receiveraddressThe recipient of the withdrawn assets.
onBehalfaddressThe owner of the shares to be burned. msg.sender must be approved.

Return Values:

NameTypeDescription
assetsuint256The amount of the underlying asset withdrawn.

forceDeallocate

function forceDeallocate(address adapter, bytes memory data, uint256 assets, address onBehalf) external returns (uint256)

Forcibly deallocates assets from a specific adapter to the vault's idle pool. A penalty can be set and taken from onBehalf's shares to disincentivize misuse (see setForceDeallocatePenalty). This function is permissionless and serves as an in-kind redemption mechanism.

Parameters:

NameTypeDescription
adapteraddressThe adapter to deallocate from.
databytesThe protocol-specific data for the deallocation.
assetsuint256The amount of assets to deallocate.
onBehalfaddressThe account from which the penalty shares will be burned.

Return Values:

NameTypeDescription
withdrawnSharesuint256The amount of shares burned from onBehalf as a penalty.

accrueInterest

function accrueInterest() public

Accrues interest for the vault by querying adapters for their current assets and updating totalAssets. This function is called by most state-changing functions.


accrueInterestView

function accrueInterestView() public view returns (uint256, uint256, uint256)

Returns the view version of interest accrual without updating state.

Return Values:

NameTypeDescription
newTotalAssetsuint256The updated total assets after interest accrual.
performanceFeeSharesuint256The amount of shares minted as performance fee.
managementFeeSharesuint256The amount of shares minted as management fee.

previewDeposit

function previewDeposit(uint256 assets) public view returns (uint256)

Returns previewed minted shares for a given asset amount.

Parameters:

NameTypeDescription
assetsuint256The amount of assets to preview deposit for.

Return Values:

NameTypeDescription
sharesuint256The amount of shares that would be minted.

previewMint

function previewMint(uint256 shares) public view returns (uint256)

Returns previewed deposited assets for a given share amount.

Parameters:

NameTypeDescription
sharesuint256The amount of shares to preview mint for.

Return Values:

NameTypeDescription
assetsuint256The amount of assets that would be deposited.

previewWithdraw

function previewWithdraw(uint256 assets) public view returns (uint256)

Returns previewed redeemed shares for a given asset amount.

Parameters:

NameTypeDescription
assetsuint256The amount of assets to preview withdrawal for.

Return Values:

NameTypeDescription
sharesuint256The amount of shares that would be burned.

previewRedeem

function previewRedeem(uint256 shares) public view returns (uint256)

Returns previewed withdrawn assets for a given share amount.

Parameters:

NameTypeDescription
sharesuint256The amount of shares to preview redemption for.

Return Values:

NameTypeDescription
assetsuint256The amount of assets that would be withdrawn.

convertToShares

function convertToShares(uint256 assets) external view returns (uint256)

Returns corresponding shares (rounded down) for a given asset amount. Takes into account performance and management fees.

Parameters:

NameTypeDescription
assetsuint256The amount of assets to convert.

Return Values:

NameTypeDescription
sharesuint256The corresponding amount of shares.

convertToAssets

function convertToAssets(uint256 shares) external view returns (uint256)

Returns corresponding assets (rounded down) for a given share amount. Takes into account performance and management fees.

Parameters:

NameTypeDescription
sharesuint256The amount of shares to convert.

Return Values:

NameTypeDescription
assetsuint256The corresponding amount of assets.

maxDeposit

function maxDeposit(address) external pure returns (uint256)

Returns the maximum amount of assets that can be deposited. Always returns 0 due to gate complexity.


maxMint

function maxMint(address) external pure returns (uint256)

Returns the maximum amount of shares that can be minted. Always returns 0 due to gate complexity.


maxWithdraw

function maxWithdraw(address) external pure returns (uint256)

Returns the maximum amount of assets that can be withdrawn. Always returns 0 due to gate complexity.


maxRedeem

function maxRedeem(address) external pure returns (uint256)

Returns the maximum amount of shares that can be redeemed. Always returns 0 due to gate complexity.


multicall

function multicall(bytes[] calldata data) external

Useful for EOAs to batch admin calls. Does not return anything, because accounts who would use the return data would be contracts, which can do the multicall themselves.

Parameters:

NameTypeDescription
databytes[]Array of encoded function calls to execute.

Owner Functions


setOwner

function setOwner(address newOwner) external

Transfers ownership of the vault to newOwner. Only callable by the current owner.


setCurator

function setCurator(address newCurator) external

Sets the vault's Curator. Only callable by the owner.


setIsSentinel

function setIsSentinel(address account, bool newIsSentinel) external

Grants or revokes the Sentinel role for an account. Only callable by the owner.


setName

function setName(string memory newName) external

Sets the vault's name. Only callable by the owner.


setSymbol

function setSymbol(string memory newSymbol) external

Sets the vault's symbol. Only callable by the owner.

Curator Functions

The following functions are only callable by the Curator. Some are subject to a timelock while others are instant. The timelock process is:

  1. Curator calls submit(bytes calldata data) with the ABI-encoded function call.
  2. After the timelock expires, anyone can execute the function directly.

abdicate

function abdicate(bytes4 selector) external

Irreversibly disables the ability to submit a specific type of action.

Timelocked Action

Parameters:

NameTypeDescription
selectorbytes4The function selector to abdicate.

addAdapter

function addAdapter(address account) external

Adds a new adapter to the vault.

Timelocked Action

Parameters:

NameTypeDescription
accountaddressThe adapter address to add.

decreaseAbsoluteCap

function decreaseAbsoluteCap(bytes memory idData, uint256 newAbsoluteCap) external

Decreases the absolute cap for an allocation target. The id is computed as keccak256(idData) where idData is the market-specific data identifying the allocation target.

Instant Action (also callable by a Sentinel)

Parameters:

NameTypeDescription
idDatabytesMarket-specific data identifying the allocation target (e.g., market ID for Morpho markets). The hash of this data (keccak256(idData)) is used as the unique identifier.
newAbsoluteCapuint256The new absolute cap value.

decreaseRelativeCap

function decreaseRelativeCap(bytes memory idData, uint256 newRelativeCap) external

Decreases the relative cap for an allocation target. The id is computed as keccak256(idData) where idData is the market-specific data identifying the allocation target.

Instant Action (also callable by a Sentinel)

Parameters:

NameTypeDescription
idDatabytesMarket-specific data identifying the allocation target (e.g., market ID for Morpho markets). The hash of this data (keccak256(idData)) is used as the unique identifier.
newRelativeCapuint256The new relative cap value (scaled by 1e18).

decreaseTimelock

function decreaseTimelock(bytes4 selector, uint256 newDuration) external

Decreases a function's timelock duration. This action's timelock equals the current timelock of the function being decreased.

Timelocked Action

Parameters:

NameTypeDescription
selectorbytes4The function selector.
newDurationuint256The new timelock duration.

increaseAbsoluteCap

function increaseAbsoluteCap(bytes memory idData, uint256 newAbsoluteCap) external

Increases the absolute cap for an allocation target. The id is computed as keccak256(idData) where idData is the market-specific data identifying the allocation target.

Timelocked Action

Parameters:

NameTypeDescription
idDatabytesMarket-specific data identifying the allocation target (e.g., market ID for Morpho markets). The hash of this data (keccak256(idData)) is used as the unique identifier.
newAbsoluteCapuint256The new absolute cap value.

increaseRelativeCap

function increaseRelativeCap(bytes memory idData, uint256 newRelativeCap) external

Increases the relative cap for an allocation target. The id is computed as keccak256(idData) where idData is the market-specific data identifying the allocation target.

Timelocked Action

Parameters:

NameTypeDescription
idDatabytesMarket-specific data identifying the allocation target (e.g., market ID for Morpho markets). The hash of this data (keccak256(idData)) is used as the unique identifier.
newRelativeCapuint256The new relative cap value (scaled by 1e18).

increaseTimelock

function increaseTimelock(bytes4 selector, uint256 newDuration) external

Increases a function's timelock duration.

Timelocked Action

Parameters:

NameTypeDescription
selectorbytes4The function selector.
newDurationuint256The new timelock duration.

removeAdapter

function removeAdapter(address account) external

Removes an adapter from the vault.

Timelocked Action

Parameters:

NameTypeDescription
accountaddressThe adapter address to remove.

revoke

function revoke(bytes calldata data) external

Revokes a pending timelocked action.

Instant Action (also callable by a Sentinel)

Parameters:

NameTypeDescription
databytesThe ABI-encoded function call data to revoke.

setAdapterRegistry

function setAdapterRegistry(address newAdapterRegistry) external

Sets the adapter registry contract. The function validates that the new registry approves all currently added adapters. If the new registry returns false for any existing adapter, the transaction will revert. This ensures that changing the registry doesn't invalidate adapters that are already in use. Timelocked Action

Parameters:

NameTypeDescription
newAdapterRegistryaddressThe new adapter registry contract.

setForceDeallocatePenalty

function setForceDeallocatePenalty(address adapter, uint256 newForceDeallocatePenalty) external

Sets the penalty for using forceDeallocate on a specific adapter.

Timelocked Action

Parameters:

NameTypeDescription
adapteraddressThe adapter to set penalty for.
newForceDeallocatePenaltyuint256The new penalty value (scaled by 1e18).

setIsAllocator

function setIsAllocator(address account, bool newIsAllocator) external

Grants or revokes the Allocator role for an account.

Timelocked Action

Parameters:

NameTypeDescription
accountaddressThe account to modify.
newIsAllocatorboolWhether the account should be an allocator.

setManagementFee

function setManagementFee(uint256 newManagementFee) external

Sets the vault's management fee.

Timelocked Action

Parameters:

NameTypeDescription
newManagementFeeuint256The new management fee (scaled by 1e18).

setManagementFeeRecipient

function setManagementFeeRecipient(address newManagementFeeRecipient) external

Sets the management fee recipient.

Timelocked Action

Parameters:

NameTypeDescription
newManagementFeeRecipientaddressThe new management fee recipient.

setPerformanceFee

function setPerformanceFee(uint256 newPerformanceFee) external

Sets the vault's performance fee.

Timelocked Action

Parameters:

NameTypeDescription
newPerformanceFeeuint256The new performance fee (scaled by 1e18).

setPerformanceFeeRecipient

function setPerformanceFeeRecipient(address newPerformanceFeeRecipient) external

Sets the performance fee recipient.

Timelocked Action

Parameters:

NameTypeDescription
newPerformanceFeeRecipientaddressThe new performance fee recipient.

setReceiveAssetsGate

function setReceiveAssetsGate(address newReceiveAssetsGate) external

Sets the contract for gating asset receipts.

Timelocked Action

Parameters:

NameTypeDescription
newReceiveAssetsGateaddressThe new receive assets gate contract.

setReceiveSharesGate

function setReceiveSharesGate(address newReceiveSharesGate) external

Sets the contract for gating share receipts.

Timelocked Action

Parameters:

NameTypeDescription
newReceiveSharesGateaddressThe new receive shares gate contract.

setSendAssetsGate

function setSendAssetsGate(address newSendAssetsGate) external

Sets the contract for gating asset sends.

Timelocked Action

Parameters:

NameTypeDescription
newSendAssetsGateaddressThe new send assets gate contract.

setSendSharesGate

function setSendSharesGate(address newSendSharesGate) external

Sets the contract for gating share sends.

Timelocked Action

Parameters:

NameTypeDescription
newSendSharesGateaddressThe new send shares gate contract.

submit

function submit(bytes calldata data) external

Submits a timelocked action for execution after the timelock period expires.

Timelock Management Function

Parameters:

NameTypeDescription
databytesThe ABI-encoded function call data.

Allocator Functions


allocate

function allocate(address adapter, bytes memory data, uint256 assets) external

Allocates assets from the vault's idle pool to a specific adapter. The allocation is subject to the caps configured for the target market. Only callable by an Allocator.

Parameters:

NameTypeDescription
adapteraddressThe adapter to allocate assets to.
databytesMarket-specific data encoding passed to the adapter (e.g., market ID for Morpho markets). The hash of this data (keccak256(data)) identifies the allocation target for cap enforcement.
assetsuint256The amount of assets to allocate.

deallocate

function deallocate(address adapter, bytes memory data, uint256 assets) external

Deallocates assets from an adapter back to the vault's idle pool. Also callable by a Sentinel.

Parameters:

NameTypeDescription
adapteraddressThe adapter to deallocate assets from.
databytesMarket-specific data encoding passed to the adapter (e.g., market ID for Morpho markets). Must match the data used when allocating.
assetsuint256The amount of assets to deallocate.

setLiquidityAdapterAndData

function setLiquidityAdapterAndData(address newLiquidityAdapter, bytes memory newLiquidityData) external

Sets the default adapter for handling user deposits and withdrawals.

Parameters:

NameTypeDescription
newLiquidityAdapteraddressThe new liquidity adapter address.
newLiquidityDatabytesThe new liquidity data for the adapter.

setMaxRate

function setMaxRate(uint256 newMaxRate) external

Sets the maximum rate at which totalAssets can grow. A curator-controlled parameter that caps how quickly totalAssets can grow, useful for implementing fixed-rate distributions or preventing unrealistic yield spikes.

Parameters:

NameTypeDescription
newMaxRateuint256The new maximum rate per second (scaled by 1e18).

Gating Functions

Gates are optional external smart contracts that implement access control for the vault. The vault supports four independent gates: receiveSharesGate, sendSharesGate, receiveAssetsGate, and sendAssetsGate.

Gates are separate smart contracts that you (or the curator) must deploy independently. They are not part of the vault contract itself. The curator configures them using functions like setReceiveSharesGate, setSendSharesGate, etc.

Each gate contract must implement a function that returns bool to indicate whether an account is allowed to perform the action. The vault calls these gates during transfers and deposits/withdrawals to enforce access control.


canReceiveShares

function canReceiveShares(address account) public view returns (bool)

Checks if an account can receive shares based on the receive shares gate.

Parameters:

NameTypeDescription
accountaddressThe account to check.

Return Values:

NameTypeDescription
allowedboolWhether the account can receive shares.

canSendShares

function canSendShares(address account) public view returns (bool)

Checks if an account can send shares based on the send shares gate.

Parameters:

NameTypeDescription
accountaddressThe account to check.

Return Values:

NameTypeDescription
allowedboolWhether the account can send shares.

canReceiveAssets

function canReceiveAssets(address account) public view returns (bool)

Checks if an account can receive assets based on the receive assets gate. The vault itself is always allowed.

Parameters:

NameTypeDescription
accountaddressThe account to check.

Return Values:

NameTypeDescription
allowedboolWhether the account can receive assets.

canSendAssets

function canSendAssets(address account) public view returns (bool)

Checks if an account can send assets based on the send assets gate.

Parameters

NameTypeDescription
accountaddressThe account to check.

Return Values:

NameTypeDescription
allowedboolWhether the account can send assets.

View Functions


totalAssets

function totalAssets() external view returns (uint256)

Returns the total amount of underlying assets held by the vault, including both idle assets and assets allocated to adapters.

Return Values:

NameTypeDescription
assetsuint256The total assets in the vault.

adaptersLength

function adaptersLength() external view returns (uint256)

Returns the number of adapters currently added to the vault.

Return Values:

NameTypeDescription
lengthuint256The number of adapters.

absoluteCap

function absoluteCap(bytes32 id) external view returns (uint256)

Returns the absolute cap for a given allocation id. The id is computed as keccak256(idData) where idData is the market-specific data identifying the allocation target.

Parameters:

NameTypeDescription
idbytes32The allocation identifier (keccak256 hash of idData).

Return Values:

NameTypeDescription
capuint256The absolute cap value.

relativeCap

function relativeCap(bytes32 id) external view returns (uint256)

Returns the relative cap for a given allocation id. The id is computed as keccak256(idData) where idData is the market-specific data identifying the allocation target.

Parameters:

NameTypeDescription
idbytes32The allocation identifier (keccak256 hash of idData).

Return Values:

NameTypeDescription
capuint256The relative cap value (scaled by 1e18).

allocation

function allocation(bytes32 id) external view returns (uint256)

Returns the current allocation amount for a given id. The id is computed as keccak256(idData) where idData is the market-specific data identifying the allocation target.

Parameters:

NameTypeDescription
idbytes32The allocation identifier (keccak256 hash of idData).

Return Values:

NameTypeDescription
amountuint256The current allocation amount.

owner

function owner() external view returns (address)

Returns the current owner address of the vault.

Return Values:

NameTypeDescription
owneraddressThe owner address.

curator

function curator() external view returns (address)

Returns the current curator address of the vault.

Return Values:

NameTypeDescription
curatoraddressThe curator address.

isSentinel

function isSentinel(address account) external view returns (bool)

Checks if an account has the Sentinel role.

Parameters:

NameTypeDescription
accountaddressThe account to check.

Return Values:

NameTypeDescription
isSentinelboolWhether the account is a sentinel.

isAllocator

function isAllocator(address account) external view returns (bool)

Checks if an account has the Allocator role.

Parameters:

NameTypeDescription
accountaddressThe account to check.

Return Values:

NameTypeDescription
isAllocatorboolWhether the account is an allocator.

receiveSharesGate

function receiveSharesGate() external view returns (address)

Returns the address of the receive shares gate contract.

Return Values:

NameTypeDescription
gateaddressThe receive shares gate address.

sendSharesGate

function sendSharesGate() external view returns (address)

Returns the address of the send shares gate contract.

Return Values:

NameTypeDescription
gateaddressThe send shares gate address.

receiveAssetsGate

function receiveAssetsGate() external view returns (address)

Returns the address of the receive assets gate contract.

Return Values:

NameTypeDescription
gateaddressThe receive assets gate address.

sendAssetsGate

function sendAssetsGate() external view returns (address)

Returns the address of the send assets gate contract.

Return Values:

NameTypeDescription
gateaddressThe send assets gate address.

adapterRegistry

function adapterRegistry() external view returns (address)

Returns the address of the adapter registry contract.

Return Values:

NameTypeDescription
registryaddressThe adapter registry address.

adapters

function adapters(uint256 index) external view returns (address)

Returns the adapter address at a specific index (index list retrievable via the adaptersLength function).

Parameters:

NameTypeDescription
indexuint256The index in the adapters array.

Return Values:

NameTypeDescription
adapteraddressThe adapter address at the given index.

isAdapter

function isAdapter(address account) external view returns (bool)

Checks if an account is a registered adapter.

Parameters:

NameTypeDescription
accountaddressThe account to check.

Return Values:

NameTypeDescription
isAdapterboolWhether the account is an adapter.

liquidityAdapter

function liquidityAdapter() external view returns (address)

Returns the default adapter used for handling user deposits and withdrawals.

Return Values:

NameTypeDescription
adapteraddressThe liquidity adapter address.

liquidityData

function liquidityData() external view returns (bytes memory)

Returns the data associated with the liquidity adapter.

Return Values:

NameTypeDescription
databytesThe liquidity adapter data.

forceDeallocatePenalty

function forceDeallocatePenalty(address adapter) external view returns (uint256)

Returns the penalty for using forceDeallocate on a specific adapter.

Parameters:

NameTypeDescription
adapteraddressThe adapter to check.

Return Values:

NameTypeDescription
penaltyuint256The force deallocate penalty (scaled by 1e18).

virtualShares

function virtualShares() external view returns (uint256)

Returns the virtual shares used for avoiding initial share inflation attacks.

Return Values:

NameTypeDescription
sharesuint256The virtual shares amount.

firstTotalAssets

function firstTotalAssets() external view returns (uint256)

Returns the total assets after the first interest accrual of the current transaction. Used to prevent bypassing relative caps with flashloans.

Return Values:

NameTypeDescription
assetsuint256The total assets after the first interest accrual of the transaction.

_totalAssets

function _totalAssets() external view returns (uint128)

Returns the internal cached total assets value.

Return Values:

NameTypeDescription
assetsuint128The cached total assets.

lastUpdate

function lastUpdate() external view returns (uint64)

Returns the timestamp of the last interest accrual.

Return Values:

NameTypeDescription
timestampuint64The last update timestamp.

maxRate

function maxRate() external view returns (uint64)

Returns the maximum rate at which totalAssets can grow.

Return Values:

NameTypeDescription
rateuint64The maximum rate per second (scaled by 1e18).

performanceFee

function performanceFee() external view returns (uint96)

Returns the current performance fee.

Return Values:

NameTypeDescription
feeuint96The performance fee (scaled by 1e18).

performanceFeeRecipient

function performanceFeeRecipient() external view returns (address)

Returns the recipient address of performance fees.

Return Values:

NameTypeDescription
recipientaddressThe performance fee recipient address.

managementFee

function managementFee() external view returns (uint96)

Returns the current management fee.

Return Values:

NameTypeDescription
feeuint96The management fee (scaled by 1e18).

managementFeeRecipient

function managementFeeRecipient() external view returns (address)

Returns the recipient address of management fees.

Return Values:

NameTypeDescription
recipientaddressThe management fee recipient address.

timelock

function timelock(bytes4 selector) external view returns (uint256)

Returns the timelock duration for a specific function selector.

Parameters:

NameTypeDescription
selectorbytes4The function selector.

Return Values:

NameTypeDescription
durationuint256The timelock duration in seconds.

abdicated

function abdicated(bytes4 selector) external view returns (bool)

Checks if the curator has abdicated the ability to submit a specific action.

Parameters:

NameTypeDescription
selectorbytes4The function selector.

Return Values:

NameTypeDescription
abdicatedboolWhether the action has been abdicated.

executableAt

function executableAt(bytes memory data) external view returns (uint256)

Returns the timestamp when a submitted timelocked action becomes executable.

Parameters:

NameTypeDescription
databytesThe ABI-encoded function call data.

Return Values:

NameTypeDescription
timestampuint256The timestamp when the action becomes executable.

DOMAIN_SEPARATOR

function DOMAIN_SEPARATOR() external view returns (bytes32)

Returns the EIP-712 domain separator used for permit signatures.

Return Values:

NameTypeDescription
separatorbytes32The domain separator.