-
Notifications
You must be signed in to change notification settings - Fork 89
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
base: main
Are you sure you want to change the base?
Conversation
|
||
# 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 |
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.
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?
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.
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( |
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.
Can we just add this to afterTokenTransfer
instead of having 2 functions? ie update the post hook?
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, updates now only happens if the contract is deployed on OP mainnet
nativeChainId := chainid() | ||
} | ||
|
||
if (nativeChainId != uint256(10)) { |
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 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() |
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.
You can do block.chainid
in modern solidity
I believe there has been a lot of progress on this that has not yet been specified |
This adds the additional specification to allow interop functionality to the
Alligator
contract: #247