-
Go to https://defender.openzeppelin.com/#/autotask and sign up
-
To set up an account that executes tasks/transactions instructed in our Autotask scripts, we have two choices: use our own EOA or use a
Relayer
instance- Here we will use relayer, go set up a Relayer instance
-
Back to
Autotask
dashboard and hit theCreate Autotask
button to create new Autotask instnace
- Input instance name, choose
Webhook
as trigger - In
Connect to a relayer
section, select the name of the relayer instance you created - Paste the
Autotask
scripts toCode
section and hitCreate
button
pause
contract script forOneRoleAccessControl
contractpause
contract script forUpgradeProxyImplementation
contract- Note that these javscritp scripts are compiled from its original one written in typescript
- everytime you modify any of these scripts, e.g., OneRoleAccessControl.ts, you have to run
npx tsc scripts/autotask/pause/OneRoleAccessControl.ts
and copy-paste the compiled OneRoleAccessControl.js scripts toCode
section in your Autotask instance
- everytime you modify any of these scripts, e.g., OneRoleAccessControl.ts, you have to run
- You are all set, go invoke functions and see if scripts are executed as expected.
- In instance's info page, you can see the history of execution (
Runs history
) or edit the code/settings.
- You can click the run info to see the return values and logs.
- return values will be in
Result
section - you can
console.log
in your script and they will show up inLogs
section
- return values will be in
More about Autotask
service: https://docs.openzeppelin.com/defender/autotasks