I’m aware that, in Remix, I could input msg.data
as calldata values and send that as a transaction. It works for me when I send encoded function calls with parameters.
However, how do I encode and send calldata of functions without any parameters or view/pure functions and see the returned values in the console?
For example, in my case, I have a Proxy contract which points to an implementation contract. I'm using the UUPS proxy setup provided by OpenZeppelin. The implementation contract has a view or pure function that looks like this:
function owner() public view returns (address) { ... }
How should I encode this and pass it into the calldata input in Remix and see the returned value in its console?
PS: The contract I'm interacting with is a proxy and so it has the fallback
function. The owner()
function in the example is in the implementation contract which the proxy is pointed to.