Polygon zkEVM currently supports most of the wide-known JSON-RPC methods.
See zkEVM methods to try out the exclusive zkevm_*
namespace methods.
See Polygon zkEVM documentation for the full list of supported methods.
On node access details, click Add to MetaMask.
Configure Hardhat to deploy contracts and interact through your Polygon zkEVM nodes.
Install Hardhat and create a project.
Install the dotenv package to securely load your sensitive variables from a .env
file
Create a new environment in hardhat.config.js
:
Build DApps using web3.js and Polygon zkEVM nodes deployed with Chainstack.
Install web3.js.
Connect over HTTP or WebSocket.
Use the HttpProvider
object to connect to your node HTTPS endpoint and get the latest block number:
where YOUR_CHAINSTACK_ENDPOINT is your node HTTPS endpoint protected either with the key or password.
Build DApps using web3.py and Polygon zkEVM nodes deployed with Chainstack.
Install web3.py.
Connect over HTTP or WebSocket. See also EVM node connection: HTTP vs WebSocket.
Use HTTPProvider
to connect to your node endpoint and get the latest block number.
where
You can build a web app to query data using node.js and axios:
query
— your JSON-RPC query. In this case, to get the latest block number.Build DApps using ethers.js and Polygon zkEVM nodes deployed with Chainstack.
Install ethers.js.
Connect over HTTPS or WebSocket. See also EVM node connection: HTTP vs WebSocket.
Use the JsonRpcProvider
object to connect to your node endpoint and get the balance of any address:
where
YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint protected either with the key or password
NETWORK_ID — Polygon zkEVM network ID:
1101
1442
Install Brownie.
Use the brownie networks add
command with the node endpoint:
where
ID — any name that you will use as the network tag to run a deployment. For example, chainstack-testnet
.
NETWORK_NAME — any name that you want to identify the network by in the list of networks. For example, zkEVM
.
YOUR_CHAINSTACK_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password
NETWORK_ID — Polygon zkEVM network ID:
1101
1442
Example to run the deployment script:
To make Remix IDE interact with the network through a zkEVM node deployed with Chainstack:
Get MetaMask and set it to interact through a Chainstack node. See Interacting through MetaMask.
In Remix IDE, navigate to the Deploy tab. Select Injected Provider - MetaMask in Environment.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
Polygon zkEVM currently supports most of the wide-known JSON-RPC methods.
See zkEVM methods to try out the exclusive zkevm_*
namespace methods.
See Polygon zkEVM documentation for the full list of supported methods.
On node access details, click Add to MetaMask.
Configure Hardhat to deploy contracts and interact through your Polygon zkEVM nodes.
Install Hardhat and create a project.
Install the dotenv package to securely load your sensitive variables from a .env
file
Create a new environment in hardhat.config.js
:
Build DApps using web3.js and Polygon zkEVM nodes deployed with Chainstack.
Install web3.js.
Connect over HTTP or WebSocket.
Use the HttpProvider
object to connect to your node HTTPS endpoint and get the latest block number:
where YOUR_CHAINSTACK_ENDPOINT is your node HTTPS endpoint protected either with the key or password.
Build DApps using web3.py and Polygon zkEVM nodes deployed with Chainstack.
Install web3.py.
Connect over HTTP or WebSocket. See also EVM node connection: HTTP vs WebSocket.
Use HTTPProvider
to connect to your node endpoint and get the latest block number.
where
You can build a web app to query data using node.js and axios:
query
— your JSON-RPC query. In this case, to get the latest block number.Build DApps using ethers.js and Polygon zkEVM nodes deployed with Chainstack.
Install ethers.js.
Connect over HTTPS or WebSocket. See also EVM node connection: HTTP vs WebSocket.
Use the JsonRpcProvider
object to connect to your node endpoint and get the balance of any address:
where
YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint protected either with the key or password
NETWORK_ID — Polygon zkEVM network ID:
1101
1442
Install Brownie.
Use the brownie networks add
command with the node endpoint:
where
ID — any name that you will use as the network tag to run a deployment. For example, chainstack-testnet
.
NETWORK_NAME — any name that you want to identify the network by in the list of networks. For example, zkEVM
.
YOUR_CHAINSTACK_ENDPOINT — your node HTTPS or WSS endpoint protected either with the key or password
NETWORK_ID — Polygon zkEVM network ID:
1101
1442
Example to run the deployment script:
To make Remix IDE interact with the network through a zkEVM node deployed with Chainstack:
Get MetaMask and set it to interact through a Chainstack node. See Interacting through MetaMask.
In Remix IDE, navigate to the Deploy tab. Select Injected Provider - MetaMask in Environment.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.