@@ -290,61 +290,55 @@ The following will set the Defender Team API key and bundle the Actions code rea
290290``` bash
291291cd ./src/js/actions
292292
293- # Export the Defender Team API key. This is different to the Defender Relayer API key.
294- export API_KEY=
295- export API_SECRET=
293+ # Set the DEFENDER_TEAM_KEY and DEFENDER_TEAM_SECRET env vars in the .env file
296294
297- npx rollup -c
295+ yarn rollup -c
298296```
299297
300298The following will upload the different Action bundles to Defender.
301299
302300``` bash
303301
304302# Set the DEBUG environment variable to oeth* for the Defender Action
305- npx hardhat setActionVars --id 93c010f9-05b5-460f-bd10-1205dd80a7c9
306- npx hardhat setActionVars --id 563d8d0c-17dc-46d3-8955-e4824864869f
307- npx hardhat setActionVars --id c010fb76-ea63-409d-9981-69322d27993a
308- npx hardhat setActionVars --id 127171fd-7b85-497e-8335-fd7907c08386
309- npx hardhat setActionVars --id 84b5f134-8351-4402-8f6a-fb4376034bc4
310- npx hardhat setActionVars --id ffcfc580-7b0a-42ed-a4f2-3f0a3add9779 --name ONEINCH_API_KEY # Don't forget to run `export ONEINCH_API_KEY=...` first!
311- npx hardhat setActionVars --id 32dbc67b-89f3-4856-8f3d-ad4dc5a09322
312- npx hardhat setActionVars --id 7a0cb2c9-11c2-41dd-bcd0-d7c2dbda6af6
313- npx hardhat setActionVars --id a9fc4c86-0506-4809-afbc-93b5e558cb68
314- npx hardhat setActionVars --id 12977d51-d107-45eb-ac20-45942009ab01
315- npx hardhat setActionVars --id 6ec46510-0b8e-48b4-a4c8-de759aad0ba4
316- npx hardhat setActionVars --id 6d148f26-54a6-4377-92f2-3148d572eea3 --name ONEINCH_API_KEY # Don't forget to run `export ONEINCH_API_KEY=...` first!
317- npx hardhat setActionVars --id acfbb7d6-5ea6-4ffc-a758-fa4b4f584dd1 # allocateLido
318- npx hardhat setActionVars --id 6e26641e-4132-4824-bb80-7c891fd31455 # collectEtherFiFees
319- npx hardhat setActionVars --id 002c2b0d-9522-4d5f-a340-9713ee43a1c3 # allocateEtherFi
320- npx hardhat setActionVars --id 062cfee1-c34e-43ae-beb0-de62bc668bbd # autoRequestEtherFiWithdraw
321- npx hardhat setActionVars --id 6c52f3a9-85d8-4c7f-8aee-90a95b13965c # autoClaimEtherFiWithdraw
322-
323- # The Defender autotask client uses generic env var names so we'll set them first from the values in the .env file
324- export API_KEY=
325- export API_SECRET=
303+ yarn hardhat setActionVars --id 93c010f9-05b5-460f-bd10-1205dd80a7c9
304+ yarn hardhat setActionVars --id 563d8d0c-17dc-46d3-8955-e4824864869f
305+ yarn hardhat setActionVars --id c010fb76-ea63-409d-9981-69322d27993a
306+ yarn hardhat setActionVars --id 127171fd-7b85-497e-8335-fd7907c08386
307+ yarn hardhat setActionVars --id 84b5f134-8351-4402-8f6a-fb4376034bc4
308+ yarn hardhat setActionVars --id ffcfc580-7b0a-42ed-a4f2-3f0a3add9779 --name ONEINCH_API_KEY # Don't forget to run `export ONEINCH_API_KEY=...` first!
309+ yarn hardhat setActionVars --id 32dbc67b-89f3-4856-8f3d-ad4dc5a09322
310+ yarn hardhat setActionVars --id 7a0cb2c9-11c2-41dd-bcd0-d7c2dbda6af6
311+ yarn hardhat setActionVars --id a9fc4c86-0506-4809-afbc-93b5e558cb68
312+ yarn hardhat setActionVars --id 12977d51-d107-45eb-ac20-45942009ab01
313+ yarn hardhat setActionVars --id 6ec46510-0b8e-48b4-a4c8-de759aad0ba4
314+ yarn hardhat setActionVars --id 6d148f26-54a6-4377-92f2-3148d572eea3 --name ONEINCH_API_KEY # Don't forget to run `export ONEINCH_API_KEY=...` first!
315+ yarn hardhat setActionVars --id acfbb7d6-5ea6-4ffc-a758-fa4b4f584dd1 # allocateLido
316+ yarn hardhat setActionVars --id 6e26641e-4132-4824-bb80-7c891fd31455 # collectEtherFiFees
317+ yarn hardhat setActionVars --id 002c2b0d-9522-4d5f-a340-9713ee43a1c3 # allocateEtherFi
318+ yarn hardhat setActionVars --id 062cfee1-c34e-43ae-beb0-de62bc668bbd # autoRequestEtherFiWithdraw
319+ yarn hardhat setActionVars --id 6c52f3a9-85d8-4c7f-8aee-90a95b13965c # autoClaimEtherFiWithdraw
326320
327321# Mainnet
328- npx defender-autotask update-code 93c010f9-05b5-460f-bd10-1205dd80a7c9 ./dist/ autoRequestWithdraw
329- npx defender-autotask update-code 563d8d0c-17dc-46d3-8955-e4824864869f ./dist/ autoClaimWithdraw
330- npx defender-autotask update-code c010fb76-ea63-409d-9981-69322d27993a ./dist/ autoRequestLidoWithdraw
331- npx defender-autotask update-code 127171fd-7b85-497e-8335-fd7907c08386 ./dist/ autoClaimLidoWithdraw
332- npx defender-autotask update-code 84b5f134-8351-4402-8f6a-fb4376034bc4 ./dist/ collectLidoFees
333- npx defender-autotask update-code ffcfc580-7b0a-42ed-a4f2-3f0a3add9779 ./dist/ setPrices
334- npx defender-autotask update-code 32dbc67b-89f3-4856-8f3d-ad4dc5a09322 ./dist/ collectFeesSonic
335- npx defender-autotask update-code 7a0cb2c9-11c2-41dd-bcd0-d7c2dbda6af6 ./dist/ allocateSonic
336- npx defender-autotask update-code a9fc4c86-0506-4809-afbc-93b5e558cb68 ./dist/ collectRewardsSonic
337- npx defender-autotask update-code 12977d51-d107-45eb-ac20-45942009ab01 ./dist/ autoRequestWithdrawSonic
338- npx defender-autotask update-code 6ec46510-0b8e-48b4-a4c8-de759aad0ba4 ./dist/ autoClaimWithdrawSonic
339- npx defender-autotask update-code 6d148f26-54a6-4377-92f2-3148d572eea3 ./dist/ setOSSiloPriceAction
340- npx defender-autotask update-code acfbb7d6-5ea6-4ffc-a758-fa4b4f584dd1 ./dist/ allocateLido
341- npx defender-autotask update-code 6e26641e-4132-4824-bb80-7c891fd31455 ./dist/ collectEtherFiFees
342- npx defender-autotask update-code 002c2b0d-9522-4d5f-a340-9713ee43a1c3 ./dist/ allocateEtherFi
343- npx defender-autotask update-code 062cfee1-c34e-43ae-beb0-de62bc668bbd ./dist/ autoRequestEtherFiWithdraw
344- npx defender-autotask update-code 6c52f3a9-85d8-4c7f-8aee-90a95b13965c ./dist/ autoClaimEtherFiWithdraw
322+ yarn hardhat updateAction --id 93c010f9-05b5-460f-bd10-1205dd80a7c9 --file autoRequestWithdraw
323+ yarn hardhat updateAction --id 563d8d0c-17dc-46d3-8955-e4824864869f --file autoClaimWithdraw
324+ yarn hardhat updateAction --id c010fb76-ea63-409d-9981-69322d27993a --file autoRequestLidoWithdraw
325+ yarn hardhat updateAction --id 127171fd-7b85-497e-8335-fd7907c08386 --file autoClaimLidoWithdraw
326+ yarn hardhat updateAction --id 84b5f134-8351-4402-8f6a-fb4376034bc4 --file collectLidoFees
327+ yarn hardhat updateAction --id ffcfc580-7b0a-42ed-a4f2-3f0a3add9779 --file setPrices
328+ yarn hardhat updateAction --id 32dbc67b-89f3-4856-8f3d-ad4dc5a09322 --file collectFeesSonic
329+ yarn hardhat updateAction --id 7a0cb2c9-11c2-41dd-bcd0-d7c2dbda6af6 --file allocateSonic
330+ yarn hardhat updateAction --id a9fc4c86-0506-4809-afbc-93b5e558cb68 --file collectRewardsSonic
331+ yarn hardhat updateAction --id 12977d51-d107-45eb-ac20-45942009ab01 --file autoRequestWithdrawSonic
332+ yarn hardhat updateAction --id 6ec46510-0b8e-48b4-a4c8-de759aad0ba4 --file autoClaimWithdrawSonic
333+ yarn hardhat updateAction --id 6d148f26-54a6-4377-92f2-3148d572eea3 --file setOSSiloPriceAction
334+ yarn hardhat updateAction --id acfbb7d6-5ea6-4ffc-a758-fa4b4f584dd1 --file allocateLido
335+ yarn hardhat updateAction --id 6e26641e-4132-4824-bb80-7c891fd31455 --file collectEtherFiFees
336+ yarn hardhat updateAction --id 002c2b0d-9522-4d5f-a340-9713ee43a1c3 --file allocateEtherFi
337+ yarn hardhat updateAction --id 062cfee1-c34e-43ae-beb0-de62bc668bbd --file autoRequestEtherFiWithdraw
338+ yarn hardhat updateAction --id 6c52f3a9-85d8-4c7f-8aee-90a95b13965c --file autoClaimEtherFiWithdraw
345339```
346340
347- ` rollup ` and ` defender-autotask ` can be installed globally to avoid the ` npx ` prefix.
341+ ` rollup ` can be installed globally to avoid the ` yarn ` prefix.
348342
349343The Defender Actions need to be under 5MB in size. The [ rollup-plugin-visualizer] ( https://www.npmjs.com/package/rollup-plugin-visualizer ) can be used to visualize the size of an Action's dependencies.
350344A ` stats.html ` file is generated in the` src/js/actions ` folder that can be opened in a browser to see the size of the Action's dependencies.
0 commit comments