Can we run defender autotasks with our own address instead of relayer

I want to schedule and run defender autotasks in the context of our own address instead of relayer. Is there any possible way without compromising on keys.

:computer: Environment

:memo:Details

:1234: Code to reproduce

Yep, you can! We strongly recommend using the secrets vault for storing the private key of your own address. However, keep in mind that you'll need to manually manage nonces, gas prices, retries, and setting up a provider if you don't go through relayers.

I'm curious: what's your use case? Maybe you can still use relayers if you add a forwarding proxy contract?

We need to have a control of the account which is executing the transactions. I guess we cant import relayer's private key into any wallet and use it. If any ERC20 tokens get deposited into relayer we cant get back them other than native tokens.

also @spalladino defender autotask showing only past one month txns run history, can we see earlier runs ?

Indeed, relayer's keys cannot be exported by design.

This is where I wanted to dig deeper. Speaking in Solidity terms, do you need the msg.sender or the tx.origin to be in your control? If it's the former, you can set up something like a 1/N multisig (it can probably be simpler than an actual multisig) which you control, and set the relayer as one of the signers. That way, the relayer can act on behalf of that account on your Defender automated tasks, and you can set up any number of keys under your control as additional signers.

Unfortunately not, we clean up all runs info after 30 days. Would having an "export" feature help, so you can back up runs information?

ok, will check on multi-sign.

Ya it will be better if we can have export feature, since we use defender for scheduled jobs, it will be better to see all the history if the daily job skipped

1 Like