Add throttle interface
This commit is contained in:
@@ -654,6 +654,36 @@ Use cases of sealing include:
|
||||
|
||||
<https://git.grassecon.net/cicnet/erc20-demurrage-token.git>
|
||||
|
||||
### Throttle
|
||||
|
||||
An backend contract to limit access to a resource by time.
|
||||
|
||||
The smart contract managing the resource calls ‘have(address)‘ on this
|
||||
contract to check if it can be made use of at the current point in time.
|
||||
This also implements [ACL](#acl).
|
||||
|
||||
When the resource is made use of, it calls ‘poke(address)‘ method to
|
||||
register when it has been made use of.
|
||||
|
||||
#### ERC165 Interface identifier
|
||||
|
||||
8f5bc7bf
|
||||
|
||||
#### Solidity interface definition
|
||||
|
||||
interface IThrottle {
|
||||
// Returns true if the given address is authorized to make use of the resource at the current moment.
|
||||
// Implements ACL
|
||||
function have(address _address) external view returns(bool);
|
||||
|
||||
// Must be called when the resource is being used.
|
||||
function poke(address _address) external returns(bool);
|
||||
}
|
||||
|
||||
#### Reference implementation
|
||||
|
||||
<git://holbrook.no/eth-faucet.git> (PeriodSimple contract)
|
||||
|
||||
### TokenLimit
|
||||
|
||||
Define limits of value amounts of tokens that individual addresses can
|
||||
|
||||
Reference in New Issue
Block a user