> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polygon.technology/llms.txt
> Use this file to discover all available pages before exploring further.

# Building on PoS

> How to connect to Polygon PoS, deploy contracts, bridge tokens, and find the right tooling for your project.

<Note title="Transitioning to POL">
  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:

  * [Migrate from MATIC to POL](/pos/concepts/tokens/matic-to-pol)
  * [POL token specs](/pos/concepts/tokens/pol/)
</Note>

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](https://polygon-rpc.com/) and deploy.

## Prerequisites

* An EVM-compatible wallet (MetaMask or equivalent). See [supported wallets](/tools/wallets/getting-started/).
* Network configuration for Polygon mainnet or Amoy testnet. See [RPC endpoints and chain IDs](/pos/reference/rpc-endpoints/).
* POL tokens for gas. For testnet, use the [Polygon faucet](/tools/gas/matic-faucet/).

## Connect to Polygon PoS

Use any EVM wallet or node provider. The following example uses the Alchemy SDK to read from the network:

```js theme={null}
// 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](/pos/reference/rpc-endpoints/)

## Bridge tokens

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

* [Bridge tokens from Ethereum to PoS](/pos/how-to/bridging/ethereum-polygon/ethereum-to-matic/)
* [Bridge tokens from PoS to Ethereum](/pos/how-to/bridging/ethereum-polygon/matic-to-ethereum/)
* [L1-L2 state transfer](/pos/how-to/bridging/l1-l2-communication/state-transfer/)

## Tooling and SDKs

Core tools for building on Polygon PoS:

* [Faucets](/tools/gas/matic-faucet/) - test token faucet
* [Polygon Gas Station](/tools/gas/polygon-gas-station/) - gas estimation API
* [Polygon dApp Launchpad](/tools/dApp-development/launchpad/intro/) - dApp development CLI
* [Matic.js library](/tools/matic-js/get-started/) - JavaScript SDK for Polygon
* [Popular third-party tooling](/tools/dApp-development/third-party-tutorials/)

General Ethereum development resources that work on Polygon:

* [Remix](https://remix.ethereum.org/) - browser-based Solidity IDE
* [Hardhat](https://hardhat.org/hardhat-runner/docs/getting-started) - development environment
* [Foundry](https://github.com/foundry-rs/foundry/blob/master/README.md) - fast Solidity toolchain
* [Ethers.js](https://docs.ethers.io/v5/)
* [Web3.js](https://www.dappuniversity.com/articles/web3-js-intro)
* [thirdweb](https://portal.thirdweb.com)

If you are new to dApp development, the [Full Stack dApp Tutorial Series](https://kauri.io/full-stack-dapp-tutorial-series/5b8e401ee727370001c942e3/c) 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](/pos/how-to/bridging/ethereum-polygon/submit-mapping-request/) if you need them recognized by the bridge.

<Tip>
  If you encounter issues or have questions, open an issue on the [Polygon Docs GitHub repository](https://github.com/0xPolygon/polygon-docs/issues), or reach out on [Community Discord](https://discord.com/invite/0xPolygonCommunity) or [R\&D Discord](https://discord.com/invite/0xpolygonrnd).
</Tip>
