In Ride4dApps, the callable function returns WriteSet, TransferSet or a ContractResult but I still do not get the main difference between them? and who pays fees for this kind of dApps?
The sender pays fees in WAVES(1 + 4*(the cost of each script involved)) to the miner of the invocation.
Example:
ContractResult(
WriteSet([DataEntry(currentKey, amount)]),
TransferSet([ContractTransfer(i.caller, amount, unit)])
)
Where:
DataEntry (key : String, value : String | Binary | Integer | Boolean).
i.caller
is the caller address.