FeeFacade

public protocol FeeFacade

The interface of the class that is responsible for the fee cost of the operation

  • Function for evaluating the fee of transfer operation

    Declaration

    Swift

    func getFeeForTransferOperation(fromNameOrId: String, toNameOrId: String, amount: UInt, asset: String, assetForFee: String?, completion: @escaping Completion<AssetAmount>)

    Parameters

    fromNameOrId

    Sender name or id

    toNameOrId

    Receiver name or id

    amount

    Amount

    asset

    Id of asset which is sent

    assetForFee

    Id of asset which is pay fee

    completion

    Callback which returns fee for operation or error

  • Function for evaluating the fee of call contract operation

    Declaration

    Swift

    func getFeeForCallContractOperation(registrarNameOrId: String, assetId: String, amount: UInt?, assetForFee: String?, contratId: String, methodName: String, methodParams: [AbiTypeValueInputModel], completion: @escaping Completion<CallContractFee>)

    Parameters

    registrarNameOrId

    Name or id of account that call the contract

    assetId

    Asset of contract

    amount

    Amount

    asset

    Id of asset which is sent

    assetForFee

    Id of asset which is pay fee

    contratId

    Id of called contract

    methodName

    Name of called method

    methodParams

    Parameters of called method

    completion

    Callback which returns fee for operation or error

  • Function for evaluating the fee of call contract operation

    Declaration

    Swift

    func getFeeForCallContractOperation(registrarNameOrId: String, assetId: String, amount: UInt?, assetForFee: String?, contratId: String, byteCode: String, completion: @escaping Completion<CallContractFee>)

    Parameters

    registrarNameOrId

    Name or id of account that call the contract

    assetId

    Asset of contract

    amount

    Amount

    asset

    Id of asset which is sent

    assetForFee

    Id of asset which is pay fee

    contratId

    Id of called contract

    byteCode

    Code which will be execute

    completion

    Callback which returns fee for operation or error