Verify Transaction
After processing an airdrop, verify the transaction status and details using the Movement Network RPC or blockchain explorer.
RPC Verification (Recommended)
Query the Movement Network RPC directly to get transaction details programmatically. This is the recommended method for automated systems and status tracking.
Endpoint
Testnet: GET https://testnet.movementnetwork.xyz/v1/transactions/by_hash/{txHash}
Mainnet: GET https://mainnet.movementnetwork.xyz/v1/transactions/by_hash/{txHash}
Example
async function verifyTransaction(txHash: string, network: 'mainnet' | 'testnet'): Promise<any> {
const rpcUrl = network === 'testnet'
? 'https://testnet.movementnetwork.xyz/v1'
: 'https://mainnet.movementnetwork.xyz/v1';
const response = await fetch(`${rpcUrl}/transactions/by_hash/${txHash}`);
if (!response.ok) {
throw new Error(`Transaction not found: ${response.statusText}`);
}
return response.json();
}
// Usage - the network matches the bearer token you used for the airdrop
const result = await processAirdrop(address, amount, uniqueHash);
const txDetails = await verifyTransaction(result.transactionHash, 'mainnet');
console.log('Status:', txDetails.success);
console.log('Block:', txDetails.version);
console.log('Timestamp:', txDetails.timestamp);Response
{
"version": "12345678",
"hash": "0xabc123...",
"state_change_hash": "0x...",
"gas_used": "4",
"success": true,
"vm_status": "Executed successfully",
"sender": "0xae1f4f653aa1e0ac552aeccb7dc151927823b13cde95f2454e2ef5469629091b",
"sequence_number": "42",
"timestamp": "1700000000000000"
}Key Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Most important: true if transaction succeeded, false if failed |
version | string | Block height where transaction was included (confirms finality) |
hash | string | Transaction hash (matches the hash you queried) |
timestamp | string | When the transaction was processed (microseconds since epoch) |
vm_status | string | Human-readable execution status |
gas_used | string | Gas consumed by the transaction |
sender | string | Address that sent the transaction (your admin/treasury address) |
Transaction Confirmed: A transaction is final and irreversible when:
success: true(transaction executed successfully)versionis present (transaction included in a block)
If success: false, check vm_status for the error reason.
Explorer Verification (Visual)
View transactions visually in the Movement Network explorer:
Mainnet: https://explorer.movementnetwork.xyz/txn/{txHash}?network=mainnet
Testnet: https://explorer.movementnetwork.xyz/txn/{txHash}?network=bardock+testnet
Helper Function
function getExplorerUrl(txHash: string, network: 'mainnet' | 'testnet'): string {
const explorerNetwork = network === 'testnet' ? 'bardock+testnet' : 'mainnet';
return `https://explorer.movementnetwork.xyz/txn/${txHash}?network=${explorerNetwork}`;
}
// Usage - the network matches the bearer token you used for the airdrop
const result = await processAirdrop(address, amount, uniqueHash);
const url = getExplorerUrl(result.transactionHash, 'mainnet');
console.log('View on explorer:', url);What the Explorer Shows
- Transaction Status - Confirmed, pending, or failed
- Block Number - Which block included your transaction
- Timestamp - When the transaction was confirmed
- Gas Used - Transaction fees paid
- Events - Airdrop events emitted by the smart contract
- Full Transaction Data - All on-chain details
Related
- POST /api/airdrop - Process an airdrop
- GET /api/health - Check API health