-
Notifications
You must be signed in to change notification settings - Fork 86
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
audit(14): arbitrum block number #280
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question about testing Arbitrum separately
} | ||
} | ||
|
||
contract NonlinearDutchDecayLibTest is Test, GasSnapshot { | ||
contract NonlinearDutchDecayLibTest is Test, GasSnapshot, BlockNumberish { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if we should do another test suite for chainId 42161 that uses setBlockNumber
since our current tests just use vm.roll()
which wouldn't do anything in an Arbitrum environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh yeah so imo the NonLinearDutchDecayLib should function completely agnostic of the behavior of BlockNumberish - since it strictly takes it in as a parameter. So a test that the blockNumberish parameter passed into the Lib is correctly set may be better in the reactor test
/** | ||
* @notice Minimal interface for interacting with Arbitrum system contracts | ||
*/ | ||
interface IArbSys { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add this as a submodule:
[submodule "lib/nitro-contracts"]
path = lib/nitro-contracts
url = https://github.com/OffchainLabs/nitro-contracts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree but not sure if necessary since we also don't need the entire IArbSys interface, just this one func
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Left some small suggestions
fix #283