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

Initial draft of Alligator Interop spec #285

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

corydickson
Copy link

This adds the additional specification to allow interop functionality to the Alligator contract: #247


# Overview

The goal of this specification is to allow interoperability between the base and superchains for that use the [`Alligator`](alligator.md) predeploy. This allows the support of the
Copy link
Contributor

Choose a reason for hiding this comment

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

One common misconception is that each chain is called a superchain, but really the superchain is made up of individual chains. What do you mean the base here?

Copy link
Author

Choose a reason for hiding this comment

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

Explicated the use of other OP chains that are not mainnet and their interaction with the Alligator contract

the new storage field and update the voting power of the delegate.

```solidity
function afterTokenTransferInterop(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just add this to afterTokenTransfer instead of having 2 functions? ie update the post hook?

Copy link
Author

Choose a reason for hiding this comment

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

Done, updates now only happens if the contract is deployed on OP mainnet

nativeChainId := chainid()
}

if (nativeChainId != uint256(10)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not going to be scalable as every token transfer on a remote chain will require a relayer to send a transaction on op mainnet. This means gov will need to front the costs here because nobody else has the incentive to do so. Wondering if there is a way that we can:

  • send batched diffs
  • not need to be aware of the chainid

Going to brainstorm a bit on this


uint256 nativeChainId;
assembly {
nativeChainId := chainid()
Copy link
Contributor

Choose a reason for hiding this comment

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

You can do block.chainid in modern solidity

@tynes
Copy link
Contributor

tynes commented Jul 29, 2024

I believe there has been a lot of progress on this that has not yet been specified

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.

2 participants