Transaction Module
3.1 Get Transaction By Hash
get_transaction_by_hashhash (str): The hash of the transaction.from crypto_com_developer_platform_client import Transaction tx = Transaction.get_transaction_by_hash('example-hash') print(tx)
The transaction details.ValueError: If the Transaction class is not initialized with a Client instance.{'status': 'Success', 'data': {'transaction': {'_type': 'TransactionResponse', 'accessList': example-list, 'blockNumber': example-block-number, 'blockHash': 'example-hash', 'blobVersionedHashes': example-hashes, 'chainId': 'example-chain0id', 'data': 'example-data', 'from': 'example-from', 'gasLimit': 'example-gas-limit', 'gasPrice': 'example-gas-price', 'hash': 'example-hash', 'maxFeePerGas': 'example-fee', 'maxPriorityFeePerGas': 'example-fee', 'maxFeePerBlobGas': example-fee, 'nonce': example-nonce, 'signature': {'_type': 'signature', 'networkV': 'example-V', 'r': 'example-r', 's': 'example-s', 'v': example-v}, 'to': 'example-to', 'index': example-index, 'type': example-type, 'value': 'example-value'}}}
getTransactionByHash{string} txHash: Transaction hash.import { Transaction } from '@crypto.com/developer-platform-client'; const tx = await Transaction.getTransactionByHash('example-hash'); console.log(tx);
{Promise<ApiResponse<TransactionByHash>>}: A promise that resolves to the transaction result{ status: 'Success', data: { transaction: { _type: 'TransactionResponse', accessList: example-list, blockNumber: example-block-number, blockHash: 'example-hash', blobVersionedHashes: example-hashes, chainId: 'example-chain-id', data: 'example-data', from: 'example-from', gasLimit: 'example-gas-limit', gasPrice: 'example-gas-price', hash: 'example-hash', maxFeePerGas: 'example-fee', maxPriorityFeePerGas: 'example-fee', maxFeePerBlobGas: example-fee, nonce: example-nonce, signature: [example-singature], to: 'example-to', index: example-index, type: example-type, value: 'example-value' } } }
3.2 Get Transaction Status
get_transaction_statushash (str): The hash of the transaction.from crypto_com_developer_platform_client import Transaction status = Transaction.get_transaction_status('example-hash') print(status)
The transaction status.ValueError: If the Transaction class is not initialized with a Client instance.{'status': 'Success', 'data': {'status': 1}}
getTransactionStatus{string} txHash: Transaction hash.import { Transaction } from '@crypto.com/developer-platform-client'; const status = await Transaction.getTransactionStatus('example-hash'); console.log(status);
Promise<ApiResponse<TransactionStatus>>}: A promise that resolves to the transaction status.{ status: 'Success', data: { status: 1 } }
3.3 Get Transaction Count
3.4 Get Gas Price
3.5 Get Fee Data
3.6 Estimate Gas
Last updated
Was this helpful?