Skip to content

Conversation

@mrice32
Copy link
Contributor

@mrice32 mrice32 commented Feb 8, 2023

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.

Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
@mrice32 mrice32 requested a review from pxrl February 8, 2023 07:12
@mrice32 mrice32 changed the title DRAFT: initial version of succinct contracts feat: add succinct contracts Feb 16, 2023
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
@mrice32 mrice32 requested a review from nicholaspai February 16, 2023 15:41
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
@mrice32 mrice32 marked this pull request as ready for review February 16, 2023 16:23
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;
Copy link
Member

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

Copy link
Contributor Author

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?


// 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");
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member

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

Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
@mrice32 mrice32 merged commit 0b4dcea into master Feb 16, 2023
@mrice32 mrice32 deleted the succinct_integration branch February 16, 2023 23:50
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.

3 participants