oasisprotocol / oasisprotocol/explorer
[Bug]: No type safety around different types of addresses
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 13
- Avg merge
- 58m
- Merged PRs (30d)
- 2
Description
Is there an existing issue for this?
- I have searched the existing issues
SUMMARY
Internally in the code, we are using different address formats, but everything is a string
STEPS TO REPRODUCE
In our codebase, we are working with multiple types of addresses; most importantly Oasis addresses and ETH addresses. The problem is that both are represented using the string type, and so there is no type safety about using them the wrong way, therefore we can easily supply an ETH address where on Oasis address is expected, or vica versa.
Ideally, we should represent (wrap?) the different address types using different types, so that it would be impossible to use the wrong one everywhere.
EXPECTED BEHAVIOR
No response
Contributor guide
No contributing guide indexed for this repository
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
The issue names no files, tests, or entry points. Start by locating the TypeScript uses of string values for Oasis and ETH addresses, then trace where each address type enters and is passed through the application. Done means the two address kinds are represented distinctly so they cannot be supplied interchangeably throughout the affected code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100