Closed mpavlovic-txfusion closed 1 year ago
looks good, thanks @mpavlovic-txfusion !
Going to do do a release soon and put that in
Live on v.0.11.26
Seems its not working on zk-sync era I get this error
Error: ERROR processing /Users/steve/sites/multicall/deploy/multical3.js:
Error: The bytecode length in bytes must be divisible by 32
at hashBytecode (/Users/steve/sites/multicall/node_modules/zksync-web3/build/src/utils.js:187:15)
at ContractFactory.getDeployTransaction (/Users/steve/sites/multicall/node_modules/zksync-web3/build/src/contract.js:42:55)
at _deploy (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/helpers.ts:584:32)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at _deployOne (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/helpers.ts:1004:16)
at Object.module.exports [as func] (/Users/steve/sites/multicall/deploy/multical3.js:4:5)
at DeploymentsManager.executeDeployScripts (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1222:22)
at DeploymentsManager.runDeploy (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1055:5)
at SimpleTaskDefinition.action (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/index.ts:438:5)
at Environment._runTaskDefinition (/Users/steve/sites/multicall/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:14)
at DeploymentsManager.executeDeployScripts (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1225:19)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at DeploymentsManager.runDeploy (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1055:5)
at SimpleTaskDefinition.action (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/index.ts:438:5)
at Environment._runTaskDefinition (/Users/steve/sites/multicall/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:14)
at Environment.run (/Users/steve/sites/multicall/node_modules/hardhat/src/internal/core/runtime-environment.ts:156:14)
at SimpleTaskDefinition.action (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/index.ts:584:32)
at Environment._runTaskDefinition (/Users/steve/sites/multicall/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:14)
at Environment.run (/Users/steve/sites/multicall/node_modules/hardhat/src/internal/core/runtime-environment.ts:156:14)
at SimpleTaskDefinition.action (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/index.ts:669:5)
steve@Stephens-MacBook-Pro multicall %
Seems its not working on zk-sync era I get this error
Error: ERROR processing /Users/steve/sites/multicall/deploy/multical3.js: Error: The bytecode length in bytes must be divisible by 32 at hashBytecode (/Users/steve/sites/multicall/node_modules/zksync-web3/build/src/utils.js:187:15) at ContractFactory.getDeployTransaction (/Users/steve/sites/multicall/node_modules/zksync-web3/build/src/contract.js:42:55) at _deploy (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/helpers.ts:584:32) at processTicksAndRejections (node:internal/process/task_queues:95:5) at _deployOne (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/helpers.ts:1004:16) at Object.module.exports [as func] (/Users/steve/sites/multicall/deploy/multical3.js:4:5) at DeploymentsManager.executeDeployScripts (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1222:22) at DeploymentsManager.runDeploy (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1055:5) at SimpleTaskDefinition.action (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/index.ts:438:5) at Environment._runTaskDefinition (/Users/steve/sites/multicall/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:14) at DeploymentsManager.executeDeployScripts (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1225:19) at processTicksAndRejections (node:internal/process/task_queues:95:5) at DeploymentsManager.runDeploy (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1055:5) at SimpleTaskDefinition.action (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/index.ts:438:5) at Environment._runTaskDefinition (/Users/steve/sites/multicall/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:14) at Environment.run (/Users/steve/sites/multicall/node_modules/hardhat/src/internal/core/runtime-environment.ts:156:14) at SimpleTaskDefinition.action (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/index.ts:584:32) at Environment._runTaskDefinition (/Users/steve/sites/multicall/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:14) at Environment.run (/Users/steve/sites/multicall/node_modules/hardhat/src/internal/core/runtime-environment.ts:156:14) at SimpleTaskDefinition.action (/Users/steve/sites/multicall/node_modules/hardhat-deploy/src/index.ts:669:5) steve@Stephens-MacBook-Pro multicall %
OK I was able to get it to work by installing @matterlabs/hardhat-zksync-solc
and importing it in hardhat.config.js
zksync deployment do not working with upgradable contract https://github.com/wighawag/hardhat-deploy/issues/453
This PR is the addition to the original PR #276 that enabled support for zkSync deployments.
It fixes 2 issues:
zksync-web3
package to the latest (0.14.3) version.factoryDeps
for zkSync networks - The reason to add this is that on zkSync, contract bytecodes are supplied in thefactory_deps
custom field of the EIP-712 transaction and in order to compare the previous deployment transaction with the new one, plugin needs to compare the base deploy transaction data (containing the bytecode hash in case of zkSync) as well as the factory deps. However,provider.getTransaction(txHash)
method that is used to fetch previous deploy transaction data based on transactionHash (that is cached in thedeployments
folder) doesn't return custom data of the EIP-712 transaction. In order to obtain this data easily for the previous deployments on zkSync, this PR aims to extend the saved deployments data with the factoryDeps field.