contracts
contracts copied to clipboard
UniBridge: Single bridge contract for tokens
Description
New bridge for fungible tokens.
- Doesn't require re-deploying new bridge contracts for each token
- Allows deploying ERC777 & ERC20 tokens on L2
- Tokens can be converted ERC777 <-> ERC20 on L2
- L1 contracts can calculate the address of L2 tokens (using Create2)
Contributing Agreement
- [X] I have read and understood the Optimism Contributing Guide and Code of Conduct and am following those guidelines in this pull request.
Left points for discussion in the #devex channel on Discord.
Only things that I think would warrant additions to the actual contracts are a way for new tokens (meant to be used on Optimism) to lock in using ERC20 or ERC777
Also I would like to add some withdrawAndCall functionality like I've been talking with @ben-chain about for a while but that can be seperate from this PR 👍
@TransmissionsDev Ya there's lots of features I'd like to add around withdrawals as well, but I figured I'd try to limit the scope of this PR
We need a depositFor function in order to allow interactions via smart-contracts. Similar to Polygon:
https://docs.matic.network/docs/develop/ethereum-matic/pos/calling-contracts/erc20#deposit
I'm sorry this PR has been sitting here for so long, without at least having some feedback from the team. FWIW, different people have had some discussion with @dmihal on other channels, so we're not completely ghosting on him.
IMO, the main obstacle to merging this is that review needs to be done carefully, and there is a significant amount of code here.
I'll sync with the team and try to come back next week with:
- a decision for if this should be in scope for the repo
- a timeline for review