【发布时间】:2021-08-09 15:50:04
【问题描述】:
正如标题所说,似乎所有守门员运行 performUpkeep 的条件都已满足,但它没有被调用。
这里是维护链接:https://keepers.chain.link/kovan/upkeeps/413
这是合同:https://kovan.etherscan.io/address/0x969F42c92A6aeBD925982CCc1C943185B6D0E357#code
以下是相关代码:
function checkUpkeep(bytes calldata checkData) external view override returns (bool upkeepNeeded, bytes memory performData) {
upkeepNeeded = shouldHarvest();
// We don't use the checkData
// checkData was defined when the Upkeep was registered
performData = checkData;
}
function performUpkeep(bytes calldata performData) external override {
harvest();
// We don't use the performData
// performData is generated by the Keeper's call to your `checkUpkeep` function
performData;
}
function shouldHarvest() internal view returns (bool) {
bool hasPendingOutput = IMasterChef(chef).pendingBall(poolId, address(this)) > harvestThreshold;
bool harvestCondition = hasPendingOutput && !paused();
return harvestCondition;
}
我尝试过的事情:
- 通过进行新的维护来提高气体限制:https://keepers.chain.link/kovan/upkeeps/416
- 在 checkUpkeep 上使用没有“view”修饰符的合约(如@chainlink/contract npm 包中的接口:https://keepers.chain.link/kovan/upkeeps/414
我使用 Remix 查询 https://kovan.etherscan.io/address/0x969F42c92A6aeBD925982CCc1C943185B6D0E357#code 上的 checkUpkeep 以查看它是否返回 true。
【问题讨论】:
-
可以分享一下收获方法的签名吗?
-
没关系,刚刚在 Etherscan 看到了源代码 :)
标签: chainlink