I implemented a contract on the ethereum main network using online remix IDE.
I have developed that Contract using “@openzeppelin/contract-ethereum-package”: “^ 2.5.0”.
Now I want to upgrade this contract but couldn’t find any way.
I don’t have an implementation JSON file or anything that can help me get out of it.
I only have the address of the contract and its source code available on my system.
Could someone please suggest the way so that I can update it?
If you deployed just an ERC20 from @openzeppelin/contract-ethereum-package without a proxy contract, then unfortunately your contract is not upgradeable.
Did you deploy a proxy contract as well?
To create an upgradeable contract, we need a proxy contract and an implementation contract (with an optional ProxyAdmin contract). When we perform an upgrade, we deploy a new implementation contract and point the proxy contract to the new implementation. See: https://docs.openzeppelin.com/learn/upgrading-smart-contracts
The problem we are facing is we have deployed a upgradable smart contract which was created using "@openzeppelin/contracts-ethereum-package": "^2.5.0".
When we deployed it on the rinkeby test network using oz deploy commands we were able to upgrade our contract using oz upgrade commands because their was a rinkeby.json file created inside the .openzeppelin folder.
But unfortunately we deployed our contract using remix ide on mainnet so we want to upgrade it now but we don't have the rinkeby.json file with us as the contract was deployed using remix ide.
So just wanted to know is their any way we can reproduce that rinkeby.json using the already deployed contract address.
If you only deployed the ERC20 implementation without a proxy using Remix then unfortunately it isn’t upgradeable. Did you deploy a proxy contract as well as the implementation contract using Remix?