Function: setTradeData(address vaultAddress, uint256 _tradeDate, uint256 _tradeExpiry, uint256 _aprBps, uint256 _tenorInDays)
Sets a vault's trade-related metadata.
Inputs
vaultAddress
Control: Fully controlled.
Constraints: The vault's status must be set to
NotTraded
.Impact: This vault's metadata is updated.
_tradeDate
Control: Fully controlled.
Constraints: N/A.
Impact: Used to update the vault's metadata.
_tradeExpiry
Control: Fully controlled.
Constraints: Must not be set to 0.
Impact: Used to update the vault's metadata.
_aprBps
Control: Fully controlled.
Constraints: N/A.
Impact: Used to update the vault's metadata.
_tenorInDays
Control: Fully controlled.
Constraints: N/A.
Impact: Used to update the vault's metadata.
Branches and code coverage (including function calls)
Intended branches
Should update the vault's metadata correctly.
Negative behaviour
Should revert if the vault's status it not set to
NotTraded
.Should revert if the
_tradeExpiry
argument is set to 0.Should revert if called by a non--trader-admin role.