defender-autotask-examples
defender-autotask-examples copied to clipboard
Example snippets for Defender Autotasks
Defender Autotask Examples
This repository contains sample code snippets for Defender Autotasks. Follow the instructions in each folder for more info on how to use them.
Disclaimer: The scripts in this repository have not been audited. Please file an issue if you stumble upon any mistake.
- The
relayfolder contains detailed examples on how to use thedefender-relay-clientpackage from an Autotask, both standalone and integrated withethers.js, including local development and unit testing. - The
typescriptfolder shows how to write an autotask in typescript, and usetscto compile it to javascript that can be run within Defender. - The
rollupfolder includes a more complex example, that generates a bundle that incorporates additional dependencies not available in the Autotasks runtime, and embeds contract ABIs in the generated output. - The
webpackfolder is similar to the previous one, bundling dependencies and ABIs into a single file, but uses webpack as a code bundler instead of rollup. - The
keep3rsfolder contains autotasks to execute jobs as a keeper within the Keep3r Network, along with their respective unit tests.