Using @typechain/truffle-v5
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- blockchain
Research direction
Start in package.json, where the Truffle v5 and TypeChain dependencies are declared, then inspect uses of LockupInstance and depositToProperty. Update the affected calls and type inferences for @typechain/truffle-v5 while preserving existing assertions and behavior; done means the existing test cases pass in CI without type errors.
Written by the indexing model from the issue text.
Description
Detailed description
Currently, this project is using Truffle v5.
But Typechain is targeted as @typechain/truffle-v4.
https://github.com/dev-protocol/protocol-v2/blob/2abee70352043073e5841ec04cb1d0363b774cf1/package.json#L7
https://github.com/dev-protocol/protocol-v2/blob/2abee70352043073e5841ec04cb1d0363b774cf1/package.json#L28
We need to use @typechain/truffle-v5.
Context
Changing the Typechain version should result in many type errors, but as long as the existing test cases pass the CI, the existing codes are certainly executable code.
So, we will need to change function callings or type inferences to accommodate the new types, but basically the assertions and behavior itself should not need to change.
Possible implementation
No response
Additional information
As I tried it locally... it seems like the following major changes are needed:
- LockupInstance type is no longer exports
depositToProperty, it exportsmethods['depositToProperty(address,uint256)']andmethods['depositToProperty(address,uint256,bytes32)']instead of it. - Truffle is no longer uses BigNumber.js, it uses bn.js instead of it. But we only use the interfaces common to both and test cases have no problem.
Code of Conduct
- I agree to follow this project's Code of Conduct
- Dominant language
- TypeScript
- Stars
- 18
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
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.
More from dev-protocol/protocol-v2
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
dev-protocol/protocol-v2#170 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
dev-protocol/protocol-v2#169 ·
-
Dependency Dashboard Open
Difficulty 4/5 3-5 days Newbie friendliness 15/100
dev-protocol/protocol-v2#25 ·
All issues in dev-protocol/protocol-v2
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·