Hi!
So I have a upgradeable contract A and contract B that is basically the same as A since it just extends it. In my migrations I do something like this:
const { deployProxy } = require('@openzeppelin/truffle-upgrades');
const ContractA = artifacts.require('A');
const Contract B = artifacts.require('B');
module.exports = async (deployer) => {
await deployProxy(ContractA, [... init params...], { deployer });
await deployProxy(ContractB, [... init params...], { deployer });
};
Deployment goes through, but… When checking the ProxyAdmin for implementation addresses on ContractA’s proxy contract and ContractB’s proxy contract they both use the same implementation address. How’s that even possible? That’s why I created a new separate source code for ContractB that just extends ContractA, because I figured something like this might happen if I would just do:
await deployProxy(Contract, [... init params...], { deployer });
await deployProxy(Contract, [... init params...], { deployer });
What’s the best practice when deploying multiple upgradeable contracts with the same source code?
Best regards!