Commit Graph

19 Commits

Author SHA1 Message Date
Eric Mastro c03206c2b8
add tests for DAL 2022-12-07 20:37:05 +11:00
Eric Mastro 2aa50eabbf
add clearing of host slots with MAX_SLOTS boundary 2022-12-05 17:25:21 +11:00
Eric Mastro 641892ccfa
refactor the DAL api for readability 2022-12-01 21:42:27 +11:00
Eric Mastro 407d51bc9a
Refactor to data access layer
Create a DAL lib with a Database struct that contains all tables and relationships. Referential integrity is guaranteed.
2022-12-01 15:53:28 +11:00
Eric Mastro e80b5b80ef
clean up 2022-11-28 15:50:44 +11:00
Eric Mastro 3502632909
Update inspiration acknowledgement 2022-11-28 14:40:49 +11:00
Eric Mastro 8fde295b73
refactor Mappings.Mapping, add ClearableBytes32Set
- refactor Mappings.Mapping to use a ClearableBytes32Set and multiple EnumerableSet.Bytes32Sets instead of implementing that code directly in Mappings.Mapping.
- update the api for better readability and reasoning.

This should be much cleaner now.
2022-11-28 14:39:11 +11:00
Eric Mastro b0bdf5fafe
add Mappings tests
- add tests for Mappings.Mapping
- remove SetMap.test.js (no longer used)
- rename getManyCount to getValueCount
2022-11-25 15:17:08 +11:00
Eric Mastro af7f0dd8cf
remove SetMap and EnumerableSets 2022-11-24 22:07:23 +11:00
Eric Mastro 42e69d592f
add user defined types for bytes32 keys and values in Mappings 2022-11-24 22:04:18 +11:00
Eric Mastro e063041d69
WIP: cleanup checkpoint 2022-11-24 19:47:29 +11:00
Eric Mastro d4a0521f33
WIP: initial implementation of one-to-many
Needs to be cleaned up and reorganised.
2022-11-24 18:49:16 +11:00
Eric Mastro d70efad7bd
Add more tests
- Marketplace tests for requestsForHost, and additional tests for myRequests and mySlots
- Added Utils lib with tests
- Added additional Bytes32AddressSetMap.keys expectations
2022-11-23 00:14:39 +11:00
Eric Mastro a51491a6cb
Add SetMap tests 2022-11-22 16:49:08 +11:00
Eric Mastro 7e937a1e02
rename AddressSetMap to Bytes32AddressSetMap 2022-11-21 16:19:50 +11:00
Eric Mastro 5974ec00a7
add Bytes32AddressSetMap for active requests by host
Add `Bytes32AddressSetMap` which maps addresses to a requestId. This is used in `Marketplace.activeRequestsForHost`, where all addresses for a particular requestId are listed. This can then be used to iterate and list out the actives requests for a particular address in a view function only. This allows for all addresses for a request to be cleared in situations such as when a request fails or is cancelled.
2022-11-18 18:46:03 +11:00
Eric Mastro 3ec0412f72
Add SetMap type for mapping all requests 2022-11-17 23:11:23 +11:00
Eric Mastro ea0164ee0e
add ability to get all requests 2022-11-17 17:39:17 +11:00
Eric Mastro 0890081d11
switch to a lib, and generalise the api 2022-11-17 16:25:45 +11:00