Skip to content

Commit

Permalink
Merge pull request #67 from sygmaprotocol/mj52951/regex-validation
Browse files Browse the repository at this point in the history
feat: Added more validations
  • Loading branch information
nmlinaric authored Oct 16, 2023
2 parents bce859c + 3d259bc commit d88bf77
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Format of shared domains configuration for all Sygma services:
- domains - array of domains that the bridge is supporting
- id - domain id
- name - domain name
- type - domain type (supstrate, evm)
- type - domain type (substrate, evm)
- bridgeContract - address of the bridge contract
- handlers - information about the type and address of the handlers contracts
- type - handler type (erc20, erc721, permissionedGeneric, permissionlessGeneric)
Expand Down
28 changes: 21 additions & 7 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@
"type": "string"
},
"type": {
"type": "string"
"type": "string",
"enum": [
"evm",
"substrate"
]
},
"bridge": {
"type": "string"
"type": "string",
"pattern": "^$|^0x[a-fA-F0-9]{40}$"
},
"nativeTokenSymbol": {
"type": "string"
Expand Down Expand Up @@ -63,7 +68,8 @@
]
},
"feeRouter": {
"type": "string"
"type": "string",
"pattern": "^0x[a-fA-F0-9]{40}$"
},
"feeHandlers": {
"type": "array",
Expand All @@ -72,10 +78,16 @@
"type": "object",
"properties": {
"address": {
"type": "string"
"type": "string",
"pattern": "^0x[a-fA-F0-9]{40}$"
},
"type": {
"type": "string"
"type": "string",
"enum": [
"basic",
"oracle",
"percentage"
]
}
},
"required": [
Expand All @@ -92,7 +104,8 @@
"type": "object",
"properties": {
"resourceId": {
"type": "string"
"type": "string",
"pattern": "^0x[0-9]{64}$"
},
"type": {
"type": "string",
Expand All @@ -104,7 +117,8 @@
]
},
"address": {
"type": "string"
"type": "string",
"pattern": "^$|^0x[a-fA-F0-9]{40}$"
},
"symbol": {
"type": "string"
Expand Down

0 comments on commit d88bf77

Please sign in to comment.