dagger-contracts/contracts
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
..
Configuration.sol feat(slot-reservations): Allow slots to be reserved (#177) 2024-10-03 11:01:21 +10:00
Endian.sol Update solidity to 0.8.23 2024-01-25 13:08:10 +01:00
FuzzMarketplace.sol feat(slot-reservations): Allow slots to be reserved (#177) 2024-10-03 11:01:21 +10:00
Groth16.sol uint -> uint256 2024-03-13 15:25:59 +01:00
Groth16Verifier.sol Provide all gas to precompiles 2024-03-13 15:25:59 +01:00
Marketplace.sol feat(slot-reservations): Allow slots to be reserved (#177) 2024-10-03 11:01:21 +10:00
Periods.sol Update solidity to 0.8.23 2024-01-25 13:08:10 +01:00
Proofs.sol chore(certora): slot's missed periods count should be equal to the count of slot's missing periods set to true (#155) 2024-08-15 12:51:14 +02:00
Requests.sol feat: expiry specified as duration (#99) 2024-05-06 15:13:32 +02:00
SlotReservations.sol feat(slot-reservations): Allow slots to be reserved (#177) 2024-10-03 11:01:21 +10:00
StateRetrieval.sol Update solidity to 0.8.23 2024-01-25 13:08:10 +01:00
TestEndian.sol Set up certora and implement first rules (#122) 2024-07-24 18:50:18 +02:00
TestMarketplace.sol Set up certora and implement first rules (#122) 2024-07-24 18:50:18 +02:00
TestProofs.sol Set up certora and implement first rules (#122) 2024-07-24 18:50:18 +02:00
TestSlotReservations.sol feat(slot-reservations): Allow slots to be reserved (#177) 2024-10-03 11:01:21 +10:00
TestToken.sol Set up certora and implement first rules (#122) 2024-07-24 18:50:18 +02:00
TestVerifier.sol Represent elements from field F_{p^2} as `real + i * imag` 2024-02-21 10:42:41 +01:00