Overview
TUNA provides pre-configured constants for contract addresses, network settings, and application parameters. These values can be overridden using environment variables.CONTRACT_CONFIG
Sui smart contract configuration.The Sui package ID containing the TUNA smart contractsDefault:
0xadf0a6ce11dd75d3d44930ab5bf55781801dea2bfead056eb0bb59c1aa1e9e66Environment Variable: VITE_PACKAGE_IDThe shared object ID for the news registryDefault:
0x68c01d2c08923d5257a5a9959d7c9250c4053dbe4641e229ccff2f35e6a3bb6dEnvironment Variable: VITE_REGISTRY_IDThe admin capability object IDDefault:
0x18d48d74bfddffbe3dc75025136722380f374baec942df2e0aef76cad1061496Environment Variable: VITE_ADMIN_CAP_IDThe Move module name (constant)
Usage
NETWORK_CONFIG
Sui network configuration.The Sui network to connect toDefault:
testnetEnvironment Variable: VITE_SUI_NETWORKThe RPC endpoint URLDefault:
https://fullnode.testnet.sui.io:443Environment Variable: VITE_SUI_RPC_URLUsage
WALRUS_CONFIG
Walrus storage configuration.Walrus publisher endpoint for uploading contentDefault:
https://publisher.walrus-testnet.walrus.space/v1/storeEnvironment Variable: VITE_WALRUS_PUBLISHER_URLWalrus aggregator endpoint for fetching contentDefault:
https://aggregator.walrus-testnet.walrus.space/v1Environment Variable: VITE_WALRUS_AGGREGATOR_URLThe Walrus library functions use multiple fallback endpoints automatically. These config values are provided for reference but may not be directly used by the library.
CATEGORIES
Available article categories.Categories
- DeFi - Decentralized Finance
- Gaming - Blockchain Gaming
- NFT - Non-Fungible Tokens
- Dev - Development & Technical
- Governance - Protocol Governance
- General - General News
Usage
COMMENT_TYPES
Comment type constants.Short text comment (≤280 characters)
Long text comment stored in Walrus
Comment with media attachments (images/videos)
CONSTANTS
Application constants.Maximum character length for short text commentsComments longer than this must be stored in Walrus as
text_long typeMinimum tip amount in MISTEquals 0.001 SUI (1 SUI = 1,000,000,000 MIST)
Maximum length for comment preview text
Usage Example
Environment Variables
All configuration values can be overridden using environment variables in your.env file:
