Class: ContractTransaction
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ContractTransaction
- Defined in:
- lib/facetq/models/contract_transaction.rb
Overview
Schema Information
Table name: contract_transactions
id :bigint not null, primary key
transaction_hash :string not null
block_blockhash :string not null
block_timestamp :bigint not null
block_number :bigint not null
transaction_index :bigint not null
created_at :datetime not null
updated_at :datetime not null
Indexes
index_contract_transactions_on_transaction_hash (transaction_hash) UNIQUE
index_contract_txs_on_block_number_and_tx_index (block_number,transaction_index) UNIQUE
Foreign Keys
fk_rails_... (block_number => eth_blocks.block_number) ON DELETE => cascade
fk_rails_... (transaction_hash => ethscriptions.transaction_hash) ON DELETE => cascade
Instance Attribute Summary collapse
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#tx_origin ⇒ Object
Returns the value of attribute tx_origin.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#payload ⇒ Object
Returns the value of attribute payload.
33 34 35 |
# File 'lib/facetq/models/contract_transaction.rb', line 33 def payload @payload end |
#tx_origin ⇒ Object
Returns the value of attribute tx_origin.
33 34 35 |
# File 'lib/facetq/models/contract_transaction.rb', line 33 def tx_origin @tx_origin end |
Class Method Details
.transaction_mimetype ⇒ Object
35 36 37 |
# File 'lib/facetq/models/contract_transaction.rb', line 35 def self.transaction_mimetype "application/vnd.facet.tx+json" end |
Instance Method Details
#status ⇒ Object
42 43 44 |
# File 'lib/facetq/models/contract_transaction.rb', line 42 def status contract_calls.any?(&:failure?) ? :failure : :success end |