OperationFees

public struct OperationFees : Equatable

A structure representing all the fees, storage and computation needed to perform an Operation

  • Enum to differentiate different types of extra fees. Such as allocation fees when sending to a currently unrevealed account.

    See more

    Declaration

    Swift

    public enum NetworkFeeType : String
  • The transaction fee that the sender is willing to pay in order to perform the Operation. Strictly speaking operations don’t have a fee, but a gas cost, and fees and offered by the user instead. Practically, bakers will prioritsie Operation‘s with higher fees. Resulting in default feePerGas rate being required in order to get a transaction through.

    Declaration

    Swift

    public var transactionFee: XTZAmount
  • Additional fees the account will have to pay in order to send this operation. Such as allocating space for an unrevealed account.

    Declaration

    Swift

    public var networkFees: [NetworkFeeType : XTZAmount]
  • The limit of gas (computation + CPU) this Operation should take. If it exceeds this value when running, the Operation will fail.

    Declaration

    Swift

    public var gasLimit: Int
  • The limit of storage (disk) this Operation requires to complete. If it exceeds this value when running, the Operation will fail.

    Declaration

    Swift

    public var storageLimit: Int
  • Add together all the network fees and transaction fees

    Declaration

    Swift

    public func allFees() -> XTZAmount
  • Add together all the network fees and transaction fees

    Declaration

    Swift

    public func allNetworkFees() -> XTZAmount
  • Creates an OperationFees object, with everything set to zero. Primarly used as a default / placeholder until an estimation can be performed

    Declaration

    Swift

    public static func zero() -> OperationFees
  • Get a default fees for each type of Operation. No guarentee these will succeed.

    Declaration

    Swift

    public static func defaultFees(operationKind: OperationKind) -> OperationFees

    Parameters

    operationKind

    enum to denote the type of Operation

    Return Value

    a OperationFees object with all the values set.

  • Confirming to Equatable

    Declaration

    Swift

    public static func == (lhs: OperationFees, rhs: OperationFees) -> Bool