Polygon (Matic)

Using Superfluid on Polygon network

Networks

If you want to learn more about Polygon network, such as websocket connections, the full documentation is here: https://docs.matic.network/docs/develop/network-details/network​

The naming can be a little confusing. "Matic" is used to describe the main network for Polygon. The test network for Polygon is called "Mumbai".

Matic-Mainnet

To use Matic-Mainnet with Superfluid, you'll need a RPC URL to connect your metamask or application to a Polygon node.

NetworkName

Matic (Mainnet)

ParentChain

Ethereum Mainnet

chainId

137

Gas token

Matic token

RPC

(Option 1) Superfluid Public RPC Endpoint ⚠ Warning, only metamasks extensions on Firefox and Chrome are supported

https://rpc-endpoints.superfluid.dev/matic

​

(Option 2) Get your own free RPC ⚠ Warning, there may be rate limit issue, see "Troubleshooting" https://rpc.maticvigil.com/

​

(Option 3) Public RPC ⚠ Warning, these public RPC endpoints are not recommended to use with Superfluid: https://rpc-mainnet.maticvigil.com/ or https://rpc-mainnet.matic.quiknode.pro or https://matic-mainnet.chainstacklabs.com or https://matic-mainnet-full-rpc.bwarelabs.com/ or https://matic-mainnet-archive-rpc.bwarelabs.com

Block Explorer

​https://explorer-mainnet.maticvigil.com/​

Mumbai Test Network

To use the Mumbai testnet with superfluid, you'll need a RPC URL to connect your metamask or application to a Mumbai node.

NetworkName

Matic (Mumbai)

ParentChain

GoΓ«rli

chainId

80001

Gas token

Matic token

RPC

(Option 1) Superfluid Public RPC Endpoint

⚠ Warning, only metamasks extensions on Firefox and Chrome are supported

https://rpc-endpoints.superfluid.dev/mumbai

​

(Option 2) Get your own free RPC

https://rpc.maticvigil.com/

(Option 3) Public RPC ⚠ Warning, these public RPC endpoints are not recommended to use with Superfluid: https://rpc-mumbai.maticvigil.com/ or https://matic-mumbai.chainstacklabs.com or https://matic-testnet-archive-rpc.bwarelabs.com

Block Explorer

​https://explorer-mumbai.maticvigil.com/​

The public RPC is not recommended because the rate limit is not high enough to access the Superfluid Dashboard.

Troubleshooting

- JSON-RPC error eth_getLogs "Blockheight too far in the past"

What's happening is that the @superfluid-finance/js-sdk is calling too many eth_getLogs and hitting the maximum rate limit for your RPC connection.

  1. Obtain a better RPC URL from https://rpc.maticvigil.com/​

  2. Don't use the functions user.details or sf.cfa.listFlows(there may be others as well)