Skip to main content
Polygon network is transitioning from MATIC to POL, which will serve as the gas and staking token on Polygon PoS. Use the links below to learn more:
Polygon PoS is EVM-compatible. Foundry, Remix, Hardhat, ethers.js, and web3.js all work on Polygon without modification. Point your tooling at the Polygon RPC and deploy.

Prerequisites

Connect to Polygon PoS

Use any EVM wallet or node provider. The following example uses the Alchemy SDK to read from the network:
// Setup: npm install alchemy-sdk
const { Alchemy, Network } = require("alchemy-sdk");

const settings = {
  apiKey: "demo", // Replace with your Alchemy API key from https://www.alchemy.com
  network: Network.MATIC_MAINNET, // Use MATIC_AMOY for testnet
};

const alchemy = new Alchemy(settings);

async function main() {
  const latestBlock = await alchemy.core.getBlockNumber();
  console.log("The latest block number is", latestBlock);
}

main();

Deploy a contract

Polygon PoS supports any contract that runs on Ethereum. There are no changes required to your Solidity code. Configure your deployment tool to target the Polygon RPC:
  • Mainnet: https://polygon-rpc.com (chain ID 137)
  • Amoy testnet: see RPC endpoints

Bridge tokens

Most dApps that interact with Ethereum need to move tokens between the two networks. Use the bridge how-to guides:

Tooling and SDKs

Core tools for building on Polygon PoS: General Ethereum development resources that work on Polygon: If you are new to dApp development, the Full Stack dApp Tutorial Series covers the basics end to end.

Migrating an existing dApp from Ethereum

Polygon PoS is EVM-compatible, so any contract that runs on Ethereum can be deployed to Polygon without code changes. The main considerations are:
  • Update your RPC endpoint and chain ID.
  • Check that any contracts receiving bridge funds handle the POL token rather than MATIC, since the native token has changed.
  • Map your tokens if you need them recognized by the bridge.
If you encounter issues or have questions, open an issue on the Polygon Docs GitHub repository, or reach out on Community Discord or R&D Discord.