Skip to main content
Stablecoin gas fees: Tempo has no native gas token. Transaction fees are paid in TIP-20 stablecoins (like pathUSD or AlphaUSD). When using development tools, you’ll need testnet stablecoins from the faucet.

MetaMask

On node access details, click Connect wallet to inject your Chainstack endpoint automatically. If you need to add the network manually, use:
  • 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.

Testnet stablecoin addresses

TokenAddress
pathUSD0x20c0000000000000000000000000000000000000
AlphaUSD0x20c0000000000000000000000000000000000001
BetaUSD0x20c0000000000000000000000000000000000002
ThetaUSD0x20c0000000000000000000000000000000000003

web3.py

Build DApps using web3.py and Tempo nodes deployed with Chainstack.
  1. Install web3.py.
  2. Connect over HTTP or WebSocket.

HTTP

Use the HTTPProvider to connect to your node endpoint and get the latest block number.
from web3 import Web3

web3 = Web3(Web3.HTTPProvider('YOUR_CHAINSTACK_ENDPOINT'))
print(web3.eth.block_number)

WebSocket

Use the WebSocketProvider to connect over WebSocket. WebSocket connections enable subscriptions for real-time events like new blocks and pending transactions.
from web3 import Web3

web3 = 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
  • HOSTNAME — the host name of your node
Tempo network ID:
  • Moderato Testnet: 42431
See also node access details.
web3.py 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, use Viem (TypeScript) or tempo-foundry (CLI).

ethers.js

Build DApps using ethers.js and Tempo nodes deployed with Chainstack.
  1. Install ethers.js.
  2. Connect over HTTP or WebSocket.

HTTP

Use the JsonRpcProvider object to connect to your node endpoint and get the latest block number:
const { ethers } = require("ethers");

const provider = new ethers.JsonRpcProvider("YOUR_CHAINSTACK_ENDPOINT", {
  chainId: 42431,
  name: "tempo"
});

provider.getBlockNumber().then(console.log);

WebSocket

Use the WebSocketProvider to connect over WebSocket. WebSocket connections enable subscriptions for real-time events like new blocks and pending transactions.
const { ethers } = require("ethers");

const provider = new ethers.WebSocketProvider("YOUR_CHAINSTACK_WSS_ENDPOINT", {
  chainId: 42431,
  name: "tempo"
});

// Get block number
provider.getBlockNumber().then(console.log);

// Subscribe to new blocks
provider.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
See also node access details.
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 from [email protected], Viem has native Tempo support with full access to Tempo Transaction features.
  1. Install Viem:
npm install viem
  1. Create a client configured for Tempo:
import { createPublicClient, createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { tempoTestnet } from 'viem/chains'
import { tempo } from 'viem/tempo'

// Public client for read operations
const publicClient = createPublicClient({
  chain: tempoTestnet,
  transport: http('YOUR_CHAINSTACK_ENDPOINT'),
}).extend(tempo())

// Wallet client for transactions
const walletClient = createWalletClient({
  account: privateKeyToAccount('YOUR_PRIVATE_KEY'),
  chain: tempoTestnet,
  transport: http('YOUR_CHAINSTACK_ENDPOINT'),
}).extend(tempo())

// Get block number
const 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)

WebSocket

Use the webSocket transport for real-time subscriptions:
import { createPublicClient, webSocket } from 'viem'
import { tempoTestnet } from 'viem/chains'
import { tempo } from 'viem/tempo'

const publicClient = createPublicClient({
  chain: tempoTestnet,
  transport: webSocket('YOUR_CHAINSTACK_WSS_ENDPOINT'),
}).extend(tempo())

// Subscribe to new blocks
const unwatch = publicClient.watchBlocks({
  onBlock: (block) => {
    console.log('New block:', block.number)
  },
})

// To stop watching
// unwatch()
where YOUR_CHAINSTACK_WSS_ENDPOINT is your node WSS endpoint protected either with the key or password.

Send transactions with fee token

Viem’s Tempo extension supports the feeToken parameter to specify which stablecoin pays the transaction fee:
import { parseUnits } from 'viem'

const alphaUsd = '0x20c0000000000000000000000000000000000001'
const betaUsd = '0x20c0000000000000000000000000000000000002'

// Transfer AlphaUSD, pay fees in BetaUSD
const receipt = await walletClient.token.transferSync({
  amount: parseUnits('100', 6),
  to: '0xRecipientAddress',
  token: alphaUsd,
  feeToken: betaUsd,
})

