-
Notifications
You must be signed in to change notification settings - Fork 20
/
IERC4626DepositOnly.sol
69 lines (58 loc) · 2.63 KB
/
IERC4626DepositOnly.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC4626DepositOnly {
/**
* @notice Gets the total amount of underlying assets held by the contract.
* @return _totalAssets total number of underlying assets.
*/
function totalAssets() external view returns (uint256 _totalAssets);
/**
* @notice Deposit assets into the Vault.
* @param assets The amount of assets to deposit.
* @param receiver The address to receive the shares.
*/
function deposit(uint256 assets, address receiver) external returns (uint256 shares);
/**
* @notice Mint shares from the Vault.
* @param shares The amount of shares to mint.
* @param receiver The address to receive the shares.
*/
function mint(uint256 shares, address receiver) external returns (uint256 assets);
/**
* @notice Calculates the amount of shares that would be received for a given amount of assets.
* @param assets The amount of assets to deposit.
*/
function convertToShares(uint256 assets) external view returns (uint256);
/**
* @notice Calculates the amount of assets that would be received for a given amount of shares.
* @param shares The amount of shares to redeem.
*/
function convertToAssets(uint256 shares) external view returns (uint256);
/**
* @notice Previews the amount of shares that would be received for a given amount of assets.
* @param assets The amount of assets to deposit.
*/
function previewDeposit(uint256 assets) external view returns (uint256);
/**
* @notice Previews the amount of assets that would be received for minting a given amount of shares
* @param shares The amount of shares to mint
*/
function previewMint(uint256 shares) external view returns (uint256);
/**
* @notice Returns the maximum amount of assets that can be deposited.
* @param owner The address of the owner of the assets.
*/
function maxDeposit(address owner) external view returns (uint256);
/**
* @notice Returns the maximum amount of shares that can be minted.
* @param owner The address of the owner of the shares.
*/
function maxMint(address owner) external view returns (uint256);
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);
event Withdraw(
address indexed caller, address indexed receiver, address indexed owner, uint256 assets, uint256 shares
);
}