DSS
0x234f62eb…ded29fSource details
| Property | Value |
|---|---|
| Keccak256 Hash | 0x234f62eb8b6749b2fdf8b09778352c7ae9303d80cc7283aa1c7eb12b0aded29f |
| Source URL | https://raw.githubusercontent.com/busytoby/atropa_pulsechain/58607494f7741b80525953e4a85bc99e66fd20fc/solidity/dysnomia/etc/DysnomiaSelfSnipe.sol |
| Source Revision | 58607494f7741b80525953e4a85bc99e66fd20fc |
| Source Status | Canonical source snapshot; deployed bytecode equivalence is only established where a deployment record says so. |
| Compiler | solc 0.8.21; optimizer enabled with 200 runs |
| Compiler Configuration | {"evmVersion":"compiler-default","optimizer":{"enabled":true,"runs":200},"version":"0.8.21+commit.d9974bed.Linux.g++"} |
| Compilation Closure Hash | 0x4bf3a02a80c6b387af386f865bd02531ecb5125f1223959875c815efd8a7b300 |
| Compilation Closure Files | 2 |
| Hash Generated | 2026-09-14T19:34:18Z |
Overview
Section titled “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)
Section titled “Inheritance Chain (C3 Linearized)”No base contracts; this contract has no parents.
Immediate Parents
Section titled “Immediate Parents”None (root of its hierarchy).
What This Means For Players
Section titled “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
Section titled “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
Section titled “Modifiers”| Modifier | Parameters | NatSpec |
|---|---|---|
onlyOwner |
(none) |
Constructor
Section titled “Constructor”constructor
Section titled “constructor”constructorconstructor
constructor(address UserToken)- Parameters: address UserToken
Functions
Section titled “Functions”External & Public
Section titled “External & Public”setLAU
Section titled “setLAU”setLAUfunction
function setLAU(address tokenAddress) public onlyOwnerA callable deployment has not been resolved for this reference.
- Visibility: public
- Modifiers:
onlyOwner - Parameters: address tokenAddress
withdrawLAU
Section titled “withdrawLAU”withdrawLAUfunction
function withdrawLAU(uint256 amount) public payable onlyOwnerA callable deployment has not been resolved for this reference.
- Visibility: public
- State Mutability: payable
- Modifiers:
onlyOwner - Parameters: uint256 amount
chatAndSnipe
Section titled “chatAndSnipe”chatAndSnipefunction
function chatAndSnipe(string calldata text) public onlyOwnerA callable deployment has not been resolved for this reference.
- Visibility: public
- Modifiers:
onlyOwner - Parameters: string calldata text
chatfunction
function chat(string calldata text) public onlyOwnerA callable deployment has not been resolved for this reference.
- Visibility: public
- Modifiers:
onlyOwner - Parameters: string calldata text
Interfaces
Section titled “Interfaces”IERC20
Section titled “IERC20”Standard ERC20 interface for token operations.
interface ILAU { function Chat(string calldata text) external; function Purchase(address token, uint256 amount) external;}Usage Pattern
Section titled “Usage Pattern”Deployment
Section titled “Deployment”// Deploy with your LAU token addressDSS sniper = new DSS(myLauAddress);
// Approve AFFECTION spendingIERC20(AFFECTIONContract).approve(address(sniper), type(uint256).max);Chat and Snipe
Section titled “Chat and Snipe”// Chat and buy 1 LAU in one transactionsniper.chatAndSnipe("Hello world!");
// Withdraw accumulated LAUsniper.withdrawLAU(10 * 10**18);Just Chat
Section titled “Just Chat”sniper.chat("Just chatting, no purchase");chatAndSnipe Flow
Section titled “chatAndSnipe Flow”1. Call LAU.Chat(text)2. Transfer 1 AFFECTION from caller to contract3. Call LAU.Purchase(AFFECTION, 1e18)4. Transfer 1 LAU back to callerPurpose
Section titled “Purpose”This contract allows users to:
- Chat in the Dysnomia system
- Automatically purchase LAU tokens with each chat
- Build up LAU holdings over time
- Batch withdraw accumulated tokens
Security Notes
Section titled “Security Notes”- Only owner can call functions
- Requires AFFECTION approval before use
- Constructor approves max AFFECTION to LAU
- No reentrancy concerns (simple flow)
Source
Section titled “Source”Original Gist: https://gist.github.com/as-helios/cc9bb3679d03eff83b000635c45e0451
Compiled ABI
Section titled “Compiled ABI”The compiled ABI below is produced by solc 0.8.21 from the exact source bytes recorded in Source details. Consumers can paste it directly into ethers/web3/viem.
Click to expand JSON ABI
[ { "inputs": [ { "internalType": "address", "name": "UserToken", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "InsufficientLAUBalance", "type": "error" }, { "inputs": [], "name": "Unauthorized", "type": "error" }, { "inputs": [ { "internalType": "string", "name": "text", "type": "string" } ], "name": "chat", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "text", "type": "string" } ], "name": "chatAndSnipe", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "tokenAddress", "type": "address" } ], "name": "setLAU", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "withdrawLAU", "outputs": [], "stateMutability": "payable", "type": "function" }]