This question already has an answer here:
The method to execute a function on a contract in Ethereum is to use the JSON RPC protocol to make a request which has the details of which function you want to call.
When it's eg. a function called
get() what will happen is:
- Take the sha3 hash:
- Get the first 4 bytes:
- Add this function "selector" in the
datafield of your
I am wondering what happens if you try to compile and deploy a contract with conflicting function selectors.
When 1 contract has 2 functions with the same selector:
a. There will be an error during the contract compilation
b. There will be an error during the contract deploy (but it will compile)
c. No errors but when a function is called you cannot know which function will be triggered.
Does anyone know?