cic-contracts/doc/texinfo/throttle.sol.texi

23 lines
847 B
Plaintext
Raw Normal View History

2023-08-04 19:17:23 +02:00
@subsection Throttle
An backend contract to limit access to a resource by time.
The smart contract managing the resource calls @code{have(address)} on this contract to check if it can be made use of at the current point in time. This also implements @ref{acl, ACL}.
2023-08-04 19:17:23 +02:00
When the resource is made use of, it calls @code{poke(address)} method to register when it has been made use of.
The @code{next(address)} method returns the timestamp from which the resource may be used again by the given address. The implementer is permitted to change the value at any time.
2023-08-04 19:17:23 +02:00
@subsubsection ERC165 Interface identifier
@include ../../build/Throttle.interface
@subsubsection Solidity interface definition
@include ../../build/contract_Throttle.texi
@subsubsection Reference implementation
@uref{git://holbrook.no/eth-faucet.git,} (PeriodSimple contract)