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

Refactor L2 setup #16

Open
Mohiiit opened this issue Nov 1, 2024 · 0 comments
Open

Refactor L2 setup #16

Mohiiit opened this issue Nov 1, 2024 · 0 comments
Labels
enhancement New feature or request refactor Something needs to be refactor

Comments

@Mohiiit
Copy link
Contributor

Mohiiit commented Nov 1, 2024

Title

Optimize Bootstrapper to Minimize Zero-Fee Contract Deployments

Description

Currently, all L2 contracts in the bootstrapper are being declared and deployed with zero fees, which is not optimal. We need to restructure the flow to minimize zero-fee operations, using them only when absolutely necessary.

Current Issue

  • All L2 contract declarations and deployments are using zero fees
  • This includes contracts that could be deployed with actual fees after initial setup

Proposed Solution

Implement a sequential deployment flow that minimizes zero-fee operations:

  1. Zero-Fee Required Steps

    • Declare OZ account contract and create initial account
    • Declare ERC20 token and create ETH token
    • Declare and deploy ETH bridge
  2. Fund Transfer

    • Deposit funds from L1 to L2 to enable paid transactions
  3. Paid Operations

    • Use the funded account to declare and deploy remaining contracts with proper fees

Benefits

  • Minimizes zero-fee operations to only essential initial setup
  • Improves system security and economic model
  • Maintains proper fee structure for most contract deployments
@Mohiiit Mohiiit added enhancement New feature or request refactor Something needs to be refactor labels Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor Something needs to be refactor
Projects
None yet
Development

No branches or pull requests

1 participant