Skip to content

Commit

Permalink
Add missing networks (#30)
Browse files Browse the repository at this point in the history
* Add missing networks

* Add kanazawa
shahnami authored Nov 9, 2023
1 parent 3e5c839 commit 0926673
Showing 4 changed files with 18 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/types/docs-schemas/definitions.schema.json
Original file line number Diff line number Diff line change
@@ -53,7 +53,12 @@
"base",
"base-goerli",
"linea-goerli",
"linea"
"linea",
"mantle",
"scroll",
"scroll-sepolia",
"meld",
"meld-kanazawa"
]
},
"custom-network": {
5 changes: 5 additions & 0 deletions src/types/docs/definitions-definitions-publicnetwork.md
Original file line number Diff line number Diff line change
@@ -44,3 +44,8 @@
| `"base-goerli"` | |
| `"linea-goerli"` | |
| `"linea"` | |
| `"mantle"` | |
| `"scroll"` | |
| `"scroll-sepolia"` | |
| `"meld"` | |
| `"meld-kanazawa"` | |
2 changes: 1 addition & 1 deletion src/types/schemas/definitions.schema.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"$id":"definitions.schema.json","$schema":"http://json-schema.org/draft-07/schema#","title":"Definitions","definitions":{"defender-id":{"title":"DefenderID","type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-(8|9|a|b)[0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"},"address":{"title":"Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"risk-category":{"title":"RiskCategory","type":"string","enum":["NONE","GOVERNANCE","ACCESS-CONTROL","SUSPICIOUS","FINANCIAL","TECHNICAL"]},"public-network":{"title":"PublicNetwork","type":"string","enum":["mainnet","sepolia","goerli","xdai","sokol","fuse","bsc","bsctest","fantom","fantomtest","moonbase","moonriver","moonbeam","matic","mumbai","avalanche","fuji","arbitrum","arbitrum-nova","arbitrum-goerli","optimism","optimism-goerli","celo","alfajores","harmony-s0","harmony-test-s0","aurora","auroratest","hedera","hederatest","zksync","zksync-goerli","base","base-goerli","linea-goerli","linea"]},"custom-network":{"title":"CustomNetwork","type":"string","enum":["x-dfk-avax-chain","x-dfk-avax-chain-test","x-security-alliance"]},"forked-network":{"title":"ForkedNetwork","type":"string"},"network":{"title":"Network","anyOf":[{"$ref":"#/definitions/supported-network"},{"$ref":"#/definitions/forked-network"}]},"supported-network":{"title":"SupportedNetwork","oneOf":[{"$ref":"#/definitions/public-network"},{"$ref":"#/definitions/custom-network"}]},"policy":{"title":"Policy","type":"object","properties":{"gas-price-cap":{"type":"integer"},"whitelist-receivers":{"title":"WhitelistReceivers","type":"array","items":{"type":"string"}},"eip1559-pricing":{"type":"boolean"},"private-transactions":{"type":"boolean"}}},"relayer":{"title":"Relayer","type":"object","properties":{"name":{"type":"string"},"network":{"$ref":"#/definitions/network","format":"uri-reference"},"min-balance":{"type":"integer"},"address-from-relayer":{"title":"AddressFromRelayer","anyOf":[{"type":"object"},{"type":"string"}]},"policy":{"$ref":"#/definitions/policy","format":"uri-reference"},"api-keys":{"title":"RelayerAPIKeys","type":"array","items":{"type":"string"}}},"required":["name","network","min-balance"]},"contract":{"title":"Contract","type":"object","properties":{"name":{"type":"string"},"address":{"$ref":"#/definitions/address","format":"uri-reference"},"network":{"$ref":"#/definitions/network","format":"uri-reference"},"abi":{"$ref":"#/definitions/abi"},"nat-spec":{"type":"string"}},"required":["name","address","network"]},"notificationType":{"title":"NotificationType","type":"string","enum":["slack","email","discord","telegram","datadog","webhook","opsgenie","pager-duty"]},"datadogConfig":{"title":"DatadogConfig","type":"object","properties":{"api-key":{"type":"string"},"metric-prefix":{"type":"string","maxLength":100,"pattern":"^[A-Za-z]+[A-Za-z0-9_\\.]*\\.$"}},"required":["api-key","metric-prefix"]},"urlConfig":{"title":"UrlConfig","type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]},"telegramBotConfig":{"title":"TelegramConfig","type":"object","properties":{"bot-token":{"type":"string"},"chat-id":{"type":"string"}},"required":["bot-token","chat-id"]},"emailConfig":{"title":"EmailConfig","type":"object","properties":{"emails":{"title":"Emails","type":"array","items":{"type":"string","format":"email"},"default":[]}},"required":["emails"]},"opsgenieUserType":{"title":"OpsgenieUserType","type":"string","enum":["team","user","escalation","schedule"]},"opsgeniePriorityLevel":{"title":"OpsgeniePriorityLevel","type":"string","enum":["P1","P2","P3","P4","P5"]},"opsgenieInstanceLocation":{"title":"OpsgenieInstanceLocation","type":"string","enum":["US","EU"]},"opsgenieUser":{"title":"OpsgenieUser","type":"object","properties":{"username":{"type":"string"},"fullName":{"type":"string"},"id":{"type":"string"},"type":{"$ref":"#/definitions/opsgenieUserType"}},"required":["type","username"],"additionalProperties":false},"opsgenieConfig":{"title":"OpsgenieConfig","properties":{"apiKey":{"type":"string"},"instanceLocation":{"$ref":"#/definitions/opsgenieInstanceLocation"},"alias":{"type":"string","maxLength":512},"responders":{"title":"OpsgenieConfigResponders","type":"array","items":{"$ref":"#/definitions/opsgenieUser"}},"visibleTo":{"title":"OpsgenieConfigVisibleTo","type":"array","items":{"$ref":"#/definitions/opsgenieUser"}},"actions":{"title":"OpsgenieConfigActions","type":"array","maxItems":10,"items":{"type":"string","maxLength":50}},"tags":{"title":"OpsgenieConfigTags","type":"array","maxItems":10,"items":{"type":"string","maxLength":50}},"details":{"title":"OpsgenieConfigDetails","type":"object","additionalProperties":{"type":"string"}},"entity":{"type":"string","maxLength":512},"priority":{"$ref":"#/definitions/opsgeniePriorityLevel"},"note":{"type":"string","maxLength":25000}},"required":["apiKey","instanceLocation"],"additionalProperties":false},"pagerDutyEventType":{"title":"PagerDutyEventType","type":"string","enum":["change","alert"]},"pagerDutyEventAction":{"title":"PagerDutyEventAction","type":"string","enum":["trigger","acknowledge","resolve"]},"pagerDutySeverity":{"title":"PagerDutySeverity","type":"string","enum":["critical","error","warning","info"]},"pagerDutyConfig":{"title":"PagerDutyConfig","properties":{"token":{"type":"string"},"eventType":{"$ref":"#/definitions/pagerDutyEventType"},"routingKey":{"type":"string","maxLength":32,"minLength":32},"eventAction":{"$ref":"#/definitions/pagerDutyEventAction"},"dedupKey":{"type":"string","maxLength":255},"severity":{"$ref":"#/definitions/pagerDutySeverity"},"component":{"type":"string"},"group":{"type":"string"},"class":{"type":"string"},"customDetails":{"title":"PagerDutyConfigCustomDetails","type":"object","additionalProperties":{"type":"string"}}},"if":{"properties":{"eventType":{"const":"alert"}}},"then":{"required":["eventAction","severity"]},"required":["token","eventType","routingKey"],"additionalProperties":false},"notification":{"title":"Notification","type":"object","properties":{"type":{"$ref":"#/definitions/notificationType","format":"uri-reference"},"name":{"type":"string"},"paused":{"type":"boolean"},"config":{"title":"Config","type":"object","oneOf":[{"$ref":"#/definitions/emailConfig","format":"uri-reference"},{"$ref":"#/definitions/telegramBotConfig","format":"uri-reference"},{"$ref":"#/definitions/datadogConfig","format":"uri-reference"},{"$ref":"#/definitions/urlConfig","format":"uri-reference"},{"$ref":"#/definitions/opsgenieConfig","format":"uri-reference"},{"$ref":"#/definitions/pagerDutyConfig","format":"uri-reference"}]}},"required":["type","name","paused","config"]},"category":{"title":"Category","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"notification-ids":{"title":"CategoryNotificationIds","type":"array","items":{"$ref":"#/definitions/notification-or-defender-id","format":"uri-reference"}}},"required":["name"]},"block-monitor":{"title":"BlockMonitor","type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["BLOCK"]},"network":{"$ref":"#/definitions/network","format":"uri-reference"},"contracts":{"title":"Contracts","type":"array","items":{"$ref":"#/definitions/contract-or-defender-id","format":"uri-reference"}},"addresses":{"title":"Addresses","type":"array","items":{"$ref":"#/definitions/address","format":"uri-reference"}},"abi":{"$ref":"#/definitions/abi"},"alert-threshold":{"title":"AlertThreshold","type":"object","properties":{"amount":{"type":"integer"},"window-seconds":{"type":"integer"}},"required":["amount","window-seconds"]},"paused":{"type":"boolean"},"skip-abi-validation":{"type":"boolean","description":"A boolean value that indicates whether the UI should skip ABI validation checks. Enable this if you wish to use custom or partial ABIs for your monitors."},"action-condition":{"$ref":"#/definitions/action-or-defender-id","format":"uri-reference"},"action-trigger":{"$ref":"#/definitions/action-or-defender-id","format":"uri-reference"},"confirm-level":{"oneOf":[{"type":"string","enum":["safe","finalized"]},{"type":"integer"}]},"notify-config":{"title":"NotifyConfig","type":"object","properties":{"timeout":{"type":"integer"},"message":{"type":"string"},"message-subject":{"type":"string"},"category":{"$ref":"#/definitions/category-or-defender-id","format":"uri-reference"},"channels":{"title":"Channels","type":"array","items":{"$ref":"#/definitions/notification-or-defender-id","format":"uri-reference"}}},"required":["channels"]},"conditions":{"title":"Conditions","type":"object","properties":{"event":{"title":"Event","type":"array","items":{"title":"EventItems","type":"object","properties":{"signature":{"type":"string"},"expression":{"type":"string"}},"required":["signature"]}},"function":{"title":"Function","type":"array","items":{"title":"FunctionItems","type":"object","properties":{"signature":{"type":"string"},"expression":{"type":"string"}},"required":["signature"]}},"transaction":{"type":"string"}}},"risk-category":{"$ref":"#/definitions/risk-category"}},"required":["name","type","network","notify-config"]},"forta-monitor":{"title":"FortaMonitor","type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["FORTA"]},"network":{"$ref":"#/definitions/network","format":"uri-reference"},"contracts":{"title":"Contracts","type":"array","items":{"$ref":"#/definitions/contract-or-defender-id","format":"uri-reference"}},"addresses":{"title":"Addresses","type":"array","items":{"$ref":"#/definitions/address","format":"uri-reference"}},"abi":{"$ref":"#/definitions/abi"},"alert-threshold":{"title":"AlertThreshold","type":"object","properties":{"amount":{"type":"integer"},"window-seconds":{"type":"integer"}}},"paused":{"type":"boolean"},"action-condition":{"$ref":"#/definitions/action-or-defender-id","format":"uri-reference"},"action-trigger":{"$ref":"#/definitions/action-or-defender-id","format":"uri-reference"},"notify-config":{"title":"NotifyConfig","type":"object","properties":{"timeout":{"type":"integer"},"message":{"type":"string"},"message-subject":{"type":"string"},"category":{"$ref":"#/definitions/category-or-defender-id","format":"uri-reference"},"channels":{"title":"Channels","type":"array","items":{"$ref":"#/definitions/notification-or-defender-id","format":"uri-reference"}}},"required":["channels"]},"conditions":{"title":"Conditions","type":"object","properties":{"min-scanner-count":{"type":"integer"},"severity":{"type":"integer","enum":[0,1,2,3,4,5]},"alert-ids":{"title":"AlertIDs","type":"array","items":{"type":"string"}}},"required":["min-scanner-count"]},"forta-node-id":{"type":"string"},"forta-last-processed-time":{"type":"string"},"agent-ids":{"title":"AgentIDs","type":"array","items":{"type":"string"}},"risk-category":{"$ref":"#/definitions/risk-category"}},"required":["name","type","notify-config"],"dependencies":{"addresses":["network"],"network":["addresses"]}},"monitor":{"title":"Monitor","type":"object","oneOf":[{"$ref":"#/definitions/block-monitor","format":"uri-reference"},{"$ref":"#/definitions/forta-monitor","format":"uri-reference"}]},"relayer-or-defender-id":{"title":"RelayerOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/relayer","format":"uri-reference"},{"type":"string","$ref":"#/definitions/defender-id","format":"uri-reference"}]},"action-or-defender-id":{"title":"ActionOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/action","format":"uri-reference"},{"type":"string","$ref":"#/definitions/defender-id","format":"uri-reference"}]},"monitor-or-defender-id":{"title":"MonitorOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/monitor","format":"uri-reference"},{"type":"string","$ref":"#/definitions/defender-id","format":"uri-reference"}]},"forked-network-or-defender-id":{"title":"ForkedNetworkOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/forked-network-request","format":"uri-reference"},{"type":"string","$ref":"#/definitions/defender-id","format":"uri-reference"}]},"block-explorer-api-key-or-defender-id":{"title":"BlockExplorerApiKeyOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/block-explorer-api-key","format":"uri-reference"},{"type":"string","$ref":"#/definitions/defender-id","format":"uri-reference"}]},"category-or-defender-id":{"title":"CategoryOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/category","format":"uri-reference"},{"type":"string","$ref":"#/definitions/defender-id","format":"uri-reference"}]},"notification-or-defender-id":{"title":"NotificationOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/notification","format":"uri-reference"},{"type":"string","$ref":"#/definitions/defender-id","format":"uri-reference"}]},"contract-or-defender-id":{"title":"ContractOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/contract","format":"uri-reference"},{"title":"DefenderID","type":"string","pattern":"^[a-zA-Z0-9]+[-]{1}0x[a-fA-F0-9]{40}$"}]},"policy-or-defender-id":{"title":"PolicyOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/policy","format":"uri-reference"},{"type":"string","$ref":"#/definitions/defender-id","format":"uri-reference"}]},"action":{"title":"Action","type":"object","properties":{"name":{"type":"string"},"path":{"type":"string"},"relayer":{"$ref":"#/definitions/relayer-or-defender-id","format":"uri-reference"},"trigger":{"title":"Trigger","type":"object","properties":{"type":{"title":"TriggerType","type":"string","enum":["schedule","webhook","sentinel","monitor-filter"]},"cron":{"title":"TriggerCron","type":"string"},"frequency":{"title":"TriggerFrequency","type":"integer"}},"if":{"properties":{"type":{"const":"schedule"}}},"then":{"oneOf":[{"required":["cron"]},{"required":["frequency"]}]},"else":{},"required":["type"]},"paused":{"type":"boolean"},"environment-variables":{"type":"object","additionalProperties":{"type":"string"}}},"required":["name","path","trigger","paused"]},"block-explorer-api-key":{"title":"BlockExplorerApiKey","type":"object","properties":{"key":{"type":"string"},"network":{"$ref":"#/definitions/network","format":"uri-reference"}},"required":["key","network"]},"abi":{"title":"AbiType","anyOf":[{"title":"StringABI","type":"string"},{"title":"ArrayABI","type":"array"}]},"forked-network-request":{"title":"ForkedNetworkRequest","type":"object","additionalProperties":false,"required":["name","forked-network","rpc-url"],"properties":{"name":{"$ref":"#/definitions/forked-network"},"forked-network":{"$ref":"#/definitions/supported-network"},"rpc-url":{"type":"string","pattern":"^(http(s)?://)[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$"},"api-key":{"type":"string"},"block-explorer-url":{"type":"string","pattern":"^(http(s)?://)[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$"}}}}}
{"$id":"definitions.schema.json","$schema":"http://json-schema.org/draft-07/schema#","title":"Definitions","definitions":{"defender-id":{"title":"DefenderID","type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-(8|9|a|b)[0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"},"address":{"title":"Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"risk-category":{"title":"RiskCategory","type":"string","enum":["NONE","GOVERNANCE","ACCESS-CONTROL","SUSPICIOUS","FINANCIAL","TECHNICAL"]},"public-network":{"title":"PublicNetwork","type":"string","enum":["mainnet","sepolia","goerli","xdai","sokol","fuse","bsc","bsctest","fantom","fantomtest","moonbase","moonriver","moonbeam","matic","mumbai","avalanche","fuji","arbitrum","arbitrum-nova","arbitrum-goerli","optimism","optimism-goerli","celo","alfajores","harmony-s0","harmony-test-s0","aurora","auroratest","hedera","hederatest","zksync","zksync-goerli","base","base-goerli","linea-goerli","linea","mantle","scroll","scroll-sepolia","meld","meld-kanazawa"]},"custom-network":{"title":"CustomNetwork","type":"string","enum":["x-dfk-avax-chain","x-dfk-avax-chain-test","x-security-alliance"]},"forked-network":{"title":"ForkedNetwork","type":"string"},"network":{"title":"Network","anyOf":[{"$ref":"#/definitions/supported-network"},{"$ref":"#/definitions/forked-network"}]},"supported-network":{"title":"SupportedNetwork","oneOf":[{"$ref":"#/definitions/public-network"},{"$ref":"#/definitions/custom-network"}]},"policy":{"title":"Policy","type":"object","properties":{"gas-price-cap":{"type":"integer"},"whitelist-receivers":{"title":"WhitelistReceivers","type":"array","items":{"type":"string"}},"eip1559-pricing":{"type":"boolean"},"private-transactions":{"type":"boolean"}}},"relayer":{"title":"Relayer","type":"object","properties":{"name":{"type":"string"},"network":{"$ref":"#/definitions/network","format":"uri-reference"},"min-balance":{"type":"integer"},"address-from-relayer":{"title":"AddressFromRelayer","anyOf":[{"type":"object"},{"type":"string"}]},"policy":{"$ref":"#/definitions/policy","format":"uri-reference"},"api-keys":{"title":"RelayerAPIKeys","type":"array","items":{"type":"string"}}},"required":["name","network","min-balance"]},"contract":{"title":"Contract","type":"object","properties":{"name":{"type":"string"},"address":{"$ref":"#/definitions/address","format":"uri-reference"},"network":{"$ref":"#/definitions/network","format":"uri-reference"},"abi":{"$ref":"#/definitions/abi"},"nat-spec":{"type":"string"}},"required":["name","address","network"]},"notificationType":{"title":"NotificationType","type":"string","enum":["slack","email","discord","telegram","datadog","webhook","opsgenie","pager-duty"]},"datadogConfig":{"title":"DatadogConfig","type":"object","properties":{"api-key":{"type":"string"},"metric-prefix":{"type":"string","maxLength":100,"pattern":"^[A-Za-z]+[A-Za-z0-9_\\.]*\\.$"}},"required":["api-key","metric-prefix"]},"urlConfig":{"title":"UrlConfig","type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]},"telegramBotConfig":{"title":"TelegramConfig","type":"object","properties":{"bot-token":{"type":"string"},"chat-id":{"type":"string"}},"required":["bot-token","chat-id"]},"emailConfig":{"title":"EmailConfig","type":"object","properties":{"emails":{"title":"Emails","type":"array","items":{"type":"string","format":"email"},"default":[]}},"required":["emails"]},"opsgenieUserType":{"title":"OpsgenieUserType","type":"string","enum":["team","user","escalation","schedule"]},"opsgeniePriorityLevel":{"title":"OpsgeniePriorityLevel","type":"string","enum":["P1","P2","P3","P4","P5"]},"opsgenieInstanceLocation":{"title":"OpsgenieInstanceLocation","type":"string","enum":["US","EU"]},"opsgenieUser":{"title":"OpsgenieUser","type":"object","properties":{"username":{"type":"string"},"fullName":{"type":"string"},"id":{"type":"string"},"type":{"$ref":"#/definitions/opsgenieUserType"}},"required":["type","username"],"additionalProperties":false},"opsgenieConfig":{"title":"OpsgenieConfig","properties":{"apiKey":{"type":"string"},"instanceLocation":{"$ref":"#/definitions/opsgenieInstanceLocation"},"alias":{"type":"string","maxLength":512},"responders":{"title":"OpsgenieConfigResponders","type":"array","items":{"$ref":"#/definitions/opsgenieUser"}},"visibleTo":{"title":"OpsgenieConfigVisibleTo","type":"array","items":{"$ref":"#/definitions/opsgenieUser"}},"actions":{"title":"OpsgenieConfigActions","type":"array","maxItems":10,"items":{"type":"string","maxLength":50}},"tags":{"title":"OpsgenieConfigTags","type":"array","maxItems":10,"items":{"type":"string","maxLength":50}},"details":{"title":"OpsgenieConfigDetails","type":"object","additionalProperties":{"type":"string"}},"entity":{"type":"string","maxLength":512},"priority":{"$ref":"#/definitions/opsgeniePriorityLevel"},"note":{"type":"string","maxLength":25000}},"required":["apiKey","instanceLocation"],"additionalProperties":false},"pagerDutyEventType":{"title":"PagerDutyEventType","type":"string","enum":["change","alert"]},"pagerDutyEventAction":{"title":"PagerDutyEventAction","type":"string","enum":["trigger","acknowledge","resolve"]},"pagerDutySeverity":{"title":"PagerDutySeverity","type":"string","enum":["critical","error","warning","info"]},"pagerDutyConfig":{"title":"PagerDutyConfig","properties":{"token":{"type":"string"},"eventType":{"$ref":"#/definitions/pagerDutyEventType"},"routingKey":{"type":"string","maxLength":32,"minLength":32},"eventAction":{"$ref":"#/definitions/pagerDutyEventAction"},"dedupKey":{"type":"string","maxLength":255},"severity":{"$ref":"#/definitions/pagerDutySeverity"},"component":{"type":"string"},"group":{"type":"string"},"class":{"type":"string"},"customDetails":{"title":"PagerDutyConfigCustomDetails","type":"object","additionalProperties":{"type":"string"}}},"if":{"properties":{"eventType":{"const":"alert"}}},"then":{"required":["eventAction","severity"]},"required":["token","eventType","routingKey"],"additionalProperties":false},"notification":{"title":"Notification","type":"object","properties":{"type":{"$ref":"#/definitions/notificationType","format":"uri-reference"},"name":{"type":"string"},"paused":{"type":"boolean"},"config":{"title":"Config","type":"object","oneOf":[{"$ref":"#/definitions/emailConfig","format":"uri-reference"},{"$ref":"#/definitions/telegramBotConfig","format":"uri-reference"},{"$ref":"#/definitions/datadogConfig","format":"uri-reference"},{"$ref":"#/definitions/urlConfig","format":"uri-reference"},{"$ref":"#/definitions/opsgenieConfig","format":"uri-reference"},{"$ref":"#/definitions/pagerDutyConfig","format":"uri-reference"}]}},"required":["type","name","paused","config"]},"category":{"title":"Category","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"notification-ids":{"title":"CategoryNotificationIds","type":"array","items":{"$ref":"#/definitions/notification-or-defender-id","format":"uri-reference"}}},"required":["name"]},"block-monitor":{"title":"BlockMonitor","type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["BLOCK"]},"network":{"$ref":"#/definitions/network","format":"uri-reference"},"contracts":{"title":"Contracts","type":"array","items":{"$ref":"#/definitions/contract-or-defender-id","format":"uri-reference"}},"addresses":{"title":"Addresses","type":"array","items":{"$ref":"#/definitions/address","format":"uri-reference"}},"abi":{"$ref":"#/definitions/abi"},"alert-threshold":{"title":"AlertThreshold","type":"object","properties":{"amount":{"type":"integer"},"window-seconds":{"type":"integer"}},"required":["amount","window-seconds"]},"paused":{"type":"boolean"},"skip-abi-validation":{"type":"boolean","description":"A boolean value that indicates whether the UI should skip ABI validation checks. Enable this if you wish to use custom or partial ABIs for your monitors."},"action-condition":{"$ref":"#/definitions/action-or-defender-id","format":"uri-reference"},"action-trigger":{"$ref":"#/definitions/action-or-defender-id","format":"uri-reference"},"confirm-level":{"oneOf":[{"type":"string","enum":["safe","finalized"]},{"type":"integer"}]},"notify-config":{"title":"NotifyConfig","type":"object","properties":{"timeout":{"type":"integer"},"message":{"type":"string"},"message-subject":{"type":"string"},"category":{"$ref":"#/definitions/category-or-defender-id","format":"uri-reference"},"channels":{"title":"Channels","type":"array","items":{"$ref":"#/definitions/notification-or-defender-id","format":"uri-reference"}}},"required":["channels"]},"conditions":{"title":"Conditions","type":"object","properties":{"event":{"title":"Event","type":"array","items":{"title":"EventItems","type":"object","properties":{"signature":{"type":"string"},"expression":{"type":"string"}},"required":["signature"]}},"function":{"title":"Function","type":"array","items":{"title":"FunctionItems","type":"object","properties":{"signature":{"type":"string"},"expression":{"type":"string"}},"required":["signature"]}},"transaction":{"type":"string"}}},"risk-category":{"$ref":"#/definitions/risk-category"}},"required":["name","type","network","notify-config"]},"forta-monitor":{"title":"FortaMonitor","type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["FORTA"]},"network":{"$ref":"#/definitions/network","format":"uri-reference"},"contracts":{"title":"Contracts","type":"array","items":{"$ref":"#/definitions/contract-or-defender-id","format":"uri-reference"}},"addresses":{"title":"Addresses","type":"array","items":{"$ref":"#/definitions/address","format":"uri-reference"}},"abi":{"$ref":"#/definitions/abi"},"alert-threshold":{"title":"AlertThreshold","type":"object","properties":{"amount":{"type":"integer"},"window-seconds":{"type":"integer"}}},"paused":{"type":"boolean"},"action-condition":{"$ref":"#/definitions/action-or-defender-id","format":"uri-reference"},"action-trigger":{"$ref":"#/definitions/action-or-defender-id","format":"uri-reference"},"notify-config":{"title":"NotifyConfig","type":"object","properties":{"timeout":{"type":"integer"},"message":{"type":"string"},"message-subject":{"type":"string"},"category":{"$ref":"#/definitions/category-or-defender-id","format":"uri-reference"},"channels":{"title":"Channels","type":"array","items":{"$ref":"#/definitions/notification-or-defender-id","format":"uri-reference"}}},"required":["channels"]},"conditions":{"title":"Conditions","type":"object","properties":{"min-scanner-count":{"type":"integer"},"severity":{"type":"integer","enum":[0,1,2,3,4,5]},"alert-ids":{"title":"AlertIDs","type":"array","items":{"type":"string"}}},"required":["min-scanner-count"]},"forta-node-id":{"type":"string"},"forta-last-processed-time":{"type":"string"},"agent-ids":{"title":"AgentIDs","type":"array","items":{"type":"string"}},"risk-category":{"$ref":"#/definitions/risk-category"}},"required":["name","type","notify-config"],"dependencies":{"addresses":["network"],"network":["addresses"]}},"monitor":{"title":"Monitor","type":"object","oneOf":[{"$ref":"#/definitions/block-monitor","format":"uri-reference"},{"$ref":"#/definitions/forta-monitor","format":"uri-reference"}]},"relayer-or-defender-id":{"title":"RelayerOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/relayer","format":"uri-reference"},{"type":"string","$ref":"#/definitions/defender-id","format":"uri-reference"}]},"action-or-defender-id":{"title":"ActionOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/action","format":"uri-reference"},{"type":"string","$ref":"#/definitions/defender-id","format":"uri-reference"}]},"monitor-or-defender-id":{"title":"MonitorOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/monitor","format":"uri-reference"},{"type":"string","$ref":"#/definitions/defender-id","format":"uri-reference"}]},"forked-network-or-defender-id":{"title":"ForkedNetworkOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/forked-network-request","format":"uri-reference"},{"type":"string","$ref":"#/definitions/defender-id","format":"uri-reference"}]},"block-explorer-api-key-or-defender-id":{"title":"BlockExplorerApiKeyOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/block-explorer-api-key","format":"uri-reference"},{"type":"string","$ref":"#/definitions/defender-id","format":"uri-reference"}]},"category-or-defender-id":{"title":"CategoryOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/category","format":"uri-reference"},{"type":"string","$ref":"#/definitions/defender-id","format":"uri-reference"}]},"notification-or-defender-id":{"title":"NotificationOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/notification","format":"uri-reference"},{"type":"string","$ref":"#/definitions/defender-id","format":"uri-reference"}]},"contract-or-defender-id":{"title":"ContractOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/contract","format":"uri-reference"},{"title":"DefenderID","type":"string","pattern":"^[a-zA-Z0-9]+[-]{1}0x[a-fA-F0-9]{40}$"}]},"policy-or-defender-id":{"title":"PolicyOrDefenderID","anyOf":[{"type":"object","$ref":"#/definitions/policy","format":"uri-reference"},{"type":"string","$ref":"#/definitions/defender-id","format":"uri-reference"}]},"action":{"title":"Action","type":"object","properties":{"name":{"type":"string"},"path":{"type":"string"},"relayer":{"$ref":"#/definitions/relayer-or-defender-id","format":"uri-reference"},"trigger":{"title":"Trigger","type":"object","properties":{"type":{"title":"TriggerType","type":"string","enum":["schedule","webhook","sentinel","monitor-filter"]},"cron":{"title":"TriggerCron","type":"string"},"frequency":{"title":"TriggerFrequency","type":"integer"}},"if":{"properties":{"type":{"const":"schedule"}}},"then":{"oneOf":[{"required":["cron"]},{"required":["frequency"]}]},"else":{},"required":["type"]},"paused":{"type":"boolean"},"environment-variables":{"type":"object","additionalProperties":{"type":"string"}}},"required":["name","path","trigger","paused"]},"block-explorer-api-key":{"title":"BlockExplorerApiKey","type":"object","properties":{"key":{"type":"string"},"network":{"$ref":"#/definitions/network","format":"uri-reference"}},"required":["key","network"]},"abi":{"title":"AbiType","anyOf":[{"title":"StringABI","type":"string"},{"title":"ArrayABI","type":"array"}]},"forked-network-request":{"title":"ForkedNetworkRequest","type":"object","additionalProperties":false,"required":["name","forked-network","rpc-url"],"properties":{"name":{"$ref":"#/definitions/forked-network"},"forked-network":{"$ref":"#/definitions/supported-network"},"rpc-url":{"type":"string","pattern":"^(http(s)?://)[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$"},"api-key":{"type":"string"},"block-explorer-url":{"type":"string","pattern":"^(http(s)?://)[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$"}}}}}
7 changes: 6 additions & 1 deletion src/types/types/resources.schema.d.ts
Original file line number Diff line number Diff line change
@@ -45,7 +45,12 @@ export type PublicNetwork =
| 'base'
| 'base-goerli'
| 'linea-goerli'
| 'linea';
| 'linea'
| 'mantle'
| 'scroll'
| 'scroll-sepolia'
| 'meld'
| 'meld-kanazawa';
export type CustomNetwork = 'x-dfk-avax-chain' | 'x-dfk-avax-chain-test' | 'x-security-alliance';
export type ForkedNetwork = string;
export type AddressFromRelayer = {} | string;

0 comments on commit 0926673

Please sign in to comment.