Tempo blockchain development tools guide. Connect using MetaMask, Viem, Wagmi, tempo-foundry, pytempo, tempo-go, tempo-alloy, Hardhat, ethers.js, web3.py, and Remix IDE.
Stablecoin gas fees: Tempo has no native gas token. Transaction fees are paid in TIP-20 stablecoins (like pathUSD). When developing on testnet, get stablecoins from the faucet. On mainnet, acquire stablecoins from issuers or ecosystem partners.
On node access details, click Connect wallet to inject your Chainstack endpoint automatically.If you need to add the network manually, use:Mainnet:
Network name: Tempo Mainnet
RPC URL: your Chainstack HTTPS endpoint
Chain ID: 4217
Currency symbol: USD
Block explorer URL: https://explore.mainnet.tempo.xyz
Testnet:
Network name: Tempo Testnet (Moderato)
RPC URL: your Chainstack HTTPS endpoint
Chain ID: 42431
Currency symbol: USD
Block explorer URL: https://explore.tempo.xyz
Chainstack provides both HTTPS and WSS endpoints for Tempo. Use HTTPS for MetaMask and general RPC calls. Use WSS for real-time subscriptions in your applications.Refer to node access details for your endpoint URL format and credentials.
MetaMask may show an unusually high balance for the native token. This is expected—Tempo has no native gas token, and wallets see a placeholder value. Fees are paid in TIP-20 stablecoins denominated in USD. Check your stablecoin balances by adding the token addresses to MetaMask.
Use the WebSocketProvider to connect over WebSocket. WebSocket connections enable subscriptions for real-time events like new blocks and pending transactions.
Copy
from web3 import Web3web3 = Web3(Web3.WebSocketProvider('YOUR_CHAINSTACK_WSS_ENDPOINT'))print(web3.eth.block_number)
where
YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint protected either with the key or password
YOUR_CHAINSTACK_WSS_ENDPOINT — your node WSS endpoint protected either with the key or password
USERNAME — the username to your node if you use a password-protected endpoint
PASSWORD — the password to your node if you use a password-protected endpoint
web3.py works for basic JSON-RPC operations but does not support Tempo’s native feeToken parameter. For full Tempo Transaction support in Python, use pytempo instead. For TypeScript, use Viem.
Use the WebSocketProvider to connect over WebSocket. WebSocket connections enable subscriptions for real-time events like new blocks and pending transactions.
Copy
const { ethers } = require("ethers");const provider = new ethers.WebSocketProvider("YOUR_CHAINSTACK_WSS_ENDPOINT", { chainId: 4217, name: "tempo"});// Get block numberprovider.getBlockNumber().then(console.log);// Subscribe to new blocksprovider.on("block", (blockNumber) => { console.log("New block:", blockNumber);});
where
YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint protected either with the key or password
YOUR_CHAINSTACK_WSS_ENDPOINT — your node WSS endpoint protected either with the key or password
ethers.js works for basic JSON-RPC operations but does not support Tempo’s native feeToken parameter. For transactions, Tempo uses a cascading fee algorithm that defaults to pathUSD for non-TIP20 contract interactions. For full Tempo Transaction support (fee token selection, fee sponsorship, batch transactions), use Viem instead.
Viem is the recommended TypeScript library for Tempo development. Starting from viem@2.43.0, Viem has native Tempo support with full access to Tempo Transaction features.
Install Viem:
Copy
npm install viem
Create a client configured for Tempo:
Copy
import { createPublicClient, createWalletClient, http } from 'viem'import { privateKeyToAccount } from 'viem/accounts'import { tempo as tempoChain } from 'viem/chains'import { tempo } from 'viem/tempo'// Public client for read operationsconst publicClient = createPublicClient({ chain: tempoChain, transport: http('YOUR_CHAINSTACK_ENDPOINT'),}).extend(tempo())// Wallet client for transactionsconst walletClient = createWalletClient({ account: privateKeyToAccount('YOUR_PRIVATE_KEY'), chain: tempoChain, transport: http('YOUR_CHAINSTACK_ENDPOINT'),}).extend(tempo())// Get block numberconst blockNumber = await publicClient.getBlockNumber()console.log(blockNumber)
where
YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint protected either with the key or password
YOUR_PRIVATE_KEY — the private key of your account (with 0x prefix)
Use tempoModerato for the active testnet (chain ID 42431). The tempoTestnet export points to the deprecated Andantino testnet (chain ID 42429).
YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint protected either with the key or password. See node access details.
YOUR_PRIVATE_KEY — the private key of the account that you use to deploy the contract
Run npx hardhat run scripts/deploy.js --network tempo (or --network tempoTestnet for testnet) and Hardhat will deploy using Chainstack.
Hardhat’s default gas estimation may not work correctly with Tempo’s stablecoin fee model. For contract deployments, consider using tempo-foundry instead, which has native support for stablecoin gas payments.
To make Remix IDE interact with the network through a Chainstack node:
Get MetaMask and set it to interact through a Chainstack node. See MetaMask.
In Remix IDE, navigate to the Deploy & run transactions tab. Select Injected Provider - MetaMask in Environment.
This will engage MetaMask and make Remix IDE interact with the network through a Chainstack node.
Remix IDE uses standard EVM transactions and does not support Tempo’s feeToken parameter. Transactions default to pathUSD for gas fees when interacting with non-TIP20 contracts. Ensure your wallet has pathUSD balance. For smart contract deployment with fee token control, use tempo-foundry instead.
Each new project is configured for Tempo out of the box with tempo-std, the Tempo standard library, which contains helpers for Tempo’s protocol-level features.
pytempo is Tempo’s native Python SDK, built as a web3.py extension. It adds support for Tempo Transactions, including call batching, fee token selection, fee sponsorship, and access key management.
The faucet sends 1M of each testnet stablecoin (pathUSD, AlphaUSD, BetaUSD, ThetaUSD) to the specified address. After receiving tokens, use your Chainstack endpoint for all other operations.See also tempo_fundAddress API reference.