Interaction tools
MetaMask
On node access details, click Add to MetaMask.Development tools
Truffle
Configure Truffle Suite to deploy contracts to your Polygon zkEVM nodes.Install Truffle Suite, HD Wallet-enabled Web3 provider, and create a project.
Install the dotenv package to securely load your sensitive variables from a
.env fileHardhat
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 fileweb3.js
Build DApps using web3.js and Polygon zkEVM nodes deployed with Chainstack.Install web3.js.
HTTPS
Use theHttpProvider object to connect to your node HTTPS endpoint and get the latest block number:
web3.py
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.
HTTPS
UseHTTPProvider to connect to your node endpoint and get the latest block number.
- YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint protected either with the key or password
- HOSTNAME — your node HTTPS endpoint hostname
- USERNAME — your node access username (for password-protected endpoints)
- PASSWORD — your node access password (for password-protected endpoints)
node.js
You can build a web app to query data using node.js and axios:- YOUR_CHAINSTACK_ENDPOINT — your Chainstack node endpoint protected either with the key or password. See node access details.
query— your JSON-RPC query. In this case, to get the latest block number.
ethers.js
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.
HTTPS
Use theJsonRpcProvider object to connect to your node endpoint and get the balance of any address:
- YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint protected either with the key or password
-
NETWORK_ID — Polygon zkEVM network ID:
- Mainnet:
1101 - Testnet:
1442
- Mainnet:
Brownie
Install Brownie.
Use the where
brownie networks add command with the node endpoint:-
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:
- Mainnet:
1101 - Testnet:
1442
- Mainnet:
Remix IDE
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.