deposit()
and withdraw()
.internal constant
or immutable constant
.tokenAmounts
— tokens that will be used in the action (e.g. DAI in case of deposit to Compound).require()
if length of tokenAmounts
should be fixed. Use the abbreviation of the contract name to use in revert()
/require()
errors (later referred to as ABBR_OF_NAME).tokenAmounts
are decomposed in token
and amount
like that:getAbsoluteAmountDeposit()
in deposit()
function and getAbsoluteAmountWithdraw()
in withdraw()
function.bytes data
using abi.decode
like that:tokensToBeWithdrawn
array. It should consist of tokens returning to the user (e.g. cDAI in case of deposit to Compound).npx prettier ./contracts/**/*.sol --write
to fix linter issues.test/
directory, use Uniswap, Weth, and other required adapters.