The forge project uses hardhat to verify bytecode inconsistencies
daog1 opened this issue · 2 comments
daog1 commented
verify error, I have a project, first use forge to build the project, and then use hardhat to deploy the verification contract.
After verification many times, it keeps prompting that the contract bytecode is inconsistent.
Later I found out that it was added,
preprocess: {
eachLine: (hre) => ({
transform: (line: string) => {
if (line.match(/^\s*import /i)) {
for (const [from, to] of getRemappings()) {
if (line. includes(from)) {
line = line. replace(from, to);
break;
}
}
}
return line;
},
})
},
caused by.
mpopovac-txfusion commented
If you intend to compile contracts and deploy them on the zkSync network, using forge build
is not suitable as it relies on the solc binary for compilation instead of zksolc. Instead, please use the hardhat-zksync-solc
plugin to compile your project.
daog1 commented
This is used, but it is added, preprocessed into the configuration, and the verification cannot be successful.