class Web3::Hpb::TransactionReceipt

Attributes

raw_data[R]

Public Class Methods

new(transaction_data) click to toggle source
# File lib/web3/hpb/transaction_receipt.rb, line 10
def initialize transaction_data
  @raw_data = transaction_data

  transaction_data.each do |k, v|
    self.instance_variable_set("@#{k}", v)
    self.class.send(:define_method, k, proc {self.instance_variable_get("@#{k}")})
  end

  @logs = @logs.collect {|log|  Web3::Hpb::Log.new log }

end

Public Instance Methods

block_number() click to toggle source
# File lib/web3/hpb/transaction_receipt.rb, line 22
def block_number
  from_hex blockNumber
end
cumulative_gas_used() click to toggle source
# File lib/web3/hpb/transaction_receipt.rb, line 35
def cumulative_gas_used
  from_hex cumulativeGasUsed
end
gas_used() click to toggle source
# File lib/web3/hpb/transaction_receipt.rb, line 30
def gas_used
  from_hex gasUsed
end
success?() click to toggle source
# File lib/web3/hpb/transaction_receipt.rb, line 26
def success?
   status==1 || status=='0x1' || status.nil?
end