Sorry if this question is kind of dumb.
I need to code a contract using ERC4626Upgradeable.sol
This contract needs to be upgradable so it's inheriting
import {ERC4626Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC4626Upgradeable.sol";
I'm having hard time understanding this:
-
The ERC4626Upgradeable is an erc20 token by itself right ?
-
When deploying this contract, that token is created or should I create a standard token separately and link it to the vault ?
-
That token (created separately or not) represent the shares of the vault and it will be minted to users depositing for example usdc, right ?
-
When calling the function asset(), that returns the token representing the shares right ?
-
I'm having issues to write the initialize() of the vault when putting parameters for the sharesToken. Do you guys have any example ?
-
If I have a factory of such Vaults, how to put the parameters to deploy a new Vault ?
Thanks a lot for your time!