Hi, I am trying to deploy my Pool contract via a proxy using the hardhat-deploy plugin.
Everything was fine until I used the proxy: true to specify deployment through a default proxy.
const poolDeployResult = await deploy('Pool', {
from: deployer,
log: true,
skipIfAlreadyDeployed: true,
proxy: true,
nonce: getNonce(),
})
When I execute this, I get :
Error HH604: Error running JSON-RPC server: ERROR processing /user/core/deploy/001_Pool.ts:
Error: function "owner" will shadow "owner". Please update code to avoid conflict.
at Object.mergeABIs (/user/core/node_modules/hardhat-deploy/src/utils.ts:558:19)
at _deployViaEIP173Proxy (core/node_modules/hardhat-deploy/src/helpers.ts:999:23)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.deployFunc [as func] (core/deploy/001_Pool.ts:30:28)
at async DeploymentsManager.executeDeployScripts (/core/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1049:22)
at async DeploymentsManager.runDeploy (/core/node_modules/hardhat-deploy/src/DeploymentsManager.ts:885:5)
at async Environment._runTaskDefinition (/core/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
at async Environment.run (/core/node_modules/hardhat/src/internal/core/runtime-environment.ts:129:14)
at async SimpleTaskDefinition.action (/core/node_modules/hardhat-deploy/src/index.ts:528:32)
at async Environment._runTaskDefinition (/core/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
Any hints on how to solve this shadowing problem? The pool contract is indeed Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable but I don't see why it now shows a problem with the keyword owner.
When taking a look at the hardhat-deploy plugin, this is the code that raises the exception.
if (fragment.type === 'function') {
throw new Error(
`function "${fragment.name}" will shadow "${foundSameSig.name}". Please update code to avoid conflict.`
);
}
Any help would be highly appreciated.