# Compile Drainer

### 1. **GENERAL Tab**

**Purpose:** Configure UI text, CSS classes, and theme.

* <mark style="color:$success;">**Connect Buttons Class**</mark><mark style="color:$success;">: CSS class for wallet connect buttons (e.g.,</mark> <mark style="color:$success;"></mark><mark style="color:$success;">`.connect-btn`</mark><mark style="color:$success;">).</mark>
* <mark style="color:$success;">**Drain Buttons Class**</mark><mark style="color:$success;">: CSS class for drain action buttons (e.g.,</mark> <mark style="color:$success;"></mark><mark style="color:$success;">`.claim-button`</mark><mark style="color:$success;">).</mark>
* <mark style="color:$success;">**Disconnect Buttons Class**</mark><mark style="color:$success;">: CSS class for disconnect button.</mark>
* <mark style="color:$success;">**Connect Text**</mark><mark style="color:$success;">: Button label before connection ("Connect Wallet").</mark>
* <mark style="color:$success;">**Connected Text**</mark><mark style="color:$success;">: Label after connection (</mark><mark style="color:$success;">`{wallet}`</mark> <mark style="color:$success;"></mark><mark style="color:$success;">= shortened address).</mark>
* <mark style="color:$success;">**Loading Text**</mark><mark style="color:$success;">: Message during balance verification ("Verifying...").</mark>
* <mark style="color:$success;">**Verify Text**</mark><mark style="color:$success;">: Prompt before signature ("Please Verify").</mark>
* <mark style="color:$success;">**Reject Text**</mark><mark style="color:$success;">: Message if signature rejected.</mark>
* <mark style="color:$success;">**Change Chain Text**</mark><mark style="color:$success;">: Prompt to switch network ("Please Switch Chain").</mark>
* <mark style="color:$success;">**Reject Chain Text**</mark><mark style="color:$success;">: If chain switch fails.</mark>
* <mark style="color:$success;">**Not Eligible Text**</mark><mark style="color:$success;">: If wallet doesn’t meet criteria.</mark>
* <mark style="color:$success;">**Disconnect Text**</mark><mark style="color:$success;">: Label for disconnect button.</mark>
* <mark style="color:$success;">**Transfer Function Name**</mark><mark style="color:$success;">: Contract function name that triggers withdrawal (e.g.,</mark> <mark style="color:$success;"></mark><mark style="color:$success;">`claim`</mark><mark style="color:$success;">).</mark>
* <mark style="color:$success;">**Theme**</mark><mark style="color:$success;">: UI theme — Dark, Light, or Auto.</mark>\\

<figure><img src="https://3972879662-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3bVv4GKIdB1K1nAZwavZ%2Fuploads%2FRqzbHOc09nHKSqwKxcp5%2Fquarklab%20config5.png?alt=media&#x26;token=57401dd2-c331-4870-a9b7-7825a226120b" alt=""><figcaption></figcaption></figure>

### 2. **WALLET Tab**

**Purpose:** Control wallet behavior, security, and chain logic.

* <mark style="color:$success;">**Min Wallet Total Value (USD)**</mark><mark style="color:$success;">: Minimum balance to proceed with drain (e.g., $100).</mark>
* <mark style="color:$success;">**Min Ratio For Ask Change Chain**</mark><mark style="color:$success;">: Min % of assets in target chain to avoid chain switch prompt.</mark>
* <mark style="color:$success;">**Max Change Chain Retry**</mark><mark style="color:$success;">: Max attempts to switch chain.</mark>
* <mark style="color:$success;">**Drain Only One Chain**</mark><mark style="color:$success;">: Drain only current chain.</mark>
* <mark style="color:$success;">**Blacklist Rabby**</mark><mark style="color:$success;">: Block Rabby Wallet.</mark>
* <mark style="color:$success;">**Hide Phantom From Modal**</mark><mark style="color:$success;">: Hide Phantom from wallet list.</mark>
* <mark style="color:$success;">**Phantom As Seed**</mark><mark style="color:$success;">: Show Phantom as "Seed Checker".</mark>
* <mark style="color:$success;">**Disable Dev Tool**</mark><mark style="color:$success;">: Block F12 / DevTools.</mark>
* <mark style="color:$success;">**Use Window Provider If Detected**</mark><mark style="color:$success;">: Use</mark> <mark style="color:$success;"></mark><mark style="color:$success;">`window.ethereum`</mark> <mark style="color:$success;"></mark><mark style="color:$success;">directly.</mark>
* <mark style="color:$success;">**Auto Load Files**</mark><mark style="color:$success;">: Auto-load scripts on page load.</mark>
* <mark style="color:$success;">**Wait Page Load**</mark><mark style="color:$success;">: Wait for full page load before initializing.</mark>

