就像标题所说的那样,似乎已经满足了 keeper 运行 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;
}
我尝试过的事情:
- 通过进行新的维护来增加 gas 限制: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。