simplify tx builder checksum calculation
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 50/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- web-dev
Research direction
Start at apps/tx-builder/src/lib/checksum.ts around line 8 and inspect how serializeJSONObject produces the checksum input. Compare the proposed stable-stringify approach with the example tx builder JSON output. Done means the custom encoding is simplified while checksum calculation remains deterministic for tx builder files.
Written by the indexing model from the issue text.
Description
im working on adding the tx builder json format support to ape-safe and the way checksum is calculated sticks out to me.
currently it uses some unhinged weird custom encoding, which looks very brittle when you consider porting into other languages.
consider using something like json-stable-stringify instead.
example of output:
>>> serializeJSONObject(batchFileObject)
'{["chainId","createdAt","meta","transactions","version"]"4",1646321521061,{["checksum","createdFromOwnerAddress","createdFromSafeAddress","name","txBuilderVersion"]"","0x49d4450977E2c95362C13D3a31a09311E0Ea26A6","0xDF8a1Ce35c9a6ACE153B4e0767942f1E2291a1Aa","test batch file","1.4.0",},[{["contractInputsValues","contractMethod","to","value"]{["paramAddress"]"0x49d4450977E2c95362C13D3a31a09311E0Ea26A6",},{["inputs","name","payable"][{["internalType","name","type"]"address","paramAddress","address",}],"testAddress",false,},"0x49d4450977E2c95362C13D3a31a09311E0Ea26A6","0",},{["contractInputsValues","contractMethod","to","value"]{["paramAddress","paramBool"]"","false",},{["inputs","name","payable"][{["internalType","name","type"]"bool","paramBool","bool",}],"testBool",false,},"0x49d4450977E2c95362C13D3a31a09311E0Ea26A6","0",},{["data","to","value"]"0x42f4579000000000000000000000000049d4450977e2c95362c13d3a31a09311e0ea26a6","0x49d4450977E2c95362C13D3a31a09311E0Ea26A6","2000000000000000000",}],"1.0",}'
- Dominant language
- TypeScript
- Stars
- 116
- Forks
- 84
- PR merge metrics
- No merged PRs in 30d
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.
More from safe-global/safe-react-apps
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
safe-global/safe-react-apps#863 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
safe-global/safe-react-apps#854 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
safe-global/safe-react-apps#852 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
safe-global/safe-react-apps#839 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
safe-global/safe-react-apps#835 ·
All issues in safe-global/safe-react-apps
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·