[Contract Verification] Verify plugin reads incorrect number of constructor arguments #389
-
EnvironmentMainnet Issue Type
Contract Address0xDe7a77Dd6B283429522bBdfD268E10A3F4E6950A Compiler TypeMulti-part contract zkSolc Version1.4.0 Solc Version0.8.24 Contract NameTTUV2BeaconManager Contract Code// SPDX-License-Identifier: AGPL v3
pragma solidity ^0.8.20;
import {UpgradeableBeacon} from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {IVersionable} from "../interfaces/IVersionable.sol";
/**
* @title TTUV2BeaconManager
* @author Jack Xu @ EthSign
* @dev This contract manages the upgradeable beacons that we use to seamlessly
* upgrade TokenTableUnlocker, TTFutureToken, and TTTrackerToken on behalf of
* our users in the future.
*
* This contract should be deployed using TTUDeployer.
*/
contract TTUV2BeaconManager is Ownable, IVersionable {
UpgradeableBeacon public immutable unlockerBeacon;
UpgradeableBeacon public immutable futureTokenBeacon;
UpgradeableBeacon public immutable trackerTokenBeacon;
constructor(
address unlockerImpl,
address futureTokenImpl,
address trackerTokenImpl
) Ownable(_msgSender()) {
unlockerBeacon = new UpgradeableBeacon(unlockerImpl, address(this));
futureTokenBeacon = new UpgradeableBeacon(
futureTokenImpl,
address(this)
);
trackerTokenBeacon = new UpgradeableBeacon(
trackerTokenImpl,
address(this)
);
}
function upgradeUnlocker(address newImpl) external onlyOwner {
unlockerBeacon.upgradeTo(newImpl);
}
function upgradeFutureToken(address newImpl) external onlyOwner {
futureTokenBeacon.upgradeTo(newImpl);
}
function upgradePreviewToken(address newImpl) external onlyOwner {
trackerTokenBeacon.upgradeTo(newImpl);
}
function version() external pure returns (string memory) {
return "2.0.1";
}
}
Constructor Arguments
Hardhat Verify Plugin VersionNo response Repo Link (Optional)https://github.com/EthSign/tokentable-v2-evm Additional DetailsError message: |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Hey @boyuanx , we have tried using our |
Beta Was this translation helpful? Give feedback.
Hey @boyuanx , we have tried using our
hardhat-zksync
plugins and everything worked. It seems that the community plugin you are using for deploying (hardhat-deploy
) doesn't handle the tx receipt in a proper way on zkSync, meaning it doesn't return the right address for the given contract and instead returns the address from one of the deployed upgradable beacons. We will try to contribute to that community plugin, but until then, you can use ours.Also, you can check the logs of the deployed transaction; there, in one of them, you can find the correct address that you can use for your verification.