dagger-contracts/test
Eric 33010bd20c
feat(slot-reservations): Allow slots to be reserved (#177)
* feat(slot-reservations): Allow slots to be reserved

Closes #175.

Allows reservation of slots, without an implementation of the expanding window.

- Add a function called `reserveSlot(address, SlotId)`, that allows three unique addresses per slot to be reserved, that returns bool if successful.
       - Use `mapping(SlotId => EnumerableSet.AddressSet)`
       - Return false if the address could not be added to the set (if `EnumerableSet.add` returns false)
- Add `canReserveSlot(address, SlotId)`
        - Return `true` if set of reservations is less than 3 and the set doesn't already contain the address
        - Return `true` otherwise (for now, later add in logic for checking the address is inside the expanding window)
        - Call `canReserveSlot` from `reserveSlot` as a `require` or invariant
- Add `SlotReservations` configuration struct to the network-level config, with `maxReservations`
2024-10-03 11:01:21 +10:00
..
Endian.test.js Formatting 2024-01-25 13:16:49 +01:00
Marketplace.test.js fix(Marketplace): ensure requests include ask with sufficient slots 2024-08-27 17:14:52 +02:00
Proofs.test.js chore: add `downtimeProduct` configuration parameter (#138) 2024-08-14 15:50:32 +10:00
SlotReservations.test.js feat(slot-reservations): Allow slots to be reserved (#177) 2024-10-03 11:01:21 +10:00
evm.js feat: partial payouts for cancelled requests (#69) 2023-10-16 11:14:02 +02:00
examples.js feat(slot-reservations): Allow slots to be reserved (#177) 2024-10-03 11:01:21 +10:00
ids.js Merkle root is 32 bytes 2023-11-22 14:43:11 +01:00
marketplace.js feat: adds an optional `payoutAddress` to allow payouts to be paid to separate address (#144) 2024-08-19 17:09:48 +10:00
price.js [marketplace] Reward is paid out per second per slot 2022-08-08 11:51:14 +02:00
requests.js feat: expiry specified as duration (#99) 2024-05-06 15:13:32 +02:00
time.js clean up tests 2022-10-25 12:38:19 +11:00