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
Add propose_vault_strategy_moves actions for Ethereum and Base (#2945)
* add propose_vault_strategy_moves actions for ethereum and base
* Get rid of hardhat
---------
Co-authored-by: Shahul Hameed <10547529+shahthepro@users.noreply.github.com>
Copy file name to clipboardExpand all lines: contracts/README.md
+141Lines changed: 141 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -317,6 +317,147 @@ Building the runner image installs the optional `@oplabs/talos-client` peer
317
317
dependency from GitHub Packages. Set `TALOS_PACKAGE_TOKEN` to a PAT with
318
318
`read:packages` access before running `docker compose build`.
319
319
320
+
Actions that propose transactions through the Safe Transaction Service require
321
+
`SAFE_API_KEY`. The active Talos signer must be registered separately on each
322
+
chain as a delegate for the target Safe. A delegate can submit a proposal but
323
+
does not provide an owner confirmation or reduce the Safe threshold.
324
+
325
+
### Defender Relayer
326
+
327
+
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.
328
+
329
+
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.
330
+
331
+
```
332
+
export DEFENDER_API_KEY=
333
+
export DEFENDER_API_SECRET=
334
+
```
335
+
336
+
Once you have finished sending your transactions, the API key for hte Relayer account should be deleted in Defender and the environment variables unset.
337
+
338
+
```
339
+
unset DEFENDER_API_KEY
340
+
unset DEFENDER_API_SECRET
341
+
```
342
+
343
+
### Deploying Defender Actions
344
+
345
+
Actions are used to run operational jobs are specific times or intervals.
346
+
347
+
[rollup](https://rollupjs.org/) is used to bundle Actions source code in
348
+
[/scripts/defender-actions](./scripts/defender-actions) into a single file that can be uploaded to Defender. The
349
+
implementation was based off
350
+
[Defender Actions example using Rollup](https://github.com/OpenZeppelin/defender-autotask-examples/tree/master/rollup).
351
+
The rollup config is in [/scripts/defender-actions/rollup.config.cjs](./scripts/defender-actions/rollup.config.cjs). The
352
+
outputs are written to task specific folders under [/scripts/defender-actions/dist](./scripts/defender-actions/dist/).
353
+
354
+
The [defender-autotask CLI](https://www.npmjs.com/package/@openzeppelin/defender-autotask-client) is used to upload the
355
+
Action code to Defender. For this to work, a Defender Team API key with `Manage Actions` capabilities is needed. This
356
+
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
357
+
left menu. Best to unselect all capabilities except `Manage Actions`.
358
+
359
+
Save the Defender Team API key and secret to your `.env` file.
360
+
361
+
```
362
+
# Open Zeppelin Defender Team API key
363
+
DEFENDER_TEAM_KEY=
364
+
DEFENDER_TEAM_SECRET=
365
+
```
366
+
367
+
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`
375
+
376
+
```
377
+
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.
378
+
```
379
+
380
+
If you are on Apple Silicon (M1/M2/M3) and you node is emulated x64, then the following will return `x64` rather than `arm64`.
381
+
382
+
```
383
+
node -p "process.arch"
384
+
```
385
+
386
+
If x64, run the following to install the required rollup package.
387
+
388
+
```
389
+
pnpm add -D @rollup/rollup-darwin-x64
390
+
```
391
+
392
+
The following will upload the different Action bundles to Defender.
0 commit comments