mint
params of yAssetParams -> (list(op), storage upd)
Add token to protocol and mints related yToken token
for caller.
Underlying token must be approved before calling this operation for an amount
The yToken
contract expects that underlying token info of tokenId
is updated by calling PriceFeed.getPrice and updateInterest in the same block before this contract method.
Types
tokenId
nat
yToken identifier
amount
nat
amount of underlying token to be sent to protocol
Usage
Errors
token/cant-get-contract-token
- FA12 token contract address does not containtransfer
entrypoint from FA12 interface.token/cant-get-contract-fa2-token
- FA2 token contract address does not containtransfer
entrypoint from FA2 interface.underflow/liquidity - reserves
- liquidity more than reserves.yToken/amount-is-zero
- passed zeroamount
.yToken/need-update
- token price and interest not updated (see warning above)yToken/yToken-undefined
- token identifier is not assigned to any known yTokens.
Last updated