class Nis::Transaction::MosaicDefinitionCreation

@attr [Nis::Struct::MosaicDefinition] mosaic_definition @attr [Integer] creationFee @attr [Integer] creationFeeSink @attr [Integer] type @attr [Integer] fee @attr [Integer] deadline @attr [Integer] timeStamp @attr [Integer] version @attr [String] signer @attr [String] signature @attr [Symbol] network @attr [Nis::Struct::MosaicDefinition] mosaicDefinition @see nemproject.github.io/#mosaicDefinitionCreationTransaction

Constants

TYPE

Attributes

creationFee[RW]
creationFeeSink[RW]
creation_fee[RW]
creation_fee_sink[RW]
deadline[RW]
fee[R]
mosaicDefinition[RW]
mosaic_definition[RW]
mosaic_definition=[RW]
network[RW]
signature[RW]
signer[RW]
timeStamp[RW]
timestamp[RW]
type[R]
version[RW]

Public Class Methods

new(mosaic_definition, network: :testnet) click to toggle source
# File lib/nis/transaction/mosaic_definition_creation.rb, line 31
def initialize(mosaic_definition, network: :testnet)
  @type = TYPE
  @network = network

  @mosaicDefinition = mosaic_definition
  @creationFee = creation[:fee]
  @creationFeeSink = creation[:sink]
  @fee = Nis::Fee::MosaicDefinitionCreation.new(self)
end

Private Instance Methods

creation() click to toggle source

@see www.nem.ninja/docs/#mosaics

# File lib/nis/transaction/mosaic_definition_creation.rb, line 44
def creation
  if @network == :testnet
    { sink: 'TBMOSAICOD4F54EE5CDMR23CCBGOAM2XSJBR5OLC',
      fee: 20 * 1_000_000 }
  else
    { sink: 'NBMOSAICOD4F54EE5CDMR23CCBGOAM2XSIUX6TRS',
      fee: 20 * 1_000_000 }
  end
end