-
Notifications
You must be signed in to change notification settings - Fork 114
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
validation: decouple GasToken tests #803
base: main
Are you sure you want to change the base?
Conversation
7552640
to
b2549f3
Compare
validation/gas_token.go
Outdated
} | ||
} | ||
|
||
isCustomGasToken, err = getBool("isCustomGasToken()", superchain.Addresses[chain.ChainID].SystemConfigProxy, l2Client) |
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.
Shouldn't this use an l1Client?
I'd like us to revisit the "reverting is acceptable" case b/c it seems like it could be hiding many skeletons like this one. Can we double check it?
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.
Yea this should be an l1Client. Good catch. What are the pre/post comments referring to? Pre-what? Those comments were just copied from existing code
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.
I think what this is trying to do is to cope with deployments of the SystemConfig
which don't expose the isCustomGasToken()
method. This would indicate they don't support custom gas tokens and therefore should automatically pass the test. A better approach would be to read the semver here, and unless it is greater than or equal to some version (which we would need to look up or ask someone for) we don't do the rest of the check.
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.
Maybe there is a semver for the SystemConfigProxy
we could check?
If its < a certain value, we don't make the following calls at all (because the method doesn't exist?):
- SystemConfigProxy.isCustomGasToken()
- L1BlockPredeploy.isCustomGasToken()
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.
Discussed some findings on semver in this discord thread. Not sure how to proceed at the moment. The isCustomGasToken()
method seems to be missing on the latest standard version of the SystemConfig
contract
validation/gas_token.go
Outdated
require.NoError(t, err) | ||
} | ||
|
||
func CheckGasToken(chain *superchain.ChainConfig, l1Client EthClient) error { |
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.
Did we add a unit test for this yet? That is what I would expect in gas_token_test.go
.
Closes #773