Easy-Go-Web3
知识图谱Go 教程React Web3智能合约
需求分析系统设计设计模式Go 微服务
项目实战DevOps
Go 生态React 生态智能合约生态Web3 生态AI × Web3工具箱Web3 公司远程Web3求职
🎯 AA 工程师面试手册博客
GitHub
返回 Web3 生态

Polygon

L2

以太坊的可扩展性解决方案

官网文档
TPS
7,000+
TVL
$1B+
类型
L2
特性
4+

概述

Polygon(原 Matic)是以太坊的 Layer 2 扩容解决方案,提供更快的交易速度和更低的 Gas 费用。Polygon 生态包括 PoS 链、zkEVM、Miden 等多种扩容方案,是目前使用最广泛的以太坊 L2 之一。

EVM 兼容低 GaszkEVMPoS 链

RPC 端点

https://polygon-rpc.com
https://rpc-mainnet.matic.network
区块浏览器

Go 开发教程

连接 Polygon 网络

Polygon 完全兼容 EVM,使用相同的 go-ethereum 库即可连接。

go
1package main
2
3import (
4 "context"
5 "fmt"
6 "log"
7
8 "github.com/ethereum/go-ethereum/ethclient"
9)
10
11func main() {
12 // Polygon 主网 RPC
13 client, err := ethclient.Dial("https://polygon-rpc.com")
14 if err != nil {
15 log.Fatal(err)
16 }
17
18 chainID, err := client.ChainID(context.Background())
19 if err != nil {
20 log.Fatal(err)
21 }
22 fmt.Println("Chain ID:", chainID) // 137 for Polygon mainnet
23}

探索更多区块链生态

查看所有链
Easy-Go-Web3

构建 Go 后端与 Web3 的学习之路。从基础到进阶,从理论到实践,助你成为全栈区块链开发者。

学习路径

  • 知识图谱
  • Go 教程
  • Go 微服务
  • 面试手册

资源中心

  • 工具箱
  • DevOps 工具
  • Web3 生态
  • 博客

© 2025 Easy-Go-Web3. All rights reserved.

Created withbyhardybao