Skip to content

ProviderError: the method has been deprecated: eth_accounts when deploying with defender.deployProxy on Polygon Mainnet #1159

Open
@saholo21

Description

@saholo21

Trying to deploy an upgradeable contract using Hardhat and OpenZeppelin Defender with defender.deployProxy on Polygon Mainnet.

The issue arises specifically when attempting to deploy the proxy contract. The deployment fails with the following error: ProviderError: the method has been deprecated: eth_accounts

This problem only occurs on Polygon Mainnet and only when using deployProxy. Other deployment methods work correctly across all networks tested.

Attempts Made

  • Deployed two other contracts using deployContract and deployImplementation functions on Polygon Mainnet, both deployed successfully.
  • Used defender.deployProxy to deploy the same contract on other networks (Sepolia, Avalanche, etc.), worked without issues.
  • Attempted different configurations on Polygon Mainnet, issue persists.

Constraints

  • I cannot modify the contract code.
  • I can modify the deployment script.

Expected Behavior

The contract should be deployed successfully on Polygon Mainnet using defender.deployProxy, just as it is on other networks.

Actual Behavior

Deployment using defender.deployProxy fails on Polygon Mainnet with the following error: ProviderError: the method has been deprecated: eth_accounts

Steps to Reproduce

  1. Use defender.deployProxy to deploy an upgradeable contract on Polygon Mainnet.
  2. Observe that deployment fails with the mentioned provider error.
  3. Deploy the same contract using the same deployProxy function on other networks (Sepolia, Avalanche, etc.), it succeeds.

Possible Solutions / Help Needed

  • Is there a way to avoid or work around the deprecated eth_accounts call during proxy deployment?
  • Are there any recommended configurations or versions to ensure compatibility?

Any insights or suggestions would be appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions