IMultiDepositorVault
Last updated
Last updated
Interface for vaults that can accept deposits from multiple addresses
Set the before transfer hooks
function setBeforeTransferHook(IBeforeTransferHook hooks) external;
Parameters
hooks
IBeforeTransferHook
The before transfer hooks address
Deposit tokens into the vault and mint units
function enter(address sender, IERC20 token, uint256 tokenAmount, uint256 unitsAmount, address recipient) external;
Parameters
sender
address
The sender of the tokens
token
IERC20
The token to deposit
tokenAmount
uint256
The amount of token to deposit
unitsAmount
uint256
The amount of units to mint
recipient
address
The recipient of the units
Withdraw tokens from the vault and burn units
function exit(address sender, IERC20 token, uint256 tokenAmount, uint256 unitsAmount, address recipient) external;
Parameters
sender
address
The sender of the units
token
IERC20
The token to withdraw
tokenAmount
uint256
The amount of token to withdraw
unitsAmount
uint256
The amount of units to burn
recipient
address
The recipient of the tokens
Emitted when the before transfer hook is updated
event BeforeTransferHookSet(address indexed beforeTransferHook);
Parameters
beforeTransferHook
address
The new before transfer hook address
Emitted when the provisioner is updated
event ProvisionerSet(address indexed provisioner);
Parameters
provisioner
address
The new provisioner address
Emitted when tokens are deposited into the vault
event Enter(
address indexed sender, address indexed recipient, IERC20 indexed token, uint256 tokenAmount, uint256 unitsAmount
);
Parameters
sender
address
The address initiating the deposit
recipient
address
The address receiving the vault units
token
IERC20
The token being deposited
tokenAmount
uint256
The amount of tokens deposited
unitsAmount
uint256
The amount of vault units minted
Emitted when tokens are withdrawn from the vault
event Exit(
address indexed sender, address indexed recipient, IERC20 indexed token, uint256 tokenAmount, uint256 unitsAmount
);
Parameters
sender
address
The address initiating the withdrawal
recipient
address
The address receiving the tokens
token
IERC20
The token being withdrawn
tokenAmount
uint256
The amount of tokens withdrawn
unitsAmount
uint256
The amount of vault units burned
error Aera__UnitsLocked();
error Aera__ZeroAddressProvisioner();
error Aera__CallerIsNotProvisioner();