How to use chainlink automation to call a function with onlyAdmin modifier?

40 views Asked by At

I have a smart contract that has a function with an onlyAdmin modifier. I want to use chainlink automation to trigger this function based on certain conditions. However, I don’t know which address to define as the admin in my contract.

1

There are 1 answers

0
ZeusLawyer On

Using Chainlink Automation V2 you can achieve this because performUpkeep is called by a Forwarder Contract that is created specifically for your contract.

Please follow the docs here: https://docs.chain.link/chainlink-automation/guides/forwarder