Skip to content

Commit

Permalink
Add L1StandardBridge address to x/rollup params
Browse files Browse the repository at this point in the history
  • Loading branch information
natebeauregard committed Dec 10, 2024
1 parent 4f1322f commit ac1ab50
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 40 deletions.
6 changes: 4 additions & 2 deletions proto/rollup/v1/rollup.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ message Params {
string l1_fee_recipient = 1;
// L1 address of the cross-domain messenger contract.
string l1_cross_domain_messenger = 2;
// L1 address of the standard bridge contract.
string l1_standard_bridge = 3;
// Minimum amount of L2 fees that the FeeCollector account must have before they can be withdrawn.
uint64 min_fee_withdrawal_amount = 3;
uint64 min_fee_withdrawal_amount = 4;
// L1 gas limit for withdrawing fees to the L1 recipient address.
uint64 fee_withdrawal_gas_limit = 4;
uint64 fee_withdrawal_gas_limit = 5;
}

// L1BlockInfo represents information about an L1 block and associated L2 data.
Expand Down
1 change: 1 addition & 0 deletions x/rollup/tests/integration/rollup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ func TestRollup(t *testing.T) {
updatedParams := rolluptypes.Params{
L1FeeRecipient: common.HexToAddress("0x123456abcdef").String(),
L1CrossDomainMessenger: common.HexToAddress("0xabcdef123456").String(),
L1StandardBridge: common.HexToAddress("0xa1b2c3d4e5f6").String(),
MinFeeWithdrawalAmount: 5,
FeeWithdrawalGasLimit: 5,
}
Expand Down
6 changes: 6 additions & 0 deletions x/rollup/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ func DefaultParams() Params {
defaultL1FeeRecipient string = "0x000000000000000000000000000000000000dEaD"
// defaultL1CrossDomainMessenger uses the devnet address of the L1 cross domain messenger contract as the default value.
defaultL1CrossDomainMessenger string = "0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE"
// defaultL1CrossDomainMessenger uses the devnet address of the L1 standard bridge contract as the default value.
defaultL1StandardBridge string = "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1"
defaultMinFeeWithdrawalAmount uint64 = 400_000
defaultFeeWithdrawalGasLimit uint64 = 400_000
)

return Params{
L1FeeRecipient: defaultL1FeeRecipient,
L1CrossDomainMessenger: defaultL1CrossDomainMessenger,
L1StandardBridge: defaultL1StandardBridge,
MinFeeWithdrawalAmount: defaultMinFeeWithdrawalAmount,
FeeWithdrawalGasLimit: defaultFeeWithdrawalGasLimit,
}
Expand All @@ -32,6 +35,9 @@ func (p *Params) Validate() error {
if err := validateEthAddress(p.L1CrossDomainMessenger); err != nil {
return fmt.Errorf("validate L1 cross domain messenger address: %w", err)
}
if err := validateEthAddress(p.L1StandardBridge); err != nil {
return fmt.Errorf("validate L1 cross domain messenger address: %w", err)
}

return nil
}
Expand Down
129 changes: 91 additions & 38 deletions x/rollup/types/rollup.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ac1ab50

Please sign in to comment.