Skip to content
Available on private testnetTestnet: yesMainnet: Not availableSoftware: Core bad4a06ea · protocol pqwerai-v8-testnet/1Updated

ERC-20 tokens

Fungible tokens follow ERC-20 unchanged. Tested end to end in Create a token.

PQToken.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;

import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

/// Example ERC-20 with an owner-only mint. Unaudited tutorial code.
contract PQToken is ERC20, Ownable {
    constructor(string memory name_, string memory symbol_, uint256 initialSupply, address owner_)
        ERC20(name_, symbol_)
        Ownable(owner_)
    {
        _mint(owner_, initialSupply);
    }

    function mint(address to, uint256 amount) external onlyOwner {
        _mint(to, amount);
    }
}
Function / event Notes
balanceOf, totalSupply, decimals decimals() is display-only; on-chain amounts are integers
transfer, transferFrom Emit Transfer(from, to, value)
approve, allowance Emit Approval; prefer exact amounts — the Windows Wallet warns on unlimited approvals
Mint / burn Transfer from / to the zero address

Support on PQWERAI

  • Windows Wallet: discovers balances, transfers, and warns about native-PQAI impostors and hidden characters.
  • Explorer: indexes ERC-20 Transfer events (/api/v1/tokens, /api/v1/address/{address}).
  • Native PQAI is not an ERC-20. A WETH9-style wrapper (WPQAI) exists only on an unreleased wallet branch.
  • Permit (EIP-2612) works (it only needs ecrecover and the chain ID); a Studio wizard is unreleased.

Found a problem? Report a documentation issue · Build testnet-rc1+72057fe3ec