Poly Smart Chain中文
  • 介紹
    • 信息
    • 共識
    • 網絡
  • 區塊鏈基礎
    • 區塊鏈的類型
    • 共識機制
    • Solidity
    • 交易
    • GAS
    • 賬戶
  • 經濟學
  • Node
    • 節點 RPC
    • 部署
    • 私有鏈
  • 錢包
    • 連接 Metamask
    • 連接 Imtoken
    • 連接 TokenPocket
    • Metamask
    • Portis
    • Torus
  • 跨鏈橋
    • MetaMask:BSC to PSC(跨鏈)
    • MetaMask:Polygon to PSC(Cross-Chain)
    • WDCSpace:WDC to PSC(Cross-Chain)
    • Imtoken:BSC to PSC(Cross-Chain)
    • TokenPocket:BSC to PSC(Cross-Chain)
    • 跨鏈通用問題
    • 跨鏈數量(每日)
  • 開發者
    • Contract
    • PRC20
    • PRC721
    • RemixIDE
    • Truffle
    • Hardhat
    • Web3.js
  • Explorer
  • DApp
    • Swanswap
      • 如何在 Swanswap 購買 PSC 代幣
      • 如何在 Swanswap 中添加 PSC-USDT 流動性
    • NFT Auction
      • 如何Claim PolyJetClub
      • 在MetaMask錢包中查看PolyJetClub
    • 礦池
      • 如何將 LP Token 質押到礦池
    • Social
      • 註冊Social(V0.1)
    • 如何遷移到V2礦池
      • 如何遷移到V2礦池(MetaMask)
      • 如何遷移到V2礦池(TP錢包)
  • 資源
  • 常問問題
Powered by GitBook
On this page
  1. 開發者

PRC20

PreviousContractNextPRC721

Last updated 3 years ago

PSC完全兼容以太坊 ,接口和事件如下:

// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// ----------------------------------------------------------------------------
contract ERC20Interface {
    function totalSupply() public constant returns (uint);
    function balanceOf(address tokenOwner) public constant returns (uint balance);
    function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
    function transfer(address to, uint tokens) public returns (bool success);
    function approve(address spender, uint tokens) public returns (bool success);
    function transferFrom(address from, address to, uint tokens) public returns (bool success);

    event Transfer(address indexed from, address indexed to, uint tokens);
    event Approval(address indexed tokenOwner, address indexed spender, uint tokens);

請參考標準:

具體實施請參考:

ERC20
eip-20
openzeppelin