trufnetwork / trufnetwork/node
Problem: bridge config is hardcoded
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 7
- Forks
- 3
- Avg merge
- 3h 2m
- Merged PRs (30d)
- 13
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the ERC20 bridge actions and the network configurations that are currently hardcoded. Review how database-owned configuration and CI or test-node setup are handled, then define the table and update path before adding coverage for the configurable behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, blockchain, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100