you can read the storage slot where it is located. from the proxy code: bytes32 private constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
Thanks for the reply.
I read your reply as well as the thread you pointed me to, but I still feel lost.
Can you please tell me step by step how I can get the code of the implementation ?
From that link it seems that you can get it programmatically, but is there a way to get it via some web page ? Like you get the proxy code from bscscan ?
bscscan sometimes points you to the implementation address. you can get this value programmatically using web3js, web3py or any other flavor of web3 lib (contracts can't read other contracts storage). you can also retrieve the contract bytecode (the source code might not be available on bscscan)
web3.eth.getStorageAt(addr, _IMPLEMENTATION_SLOT) returns the address for the implementation
not from other contracts. As i mentioned, you can read the contract's storage using one of the web3 libs (which is what interacts with the blockchain, to interact with a contract you are already using a web3 lib)