-
Notifications
You must be signed in to change notification settings - Fork 96
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
interop: update predeploys.md #314
Conversation
specs/interop/predeploys.md
Outdated
### OptimismMintableERC20 | ||
|
||
The `OptimismMintableERC20Factory` creates ERC20 contracts on L2 that can be used to deposit | ||
native L1 tokens into (`OptimismMintableERC20`). Anyone can deploy `OptimismMintableERC20`s contracts. |
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: trailing s
reads strange in "OptimismMintableERC20
s"
specs/interop/predeploys.md
Outdated
The `OptimismMintableERC20Factory` is updated to use `CREATE3` instead of `CREATE2`. | ||
This will remove the compiler's dependency on address computation. | ||
|
||
The salt SHOULD depend on the inputs: |
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.
A quick sentence for rationale here would be good, like these are used to ensure that there is a single unique token address per set of ERC20 metadata
Looks good to me, one could say that the |
@tynes Do you think its worth mentioning something about the external functions and invariants here? I also haven't mentioned anything about the |
I do think that would be useful here and keep a high bar for the specs |
I don't think we want to go deep into the one time update for the tokenlist here, that is something we should do a design doc for and not add to the specs |
Added both. Let me know if you agree. |
We are adding a new contract inheriting form Should we create a new function |
@tynes this would affect the specs. We could simply modify the existing |
I thought we decided to use |
specs/interop/predeploys.md
Outdated
|
||
### Functions | ||
|
||
#### `createWithCreate3` |
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 leaks an implementation detail into the name, not a fan of this style of naming
specs/interop/predeploys.md
Outdated
A reference implementation looks like the following: | ||
|
||
```solidity | ||
function createOptimismMintableERC20WithDecimals( |
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 we could get away without implementing the whole function here and instead precisely define the salt in natural language and the invariant that the mapping must be updated
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.
perfect. Will also remove the reference implementation for the others
Description
Updated the
predeploys.md
spec to include details on the newOptimismMintableERC20Factory
.I only focused on the updates to keep it similar to the L1Block section (also an update), but did not make any comments about the actual public and external functions, or invariants. I can include all of this and turn it into a more explicit update or a full spec.