Skip to content

Commit a57b80a

Browse files
authored
Merge pull request #12871 from raxhvl/feat/erc-4626-interface
✨ feat: Improve documentation for ERC-4626 interface
2 parents 0c6bdad + ba6206d commit a57b80a

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

public/content/developers/docs/standards/tokens/erc-4626/index.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ To better understand this page, we recommend you first read about [token standar
2727
#### asset {#asset}
2828

2929
```solidity
30-
function asset() public view returns (address)
30+
function asset() public view returns (address assetTokenAddress)
3131
```
3232

3333
This function returns the address of the underlying token used for the vault for accounting, depositing, withdrawing.
@@ -59,15 +59,15 @@ This function returns the amount of `assets` that would be exchanged by the vaul
5959
#### maxDeposit {#maxdeposit}
6060

6161
```solidity
62-
function maxDeposit(address receiver) public view returns (uint256)
62+
function maxDeposit(address receiver) public view returns (uint256 maxAssets)
6363
```
6464

6565
This function returns the maximum amount of underlying assets that can be deposited in a single [`deposit`](#deposit) call by the `receiver`.
6666

6767
#### previewDeposit {#previewdeposit}
6868

6969
```solidity
70-
function previewDeposit(uint256 assets) public view returns (uint256)
70+
function previewDeposit(uint256 assets) public view returns (uint256 shares)
7171
```
7272

7373
This function allows users to simulate the effects of their deposit at the current block.
@@ -83,15 +83,15 @@ This function deposits `assets` of underlying tokens into the vault and grants o
8383
#### maxMint {#maxmint}
8484

8585
```solidity
86-
function maxMint(address receiver) public view returns (uint256)
86+
function maxMint(address receiver) public view returns (uint256 maxShares)
8787
```
8888

8989
This function returns the maximum amount of shares that can be minted in a single [`mint`](#mint) call by the `receiver`.
9090

9191
#### previewMint {#previewmint}
9292

9393
```solidity
94-
function previewMint(uint256 shares) public view returns (uint256)
94+
function previewMint(uint256 shares) public view returns (uint256 assets)
9595
```
9696

9797
This function allows users to simulate the effects of their mint at the current block.
@@ -107,15 +107,15 @@ This function mints exactly `shares` vault shares to `receiver` by depositing `a
107107
#### maxWithdraw {#maxwithdraw}
108108

109109
```solidity
110-
function maxWithdraw(address owner) public view returns (uint256)
110+
function maxWithdraw(address owner) public view returns (uint256 maxAssets)
111111
```
112112

113113
This function returns the maximum amount of underlying assets that can be withdrawn from the `owner` balance with a single [`withdraw`](#withdraw) call.
114114

115115
#### previewWithdraw {#previewwithdraw}
116116

117117
```solidity
118-
function previewWithdraw(uint256 assets) public view returns (uint256)
118+
function previewWithdraw(uint256 assets) public view returns (uint256 shares)
119119
```
120120

121121
This function allows users to simulate the effects of their withdrawal at the current block.
@@ -131,15 +131,15 @@ This function burns `shares` from `owner` and send exactly `assets` token from t
131131
#### maxRedeem {#maxredeem}
132132

133133
```solidity
134-
function maxRedeem(address owner) public view returns (uint256)
134+
function maxRedeem(address owner) public view returns (uint256 maxShares)
135135
```
136136

137137
This function returns the maximum amount of shares that can be redeemed from the `owner` balance through a [`redeem`](#redeem) call.
138138

139139
#### previewRedeem {#previewredeem}
140140

141141
```solidity
142-
function previewRedeem(uint256 shares) public view returns (uint256)
142+
function previewRedeem(uint256 shares) public view returns (uint256 assets)
143143
```
144144

145145
This function allows users to simulate the effects of their redemption at the current block.
@@ -168,6 +168,10 @@ function balanceOf(address owner) public view returns (uint256)
168168

169169
Returns the total amount of vault shares the `owner` currently has.
170170

171+
### Map of the interface {#mapOfTheInterface}
172+
173+
![Map of the ERC-4626 interface](./map-of-erc-4626.png)
174+
171175
### Events {#events}
172176

173177
#### Deposit Event
70.4 KB
Loading

0 commit comments

Comments
 (0)