I find there is no return value in decoded output when using ERC1967proxy in remix.
In my implantation contract, it can return the value and decoded ouput in remix, but in the proxy contract which is UUPSUpgradeable, it return the value, but in the decoded ouput is empty.
Is the proxy contract without the decoded ouput when return value?
Hi can you provide a minimal replication code? Maybe the implementation contract and proxy contract you use?
But keep in mind that the storage in the implementation contract and the proxy contract is different, so it makes sense if an operation was made pointing to the implementation contract and not the proxy contract, the Proxy storage will have no recollection of that ever happening. That could be your case.
here is the code:
pragma solidity ^0.8.0;
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts/proxy/Proxy.sol";
import "@openzeppelin/contracts/utils/Address.sol";
contract testContact is Initializable, OwnableUpgradeable,UUPSUpgradeable{
using Address for address;
constructor() {
_disableInitializers();
}
function initialize() initializer public {
__Ownable_init();
__UUPSUpgradeable_init();
}
function _authorizeUpgrade(address newImplementation)
internal
onlyOwner
override
{}
}
I just depoly with proxy in remix, and it will create ERC1967proxy contract for me,
the proxy contract has owner address but not decoded output,
the implementation
contract "testcontract" owner is 0*0, and decoded output is
decoded output {
"0": "address: 0x0000000000000000000000000000000000000000"
}
I was try other more compex call and return no decoded output, but it can return the right value. I am just curious about why there is no decoded output in remix but actually it indid return the right value?