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.
MetaMask
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
- Network name:
Tempo Testnet (Moderato) - RPC URL: your Chainstack HTTPS endpoint
- Chain ID:
42431 - Currency symbol:
USD - Block explorer URL:
https://explore.tempo.xyz
Stablecoin addresses
These addresses are the same on both mainnet and testnet:web3.py
Build DApps using web3.py and Tempo nodes deployed with Chainstack.- Install web3.py.
- Connect over HTTP or WebSocket.
HTTP
Use theHTTPProvider to connect to your node endpoint and get the latest block number.
WebSocket
Use theWebSocketProvider to connect over WebSocket. WebSocket connections enable subscriptions for real-time events like new blocks and pending transactions.
- 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
- HOSTNAME — the host name of your node
- Mainnet:
4217 - Moderato Testnet:
42431
ethers.js
Build DApps using ethers.js and Tempo nodes deployed with Chainstack.- Install ethers.js.
- Connect over HTTP or WebSocket.
HTTP
Use theJsonRpcProvider object to connect to your node endpoint and get the latest block number:
WebSocket
Use theWebSocketProvider to connect over WebSocket. WebSocket connections enable subscriptions for real-time events like new blocks and pending transactions.
- 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
Viem is the recommended TypeScript library for Tempo development. Starting fromviem@2.43.0, Viem has native Tempo support with full access to Tempo Transaction features.
- Install Viem:
- Create a client configured for Tempo:
- YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint protected either with the key or password
- YOUR_PRIVATE_KEY — the private key of your account (with
0xprefix)
Use
tempoModerato for the active testnet (chain ID 42431). The tempoTestnet export points to the deprecated Andantino testnet (chain ID 42429).WebSocket
Use thewebSocket transport for real-time subscriptions:
Send transactions with fee token
Viem’s Tempo extension supports thefeeToken parameter to specify which stablecoin pays the transaction fee:
Get token balance
Wagmi
Wagmi provides React Hooks for Tempo development. Starting fromwagmi@3.2.0, Wagmi has native Tempo support.
- Install Wagmi:
- Configure Wagmi with Tempo:
- YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint protected either with the key or password
- YOUR_CHAINSTACK_WSS_ENDPOINT — your node WSS endpoint for real-time subscriptions
- Use Tempo hooks in your React components:
Hardhat
Configure Hardhat to deploy contracts and interact through your Tempo nodes.- Install Hardhat and create a project.
-
Create a new environment in
hardhat.config.js:where- 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 tempoTestnetfor testnet) and Hardhat will deploy using Chainstack.
Remix IDE
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.
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.tempo-foundry
Tempo has a custom Foundry fork with native support for Tempo Transactions, including stablecoin gas fees via the--tempo.fee-token flag.
Installation
Install tempo-foundry using the standardfoundryup installer with the -n tempo flag:
forge, cast, anvil, and chisel.
Verify the installation:
-tempo, indicating you are using the Tempo fork:
Create a new project
Initialize a new project with Tempo support:tempo-std, the Tempo standard library, which contains helpers for Tempo’s protocol-level features.
Forge
Useforge to develop, test, and deploy your smart contracts.
To deploy a contract:
src/MyContract.sol:MyContract— path to your contract file and the contract name- YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint protected either with the key or password
--tempo.fee-token— the TIP-20 token address to pay gas fees (AlphaUSD in this example)--interactive— prompts for your private key instead of passing it on the command line--broadcast— broadcasts the transaction to the network--verify— verifies the contract on contracts.tempo.xyz (Sourcify-compatible)
Cast
Usecast to interact with the network and the deployed contracts.
To get the latest block number:
Solidity integration with tempo-std
Import protocol interfaces fromtempo-std in your Solidity contracts:
pytempo
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.Installation
Connect to Tempo
Send a Tempo Transaction
Build and send a transaction using theTempoTransaction class:
Pay fees in a stablecoin
Specify a fee token so users pay gas in any supported stablecoin:Batch multiple calls
Execute multiple operations atomically in a single transaction:tempo-go
tempo-go is Tempo’s Go SDK for building application clients. It provides packages for RPC communication, transaction signing, and key management.Installation
Connect to Tempo
Send a Tempo Transaction
Build and send a transaction using the builder pattern:tempo-alloy (Rust)
tempo-alloy is Tempo’s Rust SDK in the form of an Alloy crate. Alloy is a popular Rust crate for interacting with EVM-compatible blockchains.Installation
Connect to Tempo
Create a provider using theTempoNetwork type to enable Tempo-specific features:
Read chain data
Get testnet tokens
The faucet is only available on Tempo testnet. On mainnet, acquire stablecoins from issuers or ecosystem partners.
tempo_fundAddress RPC method on the public Tempo RPC: