As i'm new to solidity can someone guide me about the hashing function or encoding scheme which solidity default compiler use to encode or hash the input data of smart contracts in remix ide?
Asked
Active
Viewed 213 times
0
-
Can you elaborate on the "hashing function or encoding scheme" part? Hashing is a different thing than encoding. Can you give an example of an input and output of what you're looking for? – Petr Hejda Jun 15 '21 at 21:28
-
I mean when i giving input value then the compiler is giving values like this in json file. "methodIdentifiers": { "getAge()": "967e6e65", "getName()": "17d7de7c", "setAge(uint256)": "d5dcf127", "setName(string)": "c47f0027" } are these values are hash or encode ? – nazya Jun 16 '21 at 15:59
-
These are hashes. They are called "function signature", you can find more info about them in [this answer](https://stackoverflow.com/a/66950423/1693192) for example. – Petr Hejda Jun 16 '21 at 23:38
-
so basically its a keccak-256 hash ? – nazya Jun 17 '21 at 07:53
-
That's corrent. It's the first 4 bytes (8 hex characters) of keccak-256 hash of the function name and param datatypes. – Petr Hejda Jun 17 '21 at 08:28