链链链接守护机中检查气体限制的用途是什么?
在Chainlink keepers中,文档在这里。有一个称为checkgaslimit
的conf,为默认值6,500,000。
由于checkupkeep
中的计算有望将其外包在链上外包,所以为什么有一种称为checkgaslimit
计算链离链的配置?
或checkgaslimit
是针对函数checkupkeep
应该修改某些状态的情况。
In chainlink keepers document here. There is a conf called checkGasLimit
with 6,500,000 as the default value.
Since the computation in checkUpKeep
is expected to be outsourced off-chain, why there is a configuration called checkGasLimit
where computation is off-chain?
Or checkGasLimit
is for the situation where function checkUpKeep
is supposed to modify some state.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你明白了!
Checkupkeep
可用于更改区块链的状态。链条节点返回true时将调用checkupkeek
函数 - 如果它花费了,则它将使用气体。然后,使用
checkgaslimit
是为了确保它们不会使用太多气体。根据文档:您的Checkupkeke可以使用链计算的最大气体。
You got it!
checkUpkeep
can be used to change the state of the blockchain. The Chainlink nodes will call thecheckUpkeep
function when it returns true - and if it costs gas, it will use gas.The use of the
checkGasLimit
then, is to make sure they don't use too much gas. Per the docs:The maximum amount of gas that can be used by your checkUpkeep for off-chain computation.