Skip to content
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

Merged
merged 12 commits into from
Oct 18, 2024
Merged

audit(14): arbitrum block number #280

merged 12 commits into from
Oct 18, 2024

Conversation

zhongeric
Copy link
Collaborator

@zhongeric zhongeric commented Sep 30, 2024

fix #283

alanhwu
alanhwu previously approved these changes Oct 2, 2024
Copy link
Collaborator

@alanhwu alanhwu left a 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 {
Copy link
Collaborator

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

Copy link
Collaborator Author

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 {
Copy link
Collaborator

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

Copy link
Collaborator Author

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

codyborn
codyborn previously approved these changes Oct 8, 2024
Copy link
Collaborator

@codyborn codyborn left a 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

codyborn
codyborn previously approved these changes Oct 18, 2024
codyborn
codyborn previously approved these changes Oct 18, 2024
@codyborn codyborn merged commit c145fa4 into main Oct 18, 2024
3 checks passed
@codyborn codyborn deleted the audit-v3-14 branch October 18, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

audit: 14
3 participants