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
fromNameOrIdSender name or id
toNameOrIdReceiver name or id
amountAmount
assetId of asset which is sent
assetForFeeId of asset which is pay fee
completionCallback which returns fee for operation or error
-
getFeeForCallContractOperation(registrarNameOrId:assetId:amount:assetForFee:contratId:methodName:methodParams:completion:)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
registrarNameOrIdName or id of account that call the contract
assetIdAsset of contract
amountAmount
assetId of asset which is sent
assetForFeeId of asset which is pay fee
contratIdId of called contract
methodNameName of called method
methodParamsParameters of called method
completionCallback which returns fee for operation or error
-
getFeeForCallContractOperation(registrarNameOrId:assetId:amount:assetForFee:contratId:byteCode:completion:)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
registrarNameOrIdName or id of account that call the contract
assetIdAsset of contract
amountAmount
assetId of asset which is sent
assetForFeeId of asset which is pay fee
contratIdId of called contract
byteCodeCode which will be execute
completionCallback which returns fee for operation or error
View on GitHub
FeeFacade Protocol Reference