Skip to content

Commit 6bfb5bd

Browse files
authored
Merge pull request #88 from OpenZeppelin/feature/plat-6599-remove-forta-related-integrations-from-dac
feat: plat-6599 remove forta related integrations from dac
2 parents e8ec5af + c649d8d commit 6bfb5bd

File tree

40 files changed

+155
-1727
lines changed

40 files changed

+155
-1727
lines changed

examples/defender-test-project/serverless.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -185,37 +185,6 @@ resources:
185185
- signature: 'renounceOwnership()'
186186
expression: null # optional
187187
transaction: 'gasPrice > 0' # optional expression
188-
forta-example:
189-
name: 'Forta Example'
190-
type: 'FORTA'
191-
# optional
192-
alert-threshold:
193-
amount: 2
194-
window-seconds: 3600
195-
# optional
196-
paused: false
197-
# optional
198-
action-condition: ${self:resources.actions.action-example-1}
199-
# optional
200-
action-trigger: null
201-
notify-config:
202-
timeout: 0 # optional
203-
message: null # optional
204-
channels: [] # optional
205-
# optional
206-
conditions:
207-
min-scanner-count: 1
208-
severity: 2 # optional (unknown=0, info=1, low=2, medium=3, high=4, critical=5)
209-
# optional
210-
alert-ids:
211-
- '0x1ef2600454e8ed808cc0411a4d653679cc7a1b73d320388cee1e0fc0412490a3'
212-
# optional
213-
forta-node-id: '123'
214-
# optional if addresses is defined
215-
agent-ids:
216-
- '0x8fe07f1a4d33b30be2387293f052c273660c829e9a6965cf7e8d485bcb871083'
217-
# optional
218-
forta-last-processed-time: null
219188

220189
forked-networks:
221190
mainnet-fork:

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"@types/serverless": "^3.12.8",
6060
"@typescript-eslint/eslint-plugin": "^5.36.2",
6161
"@typescript-eslint/parser": "^5.36.2",
62-
"code-style": "https://github.com/OpenZeppelin/code-style.git",
62+
"code-style": "github:OpenZeppelin/code-style",
6363
"eslint": "^8.23.0",
6464
"eslint-config-prettier": "^8.6.0",
6565
"eslint-plugin-prettier": "^4.2.1",
@@ -70,7 +70,7 @@
7070
"typescript": "^4.9.5"
7171
},
7272
"dependencies": {
73-
"@openzeppelin/defender-sdk": "^2.2.0",
73+
"@openzeppelin/defender-sdk": "^2.6.0",
7474
"keccak256": "^1.0.6",
7575
"lodash": "^4.17.21",
7676
"prompt": "^1.3.0"

src/cmd/deploy.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ import {
5050
DefenderMonitorTrigger,
5151
DefenderMonitorFilterTrigger,
5252
DefenderBlockExplorerApiKey,
53-
DefenderFortaMonitorResponse,
5453
DefenderBlockMonitorResponse,
5554
Resources,
5655
DefenderTenantNetwork,
@@ -944,7 +943,6 @@ export default class DefenderDeploy {
944943
retrieveExisting,
945944
// on update
946945
async (monitor: Monitor, match: DefenderMonitor) => {
947-
const isForta = (o: DefenderMonitor): o is DefenderFortaMonitorResponse => o.type === 'FORTA';
948946
const isBlock = (o: DefenderMonitor): o is DefenderBlockMonitorResponse => o.type === 'BLOCK';
949947

950948
// Warn users when they try to change the monitor network
@@ -1018,14 +1016,8 @@ export default class DefenderDeploy {
10181016
blockConditions &&
10191017
blockConditions[0]!.txConditions.length > 0 &&
10201018
blockConditions[0]!.txConditions[0]!.expression,
1021-
privateFortaNodeId: (isForta(match) && match.privateFortaNodeId) || undefined,
1022-
addresses: isBlock(match) ? addressRule && addressRule.addresses : match.fortaRule?.addresses,
1023-
actionCondition: isBlock(match)
1024-
? addressRule && addressRule.actionCondition?.actionId
1025-
: match.fortaRule?.actionCondition?.actionId,
1026-
fortaLastProcessedTime: (isForta(match) && match.fortaLastProcessedTime) || undefined,
1027-
agentIDs: (isForta(match) && match.fortaRule?.agentIDs) || undefined,
1028-
fortaConditions: (isForta(match) && match.fortaRule.conditions) || undefined,
1019+
addresses: addressRule && addressRule.addresses,
1020+
actionCondition: addressRule && addressRule.actionCondition?.actionId,
10291021
riskCategory: match.riskCategory,
10301022
};
10311023

0 commit comments

Comments
 (0)