Class: Nem::Model::MosaicDefinitionCreationTransaction

Inherits:
Transaction
  • Object
show all
Defined in:
lib/nem/model/mosaic_definition_creation_transaction.rb

Instance Attribute Summary collapse

Attributes inherited from Transaction

#deadline, #fee, #hash, #height, #id, #signer, #timestamp, #type, #version

Class Method Summary collapse

Methods inherited from Transaction

new_from_account_transaction, new_from_account_transaction_meta_data_pair

Methods included from Nem::Mixin::Assignable

#initialize

Instance Attribute Details

#creation_feeObject (readonly)

Returns the value of attribute creation_fee.



4
5
6
# File 'lib/nem/model/mosaic_definition_creation_transaction.rb', line 4

def creation_fee
  @creation_fee
end

#creation_fee_sinkObject (readonly)

Returns the value of attribute creation_fee_sink.



4
5
6
# File 'lib/nem/model/mosaic_definition_creation_transaction.rb', line 4

def creation_fee_sink
  @creation_fee_sink
end

#mosaic_definitionObject (readonly)

Returns the value of attribute mosaic_definition.



4
5
6
# File 'lib/nem/model/mosaic_definition_creation_transaction.rb', line 4

def mosaic_definition
  @mosaic_definition
end

Class Method Details

.new_from_transaction_meta_data_pair(hash) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/nem/model/mosaic_definition_creation_transaction.rb', line 6

def self.(hash)
  transaction = hash[:transaction]
  mo_def = MosaicDefinition.new_from_mosaic_definition(transaction[:mosaicDefinition])
  attrs = (hash).merge(
    creation_fee: transaction[:creationFee],
    creation_fee_sink: transaction[:creationFeeSink],
    mosaic_definition: mo_def
  )
  new(attrs)
end