When I use the "Read Contract" tab on Etherscan, it works even if I didn't "connect" by Web3 wallet. It seems to be reading the blockchain passively.
The thing is, one of the functions uses msg.sender
or even _msgSender()
to check, for example, is the caller is the owner
of the contract. And calling it from Etherscan returns false
, while remix
returns true (because it's connected to the wallet).
What does Etherscan use, and is there a way to set the caller for the Read Contract methods? I tried doing it in Write Contract, but it doesn't seem to be used for Read Contract anyway. Probably just caches the info?
view
keyword from the function, I was able to call it from the Write Contract tab with a wallet connected, but I could not understand the value returned from the tx. The response did not appear in etherscan below the field.