Skip to content

Commit

Permalink
natspec(DrawHistory): improve global contract natspec
Browse files Browse the repository at this point in the history
  • Loading branch information
kamescg committed Oct 6, 2021
1 parent 089f757 commit 2b07c47
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions contracts/DrawHistory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import "./libraries/DrawRingBufferLib.sol";
/**
* @title PoolTogether V4 DrawHistory
* @author PoolTogether Inc Team
* @notice The DrawHistory keeps a historical record of Draws created/pushed by DrawBeacon(s).
Once a DrawBeacon (on mainnet) completes a RNG request, a new Draw will be added
to the DrawHistory draws ring buffer. A DrawHistory will store a limited number
of Draws before beginning to overwrite (managed via the cardinality) previous Draws.
All mainnet DrawHistory(s) are updated directly from a DrawBeacon, but non-mainnet
DrawHistory(s) (Matic, Optimism, Arbitrum, etc...) will receive a cross-chain message,
duplicating the mainnet Draw configuration - enabling a prize savings liquidity network.
* @notice The DrawHistory provides historical lookups of Draws via a circular ring buffer.
Historical Draws can be accessed on-chain using a drawId to calculate ring buffer storage slot.
The Draw settings can be created by manager/owner and existing Draws can only be updated the owner.
Once a starting Draw has been added to the ring buffer, all following draws must have a sequential Draw ID.
@dev A DrawHistory store a limited number of Draws before beginning to overwrite (managed via the cardinality) previous Draws.
@dev All mainnet DrawHistory(s) are updated directly from a DrawBeacon, but non-mainnet DrawHistory(s) (Matic, Optimism, Arbitrum, etc...)
will receive a cross-chain message, duplicating the mainnet Draw configuration - enabling a prize savings liquidity network.
*/
contract DrawHistory is IDrawHistory, Manageable {
using DrawRingBufferLib for DrawRingBufferLib.Buffer;
Expand Down
4 changes: 2 additions & 2 deletions contracts/PrizeDistributionHistory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import "./interfaces/IPrizeDistributionHistory.sol";
/**
* @title PoolTogether V4 PrizeDistributionHistory
* @author PoolTogether Inc Team
* @notice The PrizeDistributionHistory contract stores PrizeDistribution struct parameters (linked with a Draw ID) in a
* @notice The PrizeDistributionHistory contract provides historical lookups of PrizeDistribution struct parameters (linked with a Draw ID) via a
circular ring buffer. Historical PrizeDistribution parameters can be accessed on-chain using a drawId to calculate
ring buffer storage slot. The PrizeDistribution parameters can be created my manager/owner and existing PrizeDistribution
ring buffer storage slot. The PrizeDistribution parameters can be created by manager/owner and existing PrizeDistribution
parameters can only be updated the owner. When adding a new PrizeDistribution basic sanity checks will be used to
validate the incoming parameters.
*/
Expand Down
2 changes: 1 addition & 1 deletion contracts/Reserve.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import "./libraries/ObservationLib.sol";
/**
* @title PoolTogether V4 Reserve
* @author PoolTogether Inc Team
* @notice The Reserve contract enables historical searches of a token balance increase during a target timerange.
* @notice The Reserve contract provides historical lookups of a token balance increase during a target timerange.
As the Reserve contract transfers OUT tokens, the withdraw accumulator is increased. When tokens are
transfered IN new checkpoint *can* be created if checkpoint() is called after transfering tokens.
By using the reserve and withdraw accumulators to create a new checkpoint, any contract or account
Expand Down

0 comments on commit 2b07c47

Please sign in to comment.