Skip to content

Verify Contract

Forge

mainnet

forge verify-contract --verifier blockscout --verifier-url https://api.socialscan.io/cyber/v1/explorer/command_api/contract --chain-id 7560 <CONTRACT_ADDRESS> src/Counter.sol:Counter

testent

forge verify-contract --verifier blockscout --verifier-url https://api.socialscan.io/cyber-testnet/v1/explorer/command_api/contract --chain-id 111557560 <CONTRACT_ADDRESS> src/Counter.sol:Counter

More Information

Hardhat

Config network

networks: {
    CyberTestnet: {
      url: "https://cyber-testnet.alt.technology/",
      chainId: 111557560,
      accounts: [privateKey],
    },
    Cyber: {
      url: "https://cyber.alt.technology/",
      chainId: 7560,
      accounts: [privateKey],
    },
  },

Config etherscan

etherscan: {
    customChains: [
      {
        network: "CyberTestnet",
        chainId: 111557560,
        urls: {
          apiURL: "https://api.socialscan.io/cyber-testnet/v1/explorer/command_api/contract",
          browserURL: "https://cyber-testnet.socialscan.io",
        },
      },
      {
        network: "Cyber",
        chainId: 7560,
        urls: {
          apiURL: "https://api.socialscan.io/cyber/v1/explorer/command_api/contract",
          browserURL: "https://cyber.socialscan.io",
        },
      },
    ],
    apiKey: {
      CyberTestnet: "abc",
      Cyber: "abc",
    },
  }

Verify Counter contract

mainnet

npx hardhat verify <CONTRACT_ADDRESS> --network Cyber

testent

npx hardhat verify <CONTRACT_ADDRESS> --network CyberTestnet

More Information