selector but different number of arguments. I am curious about what method will be called if contract has both of them?
Can you be more specific? you can write testing cases?
As far as I know, EVM executes contract function according to the function selector. There are methods with the same selector value. What if contract has both of this functions, which one will be executed?
Thanks for the details. It can be tested, can't it?
By doing a test with a contract having both functions compiled by both Solidity v0.8.9 and v0.7.4, a TypeError is returned. So to answer your question, if two functions are in the same contract, it wouldn't pass the compilation stage.
Oh wow very interesting
Обсуждают сегодня