Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Conversation

@nmlinaric
Copy link
Contributor

Description

Add FeeHandlerRouter contract which will enable having multiple FeeHandlers per Bridge

Related Issue Or Context

Closes: #583

How Has This Been Tested? Testing details.

Unit tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation

Checklist:

  • I have commented my code, particularly in hard-to-understand areas.
  • I have ensured that all acceptance criteria (or expected behavior) from issue are met
  • I have updated the documentation locally and in chainbridge-docs.
  • I have added tests to cover my changes.
  • I have ensured that all the checks are passing and green, I've signed the CLA bot

@lastperson
Copy link
Contributor

I have one concern regarding the design. With router, not it is required to execute 2 contracts related to fee, adding ~2k+ gas overhead even if there is only a single fee handler.

@nmlinaric nmlinaric requested a review from lastperson July 12, 2022 12:25
@nmlinaric
Copy link
Contributor Author

I have one concern regarding the design. With router, not it is required to execute 2 contracts related to fee, adding ~2k+ gas overhead even if there is only a single fee handler.

Agree with you, my idea is we could implement onlyRouterOrBridge modifier on FeeHandlers so both router and bridge can call collectFee and in those cases when we don't want/require using router we just point to FeeHandlers on the Bridge contract.

@nmlinaric nmlinaric merged commit aa9614c into master Jul 14, 2022
@nmlinaric nmlinaric deleted the nmlinaric/fee-router branch July 14, 2022 10:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FeeHandlerRouter

3 participants