Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

EthFaucet + PeriodSimple

Native xDAI faucet. Registry and period checker are both required.

Proxy: yes.

initialize(owner, amount)
gimme()                  // pay msg.sender
giveTo(recipient)
check(recipient)         // false (no revert) if a gate is unset
setAmount / setRegistry / setPeriodChecker
seal(state)
withdraw(recipient, value)  // owner, remains available after seal

After initialize, registry and periodChecker are zero. Every claim reverts (RegistryBackend, then PeriodBackend) until both are set. Wire them before funding.

Expected backends:

  • registry.have(address) → bool: typically AccountsIndex
  • periodChecker.have / poke / next: PeriodSimple

Payout uses transfer (2300 gas). Contract recipients with heavy receive will fail.

Seal bits: REGISTRY_STATE=1, PERIODCHECKER_STATE=2, VALUE_STATE=4. Cannot seal an unset field.

PeriodSimple

initialize(owner, poker)
have(subject)  // false if balance ≥ threshold; else cooldown
poke(subject)  // owner or poker; records lastUsed
setPeriod / setPoker / setBalanceThreshold

balanceThreshold > 0 and subject.balance >= threshold → ineligible, including first-time.