Exception: BlockGiven::TransactionRevertedError

Inherits:
Error
  • Object
show all
Defined in:
lib/block_given/errors.rb

Overview

Raised by Transaction#wait! when the mined receipt has a failed status.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(receipt) ⇒ TransactionRevertedError

Returns a new instance of TransactionRevertedError.



152
153
154
155
# File 'lib/block_given/errors.rb', line 152

def initialize(receipt)
  @receipt = receipt
  super("transaction #{receipt.transaction_hash} reverted in block #{receipt.block_number}")
end

Instance Attribute Details

#receiptObject (readonly)

Returns the value of attribute receipt.



150
151
152
# File 'lib/block_given/errors.rb', line 150

def receipt
  @receipt
end