-
Notifications
You must be signed in to change notification settings - Fork 102
chore: cleanup z3 #1208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
chore: cleanup z3 #1208
Changes from 1 commit
77adbb6
60e9eed
c64be61
cdf6931
008818e
08ecc28
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.13 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| [project] | ||
| name = "aave-v4" | ||
| version = "0.1.0" | ||
| readme = "README.md" | ||
| requires-python = ">=3.13" | ||
| dependencies = ["z3-solver>=4.15.7.0"] | ||
|
|
||
| [dependency-groups] | ||
| dev = ["ruff>=0.15.0"] | ||
|
|
||
| [tool.ruff.format] | ||
| quote-style = "single" |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,13 @@ | ||
| from z3 import * | ||
| from commons import * | ||
|
|
||
| s = Optimize() | ||
|
|
||
| UINT256_MAX = IntVal(2**256 - 1) | ||
| RAY = IntVal(10**27) | ||
| SECONDS_PER_YEAR = IntVal(365 * 24 * 60 * 60) | ||
|
|
||
| rate = IntVal(2**96 - 1) | ||
| lastUpdateTimestamp = IntVal(1) | ||
| currentTimestamp = Int("currentTimestamp") | ||
| currentTimestamp = Int('currentTimestamp') | ||
| elapsed = currentTimestamp - lastUpdateTimestamp | ||
|
|
||
| s.add(elapsed >= 0) | ||
|
|
@@ -19,4 +18,4 @@ | |
|
|
||
| assert s.check() == sat | ||
| m = s.model() | ||
| print("currentTimestamp max =", m[currentTimestamp]) | ||
| print('currentTimestamp max =', m[currentTimestamp]) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe we can create a function in commons called
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good idea ty, lmk wdyt of the addition |
||
Uh oh!
There was an error while loading. Please reload this page.