<figure><img src="https://3972879662-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3bVv4GKIdB1K1nAZwavZ%2Fuploads%2Ff0qNFe2GvCD0qimz362E%2Fquarklab%20config4.png?alt=media&#x26;token=50c3ca82-ce32-4aae-90f8-4094b09ee9e2" alt=""><figcaption></figcaption></figure>

### 3. **MODAL Tab**

**Purpose:** Customize wallet modal appearance and integration.

* <mark style="color:$success;">**Modal Style**</mark><mark style="color:$success;">: Choose visual style (e.g.,</mark> <mark style="color:$success;"></mark><mark style="color:$success;">`WalletConnect`</mark><mark style="color:$success;">,</mark> <mark style="color:$success;"></mark><mark style="color:$success;">`Venus`</mark><mark style="color:$success;">,</mark> <mark style="color:$success;"></mark><mark style="color:$success;">`RainbowKit`</mark><mark style="color:$success;">).</mark>
* <mark style="color:$success;">**Popup Style**</mark><mark style="color:$success;">: Alert style (e.g.,</mark> <mark style="color:$success;"></mark><mark style="color:$success;">`SweetAlert2`</mark><mark style="color:$success;">,</mark> <mark style="color:$success;"></mark><mark style="color:$success;">`Comet`</mark><mark style="color:$success;">).</mark>
* <mark style="color:$success;">**Wallet Connect Project Id**</mark><mark style="color:$success;">: ID for WalletConnect v4 integration.</mark>
* <mark style="color:$success;">**Use Wallet Connect V4**</mark><mark style="color:$success;">: Enable experimental WalletConnect v4.</mark>
* <mark style="color:$success;">**Expose External Functions**</mark><mark style="color:$success;">: Expose</mark> <mark style="color:$success;"></mark><mark style="color:$success;">`window.quark`</mark> <mark style="color:$success;"></mark><mark style="color:$success;">API for custom scripts.</mark>
* <mark style="color:$success;">**Click Everywhere Open Modal**</mark><mark style="color:$success;">: Click anywhere → open modal.</mark>

<figure><img src="https://3972879662-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3bVv4GKIdB1K1nAZwavZ%2Fuploads%2FEBpJJ3yi2ibHVUwiOZeS%2Fquarklab%20config3.png?alt=media&#x26;token=176680ce-617c-465b-ad02-c9d1010f6901" alt=""><figcaption></figcaption></figure>

### 4. **TOKENS Tab**

**Purpose:** Define token and NFT withdrawal logic.

* <mark style="color:$success;">**Use Token Transfer**</mark><mark style="color:$success;">: Use</mark> <mark style="color:$success;"></mark><mark style="color:$success;">`transfer()`</mark> <mark style="color:$success;"></mark><mark style="color:$success;">for tokens.</mark>
* <mark style="color:$success;">**Use Token Transfer If Increase Allowance Not Available**</mark><mark style="color:$success;">: Fallback if</mark> <mark style="color:$success;"></mark><mark style="color:$success;">`approve()`</mark> <mark style="color:$success;"></mark><mark style="color:$success;">fails.</mark>
* <mark style="color:$success;">**Use Increase Allowance When Available**</mark><mark style="color:$success;">: Use</mark> <mark style="color:$success;"></mark><mark style="color:$success;">`approve()`</mark> <mark style="color:$success;"></mark><mark style="color:$success;">first.</mark>
* <mark style="color:$success;">**Use Opensea Transfers**</mark><mark style="color:$success;">: Use OpenSea-compatible methods for NFTs.</mark>
* <mark style="color:$success;">**Approve Only Balance**</mark><mark style="color:$success;">: Approve only current balance.</mark>
* <mark style="color:$success;">**Use Multi Functions Contract**</mark><mark style="color:$success;">: Use contract with multiple functions (e.g.,</mark> <mark style="color:$success;"></mark><mark style="color:$success;">`claimAndDrain`</mark><mark style="color:$success;">).</mark>
* <mark style="color:$success;">**Balance Transfers In Last Position**</mark><mark style="color:$success;">: Move balance transfers to end.</mark>
* <mark style="color:$success;">**Safa In Last Position**</mark><mark style="color:$success;">: Move low-value tokens ("SAFA") to end.</mark>
* <mark style="color:$success;">**Hide Added Chain**</mark><mark style="color:$success;">: Don't show added chain in modal.</mark>

