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

Add support for Orbit token bridge #34

Merged
merged 140 commits into from
Oct 9, 2023
Merged

Conversation

gvladika
Copy link
Contributor

@gvladika gvladika commented Jun 4, 2023

This commit adds support for token bridge for Orbit (ERC20-based) rollups where custom token is used to pay for fees.

Implementation is done mainly in new Orbit-specific contracts which inherit from their "standard" counterparts.
Ie.:

  • L1OrbitERC20Gateway inherits from L1ERC20Gateway
  • L1OrbitCustomGateway inherits from L1CustomGateway
  • L1OrbitGatewayRouter inherits from L1GatewayRouter
  • L1OrbitReverseCustomGateway from L1ReverseCustomGateway

Bridging of rollup's native fee token through token bridge is not allowed. It can only be bridged through inbox directly, and in that case it is minted on L2 side as native currency.

Also Includes:

  • Foundry unit and integration test cases
  • e2e Hardhat test cases executed in local test env

gvladika and others added 23 commits August 25, 2023 16:07
…design

Rollup and rollup proxy admin are owned by L1 upgrade executor, on which the
rollupOwner has EXECUTOR role. When creating token bridge for rollup, now
rollupOwner has to be provided as well. L1 creator will check that rollupOwner
has EXECUTOR role on the upgrade executor (which is fetched via .owner()).
Aliased L1 upgrade executor and rollup owner are then made executors on L2
upgrade executor.
Add UpgradeExecutor to token bridge creation flow
Derive token bridge addresses on child chain from chain ID
Add support to do single-TX deployment of token bridge for fee token based Orbit chains
This function uses the fee paying token instead of ETH for fees
Make sure ether is not sent in ERC20 token bridge
setGateways() in OrbitGatewayRouter should not be payable
@gvladika gvladika merged commit c68b22b into token-bridge-factory Oct 9, 2023
4 of 5 checks passed
@gzeoneth gzeoneth deleted the erc20-based-bridge branch July 8, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants