Logo
RPC Assistant

Sui Testnet RPC Endpoint: Chain Settings, Faucet, and Debugging

Summary

The Sui Testnet RPC endpoint allows developers to test dApps and smart contracts on the Sui blockchain before mainnet deployment. This article covers the default endpoint, chain settings, how to get test SUI tokens via faucet, connecting with JSON-RPC and SDKs, and common debugging tips.

Sui Testnet RPC Decision Checklist

Before integrating Sui Testnet RPC, consider these points:

CriterionWhat to checkWhy it matters
Endpoint reliabilityDoes the provider guarantee uptime for testnet?Unreliable testnet RPC can block development and CI/CD pipelines.
Rate limitsWhat are the requests per second (RPS) limits?Testnet usage patterns differ—ensure limits accommodate automated tests.
WebSocket supportIs WSS available for real-time subscriptions?Needed for event listeners and dApp state sync.
Faucet accessibilityCan you easily get test SUI tokens?Without tokens, you cannot pay gas or call state-changing endpoints.
Archive dataDoes the provider support archive snapshots?Useful for debugging historical states.
Multi-chain accessDoes the same provider also support mainnet or other networks?Reduces integration overhead.
Documentation qualityClear setup guides and examples.Faster onboarding and fewer support tickets.

What Is Sui Testnet RPC?

Sui Testnet is a public test network for the Sui blockchain, designed for developers to experiment with smart contracts, test dApps, and explore the Sui object-centric model without risking real assets. The Sui Testnet RPC endpoint is a JSON-RPC API that allows your application to read and write data on the test network. Testnet RPC endpoints are essential for development and are used for:

  • Deploying and testing Move modules
  • Sending test transactions
  • Monitoring on-chain events
  • Querying object and ledger state

While Sui Testnet is free to use, public endpoints often have rate limits and may experience downtime. For more reliable access, many teams use a managed RPC provider like OnFinality, which offers dedicated nodes and scalable API services for testnet and mainnet.

Sui Testnet Chain Settings

When connecting to Sui Testnet, configure your application with the following chain parameters:

  • Network Name: Sui Testnet
  • RPC URL: https://fullnode.testnet.sui.io:443 (public endpoint)
  • WebSocket URL: wss://fullnode.testnet.sui.io:443 (public WSS)
  • Chain ID: testnet (epoch-based)
  • Currency Symbol: SUI (test tokens)
  • Block Explorer: https://suiscan.xyz/testnet

Note: Public endpoints are community-maintained and may be rate-limited. For production-level testnet development, consider using a dedicated RPC provider that offers higher throughput and guaranteed availability.

Sui Testnet Faucet

To obtain test SUI tokens, use the official Sui Testnet faucet:

  1. Visit https://faucet.sui.io/
  2. Enter your Sui address (e.g., 0x...)
  3. Complete the CAPTCHA and request tokens.

Alternatively, use the CLI or SDK to request tokens programmatically. The faucet distributes test SUI for gas fees and payouts during development.

Connecting to Sui Testnet

Using curl (JSON-RPC)

Test the endpoint with a simple curl command to get the latest checkpoint:

curl --location --request POST 'https://fullnode.testnet.sui.io:443' \
--header 'Content-Type: application/json' \
--data-raw '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "sui_getLatestCheckpointSequenceNumber",
  "params": []
}'

Expected response:

{
  "jsonrpc": "2.0",
  "result": "12345678",
  "id": 1
}

Using Sui TypeScript SDK

Install the Sui SDK and connect to testnet:

import { SuiClient, getFullnodeUrl } from '@mysten/sui.js/client';

const client = new SuiClient({ url: getFullnodeUrl('testnet') });

async function getOwnedObjects(address: string) {
  const objects = await client.getOwnedObjects({ owner: address });
  console.log(objects);
}

getOwnedObjects('0xYOUR_ADDRESS');

Using Sui Python SDK

from pysui import SuiClient, SyncClient

client = SyncClient(network="testnet")
checkpoint = client.get_latest_checkpoint_sequence_number()
print(checkpoint)

Common Pitfalls and Troubleshooting

1. Rate Limiting

Public testnet endpoints often throttle requests. If you receive HTTP 429 errors, increase retry intervals or switch to a provider with higher limits. Managed RPC providers like OnFinality offer configurable rate plans for testnet workloads.

2. Faucet Dryness

The testnet faucet may run out of tokens. Wait a few hours or try a different faucet (e.g., Sui Discord faucet bot).

3. Incorrect Chain ID

Some SDKs require explicit chain ID. Use testnet as the network name, not sui:testnet.

4. WebSocket Disconnections

If using WebSocket, ensure your client handles reconnection. Example with ws library:

const WebSocket = require('ws');
let ws = new WebSocket('wss://fullnode.testnet.sui.io:443');

ws.on('open', () => {
  ws.send(JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'sui_subscribe', params: ['checkpoints'] }));
});

ws.on('close', () => {
  // Reconnect logic
  setTimeout(() => { ws = new WebSocket('wss://...'); }, 3000);
});

5. Gas Estimation Errors

Testnet gas prices fluctuate. Use the SDK's built-in gas estimation instead of hardcoding values.

Sui Testnet RPC Provider Options

While the public endpoint is fine for initial testing, serious development benefits from a dedicated provider. Here's what to evaluate:

Provider typeProsCons
Public endpointFree, no sign-upRate-limited, no SLA, may go down
Managed RPC (e.g., OnFinality)Higher throughput, WebSocket, archive data, mainnet integrationUsage-based pricing, need API key
Self-hosted nodeFull control, clear rate limitsRequires infrastructure, maintenance overhead

For most teams, a managed RPC service strikes the right balance. OnFinality supports Sui Testnet with dedicated node options, automatic failover, and multi-chain access. Check our pricing page for plans and our supported networks for full list.

Sui Testnet vs. Devnet vs. Mainnet

  • Testnet: Stable environment for public testing. Regularly reset but more reliable.
  • Devnet: Latest features but may be unstable. Best for early experimentation.
  • Mainnet: Production network with real assets.

Most developers start on devnet, then move to testnet for integration and pre-release testing.

Key Takeaways

  • The Sui Testnet RPC endpoint is https://fullnode.testnet.sui.io:443 with WebSocket at wss://fullnode.testnet.sui.io:443.
  • Use the official faucet to get test SUI tokens.
  • Testnet is free but rate-limited; for robust development, consider a managed provider like OnFinality.
  • Always handle rate limiting, reconnections, and faucet availability in your application logic.
  • Sui's object-centric model means you interact with objects rather than accounts – design your queries accordingly.

Frequently Asked Questions

Q: Is Sui Testnet free? A: Yes, the public endpoints and faucet are free. However, for higher reliability, providers may charge for testnet access.

Q: How often is Sui Testnet reset? A: The Sui team resets testnet periodically (typically every few months). Check Sui network status for announcements.

Q: Can I use the same RPC provider for both testnet and mainnet? A: Yes, providers like OnFinality offer unified access across networks, simplifying key management and billing.

Q: What's the difference between sui_getObject and sui_getPastObject? A: sui_getObject returns current state, while sui_getPastObject retrieves historical state at a specific version. Both are supported on testnet.

Q: How do I report a bug in the testnet? A: Open an issue on the Sui GitHub repository or use the Sui Discord.

Ready to build on Sui Testnet? Get started with a reliable RPC endpoint from OnFinality. Our platform offers dedicated nodes, high rate limits, and instant access to both testnet and mainnet. Explore our Sui offerings today.

RPC Knowledge Base

Related RPC details

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started