0

A few weeks ago I read a comment here on the forum with a link to an article that said it was possible to perform a function marked as internal from outside the contract. That is, it is possible through some tricks/hacks to be able to call an internal function from outside the contract.

I can't find the comment or the article anymore (although I've searched in every way) and I can't find anything that helps me understand the subject and how this is possible.

I'm creating token and farm contracts, so it's in my best interest to keep my code as secure as possible.

Can anyone give me some information, article, book suggestion?

Ether Man
  • 56
  • 8

1 Answers1

1

Perhaps the person is referring to the difference between internal and private methods. Internal methods can also be called by contracts that are children of the contract, while private methods can only be called by the contract itself. If you don't want your contract to have heirs, it might be better to declare the methods as private.

Anyway, if you want to learn about smart contract security, I believe the best source is the open zeppellin website. They have a little game https://ethernaut.openzeppelin.com/ where you learn the most common ways to hack a contract.

  • Hello Friend. Here's the link to the article on the subject: https://ethereum.stackexchange.com/questions/631/internal-keyword-in-a-function-definition-in-solidity Thanks for the study recommendation. I will look into this carefully. About the link above, I still can't quite understand the technical part and how it works. – Ether Man Feb 15 '22 at 18:37