You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code looks very similar though, but it uses completely different types without a common trait implementation so it's not easy to extract the generic part. What we would need is "generic modules", but these are obviously not available.
However it's possible to reduce some of the boilerplate by using macros (see select_bridge! in CLI as an example). It would be cool to take a look at what trade-off are we talking about: macro complexity vs code reduction.
The text was updated successfully, but these errors were encountered:
There aren't many lines required now. Bridge declaration is now actually looks like declaration (e.g. here and here). Call builders is the most annoying thing in current declarations - it shall be fixed with #2491 . So I'm closing this issue now
Currently we support ~6 networks / ~3 bridges and the amount of code required to support new pairs seems quite high (see https://github.com/paritytech/parity-bridges-common/pull/1122/files#).
The code looks very similar though, but it uses completely different types without a common trait implementation so it's not easy to extract the generic part. What we would need is "generic modules", but these are obviously not available.
However it's possible to reduce some of the boilerplate by using macros (see
select_bridge!
in CLI as an example). It would be cool to take a look at what trade-off are we talking about: macro complexity vs code reduction.The text was updated successfully, but these errors were encountered: