Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions swaptrade-contracts/counter/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ pub enum SwapTradeError {
SelfReferral = 800,
AlreadyReferred = 801,
CircularReferral = 802,

// ── Faucet ─────────────────────────────────────────────────────────────
FaucetRateLimited = 900,
FaucetNotConfigured = 901,
}

/// Alias kept for modules that still import `ContractError` by name.
Expand Down
7 changes: 7 additions & 0 deletions swaptrade-contracts/counter/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ impl Events {
env.events()
.publish((Symbol::new(env, "AdminResumed"), admin), (timestamp,));
}

pub fn faucet_claimed(env: &Env, user: Address, asset: Symbol, amount: i128, timestamp: u64) {
env.events().publish(
(Symbol::new(env, "FaucetClaimed"), user, asset),
(amount, timestamp),
);
}
}

/// Emitted whenever an alert fires. Carries enough metadata for an
Expand Down
Loading