Function: rolloverVault(address vaultAddress)
Resets the vault to the default state after the trade is settled.
Inputs
vaultAddress
Control: Fully controlled.
Constraints: The vault metadata's
vaultStart
property must not be 0, and it must have a state ofWithdrawalQueueProcessed
.Impact: This vault's metadata is reset.
Branches and code coverage (including function calls)
Intended branches
Should successfully roll over the vault.
Should emit a
RolloverVault
event.
Negative behaviour
Should revert if not called by a trader admin.
Should revert if the vault status is not set to
WithdrawalQueueProcessed
.Should revert if the vault's
tradeExpiry
is set to 0.