wighawag / hardhat-deploy

hardhat deployment plugin
MIT License
1.17k stars 283 forks source link

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

Open leonfancy opened 1 year ago

leonfancy commented 1 year ago

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

gtsui commented 11 months ago

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

berlinp-wombat commented 10 months ago

Same error here Does anyone have a solution?