GetTransaction - Query Transaction Details
Retrieve comprehensive Sui transaction details via gRPC including effects, events, and state changes. Perfect for transaction verification and blockchain analytics with Dwellir.
Query Executed Transaction Details
The GetTransaction method retrieves comprehensive information about an executed Sui transaction using its digest. This includes transaction inputs, execution effects, emitted events, object changes, and balance modifications--essential for verifying transaction outcomes and building analytics tools.
Overview
Every state change on the Sui blockchain is the result of an executed transaction. The GetTransaction method provides complete access to the details of any finalized transaction, identified by its unique base58-encoded digest. This is fundamental for building block explorers, transaction verification systems, and on-chain analytics platforms.
Sui transactions are unique among L1 blockchains because of the object-centric execution model. Rather than modifying account balances directly, transactions operate on owned and shared objects, creating a rich set of effects that include object mutations, creations, deletions, and event emissions. The GetTransaction response captures all of this, providing a full audit trail for each executed operation.
Key Capabilities
- Transaction Verification: Confirm that a submitted transaction executed successfully and produced expected effects
- Gas Cost Analysis: Inspect computation, storage, and rebate costs for budgeting and optimization
- Event Parsing: Access Move events emitted during execution for indexing and notification systems
- Object Change Tracking: See exactly which objects were created, mutated, wrapped, or deleted
- Balance Impact: View net balance changes per address resulting from the transaction
Method Signature
Service: sui.rpc.v2.LedgerService
Method: GetTransaction
Type: Unary RPC
Use Cases
Transaction Verification
async function verifyTransactionSuccess(digest: string): Promise<boolean> {
const tx = await getTransaction(digest);
return tx.effects?.status?.status === 'success';
}Gas Cost Analysis
async function analyzeGas(digest: string) {
const tx = await getTransaction(digest);
const gas = tx.effects.gasUsed;
return {
computation: parseInt(gas.computationCost),
storage: parseInt(gas.storageCost),
rebate: parseInt(gas.storageRebate),
total: parseInt(gas.computationCost) + parseInt(gas.storageCost) - parseInt(gas.storageRebate)
};
}Related Methods
- ExecuteTransaction - Submit transactions
- GetCheckpoint - Query checkpoints
Need help? Contact support@dwellir.com or check the gRPC overview.
GetObject
Retrieve detailed Sui blockchain object information using the gRPC GetObject method. Access object metadata, ownership, version history, and contents with high-performance binary serialization through Dwellir's infrastructure.
GetDatatype
Retrieve Move struct and datatype definitions via gRPC including fields and type parameters. Essential for understanding smart contract data structures with Dwellir.