Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@
"type": "datetime",
"required": true
},
"bonding_pool": {
"type": "relation",
"relation": "manyToOne",
"target": "api::bonding-pool.bonding-pool",
"inversedBy": "solver_bonding_pools"
"name": {
"type": "string",
"required": true
},
"solvers": {
"type": "relation",
Expand All @@ -37,6 +35,12 @@
"type": "boolean",
"required": true,
"default": false
},
"solver_networks": {
"type": "relation",
"relation": "oneToMany",
"target": "api::solver-network.solver-network",
"mappedBy": "vouchedBy"
}
}
}
14 changes: 11 additions & 3 deletions src/api/solver-network/content-types/solver-network/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
"type": "relation",
"relation": "manyToOne",
"target": "api::network.network",
"inversedBy": "solver_networks"
"inversedBy": "solver_networks",
"required": true
},
"address": {
"type": "string",
"regex": "^(0x)?[0-9a-fA-F]{40}$"
"regex": "^(0x)?[0-9a-fA-F]{40}$",
"required": true
},
"payoutAddress": {
"type": "string",
Expand All @@ -40,7 +42,8 @@
"environment": {
"type": "relation",
"relation": "oneToOne",
"target": "api::environment.environment"
"target": "api::environment.environment",
"required": true
},
"isWhiteListed": {
"type": "boolean",
Expand All @@ -54,6 +57,11 @@
"type": "boolean",
"default": false,
"required": true
},
"vouchedBy": {
"type": "relation",
"relation": "manyToOne",
"target": "api::solver-bonding-pool.solver-bonding-pool"
}
}
}
8 changes: 8 additions & 0 deletions src/api/solver/content-types/solver/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@
],
"required": true,
"default": "No"
},
"activeNetworks": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would we want the activeNetworks and hasActiveNetworks fields if we have the isActive field on the network itself?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, thinking about this some more I think it makes sense to aggregate these on the solver schema to make it easier to find. Will we use this to show the network names or their addresses? I can see both being useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently I made it contain the network names

"type": "json",
"private": false
},
"hasActiveNetworks": {
"type": "boolean",
"default": false
}
}
}
Loading