dAppBooster
    Preparing search index...
    • Extracts specified output values from transaction event logs

      Type Parameters

      • T extends readonly string[]
      • ThrowOnMissing extends boolean = true

      Parameters

      • receipt: TransactionReceipt

        The transaction receipt containing event logs

      • abiEvent: AbiEvent

        The ABI event definition used to decode the event logs

      • expectedOutputs: T

        Array of output keys to extract from event args

      • options: OutputsConfig = {}

        Configuration options

        • OptionallogDecodeErrors?: boolean
        • OptionalthrowOnMissing?: boolean

      Returns OutputResult<T, ThrowOnMissing>

      Object containing the requested output values as hex strings

      This function processes transaction logs to extract specified output values from event arguments. It decodes event logs using the provided ABI and collects values for the requested output keys.

      When required outputs are not found and throwOnMissing is true

      When transaction processing fails

      const receipt = await getTransactionReceipt(hash)
      const outputs = getTransactionOutputs(
      receipt,
      abiEvent,
      ['tokenId', 'to'],
      { throwOnMissing: true }
      )
      // outputs = { tokenId: '0x...', to: '0x...' }