hello
I asked AI this question , but Im having some doubts so I come back to human to check !

why would use abi.encodeWithSignature to call a function of a contract that is already deployed on the chain in stead of using interface to define the methods of this contract ?

and one of the answer was :

3:You want to call the contract's functions using a contract that is compiled with an older version of Solidity: If the contract you want to call was compiled with a newer version of Solidity than the contract you are calling it from, you may not be able to use an interface to define the methods of the contract. In this case, you can use abi.encodeWithSignature to call the contract's functions.

4:You want to call the contract's functions using a contract that is compiled with a different compiler: If the contract you want to call was compiled with a different compiler than the contract you are calling it from, you may not be able to use an interface to define the methods of the contract. In this case, you can use abi.encodeWithSignature to call the contract's functions.

Jan 5, 2023, 5:26 PM
my question is reagrding number 4 , is this true ?
and how can I know the name of the compiler that has been used ? (talking about the compiler not the version )
Jan 5, 2023, 5:28 PM
I see you have so much free time)
Jan 5, 2023, 5:50 PM
not really , Im self learning from resources I found on internet , Im even frustrated because Im not able to go fast 😒
and I have been blocked with low level calls , these days
Jan 5, 2023, 5:56 PM
just get a udemy course and do it
Jan 5, 2023, 6:21 PM
Do you have a recent one that you recommend?
Jan 5, 2023, 6:23 PM
nah, mine was long time ago.

but just search and you'll see
Jan 5, 2023, 6:24 PM
Ya I did, and I was overwhelmed by the negative reviews and that the one that were on top were mainly old and many tweek to make them work and that is why I did not go for this solution
I will try to have a look again
Jan 5, 2023, 6:26 PM
most solidity learners stop after the basics, cause it was easy to make money with that
but if you know other languages like C you can implement the logic in Solidity and can do much more
Jan 5, 2023, 6:27 PM
should be fairly easy for anyone going from low- and mid-level languages to Solidity
Jan 5, 2023, 6:45 PM
nah you miss a lot of easy tools
like dynamic arrays and so
so you gotta think around
Jan 5, 2023, 6:49 PM
In my personal experience, all the low or mid-level developers I have ever worked with can do it all, or learn it pretty quickly, while the opposite is not true
Jan 5, 2023, 7:03 PM

© 2024 Draquery.com All rights reserved.