[Contract Verification] Cannot verify NonFungibleTokenPositionDescriptorAddressV1_3_0 deployed via uniswap-zksync/era-uniswap-deploy-v3 (Abstract Testnet) #669
-
EnvironmentTestnet Block ExplorerIssue Type
Contract Address0xD533950c2be73B8146BA81877f91a845F0879E13 Compiler TypeMulti-part contract zkSolc Version1.3.13 Solc Version0.7.6 Contract NameNonfungibleTokenPositionDescriptor Contract Code// SPDX-License-Identifier: GPL-2.0-or-later import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol'; import './libraries/ChainId.sol'; /// @title Describes NFT token positions
} Constructor Arguments0x740810c5CB6a562BC0F4F387dC7cFaDa9f3A7ebf Hardhat Verify Plugin VersionNo response Repo Link (Optional)https://github.com/uniswap-zksync/era-uniswap-v3-periphery/tree/v1.3.0-zksync-era Additional DetailsI deployed uniswap-zksync v3 to Abstract testnet by following the instructions in uniswap-zksync/era-uniswap-deploy-v3. Deployment and verification worked perfectly for all contracts except one that I couldn't verify, NonfungibleTokenPositionDescriptor.sol. I've tried verifying via hardhat plugin from both the v1.1.1-zksync-era and v1.3.0-zksync-era branches, but neither branch seems to have bytecode matching the contract that gets deployed from uniswap-zksync/era-uniswap-deploy-v3. This is the command I am running: This is my config for Abstract testnet that I've defined in hardhat.config.ts:
Can you please share the steps taken to verify this same contract on zkSync Mainnet? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
It seems you are encountering issues with verifying the Here are a few steps and checks you can perform to potentially resolve the verification issue:
For a more detailed guide on verifying contracts using Hardhat, you can refer to the ZKsync documentation on contract verification with Hardhat here. If these steps do not resolve the issue, it might be helpful to reach out to the support or community forums for the specific tools and networks you are using, as they might have more context-specific insights or updates. Your feedback helps us serve you better. If this fully addresses your question, please give it a thumbs up. If it doesn't, please give it a thumbs down. This will inform the community and team so we can improve our support. |
Beta Was this translation helpful? Give feedback.
-
What error did you get when trying to verify it? Were you able to test manually verifying it through their block explorer UI? https://explorer.testnet.abs.xyz/contracts/verify |
Beta Was this translation helpful? Give feedback.
-
@stephankmin I believe the issue is that you need to specify the NFTDescriptor library address, it's an external library so we are setting it in the runtime in the deploy script https://github.com/uniswap-zksync/era-uniswap-deploy-v3/blob/zksync-era/src/steps/deploy-nft-position-descriptor-v1_3_0.ts#L10 and then recompiling it. But you can just add it to the hardhat config like this: https://docs.zksync.io/zksync-era/tooling/hardhat/guides/compiling-libraries#manual-deployment and rerun verification. Regarding the bytecode difference - I think your script trying to parse the bytecode as an EVM bytecode, but it's EraVM bytecode. I believe there should be only one difference - a different library address. Can you try to compare bytecodes without parsing(like hex strings)? Then I guess you should see only this addresses the difference. |
Beta Was this translation helpful? Give feedback.
@stephankmin I believe the issue is that you need to specify the NFTDescriptor library address, it's an external library so we are setting it in the runtime in the deploy script https://github.com/uniswap-zksync/era-uniswap-deploy-v3/blob/zksync-era/src/steps/deploy-nft-position-descriptor-v1_3_0.ts#L10 and then recompiling it.
But you can just add it to the hardhat config like this: https://docs.zksync.io/zksync-era/tooling/hardhat/guides/compiling-libraries#manual-deployment and rerun verification.
Regarding the bytecode difference - I think your script trying to parse the bytecode as an EVM bytecode, but it's EraVM bytecode. I believe there should be only one difference - a different l…