getTransaction

Call this function to query the status of a submitted transaction. The input txId should be a txId returned by calling one of the contract execution functions.

Example Usage

// Previous Transaction

// Call an arbitrary contract.
const contractAddress = '0x1f6557356bfb310a556300a36fb18f54fb4791b1';
// The contract's ABI
const contractAbi = [...]; // Replace with your contract's ABI
// Create an instance of the contract
const contract = new ethers.Contract(contractAddress, contractAbi, signer);
// Get the calldata for a contract call
const calldata = contract.interface.encodeFunctionData('someFunction', ['arg1', 'arg2']);

const transactionRequest: CallContractRequest = {
  targetAddress: contractAddress,
  valueInWei: "0",
  calldata: calldata,
  sponsorGas: true
}

// Call the contract, with gas sponsored by the paymaster.
const transactionInfo = await hallidayClient.callContract(transactionRequest);


// get transaction based on txId
const getTxInfo = await hallidayClient.getTransaction(transactionInfo.txId);

Inputs

This function requires the txId to get the transaction details for.

NameTypeDescription
txIdstringThe id of the transaction to get the details for

Outputs

A TransactionDetails object, with properties shown below:

NameTypeDescription
senderstringThe Halliday Smart Account address that sent the transaction
blockchainTypestringThe blockchain on which this transaction occurred (e.g. AVALANCHE_CCHAIN, OPTIMISM, etc.)
txIdstringThe ID of the transaction
statusstringThe status of the transaction (e.g. PENDING, COMPLETE, FAILED)
retryCountnumberThe number of times we've retried sending this transaction
onChainId (optional)stringThe transaction hash, if the transaction succeeded or failed on chain
errorMessage (optional)stringThe error message if the transaction failed
userOpReceipt (optional)stringJSON Object of the user operation receipt (if the operation went through on chain)