You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Remove Defender from the repo
* Removed Holesky test chain
* More Holesky changes
* Skip Sonic strategy fork tests
* Fix Base cross chain strategy fork tests
* Fix Base Curve AMO fork test
`contracts/harvest/` - collect reward tokens from strategies and swap to yield-bearing assets. `Harvester` for OUSD, `OETHHarvester` for OETH, network-specific variants exist.
**Scheduled actions (Talos):** distinct from the Defender scripts above — the Talos runner's cron/manual actions live in `contracts/tasks/actions/*.ts`, are scheduled in `contracts/migrations/seed_schedules.sql`, and are catalogued in `contracts/docs/ACTIONS.md`. Update that doc in the same change whenever a scheduled action is added, removed, or its behaviour changes.
121
+
### Automation (Talos)
122
+
The Talos runner's cron/manual actions live in `contracts/tasks/actions/*.ts`,
123
+
are scheduled in `contracts/migrations/seed_schedules.sql`, and are catalogued
124
+
in `contracts/docs/ACTIONS.md`. Update that doc in the same change whenever a
125
+
scheduled action is added, removed, or its behaviour changes.
**No Postgres required for local runs.** The library's nonce queue is gated by `process.env.DATABASE_URL`: if unset, the action uses a raw ethers signer with ethers' own nonce handling. The gate is a single `if (!process.env.DATABASE_URL) return null` check at the top of the handler — no DB connection is opened. If you want to opt in locally (e.g., via `docker compose up`), set `DATABASE_URL` and the queue engages; `unset DATABASE_URL` to go back.
316
315
317
-
Signer construction (KMS via `utils/signersNoHardhat.js`, `DEPLOYER_PK` / `GOVERNOR_PK` fallbacks, `IMPERSONATE`, Defender) stays exactly as described in the sections above. The library only handles the nonce wrap; it does not construct signers here.
318
-
319
-
### Defender Relayer
320
-
321
-
Open Zeppelin's [Defender](https://defender.openzeppelin.com/) product has a [Relayer](https://docs.openzeppelin.com/defender/v2/manage/relayers) service that is a managed wallet. It handles the nonce, gas, signing and sending of transactions.
322
-
323
-
To use a [Relayer](https://defender.openzeppelin.com/v2/#/manage/relayers) account, first log into Defender and create an API key for the account you want to use. Use the generated API key and secret to set the `DEFENDER_API_KEY` and `DEFENDER_API_SECRET` environment variables.
324
-
325
-
```
326
-
export DEFENDER_API_KEY=
327
-
export DEFENDER_API_SECRET=
328
-
```
329
-
330
-
Once you have finished sending your transactions, the API key for hte Relayer account should be deleted in Defender and the environment variables unset.
331
-
332
-
```
333
-
unset DEFENDER_API_KEY
334
-
unset DEFENDER_API_SECRET
335
-
```
336
-
337
-
### Deploying Defender Actions
338
-
339
-
Actions are used to run operational jobs are specific times or intervals.
340
-
341
-
[rollup](https://rollupjs.org/) is used to bundle Actions source code in
342
-
[/scripts/defender-actions](./scripts/defender-actions) into a single file that can be uploaded to Defender. The
343
-
implementation was based off
344
-
[Defender Actions example using Rollup](https://github.com/OpenZeppelin/defender-autotask-examples/tree/master/rollup).
345
-
The rollup config is in [/scripts/defender-actions/rollup.config.cjs](./scripts/defender-actions/rollup.config.cjs). The
346
-
outputs are written to task specific folders under [/scripts/defender-actions/dist](./scripts/defender-actions/dist/).
347
-
348
-
The [defender-autotask CLI](https://www.npmjs.com/package/@openzeppelin/defender-autotask-client) is used to upload the
349
-
Action code to Defender. For this to work, a Defender Team API key with `Manage Actions` capabilities is needed. This
350
-
can be generated by a Defender team admin under the `Manage` tab on the top right of the UI and then `API Keys` on the
351
-
left menu. Best to unselect all capabilities except `Manage Actions`.
352
-
353
-
Save the Defender Team API key and secret to your `.env` file.
354
-
355
-
```
356
-
# Open Zeppelin Defender Team API key
357
-
DEFENDER_TEAM_KEY=
358
-
DEFENDER_TEAM_SECRET=
359
-
```
360
-
361
-
The following will bundle the Actions code ready for upload.
If you get error like the below, you will need to install `@rollup/rollup-darwin-x64`
369
-
370
-
```
371
-
Error: Cannot find module @rollup/rollup-darwin-x64. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
372
-
```
373
-
374
-
If you are on Apple Silicon (M1/M2/M3) and you node is emulated x64, then the following will return `x64` rather than `arm64`.
375
-
376
-
```
377
-
node -p "process.arch"
378
-
```
379
-
380
-
If x64, run the following to install the required rollup package.
381
-
382
-
```
383
-
pnpm add -D @rollup/rollup-darwin-x64
384
-
```
385
-
386
-
The following will upload the different Action bundles to Defender.
Defender Action that operates the validators will by default request a validator with encrypted private keys and store those encrypted keys in the `validator-keys` S3 bucket. Each validator private key is one S3 object and the name of the object is the pubkey (schema: [pubkey].json) of the validator. The S3 bucket has versioning enabled so we can always retrieve possibly overwritten / deleted objects.
338
+
The validator automation requests validators with encrypted private keys and
339
+
stores those encrypted keys in the `validator-keys` S3 bucket. Each validator
340
+
private key is one S3 object and the name of the object is the pubkey (schema:
341
+
`[pubkey].json`). The S3 bucket has versioning enabled so overwritten or deleted
0 commit comments