Function: receiveAssetsFromCegaState(address vaultAddress, uint256 amount)
Receive assets and allocate the underlying asset to the specified vault's balance.
Inputs
vaultAddress
Control: Fully controlled.
Constraints: The CegaState contract that is calling this function must have the required funds.
Impact: The funds are transferred to this contract.
amount
Control: Fully controlled.
Constraints: The CegaState contract must own at least this amount of funds.
Impact: This amount is transferred over to this contract.
Branches and code coverage (including function calls)
Intended branches
The balance of this contract is updated successfully.
The vault's metadata is updated to account for the new funds.
Negative behaviour
Should revert if not called by the CegaState contract.
Should revert if an invalid vault address is used.
Should revert if the caller does not have the required funds.