POOLS Chain Documentation
  • Introduction
    • Version
    • Purpose: Blockchain & AI
    • Mission
    • Vision
  • MARKET OVERVIEW
    • Blockchain Market: Current State
    • Blockchain Market: Issues
    • Pools Chain Solutions
  • POOLS CHAIN OVERVIEW
    • Pools chain: Definition & Main functions
    • Features and Utilities
    • Compatible with EVM
    • Abilibitiy of Extension
    • Interoperable
    • Artificial Intelligence
    • Ecosystem
    • Dapps
      • Pools Wallet
      • AIHomes
      • Friendify GPT
      • More Dapps
      • Pools Phone
        • Pools Phone System
        • Pools Phone Authentication
  • Startmobis
  • TECHNICAL ARCHITECTURE
    • Proof-of-Stake (PoS)
    • Node structure
    • Security & Encryption mechanisms
    • Security and Finality
    • Reward
    • Validator Quorum
    • Staking and Governance
    • Staking on POOLS
    • Rewarding
    • Slashing
    • Double Sign
    • Governance Parameters
    • Smart contract language
      • Hardhat: Deploy ERC20 Contract
      • Truffle: Deploy ERC20 Contract
  • Develop smart contracts
  • Integrated smart contracts
  • Smart Contract Verification
    • Overview
    • How to verify your smart contracts on Pools Chain
  • Smart contract
    • Smart Contract Language
      • Hardhat
      • Truffle
    • Smart Contract Development
    • Smart Contract A.I Integration
    • Smart Contract Verification
      • Overview
      • How to verify your smart contracts on Pools Chain
  • TOKENOMIC
    • POOLS Coin: Role & Use case
    • Coin Distribution
    • Incentive Structure
  • ROADMAP & DEVELOPMENT PLAN
    • Pools Chain: Development Milestone
      • A playground for developers
      • Build the Infrastructure
      • Partnership
      • Marketing & PR
    • Future Plans
  • TEAM & PARTNERS
    • Core Team
    • Advisor & Partnership
  • NOTICE & DISCLAIMER
    • Legal Notices & Warnings
    • Regulatory Compliance & Transparency
    • Responsibilities & Rights
      • Pools Chain
      • Users
  • BUILT FOR DEVELOPERS
    • Pools SDK
      • Supported platforms
        • JavaScript
          • React
          • Pure JavaScript
          • Other web frameworks
          • React Native
          • Node.js
          • Electron
        • Mobile
          • Native IOS
    • Contract deploy
    • Blockchain Explorer
  • CONTACT US
    • Summary
    • Contact for further info
Powered by GitBook
On this page
  1. Smart Contract Verification

How to verify your smart contracts on Pools Chain

After you deploy your PRC20 Contract successfully, the next is to verify the source code for your Solidity contracts. This plugin adds the Pools network to the verify task provided by Hardhat-Etherscan

Step 1. Install the package

We need the Hardhat plugin for integration with Poolcan's contract verification service. This plugin needs to be used in conjunction with the Hardhat-Etherscan plugin (v3.1.0 or above).

# Install hardhat-etherscan plugin

npm install --save-dev @nomiclabs/hardhat-etherscan@^3.1.0

And make sure you also have the following dependencies:

npm install ethers dotenv @openzeppelin/contracts

npm install --save-dev solidity-coverage

npm install --save-dev hardhat-gas-reporter

Step 2. Import the plugins

Under Hardhat, add the following statement to your hardhat.config.ts:

...

import "@nomiclabs/hardhat";

import "@nomiclabs/hardhat-etherscan";

...

};

Step 3. Check the supported network list:

Check the list of supported networks:

npx hardhat verify --list-networks

Step 4. Verify the Smart Contract

Obtain your deployed contract address when you deployed the contract (Step 8 in the previous section).

In your hardhat project, run the verify task as shown below. Replace DEPLOYED_CONTRACT_ADDRESS with your deployed contract address, and the constructor arguments that were used to deploy it (if any):

Verify on Pools (Mainnet):

npx hardhat verify --network pool DEPLOYED_CONTRACT_ADDRESS "Constructor argument 1""Constructor argument 2"

Verify on Pools Testnet

npx hardhat verify --network poolTestnet DEPLOYED_CONTRACT_ADDRESS "Constructor argument 1""Constructor argument 2"

Example:

npx hardhat verify --network poolTestnet "0x00e9fd0eaea8325dc31a64e23d91607fdd60d2d1" "My token name" "My token symbol"

​You should now be able to see your contact is verified on Poolscan or Testnet Poolscan and start to read and write your smart contracts.

PreviousOverviewNextSmart Contract Language

Last updated 1 year ago