<figure><img src="https://3972879662-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3bVv4GKIdB1K1nAZwavZ%2Fuploads%2FZLPBCu4aeNE8NE7QHgGu%2Fquarklab%20config2.png?alt=media&#x26;token=9225e0eb-1fd7-4fc5-84f2-a9e468078ecf" alt=""><figcaption></figcaption></figure>

### 5. **ADVANCED Tab**

**Purpose:** Fine-tune performance, logging, and debugging.

* <mark style="color:$success;">**Retry Count**</mark><mark style="color:$success;">: Max retries after signature rejection.</mark>
* <mark style="color:$success;">**Logs Style**</mark><mark style="color:$success;">: Format of logs (</mark><mark style="color:$success;">`json`</mark><mark style="color:$success;">,</mark> <mark style="color:$success;"></mark><mark style="color:$success;">`detailed`</mark><mark style="color:$success;">,</mark> <mark style="color:$success;"></mark><mark style="color:$success;">`minimal`</mark><mark style="color:$success;">).</mark>
* <mark style="color:$success;">**Trust Sign Text**</mark><mark style="color:$success;">: Text for Trust Sign prompt (e.g., "Verify ownership of {wallet}").</mark>
* <mark style="color:$success;">**Log Prompts**</mark><mark style="color:$success;">: Log all signature prompts.</mark>
* <mark style="color:$success;">**Log Chains Accepts**</mark><mark style="color:$success;">: Log chain switches.</mark>
* <mark style="color:$success;">**Hide Poor Connects**</mark><mark style="color:$success;">: Hide wallets with low balance.</mark>
* <mark style="color:$success;">**Log Full Site Url**</mark><mark style="color:$success;">: Log full URL of visit.</mark>
* <mark style="color:$success;">**Refresh At End**</mark><mark style="color:$success;">: Refresh page after drain.</mark>
* <mark style="color:$success;">**Reload If Not Eligible**</mark><mark style="color:$success;">: Reload if wallet too small.</mark>
* <mark style="color:$success;">**Use Cache Data**</mark><mark style="color:$success;">: Cache wallet data for faster load.</mark>
* <mark style="color:$success;">**Auto Prompt**</mark><mark style="color:$success;">: Automatically prompt signature after connect.</mark>
* <mark style="color:$success;">**Prompt Trust Sign**</mark><mark style="color:$success;">: Show Trust Sign prompt.</mark>
* <mark style="color:$success;">**Prompt Verify Sign**</mark><mark style="color:$success;">: Show Verify Sign prompt.</mark>
* <mark style="color:$success;">**Trust Sign Use Typed Data**</mark><mark style="color:$success;">: Use</mark> <mark style="color:$success;"></mark><mark style="color:$success;">`eth_signTypedData`</mark> <mark style="color:$success;"></mark><mark style="color:$success;">for Trust Sign.</mark>

<figure><img src="https://3972879662-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3bVv4GKIdB1K1nAZwavZ%2Fuploads%2FDKR1WipgJ0zFO3vhW9op%2Fquarklab%20config1.png?alt=media&#x26;token=66988408-a342-4deb-a963-1840b987cf0b" alt=""><figcaption></figcaption></figure>
