Skip to content

Problem: bridge config is hardcoded #1161

@outerlook

Description

@outerlook

hey @williamrusdyputra, since you are owning more of the code of erc20 implementation, can you analyze some suggestions?

My aim here is to make sure we have tests available to cover the implementation.

I see that some actions hardcode configurations of each network. I propose we make this configurable by adding a table network_bridge_config with columns

  • fee
  • treasure_address
  • chain_name

this should only be updated by the db_owner, and would make it more testable in ci tests and test nodes, etc.

It would be better if even the action could accept the alias as a parameter so we could call things like {chain_name}.bridge dynamically. But doesn't seem possible, in the worst case, we would still need to add a bunch of if ... else to have a statement for each chain. The idea is just to have less surface of code for fewer tests.

What do you think about this? Then we can start covering more critical parts with tests

I can take this issue if it aligns with the goal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions