-
Notifications
You must be signed in to change notification settings - Fork 75
feat: add succinct contracts #232
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
Conversation
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
| // private. Leaving it set to true can permanently disable admin calls. | ||
| bool private adminCallValidated; | ||
|
|
||
| uint16 public hubChainId; |
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.
nit: can we make this a constant = 1 and temporarily override when deploying to goerli? Not a big deal but save some gas
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 don't think we can do that (unless we make it immutable) because it would be stored in the implementation contract and not the proxy, right?
contracts/Succinct_SpokePool.sol
Outdated
|
|
||
| // This operates similarly to a re-entrancy guard. It is set after validation to tell methods called by this | ||
| // method that the call has been validated as an admin and is safe. | ||
| require(!adminCallValidated, "Re-entered handleTelepathy"); |
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.
Seems like a good candidate to use a modifier even though it adds contract storage and potentailly adds gas, it makes it more readable
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.
Done.
nicholaspai
left a comment
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.
This is pretty straightforward to me LGTM
This includes the Succinct SpokePool and Adapter contracts. Note: succinct is only a message bridge, so the methods that relay tokens have been left as no-ops. Those will either need to be overridden, or be left as no-ops and never used on those chains (in favor of arbitrage-style mechanisms). Right now, I have these as no-ops rather than reverting so they don't prevent other related actions from going through. Might be a good idea to have them emit a warning event that we can watch for.
Note: I used the succinct contracts in this repo: https://github.com/succinctlabs/telepathy-contracts.