NEO N3区块链 - 多合同交易的结构费用

发布于 2025-02-06 15:24:12 字数 257 浏览 0 评论 0 原文

我正在学习python的新区块链编程 而且我已经开始从事一个模块化项目,在该项目中,不同的零件是通过将不同的智能合约链接回的不同智能合约执行的。

我想拥有一个功能,例如: 发送1个NEO合同A - >合同A薄荷糖1 XXX令牌,并将其发送到Cotnract B - ≫ 合同B进行了一些操作或锁定资金,然后允许用户回收它,

它纯粹是理论简化的示例来说明我的问题。 在这种情况下,如何支付交易费?如果我想签订合同签订另一个合同,合同是否必须为此交易支付费用?

I'm learning NEO blockchain programming with Python
and I've started working on a modular project where different parts are executed by different smart contracts hard-linked back together.

I want to have a functionality such as:
send 1 NEO to contract A -> contract A mints 1 XXX Token and sends it to cotnract B ->
contract B does some operations or locks the funds for a bit then allows the user to reclaim it

It's purely theoretical simplified example to illustrate my question.
How in such case transaction fees would be paid? If I want a contract to call to another contract, will the contract have to pay the fees for this transaction?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时光病人 2025-02-13 15:24:12

N3费用由事务发送者(签名者#0)支付,特别是网络(验证/大小)和系统(执行)费用。无论执行多少代码以及合同调用的深度,所有代码都平等计数,并以单个系统费用付款。通常,您会通过 InvokeFunction RPC API(返回数据中的 GasCunsumed )。

如果是交易发送者,合同可以支付系统费用(在这种情况下,必须具有适当的 verififififififififififififififififififififify 方法),但这是同一模型---一个发件人帐户为整个执行付费。

N3 fees are paid by the transaction sender (signer #0), specifically network (verification/size) and system (execution) fees. No matter what amount of code is executed and how deep it goes with contract calls it's all counted equally and paid for with a single system fee. Usually you estimate it with a test invocation via invokefunction or invokescript RPC APIs (gasconsumed in returned data).

Contract can pay the system fee if it's a transaction sender (in which case it must have an appropriate verify method), but that'd be the same model --- one sender account paying for the whole execution.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文