Timeline for How to generate the correct hash for signatures?
Current License: CC BY-SA 4.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 4 at 2:08 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Sep 28 at 14:58 | answer | added | Ahmed Ihsan Tawfeeq | timeline score: 0 | |
Sep 27 at 19:05 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
May 22 at 1:03 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Jan 8 at 17:05 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Jan 26, 2023 at 16:11 | answer | added | rajohs | timeline score: 0 | |
Jan 26, 2023 at 9:33 | comment | added | Markus Schick |
Are you sure that abi.encodePacked is used by defaultAbiCoder ? You should really only use abi.encodePacked if you know what you are doing, as it can lead to hash collisions when used with dynamic types (see: discussion). The function abi.encode is available in Solidity
|
|
Jan 26, 2023 at 0:43 | comment | added | Nulik |
encodePacked() is the correct function as 'packed' means that when the variable is smaller than 32 bytes it will be used as its true size is, if it is not packed, then it will be aligned on 32 bytes with prepended 0s and computed
|
|
Jan 26, 2023 at 0:41 | comment | added | Nulik | in solidity the address is 20 byte array, the hash is 32 byte array. In Javascript what is your address? A string with 0x and hexadecimal characters? That would be an error. Same for the hash. You have to handle raw bytes in javascript | |
Jan 25, 2023 at 23:34 | comment | added | rajohs | abi.encode as part of which package? | |
Jan 25, 2023 at 23:31 | comment | added | Markus Schick |
Have you tried using abi.encode instead. For reference: ethereum.stackexchange.com/questions/119583/…
|
|
Jan 25, 2023 at 23:17 | history | asked | rajohs | CC BY-SA 4.0 |