DSS¶
Overview¶
DSS is a utility contract that allows users to chat and purchase their own LAU tokens atomically. It's designed for users who want to interact with the chat system while accumulating LAU tokens.
- Kind: Contract
- License: Unspecified
- Solidity: ^0.8.2
- Source:
etc/DysnomiaSelfSnipe.sol
Inheritance Chain (C3 Linearized)¶
No base contracts; this contract has no parents.
Immediate Parents¶
None (root of its hierarchy).
What This Means For Players¶
Plain English Summary: DSS is a convenience tool that lets you chat and buy LAU tokens in a single transaction. Instead of sending two separate transactions (one to chat, one to buy), DSS bundles them together. This saves gas and ensures both actions succeed or fail together.
Real-World Analogy: It's like a coffee shop loyalty program where every time you buy a coffee, you automatically get a stamp. DSS makes it so every chat message you send also triggers a small LAU purchase, helping you accumulate tokens effortlessly.
How It Affects Your Gameplay: - Atomic actions - Chat and purchase happen together in one transaction - Token accumulation - Automatically builds your LAU holdings with every chat - Batched withdrawals - Accumulate tokens over time, then withdraw in bulk - Owner only - Only the contract owner can use these functions
State Variables¶
| Variable | Type | Visibility | Mutability | Initial Value | NatSpec |
|---|---|---|---|---|---|
ownerAddress |
address |
internal | mutable | `` | |
LAUAddress |
address |
internal | mutable | `` | |
AffectionAddress |
address |
internal | mutable | AFFECTIONContract |
|
LAUContract |
ILAU |
internal | mutable | ILAU(LAUAddress) |
|
LAUContractERC20 |
IERC20 |
internal | mutable | `` | |
AffectionContract |
IERC20 |
internal | mutable | IERC20(AffectionAddress) |
Modifiers¶
| Modifier | Parameters | NatSpec |
|---|---|---|
onlyOwner |
(none) |
Constructor¶
constructor¶
- Parameters: address UserToken
Functions¶
External & Public¶
setLAU¶
- Visibility: public
- Modifiers:
onlyOwner - Parameters: address tokenAddress
withdrawLAU¶
- Visibility: public
- State Mutability: payable
- Modifiers:
onlyOwner - Parameters: uint256 amount
chatAndSnipe¶
- Visibility: public
- Modifiers:
onlyOwner - Parameters: string calldata text
chat¶
- Visibility: public
- Modifiers:
onlyOwner - Parameters: string calldata text
Interfaces¶
IERC20¶
Standard ERC20 interface for token operations.
ILAU¶
interface ILAU {
function Chat(string calldata text) external;
function Purchase(address token, uint256 amount) external;
}
Usage Pattern¶
Deployment¶
// Deploy with your LAU token address
DSS sniper = new DSS(myLauAddress);
// Approve AFFECTION spending
IERC20(AFFECTIONContract).approve(address(sniper), type(uint256).max);
Chat and Snipe¶
// Chat and buy 1 LAU in one transaction
sniper.chatAndSnipe("Hello world!");
// Withdraw accumulated LAU
sniper.withdrawLAU(10 * 10**18);
Just Chat¶
chatAndSnipe Flow¶
1. Call LAU.Chat(text)
2. Transfer 1 AFFECTION from caller to contract
3. Call LAU.Purchase(AFFECTION, 1e18)
4. Transfer 1 LAU back to caller
Purpose¶
This contract allows users to: 1. Chat in the Dysnomia system 2. Automatically purchase LAU tokens with each chat 3. Build up LAU holdings over time 4. Batch withdraw accumulated tokens
Security Notes¶
- Only owner can call functions
- Requires AFFECTION approval before use
- Constructor approves max AFFECTION to LAU
- No reentrancy concerns (simple flow)
Source¶
Original Gist: https://gist.github.com/as-helios/cc9bb3679d03eff83b000635c45e0451
Contract Verification¶
| Property | Value |
|---|---|
| Keccak256 Hash | 0x234f62eb8b6749b2fdf8b09778352c7ae9303d80cc7283aa1c7eb12b0aded29f |
| Source URL | https://raw.githubusercontent.com/busytoby/atropa_pulsechain/main/solidity/dysnomia/etc/DysnomiaSelfSnipe.sol |
| Hash Generated | 2026-04-17T20:48:16Z |