ForgeAbi_AssetFactory

public struct ForgeAbi_AssetFactory

Undocumented

  • description of the asset factory

    Declaration

    Swift

    public var description_p: String { get set }
  • total assets it can create

    Declaration

    Swift

    public var limit: UInt32 { get set }
  • the price for the asset, in unit

    Declaration

    Swift

    public var price: ForgeAbi_BigUint { get set }
  • Returns true if price has been explicitly set.

    Declaration

    Swift

    public var hasPrice: Bool { get }
  • Clears the value of price. Subsequent reads from it will return its default value.

    Declaration

    Swift

    public mutating func clearPrice()
  • the template that asset factory will use to generate the asset, template is string that could be processed by EEx with the given args, and its output is json. Then the json will be parsed and converted against the asset_name. e.g. If your asset name is Ticket,e.g. the the generated json data will be converted with ForgeAbi.Ticket.new(json).

    Declaration

    Swift

    public var template: String { get set }
  • allowed args for the template. In transfer tx, user can transfer tokens to this AssetFactory address with a json string containing necessary args, once the json is parsed, it will be checked against this, if any field not in the list, the transfer tx will fail.

    Declaration

    Swift

    public var allowedSpecArgs: [String] { get set }
  • the protobuf message name for the asset. Note that this shall be registered to forge.

    Declaration

    Swift

    public var assetName: String { get set }
  • asset attributes will be copied to generated asset. Note assets generated from asset factory is read only.

    Declaration

    Swift

    public var attributes: ForgeAbi_AssetAttributes { get set }
  • Returns true if attributes has been explicitly set.

    Declaration

    Swift

    public var hasAttributes: Bool { get }
  • Clears the value of attributes. Subsequent reads from it will return its default value.

    Declaration

    Swift

    public mutating func clearAttributes()
  • extra content that user can inject into the factory

    Declaration

    Swift

    public var data: SwiftProtobuf.Google_Protobuf_Any { get set }
  • Returns true if data has been explicitly set.

    Declaration

    Swift

    public var hasData: Bool { get }
  • Clears the value of data. Subsequent reads from it will return its default value.

    Declaration

    Swift

    public mutating func clearData()
  • Undocumented

    Declaration

    Swift

    public var unknownFields: <<error type>>
  • Undocumented

    Declaration

    Swift

    public init()