We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
json-stable-stringify
safe-react-apps/apps/tx-builder/src/lib/checksum.ts
Line 8 in 8952156
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",}'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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.safe-react-apps/apps/tx-builder/src/lib/checksum.ts
Line 8 in 8952156
example of output:
The text was updated successfully, but these errors were encountered: