CellarMigrationAdaptor
Was this helpful?
Was this helpful?
Identifier unique to this adaptor for a shared registry. Normally the identifier would just be the address of this contract, but this Identifier is needed during Cellar Delegate Call Operations, so getting the address of the adaptor is more difficult.
Function Cellars call to deposit users funds into holding position.
Function Cellars call to withdraw funds from positions to send to users.
Parameters
assets
uint256
in terms of accountant's base asset
receiver
address
the address that should receive withdrawn funds
<none>
bytes
configurationData
bytes
Function Cellars use to determine assetOf
balance of an adaptor position.
Returns
<none>
uint256
assets of the position in terms of assetOf
Functions Cellars use to determine the withdrawable balance from an adaptor position.
accepts adaptorData and configurationData
Debt positions MUST return 0 for their withdrawableFrom
Returns
<none>
uint256
withdrawable balance of the position in terms of assetOf
Function Cellars use to determine the underlying ERC20 asset of a position.
Returns
<none>
ERC20
the underlying ERC20 asset of a position
When positions are added to the Registry, this function can be used in order to figure out what assets this adaptor needs to price, and confirm pricing is properly setup.
Functions Registry/Cellars use to determine if this adaptor reports debt values.
returns true if this adaptor reports debt values.
Allows strategist to perform a bulkDeposit into Teller.
Allows strategist to perform a bulkWithdraw from Teller.
Helper function that allows adaptor calls to use the max available of an ERC20 asset by passing in type(uint256).max
Parameters
token
ERC20
the ERC20 asset to work with
amount
uint256
when type(uint256).max
is used, this function returns token
s balanceOf
otherwise this function returns amount.
Helper function that checks if spender
has any more approval for asset
, and if so revokes it.
Helper function that validates external receivers are allowed.
Attempted to specify an external receiver during a Cellar callOnAdaptor
call.
Attempted to deposit to a position where user deposits were not allowed.
Attempted to withdraw from a position where user withdraws were not allowed.