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

feat: cleaner chain migration, native token vault, general bridging via L1SharedBridge #463

Open
wants to merge 38 commits into
base: sb-sync-layer-migration
Choose a base branch
from

Conversation

kelemeno
Copy link

@kelemeno kelemeno commented May 10, 2024

What ❔

  • in order to provide better migration of hyperchains, we can migrate them through the l1SharedBridge
  • to do this we need to enable general bridging in the L1SharedBridge, and we also need to move the holding of native tokens to their own NativeTokenVault
  • this solution will also later allow to bridge L2 native tokens, as well as other assets.

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

@@ -230,6 +230,7 @@ contract DefaultAccount is IAccount {
assert(msg.sender != BOOTLOADER_FORMAL_ADDRESS);

// If the contract is called directly, behave like an EOA

Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: probably line added by mistake or linting

@kelemeno kelemeno changed the title move things around feat: native token vault, general messaging. May 13, 2024
l1-contracts/contracts/bridge/L1NativeTokenVault.sol Outdated Show resolved Hide resolved
/// @custom:security-contact security@matterlabs.dev
/// @dev Vault holding L1 native ETH and ERC20 tokens bridged into the hyperchains.
/// @dev Designed for use with a proxy for upgradability.
contract L1NativeTokenVault is
Copy link
Collaborator

Choose a reason for hiding this comment

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

I can see that this essentially separates from the shared bridge, but in the diagram we have a separation between native token vault & the standard scenario.

Does this mean we're only considering here the tokens native to L1?
As I understand the vault for L2 native tokens has yet to be added

Copy link
Author

Choose a reason for hiding this comment

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

Yes, we cannot handle l2 native token yet. ( You could implement it if you want )

@kelemeno kelemeno changed the title feat: native token vault, general messaging. feat: cleaner chain migration, native token vault, general bridging via L1SharedBridge May 14, 2024
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.

None yet

5 participants