Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
78c6c7f3
Commit
78c6c7f3
authored
Oct 26, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
invariant-docs: regenerate
parent
af5ad1d2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
OptimismPortal.md
packages/contracts-bedrock/invariant-docs/OptimismPortal.md
+4
-4
No files found.
packages/contracts-bedrock/invariant-docs/OptimismPortal.md
View file @
78c6c7f3
# `OptimismPortal` Invariants
## Deposits of any value should always succeed unless `_to` = `address(0)` or `_isCreation` = `true`.
**Test:**
[
`OptimismPortal.t.sol#L14
7`
](
../test/invariants/OptimismPortal.t.sol#L147
)
**Test:**
[
`OptimismPortal.t.sol#L14
8`
](
../test/invariants/OptimismPortal.t.sol#L148
)
All deposits, barring creation transactions and transactions sent to
`address(0)`
, should always succeed.
## `finalizeWithdrawalTransaction` should revert if the finalization period has not elapsed.
**Test:**
[
`OptimismPortal.t.sol#L17
0`
](
../test/invariants/OptimismPortal.t.sol#L170
)
**Test:**
[
`OptimismPortal.t.sol#L17
1`
](
../test/invariants/OptimismPortal.t.sol#L171
)
A withdrawal that has been proven should not be able to be finalized until after the finalization period has elapsed.
## `finalizeWithdrawalTransaction` should revert if the withdrawal has already been finalized.
**Test:**
[
`OptimismPortal.t.sol#L20
0`
](
../test/invariants/OptimismPortal.t.sol#L200
)
**Test:**
[
`OptimismPortal.t.sol#L20
1`
](
../test/invariants/OptimismPortal.t.sol#L201
)
Ensures that there is no chain of calls that can be made that allows a withdrawal to be finalized twice.
## A withdrawal should **always** be able to be finalized `FINALIZATION_PERIOD_SECONDS` after it was successfully proven.
**Test:**
[
`OptimismPortal.t.sol#L2
29`
](
../test/invariants/OptimismPortal.t.sol#L229
)
**Test:**
[
`OptimismPortal.t.sol#L2
30`
](
../test/invariants/OptimismPortal.t.sol#L230
)
This invariant asserts that there is no chain of calls that can be made that will prevent a withdrawal from being finalized exactly
`FINALIZATION_PERIOD_SECONDS`
after it was successfully proven.
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment