简体   繁体   English

Ride4dApps 中的 WriteSet、TransferSet 和 ContractResult 之间的主要区别是什么?

[英]What is the main difference between WriteSet, TransferSet and ContractResult in Ride4dApps?

In Ride4dApps, the callable function returns WriteSet, TransferSet or a ContractResult but I still do not get the main difference between them?在 Ride4dApps 中,可调用函数返回 WriteSet、TransferSet 或 ContractResult,但我仍然不明白它们之间的主要区别? and who pays fees for this kind of dApps?谁为这种 dApp 支付费用?

  • TransferSet, It's a keyValue list which defines what outgoing payments will be made upon your contract invocation. TransferSet,它是一个 keyValue 列表,它定义了在您的合同调用时将进行的付款。
  • WriteSet, It's a keyValue list which defines what data will be stored in contract's account upon your contract invocation(for example the caller address and balance). WriteSet,它是一个 keyValue 列表,它定义了在您的合约调用时哪些数据将存储在合约的帐户中(例如调用者地址和余额)。 So basically it's a list of data entries that should be recorded to read the dApp state.所以基本上它是应该记录以读取 dApp 状态的数据条目列表。
  • ContractResult, It's the combination of WriteSet and TransferSet. ContractResult,它是WriteSet 和TransferSet 的组合。

The sender pays fees in WAVES(1 + 4*(the cost of each script involved)) to the miner of the invocation.发件人以 WAVES(1 + 4*(所涉及的每个脚本的成本)) 形式向调用的矿工支付费用。

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. i.caller是来电地址。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 参数“i”在Ride4dApps中的可调用函数中表示什么? - What does the parameter “i” represent in the callable functions in Ride4dApps? Ride4dApps中的前三行是什么意思? - What does the first three lines in Ride4dApps mean? Ride4Dapps:TypeError 无法读取 invokeScript 中未定义的属性“长度” - Ride4Dapps: TypeError Cannot read property 'length' of undefined in invokeScript 在Ride4dApps中,充提dApp(Waves IDE中的例子)是如何处理延迟问题的? - In Ride4dApps, how does the deposit and withdraw dApp(the example in Waves IDE) handle the delay issue? 什么是 dapp? 洪流客户端可以被视为 dapps 吗? - What are dapps? Can torrent clients be considered as dapps? Waves Platform中具有不同版本的事务类型不同,它们之间的主要区别是什么? - There're different types of transactions with different versions in Waves Platform, what is the main difference between them? 在Solidity中,使用if()和require()有什么区别? - In Solidity, what is the difference between using if() and require()? 链上和已安装的智能合约有什么区别? - What is the difference between On chain and installed smart contracts? 网络演示和多链浏览器有什么区别? - what is the difference between web demo and multichain explorer? 确定性共识协议和随机共识协议有什么区别? - What is the difference between a deterministic and randomised consensus protocol?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM