¡El código fuente de este contrato está verificado!
Metadatos del Contrato
Compilador
0.8.19+commit.7dd6d404
Idioma
Solidity
Código Fuente del Contrato
Archivo 1 de 9: ERC20.sol
// SPDX-License-Identifier: AGPL-3.0-onlypragmasolidity ^0.8.19;import {IERC20} from"./IERC20.sol";
/*
███████╗██████╗ ██████╗ ██████╗ ██████╗
██╔════╝██╔══██╗██╔════╝ ╚════██╗██╔═████╗
█████╗ ██████╔╝██║ █████╔╝██║██╔██║
██╔══╝ ██╔══██╗██║ ██╔═══╝ ████╔╝██║
███████╗██║ ██║╚██████╗ ███████╗╚██████╔╝
╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ╚═════╝
*//**
* @title Modern ERC-20 implementation.
* @dev Acknowledgements to Solmate, OpenZeppelin, and DSS for inspiring this code.
*/contractERC20isIERC20{
/**
*
*//**
* ERC-20 **
*//**
*
*/stringpublicoverride name;
stringpublicoverride symbol;
uint8publicoverride decimals;
uint256publicoverride totalSupply;
mapping(address=>uint256) publicoverride balanceOf;
mapping(address=>mapping(address=>uint256)) publicoverride allowance;
/**
*
*//**
* ERC-2612 **
*//**
*
*/// PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256// nonce,uint256 deadline)");bytes32publicconstantoverride PERMIT_TYPEHASH =0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
mapping(address=>uint256) publicoverride nonces;
/**
* @param name_ The name of the token.
* @param symbol_ The symbol of the token.
* @param decimals_ The decimal precision used by the token.
*/constructor(stringmemory name_, stringmemory symbol_, uint8 decimals_) {
name = name_;
symbol = symbol_;
decimals = decimals_;
}
/**
*
*//**
* External Functions **
*//**
*
*/functionapprove(address spender_, uint256 amount_) externaloverridereturns (bool success_) {
_approve(msg.sender, spender_, amount_);
returntrue;
}
functiondecreaseAllowance(address spender_, uint256 subtractedAmount_)
externaloverridereturns (bool success_)
{
_decreaseAllowance(msg.sender, spender_, subtractedAmount_);
returntrue;
}
functionincreaseAllowance(address spender_, uint256 addedAmount_)
externaloverridereturns (bool success_)
{
_approve(msg.sender, spender_, allowance[msg.sender][spender_] + addedAmount_);
returntrue;
}
functionpermit(address owner_,
address spender_,
uint256 amount_,
uint256 deadline_,
uint8 v_,
bytes32 r_,
bytes32 s_
) externaloverride{
require(deadline_ >=block.timestamp, "ERC20:P:EXPIRED");
// Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf),// defines// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}.require(
uint256(s_) <=uint256(0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0)
&& (v_ ==27|| v_ ==28),
"ERC20:P:MALLEABLE"
);
// Nonce realistically cannot overflow.unchecked {
bytes32 digest =keccak256(
abi.encodePacked(
"\x19\x01",
DOMAIN_SEPARATOR(),
keccak256(
abi.encode(PERMIT_TYPEHASH, owner_, spender_, amount_, nonces[owner_]++, deadline_)
)
)
);
address recoveredAddress =ecrecover(digest, v_, r_, s_);
require(recoveredAddress == owner_ && owner_ !=address(0), "ERC20:P:INVALID_SIGNATURE");
}
_approve(owner_, spender_, amount_);
}
functiontransfer(address recipient_, uint256 amount_) externaloverridereturns (bool success_) {
_transfer(msg.sender, recipient_, amount_);
returntrue;
}
functiontransferFrom(address owner_, address recipient_, uint256 amount_)
externaloverridereturns (bool success_)
{
_decreaseAllowance(owner_, msg.sender, amount_);
_transfer(owner_, recipient_, amount_);
returntrue;
}
/**
*
*//**
* View Functions **
*//**
*
*/functionDOMAIN_SEPARATOR() publicviewoverridereturns (bytes32 domainSeparator_) {
returnkeccak256(
abi.encode(
keccak256(
"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
),
keccak256(bytes(name)),
keccak256(bytes("1")),
block.chainid,
address(this)
)
);
}
/**
*
*//**
* Internal Functions **
*//**
*
*/function_approve(address owner_, address spender_, uint256 amount_) internal{
emit Approval(owner_, spender_, allowance[owner_][spender_] = amount_);
}
function_burn(address owner_, uint256 amount_) internal{
balanceOf[owner_] -= amount_;
// Cannot underflow because a user's balance will never be larger than the total supply.unchecked {
totalSupply -= amount_;
}
emit Transfer(owner_, address(0), amount_);
_afterTokenTransfer(owner_, address(0x0), amount_);
}
function_decreaseAllowance(address owner_, address spender_, uint256 subtractedAmount_) internal{
uint256 spenderAllowance = allowance[owner_][spender_]; // Cache to memory.if (spenderAllowance !=type(uint256).max) {
_approve(owner_, spender_, spenderAllowance - subtractedAmount_);
}
}
function_mint(address recipient_, uint256 amount_) internal{
totalSupply += amount_;
// Cannot overflow because totalSupply would first overflow in the statement above.unchecked {
balanceOf[recipient_] += amount_;
}
emit Transfer(address(0), recipient_, amount_);
_afterTokenTransfer(address(0x0), recipient_, amount_);
}
function_transfer(address owner_, address recipient_, uint256 amount_) internal{
balanceOf[owner_] -= amount_;
// Cannot overflow because minting prevents overflow of totalSupply, and sum of user balances ==// totalSupply.unchecked {
balanceOf[recipient_] += amount_;
}
emit Transfer(owner_, recipient_, amount_);
_afterTokenTransfer(owner_, recipient_, amount_);
}
function_afterTokenTransfer(addressfrom, address to, uint256 amount) internalvirtual{}
}
Código Fuente del Contrato
Archivo 2 de 9: ERC20Helper.sol
// SPDX-License-Identifier: AGPL-3.0-onlypragmasolidity ^0.8.7;import {IERC20Like} from"./IERC20Like.sol";
/**
* @title Small Library to standardize erc20 token interactions.
*/libraryERC20Helper{
/**
*
*//**
* Internal Functions **
*//**
*
*/functiontransfer(address token_, address to_, uint256 amount_) internalreturns (bool success_) {
return _call(token_, abi.encodeWithSelector(IERC20Like.transfer.selector, to_, amount_));
}
functiontransferFrom(address token_, address from_, address to_, uint256 amount_)
internalreturns (bool success_)
{
return
_call(token_, abi.encodeWithSelector(IERC20Like.transferFrom.selector, from_, to_, amount_));
}
functionapprove(address token_, address spender_, uint256 amount_)
internalreturns (bool success_)
{
// If setting approval to zero fails, return false.if (!_call(token_, abi.encodeWithSelector(IERC20Like.approve.selector, spender_, uint256(0)))) {
returnfalse;
}
// If `amount_` is zero, return true as the previous step already did this.if (amount_ ==uint256(0)) returntrue;
// Return the result of setting the approval to `amount_`.return _call(token_, abi.encodeWithSelector(IERC20Like.approve.selector, spender_, amount_));
}
function_call(address token_, bytesmemory data_) privatereturns (bool success_) {
if (token_.code.length==uint256(0)) returnfalse;
bytesmemory returnData;
(success_, returnData) = token_.call(data_);
return success_ && (returnData.length==uint256(0) ||abi.decode(returnData, (bool)));
}
}
Código Fuente del Contrato
Archivo 3 de 9: IERC20.sol
// SPDX-License-Identifier: AGPL-3.0-onlypragmasolidity ^0.8.19;/// @title Interface of the ERC20 standard as defined in the EIP, including EIP-2612 permit/// functionality.interfaceIERC20{
/**
*
*//**
* Events **
*//**
*
*//**
* @dev Emitted when one account has set the allowance of another account over their tokens.
* @param owner_ Account that tokens are approved from.
* @param spender_ Account that tokens are approved for.
* @param amount_ Amount of tokens that have been approved.
*/eventApproval(addressindexed owner_, addressindexed spender_, uint256 amount_);
/**
* @dev Emitted when tokens have moved from one account to another.
* @param owner_ Account that tokens have moved from.
* @param recipient_ Account that tokens have moved to.
* @param amount_ Amount of tokens that have been transferred.
*/eventTransfer(addressindexed owner_, addressindexed recipient_, uint256 amount_);
/**
*
*//**
* External Functions **
*//**
*
*//**
* @dev Function that allows one account to set the allowance of another account over their
* tokens.
* Emits an {Approval} event.
* @param spender_ Account that tokens are approved for.
* @param amount_ Amount of tokens that have been approved.
* @return success_ Boolean indicating whether the operation succeeded.
*/functionapprove(address spender_, uint256 amount_) externalreturns (bool success_);
/**
* @dev Function that allows one account to decrease the allowance of another account over
* their tokens.
* Emits an {Approval} event.
* @param spender_ Account that tokens are approved for.
* @param subtractedAmount_ Amount to decrease approval by.
* @return success_ Boolean indicating whether the operation succeeded.
*/functiondecreaseAllowance(address spender_, uint256 subtractedAmount_)
externalreturns (bool success_);
/**
* @dev Function that allows one account to increase the allowance of another account over
* their tokens.
* Emits an {Approval} event.
* @param spender_ Account that tokens are approved for.
* @param addedAmount_ Amount to increase approval by.
* @return success_ Boolean indicating whether the operation succeeded.
*/functionincreaseAllowance(address spender_, uint256 addedAmount_)
externalreturns (bool success_);
/**
* @dev Approve by signature.
* @param owner_ Owner address that signed the permit.
* @param spender_ Spender of the permit.
* @param amount_ Permit approval spend limit.
* @param deadline_ Deadline after which the permit is invalid.
* @param v_ ECDSA signature v component.
* @param r_ ECDSA signature r component.
* @param s_ ECDSA signature s component.
*/functionpermit(address owner_,
address spender_,
uint256 amount_,
uint256 deadline_,
uint8 v_,
bytes32 r_,
bytes32 s_
) external;
/**
* @dev Moves an amount of tokens from `msg.sender` to a specified account.
* Emits a {Transfer} event.
* @param recipient_ Account that receives tokens.
* @param amount_ Amount of tokens that are transferred.
* @return success_ Boolean indicating whether the operation succeeded.
*/functiontransfer(address recipient_, uint256 amount_) externalreturns (bool success_);
/**
* @dev Moves a pre-approved amount of tokens from a sender to a specified account.
* Emits a {Transfer} event.
* Emits an {Approval} event.
* @param owner_ Account that tokens are moving from.
* @param recipient_ Account that receives tokens.
* @param amount_ Amount of tokens that are transferred.
* @return success_ Boolean indicating whether the operation succeeded.
*/functiontransferFrom(address owner_, address recipient_, uint256 amount_)
externalreturns (bool success_);
/**
*
*//**
* View Functions **
*//**
*
*//**
* @dev Returns the allowance that one account has given another over their tokens.
* @param owner_ Account that tokens are approved from.
* @param spender_ Account that tokens are approved for.
* @return allowance_ Allowance that one account has given another over their tokens.
*/functionallowance(address owner_, address spender_) externalviewreturns (uint256 allowance_);
/**
* @dev Returns the amount of tokens owned by a given account.
* @param account_ Account that owns the tokens.
* @return balance_ Amount of tokens owned by a given account.
*/functionbalanceOf(address account_) externalviewreturns (uint256 balance_);
/**
* @dev Returns the decimal precision used by the token.
* @return decimals_ The decimal precision used by the token.
*/functiondecimals() externalviewreturns (uint8 decimals_);
/**
* @dev Returns the signature domain separator.
* @return domainSeparator_ The signature domain separator.
*/functionDOMAIN_SEPARATOR() externalviewreturns (bytes32 domainSeparator_);
/**
* @dev Returns the name of the token.
* @return name_ The name of the token.
*/functionname() externalviewreturns (stringmemory name_);
/**
* @dev Returns the nonce for the given owner.
* @param owner_ The address of the owner account.
* @return nonce_ The nonce for the given owner.
*/functionnonces(address owner_) externalviewreturns (uint256 nonce_);
/**
* @dev Returns the permit type hash.
* @return permitTypehash_ The permit type hash.
*/functionPERMIT_TYPEHASH() externalviewreturns (bytes32 permitTypehash_);
/**
* @dev Returns the symbol of the token.
* @return symbol_ The symbol of the token.
*/functionsymbol() externalviewreturns (stringmemory symbol_);
/**
* @dev Returns the total amount of tokens in existence.
* @return totalSupply_ The total amount of tokens in existence.
*/functiontotalSupply() externalviewreturns (uint256 totalSupply_);
}
Código Fuente del Contrato
Archivo 4 de 9: IERC20Like.sol
// SPDX-License-Identifier: AGPL-3.0-onlypragmasolidity ^0.8.7;/// @title Interface of the ERC20 standard as needed by ERC20Helper.interfaceIERC20Like{
functionapprove(address spender_, uint256 amount_) externalreturns (bool success_);
functiontransfer(address recipient_, uint256 amount_) externalreturns (bool success_);
functiontransferFrom(address owner_, address recipient_, uint256 amount_)
externalreturns (bool success_);
}
Código Fuente del Contrato
Archivo 5 de 9: IERC4626.sol
// SPDX-License-Identifier: AGPL-3.0-onlypragmasolidity ^0.8.19;import {IERC20} from"./IERC20.sol";
/// @title A standard for tokenized Vaults with a single underlying ERC-20 token.interfaceIERC4626isIERC20{
/**
*
*//**
* Events **
*//**
*
*//**
* @dev `caller_` has exchanged `assets_` for `shares_` and transferred them to `owner_`.
* MUST be emitted when assets are deposited via the `deposit` or `mint` methods.
* @param caller_ The caller of the function that emitted the `Deposit` event.
* @param owner_ The owner of the shares.
* @param assets_ The amount of assets deposited.
* @param shares_ The amount of shares minted.
*/eventDeposit(addressindexed caller_, addressindexed owner_, uint256 assets_, uint256 shares_);
/**
* @dev `caller_` has exchanged `shares_`, owned by `owner_`, for `assets_`, and
* transferred them to `receiver_`.
* MUST be emitted when assets are withdrawn via the `withdraw` or `redeem` methods.
* @param caller_ The caller of the function that emitted the `Withdraw` event.
* @param receiver_ The receiver of the assets.
* @param owner_ The owner of the shares.
* @param assets_ The amount of assets withdrawn.
* @param shares_ The amount of shares burned.
*/eventWithdraw(addressindexed caller_,
addressindexed receiver_,
addressindexed owner_,
uint256 assets_,
uint256 shares_
);
/**
*
*//**
* State Variables **
*//**
*
*//**
* @dev The address of the underlying asset used by the Vault.
* MUST be a contract that implements the ERC-20 standard.
* MUST NOT revert.
* @return asset_ The address of the underlying asset.
*/functionasset() externalviewreturns (address asset_);
/**
*
*//**
* State Changing Functions **
*//**
*
*//**
* @dev Mints `shares_` to `receiver_` by depositing `assets_` into the Vault.
* MUST emit the {Deposit} event.
* MUST revert if all of the assets cannot be deposited (due to insufficient approval,
* deposit limits, slippage, etc).
* @param assets_ The amount of assets to deposit.
* @param receiver_ The receiver of the shares.
* @return shares_ The amount of shares minted.
*/functiondeposit(uint256 assets_, address receiver_) externalreturns (uint256 shares_);
/**
* @dev Mints `shares_` to `receiver_` by depositing `assets_` into the Vault.
* MUST emit the {Deposit} event.
* MUST revert if all of shares cannot be minted (due to insufficient approval, deposit
* limits, slippage, etc).
* @param shares_ The amount of shares to mint.
* @param receiver_ The receiver of the shares.
* @return assets_ The amount of assets deposited.
*/functionmint(uint256 shares_, address receiver_) externalreturns (uint256 assets_);
/**
* @dev Burns `shares_` from `owner_` and sends `assets_` to `receiver_`.
* MUST emit the {Withdraw} event.
* MUST revert if all of the shares cannot be redeemed (due to insufficient shares,
* withdrawal limits, slippage, etc).
* @param shares_ The amount of shares to redeem.
* @param receiver_ The receiver of the assets.
* @param owner_ The owner of the shares.
* @return assets_ The amount of assets sent to the receiver.
*/functionredeem(uint256 shares_, address receiver_, address owner_)
externalreturns (uint256 assets_);
/**
* @dev Burns `shares_` from `owner_` and sends `assets_` to `receiver_`.
* MUST emit the {Withdraw} event.
* MUST revert if all of the assets cannot be withdrawn (due to insufficient assets,
* withdrawal limits, slippage, etc).
* @param assets_ The amount of assets to withdraw.
* @param receiver_ The receiver of the assets.
* @param owner_ The owner of the assets.
* @return shares_ The amount of shares burned from the owner.
*/functionwithdraw(uint256 assets_, address receiver_, address owner_)
externalreturns (uint256 shares_);
/**
*
*//**
* View Functions **
*//**
*
*//**
* @dev The amount of `assets_` the `shares_` are currently equivalent to.
* MUST NOT be inclusive of any fees that are charged against assets in the Vault.
* MUST NOT reflect slippage or other on-chain conditions when performing the actual
* exchange.
* MUST NOT show any variations depending on the caller.
* MUST NOT revert.
* @param shares_ The amount of shares to convert.
* @return assets_ The amount of equivalent assets.
*/functionconvertToAssets(uint256 shares_) externalviewreturns (uint256 assets_);
/**
* @dev The amount of `shares_` the `assets_` are currently equivalent to.
* MUST NOT be inclusive of any fees that are charged against assets in the Vault.
* MUST NOT reflect slippage or other on-chain conditions when performing the actual
* exchange.
* MUST NOT show any variations depending on the caller.
* MUST NOT revert.
* @param assets_ The amount of assets to convert.
* @return shares_ The amount of equivalent shares.
*/functionconvertToShares(uint256 assets_) externalviewreturns (uint256 shares_);
/**
* @dev Maximum amount of `assets_` that can be deposited on behalf of the `receiver_` through
* a `deposit` call.
* MUST return a limited value if the receiver is subject to any limits, or the maximum
* value otherwise.
* MUST NOT revert.
* @param receiver_ The receiver of the assets.
* @return assets_ The maximum amount of assets that can be deposited.
*/functionmaxDeposit(address receiver_) externalviewreturns (uint256 assets_);
/**
* @dev Maximum amount of `shares_` that can be minted on behalf of the `receiver_` through a
* `mint` call.
* MUST return a limited value if the receiver is subject to any limits, or the maximum
* value otherwise.
* MUST NOT revert.
* @param receiver_ The receiver of the shares.
* @return shares_ The maximum amount of shares that can be minted.
*/functionmaxMint(address receiver_) externalviewreturns (uint256 shares_);
/**
* @dev Maximum amount of `shares_` that can be redeemed from the `owner_` through
* a `redeem` call.
* MUST return a limited value if the owner is subject to any limits, or the total
* amount of owned shares otherwise.
* MUST NOT revert.
* @param owner_ The owner of the shares.
* @return shares_ The maximum amount of shares that can be redeemed.
*/functionmaxRedeem(address owner_) externalviewreturns (uint256 shares_);
/**
* @dev Maximum amount of `assets_` that can be withdrawn from the `owner_` through a
* `withdraw` call.
* MUST return a limited value if the owner is subject to any limits, or the total amount
* of owned assets otherwise.
* MUST NOT revert.
* @param owner_ The owner of the assets.
* @return assets_ The maximum amount of assets that can be withdrawn.
*/functionmaxWithdraw(address owner_) externalviewreturns (uint256 assets_);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the
* current block, given current on-chain conditions.
* MUST return as close to and no more than the exact amount of shares that would be
* minted in a `deposit` call in the same transaction.
* MUST NOT account for deposit limits like those returned from `maxDeposit` and should
* always act as though the deposit would be accepted.
* MUST NOT revert.
* @param assets_ The amount of assets to deposit.
* @return shares_ The amount of shares that would be minted.
*/functionpreviewDeposit(uint256 assets_) externalviewreturns (uint256 shares_);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the
* current block, given current on-chain conditions.
* MUST return as close to and no fewer than the exact amount of assets that would be
* deposited in a `mint` call in the same transaction.
* MUST NOT account for mint limits like those returned from `maxMint` and should always
* act as though the minting would be accepted.
* MUST NOT revert.
* @param shares_ The amount of shares to mint.
* @return assets_ The amount of assets that would be deposited.
*/functionpreviewMint(uint256 shares_) externalviewreturns (uint256 assets_);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their redemption at
* the current block, given current on-chain conditions.
* MUST return as close to and no more than the exact amount of assets that would be
* withdrawn in a `redeem` call in the same transaction.
* MUST NOT account for redemption limits like those returned from `maxRedeem` and should
* always act as though the redemption would be accepted.
* MUST NOT revert.
* @param shares_ The amount of shares to redeem.
* @return assets_ The amount of assets that would be withdrawn.
*/functionpreviewRedeem(uint256 shares_) externalviewreturns (uint256 assets_);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at
* the current block, given current on-chain conditions.
* MUST return as close to and no fewer than the exact amount of shares that would be
* burned in a `withdraw` call in the same transaction.
* MUST NOT account for withdrawal limits like those returned from `maxWithdraw` and
* should always act as though the withdrawal would be accepted.
* MUST NOT revert.
* @param assets_ The amount of assets to withdraw.
* @return shares_ The amount of shares that would be redeemed.
*/functionpreviewWithdraw(uint256 assets_) externalviewreturns (uint256 shares_);
/**
* @dev Total amount of the underlying asset that is managed by the Vault.
* SHOULD include compounding that occurs from any yields.
* MUST NOT revert.
* @return totalAssets_ The total amount of assets the Vault manages.
*/functiontotalAssets() externalviewreturns (uint256 totalAssets_);
}
Código Fuente del Contrato
Archivo 6 de 9: IRevenueDistributionToken.sol
// SPDX-License-Identifier: AGPL-3.0-onlypragmasolidity ^0.8.19;import {IERC20} from"./IERC20.sol";
import {IERC4626} from"./IERC4626.sol";
/// @title A token that represents ownership of future revenues distributed linearly over time.interfaceIRevenueDistributionTokenisIERC20, IERC4626{
/**
*
*//**
* Events **
*//**
*
*//**
* @dev Issuance parameters have been updated after a `_mint` or `_burn`.
* @param freeAssets_ Resulting `freeAssets` (y-intercept) value after accounting update.
* @param issuanceRate_ The new issuance rate of `asset` until `vestingPeriodFinish_`.
*/eventIssuanceParamsUpdated(uint256 freeAssets_, uint256 issuanceRate_);
/**
* @dev `newOwner_` has accepted the transferral of RDT ownership from `previousOwner_`.
* @param previousOwner_ The previous RDT owner.
* @param newOwner_ The new RDT owner.
*/eventOwnershipAccepted(addressindexed previousOwner_, addressindexed newOwner_);
/**
* @dev `owner_` has set the new pending owner of RDT to `pendingOwner_`.
* @param owner_ The current RDT owner.
* @param pendingOwner_ The new pending RDT owner.
*/eventPendingOwnerSet(addressindexed owner_, addressindexed pendingOwner_);
/**
* @dev `owner_` has updated the RDT vesting schedule to end at `vestingPeriodFinish_`.
* @param owner_ The current RDT owner.
* @param vestingPeriodFinish_ When the unvested balance will finish vesting.
*/eventVestingScheduleUpdated(addressindexed owner_, uint256 vestingPeriodFinish_);
/**
*
*//**
* State Variables **
*//**
*
*//**
* @dev The total amount of the underlying asset that is currently unlocked and is not
* time-dependent.
* Analogous to the y-intercept in a linear function.
*/functionfreeAssets() externalviewreturns (uint256 freeAssets_);
/**
* @dev The rate of issuance of the vesting schedule that is currently active.
* Denominated as the amount of underlying assets vesting per second.
*/functionissuanceRate() externalviewreturns (uint256 issuanceRate_);
/**
* @dev The timestamp of when the linear function was last recalculated.
* Analogous to t0 in a linear function.
*/functionlastUpdated() externalviewreturns (uint256 lastUpdated_);
/**
* @dev The address of the account that is allowed to update the vesting schedule.
*/functionowner() externalviewreturns (address owner_);
/**
* @dev The next owner, nominated by the current owner.
*/functionpendingOwner() externalviewreturns (address pendingOwner_);
/**
* @dev The precision at which the issuance rate is measured.
*/functionPRECISION() externalviewreturns (uint256 precision_);
/**
* @dev The end of the current vesting schedule.
*/functionvestingPeriodFinish() externalviewreturns (uint256 vestingPeriodFinish_);
/**
*
*//**
* Administrative Functions **
*//**
*
*//**
* @dev Sets the pending owner as the new owner.
* Can be called only by the pending owner, and only after their nomination by the current
* owner.
*/functionacceptOwnership() external;
/**
* @dev Sets a new address as the pending owner.
* @param pendingOwner_ The address of the next potential owner.
*/functionsetPendingOwner(address pendingOwner_) external;
/**
* @dev Updates the current vesting formula based on the amount of total unvested funds in the
* contract and the new `vestingPeriod_`.
* @param vestingPeriod_ The amount of time over which all currently unaccounted underlying
* assets will be vested over.
* @return issuanceRate_ The new issuance rate.
* @return freeAssets_ The new amount of underlying assets that are unlocked.
*/functionupdateVestingSchedule(uint256 vestingPeriod_)
externalreturns (uint256 issuanceRate_, uint256 freeAssets_);
/**
*
*//**
* Staker Functions **
*//**
*
*//**
* @dev Does a ERC4626 `deposit` with a ERC-2612 `permit`.
* @param assets_ The amount of `asset` to deposit.
* @param receiver_ The receiver of the shares.
* @param deadline_ The timestamp after which the `permit` signature is no longer valid.
* @param v_ ECDSA signature v component.
* @param r_ ECDSA signature r component.
* @param s_ ECDSA signature s component.
* @return shares_ The amount of shares minted.
*/functiondepositWithPermit(uint256 assets_,
address receiver_,
uint256 deadline_,
uint8 v_,
bytes32 r_,
bytes32 s_
) externalreturns (uint256 shares_);
/**
* @dev Does a ERC4626 `mint` with a ERC-2612 `permit`.
* @param shares_ The amount of `shares` to mint.
* @param receiver_ The receiver of the shares.
* @param maxAssets_ The maximum amount of assets that can be taken, as per the permit.
* @param deadline_ The timestamp after which the `permit` signature is no longer valid.
* @param v_ ECDSA signature v component.
* @param r_ ECDSA signature r component.
* @param s_ ECDSA signature s component.
* @return assets_ The amount of shares deposited.
*/functionmintWithPermit(uint256 shares_,
address receiver_,
uint256 maxAssets_,
uint256 deadline_,
uint8 v_,
bytes32 r_,
bytes32 s_
) externalreturns (uint256 assets_);
/**
*
*//**
* View Functions **
*//**
*
*//**
* @dev Returns the amount of underlying assets owned by the specified account.
* @param account_ Address of the account.
* @return assets_ Amount of assets owned.
*/functionbalanceOfAssets(address account_) externalviewreturns (uint256 assets_);
}