Does chainlink automation use my performUpKeep function even though there is onlyOwner modifier ? If so can another person call performUpKeep function of my smart contract ?
I was using chainlink automation on my smart contract function. And i thought if chainlink automation can use my smart contract function directly, can another person call it ? Is chainlink automation safe ?
Hello Tuvshuu kun
No, the
performUpKeep
function will not work if you add anonlyOwner
modifier, if the address is who deployed the contract (concept of owner).But you can restrict it using
onlyKeeperRegistry
.The EthBalanceMonitor Contract use this concept, it can be useful for you :)