Class ContractException
Represents an error with a contract query that passed the gateway node pre-check and was processed by the gossip node but did not succeed. It includes additional information returned by the hedera contract virtual machine. Transaction fees will have been spent by this query.
Implements
Inherited Members
Namespace: Hashgraph
Assembly: Hashgraph.dll
Syntax
public sealed class ContractException : Exception, ISerializable
Constructors
| Improve this Doc View SourceContractException(String, TxId, ResponseCode, UInt64, ContractCallResult)
Public Constructor.
Declaration
public ContractException(string message, TxId transaction, ResponseCode code, ulong cost, ContractCallResult callResult)
Parameters
Type | Name | Description |
---|---|---|
String | message | The message generated by the library describing the condition that raised the exception. |
TxId | transaction | The Transaction ID of the request that failed. |
ResponseCode | code | The final ResponseCode returned by the network prior to transaction request expiration. |
UInt64 | cost | |
ContractCallResult | callResult | The results returned from the contract, which may include additional information regarding the error. |
Properties
| Improve this Doc View SourceCallResult
The results returned from the failed call to the smart contract virtual machine.
Declaration
public ContractCallResult CallResult { get; }
Property Value
Type | Description |
---|---|
ContractCallResult |
RequiredFee
If the returned status is InsufficientTxFee this value will contain the transaction fee necessary to execute the transaction.
Declaration
public ulong RequiredFee { get; }
Property Value
Type | Description |
---|---|
UInt64 |
Status
The ResponseCode returned by the network. prior to transaction request expiration.
Declaration
public ResponseCode Status { get; }
Property Value
Type | Description |
---|---|
ResponseCode |
TxId
The Transaction ID generated by the library (or client code) identifying the request.
Declaration
public TxId TxId { get; }
Property Value
Type | Description |
---|---|
TxId |