Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying proxy contract on zkSync got this error: "The bytecode length in bytes must be divisible by 32" #453

Open
leonfancy opened this issue Jun 6, 2023 · 2 comments · May be fixed by #522

Comments

@leonfancy
Copy link

Describe the bug
Deploying proxy contract on zkSync got this error: "The bytecode length in bytes must be divisible by 32".

To Reproduce

deploy script

module.exports = async ({ getNamedAccounts, deployments }) => {
  const { deploy } = deployments;
  const { deployer } = await getNamedAccounts();
  await deploy('Vault', {
    from: deployer,
    args: [],
    log: true,
    waitConfirmations: 1,
    proxy: {
      proxyContract: "OpenZeppelinTransparentProxy"
    }
  });
};
module.exports.tags = ['Vault'];

hardhat config:

require("@matterlabs/hardhat-zksync-deploy")
require("@matterlabs/hardhat-zksync-solc")
require("@matterlabs/hardhat-zksync-upgradable")
require("hardhat-deploy")
require("hardhat-deploy-ethers")
module.exports = {
  zksolc: {
    version: "1.3.10",
    compilerSource: "binary",
    settings: {
      optimizer: {
        enabled: true,
        mode: "z"
      }
    },
  }
  networks: {
    zksyncTestnet: {
      url: "https://testnet.era.zksync.dev",
      ethNetwork: "goerli",
      zksync: true,
      accounts: [process.env.ZKSYNC_TESTNET_DEPLOY_KEY || ""],
    },
  }
}

versions

  • hardhat-deploy [0.11.30]
  • hardhat 2.6.1
  • nodejs 16
@gtsui
Copy link

gtsui commented Jul 12, 2023

Did you ever find a solution to this? Also having problems with deploying OZ proxy contracts on zksync using hardhat-deploy

@berlinp-wombat
Copy link

Same error here
Does anyone have a solution?

@gergelyhegykozi gergelyhegykozi linked a pull request Mar 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants