Afterwards I upgraded the contracts on Gnosis Safe. Checking ProxyAdmin on Etherscan all looks correct, the proxy contract points to the new implementation contract. However, when I on the console MyContract.address I get the address of the implementation address where I would expect to get the proxy address. Hence, when calling MyContract.deployed() I don’t get the address of the proxy. Any idea?
I am using migration scripts calling MyContract.deployed() for some initial set-ups.
I am using the same contract name ‘MyContract’ for the old and the new version (not like Box and BoxV2).
In the MyContract.json under
"networks"."4"."address:" now is the address of the implementation contract, before it was the address of the proxy contract. I guess MyContract.deployed() reads the address from there.
OpenZeppelin Upgrades Plugins store the proxy address in the Truffle artifacts of the first implementation contract using myContract.deployed(). I assume that when you do a prepare upgrade you then get the implementation address using myContract.deployed() in the artifacts.
You can use myContract.at([Address of the proxy]) to interact via the console.