console.log('Transaction hash:', receipt.transactionHash)

Get token balance

const balance = await publicClient.token.getBalance({
  account: '0xYourAddress',
  token: '0x20c0000000000000000000000000000000000001', // AlphaUSD
})

console.log('Balance:', balance)
See also Viem Tempo documentation.

Wagmi

Wagmi provides React Hooks for Tempo development. Starting from [email protected], Wagmi has native Tempo support.
  1. Install Wagmi:
npm install wagmi viem @tanstack/react-query
  1. Configure Wagmi with Tempo:
import { http, createConfig } from 'wagmi'
import { tempoTestnet } from 'wagmi/chains'

export const config = createConfig({
  chains: [tempoTestnet],
  transports: {
    [tempoTestnet.id]: http('YOUR_CHAINSTACK_ENDPOINT'),
  },
})
where
  • 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
  1. Use Tempo hooks in your React components:
import { Hooks } from 'wagmi/tempo'
import { parseUnits } from 'viem'

const alphaUsd = '0x20c0000000000000000000000000000000000001'
const betaUsd = '0x20c0000000000000000000000000000000000002'

function SendPayment() {
  const sendPayment = Hooks.token.useTransferSync()

  const handleSend = () => {
    sendPayment.mutate({
      amount: parseUnits('100', 6),
      to: '0xRecipientAddress',
      token: alphaUsd,
      feeToken: betaUsd,
    })
  }

  return (
    <button onClick={handleSend} disabled={sendPayment.isPending}>
      Send Payment
    </button>
  )
}
See also Wagmi Tempo documentation.

Hardhat

Configure Hardhat to deploy contracts and interact through your Tempo nodes.
  1. Install Hardhat and create a project.
  2. Create a new environment in hardhat.config.js:
    require("@nomicfoundation/hardhat-ethers");
    ...
    module.exports = {
      solidity: "0.8.26",
      networks: {
        tempoTestnet: {
          url: "YOUR_CHAINSTACK_ENDPOINT",
          chainId: 42431,
          accounts: ["YOUR_PRIVATE_KEY"]
        }
      }
    };
    
    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
  3. Run npx hardhat run scripts/deploy.js --network tempoTestnet 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.

Remix IDE

To make Remix IDE interact with the network through a Chainstack node:
  1. Get MetaMask and set it to interact through a Chainstack node. See MetaMask.
  2. 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.

tempo-foundry

Tempo has a custom Foundry fork with native support for stablecoin gas fees via the --fee-token flag.

Installation

Install tempo-foundry:
foundryup -n tempo
Verify the installation:
forge -V
You should see version information including -tempo, indicating you are using the Tempo fork:
# forge <version>-tempo (<commit> <timestamp>)

Forge

Use forge to develop, test, and deploy your smart contracts. To deploy a contract:
forge create src/MyContract.sol:MyContract \
  --private-key YOUR_PRIVATE_KEY \
  --rpc-url YOUR_CHAINSTACK_ENDPOINT \
  --fee-token 0x20c0000000000000000000000000000000000001 \
  --broadcast
where
  • src/MyContract.sol:MyContract — path to your contract file and the contract name
  • YOUR_PRIVATE_KEY — the private key to your funded account that you will use to deploy the contract
  • YOUR_CHAINSTACK_ENDPOINT — your node HTTPS endpoint protected either with the key or password
  • --fee-token — the TIP-20 token address to pay gas fees (AlphaUSD in this example)
  • --broadcast — broadcasts the transaction to the network

Cast

Use cast to interact with the network and the deployed contracts. To get the latest block number:
cast block-number --rpc-url YOUR_CHAINSTACK_ENDPOINT
To send a transaction (requires --fee-token):
cast send CONTRACT_ADDRESS \
  "functionName(args)" \
  --private-key YOUR_PRIVATE_KEY \
  --rpc-url YOUR_CHAINSTACK_ENDPOINT \
  --fee-token 0x20c0000000000000000000000000000000000001
where YOUR_CHAINSTACK_ENDPOINT is your node HTTPS endpoint protected either with the key or password.

Get testnet tokens

Fund your wallet using the tempo_fundAddress RPC method. This faucet is only available on the public Tempo RPC:
cast rpc tempo_fundAddress YOUR_ADDRESS --rpc-url https://rpc.moderato.tempo.xyz
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.

See also

Last modified on January 22, 2026