[x] Replace finalizeExits() with finalizeExits(uint64[] slots) which will call finalizeExit on each slot. This allows a user to finalize the exit of multiple of their coins. Allows us to simplify the cleanupExit modifier, and reduce gas costs. Will also omit the getExitIndex function.
[x] Add timestamp to getExit
[x] Add cancelExit(uint64 slot) and cancelExits(uint64[] slots) functions. This must check if there is an exit for the specified coin. If yes, it will reset the coin's state to DEPOSITING and free the exitor's bond.
[x] Add max value to be held by the chain (as a safety measure)
Notes to self:
Investigate if it's safe to remove parent coin from challengeBefore.
Investigate if returning to sequential coin numbering is better
finalizeExits()
withfinalizeExits(uint64[] slots)
which will callfinalizeExit
on each slot. This allows a user to finalize the exit of multiple of their coins. Allows us to simplify thecleanupExit
modifier, and reduce gas costs. Will also omit thegetExitIndex
function.getExit
cancelExit(uint64 slot)
andcancelExits(uint64[] slots)
functions. This must check if there is an exit for the specified coin. If yes, it will reset the coin's state toDEPOSITING
and free the exitor's bond.challengeBefore
.