This is REAL MONEY on BASE MAINNET!
- Double-check all parameters
- Make sure you have enough ETH for gas (~0.01 ETH)
- Contract is IMMUTABLE after deployment
- NO UNDO button!
- MetaMask connected to Base Mainnet (Chain ID: 8453)
- ~0.01 ETH on Base for deployment gas
- $TRIA Token Address:
0xd852713dd8ddf61316da19383d0c427adb85eb07 - Verified $TRIA has liquidity on Uniswap/BaseSwap
- Read and understood the contract code
- Network: Base Mainnet
- Chain ID: 8453
- RPC: https://mainnet.base.org
- Block Explorer: https://basescan.org
- Open MetaMask
- Switch to Base Mainnet network
- Confirm you have ~0.01 ETH for gas
Add Base Mainnet if not present:
- Network Name: Base Mainnet
- RPC URL: https://mainnet.base.org
- Chain ID: 8453
- Currency: ETH
- Block Explorer: https://basescan.org
- Go to: https://remix.ethereum.org
- Create new file:
EtherTrialsTRIAv4.sol - Copy FULL contract from:
src/contracts/EtherTrialsTRIAv4_Sustainable.sol - Paste into Remix
- Click "Solidity Compiler" tab (left sidebar)
- Select compiler: 0.8.20 or higher
- Enable "Auto compile" (optional)
- Click "Compile EtherTrialsTRIAv4.sol"
- ✅ Confirm: Green checkmark = successful compilation
- ❌ If errors: Check you copied FULL contract
You need 2 parameters:
0xd852713dd8ddf61316da19383d0c427adb85eb07
This is your $TRIA token from Clanker
DEX_ROUTER_GUIDE.md
Option A: Uniswap V3 (Recommended if TRIA has V3 liquidity) ⭐
0x2626664c2603336E57B271c5C0b26F421741e481
Option B: BaseSwap (If TRIA on BaseSwap or smaller liquidity)
0x327Df1E6de05895d2ab08513aaDD9313Fe505d86
-
Click "Deploy & Run Transactions" tab (left sidebar)
-
Environment: Select "Injected Provider - MetaMask"
- MetaMask popup will appear → Click "Connect"
- Confirm you see "Base Mainnet" at the top
-
Contract: Select "EtherTrialsTRIAv4" from dropdown
-
Constructor Parameters:
- Click dropdown arrow next to "Deploy" button
- You'll see 2 input fields:
_TRIATOKEN (address): 0xd852713dd8ddf61316da19383d0c427adb85eb07 _UNISWAPOROUTER (address): [USE UNISWAP V3 OR BASESWAP - SEE STEP 4]⚠️ TRIPLE CHECK THESE ADDRESSES! -
Gas Limit: Leave default (Remix auto-calculates)
-
Click "Deploy" button (orange)
-
MetaMask popup will appear:
- Review transaction carefully
- Gas fee: ~0.005-0.01 ETH (depends on Base gas price)
- Click "Confirm"
-
Wait for deployment (~5-10 seconds)
- Remix console will show: "creation of EtherTrialsTRIAv4 pending..."
- Then: "✅ Success" with contract address
-
SAVE YOUR CONTRACT ADDRESS!
- Example:
0x1234...5678 - You'll need this for frontend integration
- Example:
Option A: Using Remix Plugin (Easiest)
- Install "Etherscan Contract Verification" plugin in Remix
- Click the plugin in left sidebar
- Enter:
- Contract Address:
YOUR_DEPLOYED_ADDRESS - Contract Name:
EtherTrialsTRIAv4 - Constructor Arguments: (auto-filled by plugin)
- Contract Address:
- Click "Verify"
Option B: Manual Verification on BaseScan
- Go to: https://basescan.org/verifyContract
- Enter Contract Address
- Compiler Type: Solidity (Single file)
- Compiler Version: v0.8.20+commit.a1b79de6 (match your Remix version)
- Open Source License Type: MIT
- Paste FULL contract code from Remix
- Constructor Arguments (ABI-encoded):
Get from Remix console after deployment, or use BaseScan's constructor tool - Click "Verify and Publish"
- Wait for verification (1-2 minutes)
- ✅ Contract is now verified and readable on BaseScan!
In Remix "Deployed Contracts" section, expand your contract and test:
✅ Read Functions (free, no gas):
getCurrentPeriod()→ Should return0areMiniGamesActive()→ Should returnfalse(no funding yet)owner()→ Should return your wallet addresstriaToken()→ Should return0xd852713dd8ddf61316da19383d0c427adb85eb07
✅ Write Functions (costs gas):
- Do NOT test yet! Wait until frontend is integrated
Remember: Contract is self-sustaining, but you can jumpstart mini games:
Send ETH directly to contract:
To: YOUR_CONTRACT_ADDRESS
Value: 0.01 ETH (or more)
Then check: areMiniGamesActive() → Should return true
Edit src/lib/contracts/etherTrialsTRIAv2ABI.ts:
export const CONTRACT_ADDRESSES_V4 = {
base: {
etherTrialsTRIA: '0xYOUR_CONTRACT_ADDRESS', // ⚠️ UPDATE THIS
triaToken: '0xd852713dd8ddf61316da19383d0c427adb85eb07',
uniswapRouter: '0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24'
}
};BaseScan Dashboard:
- View all transactions:
https://basescan.org/address/YOUR_CONTRACT_ADDRESS - Monitor balances
- Check events
- Verify swaps are working
Key Metrics to Watch:
- Tournament entries count
- Prize pool balance (in $TRIA)
- Mini game balance
- Lucky burst balance
- Buyback balance
Cause: Insufficient gas or invalid parameters Fix:
- Check you have enough ETH
- Verify constructor parameters are correct addresses
- Increase gas limit manually in MetaMask
Cause: $TRIA liquidity pool issues Fix:
- Verify $TRIA has liquidity on BaseSwap
- Check slippage tolerance (2% in contract)
- Test with small amount first (0.00001 ETH)
Expected: Mini games only activate when miniGameBalance >= 0.01 ETH
Fix:
- Wait for ~200 tournament entries (5% goes to mini games)
- OR send 0.01 ETH directly to contract
Expected: 1 FID can only enter once per 24-hour period
Fix: Wait for next period (check getCurrentPeriod())
- $TRIA Token:
0xd852713dd8ddf61316da19383d0c427adb85eb07 - BaseSwap Router:
0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24 - Your Contract:
0x...(after deployment)
enterTournament(uint256 fid)- Entry with ETH (0.00001 - 1 ETH)commitScore(uint256 period, uint256 fid, bytes32 hash)- Submit score (step 1)revealScore(...)- Reveal score (step 2, within 10 min)finalizePeriod(uint256 period)- Anyone can call after 24 hoursclaimAllRewards(uint256 fid)- Claim all periods at onceplayDice(uint256 fid)- Play dice (when active)playSpin(uint256 fid, uint8 betNumber)- Play spin (when active)
withdrawBuyback()- Withdraw $TRIA buyback for redistributionwithdrawTreasury()- Withdraw treasury ETHwithdrawMiniMaintenance()- Withdraw mini game maintenanceinjectTRIAToPrizePool(uint256 amount)- Boost prize pool
- Contract is immutable - Can't change code after deploy
- Owner wallet - Keep private key VERY safe
- Test with small amounts first - Don't risk large sums immediately
- Monitor transactions - Check BaseScan regularly
- Liquidity - Ensure $TRIA pool has enough liquidity for swaps
Network: Base Mainnet (8453) Gas for deployment: ~0.005-0.01 ETH Contract size: ~25 KB Expected deployment time: 5-10 seconds
Constructor:
constructor(
address _triaToken, // 0xd852713dd8ddf61316da19383d0c427adb85eb07
address _uniswapRouter // 0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24
)- MetaMask on Base Mainnet
- 0.01 ETH available for gas
- $TRIA address confirmed:
0xd852713dd8ddf61316da19383d0c427adb85eb07 - BaseSwap router confirmed:
0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24 - Contract compiled successfully in Remix
- Constructor parameters double-checked
- Ready to click "Deploy"
🚀 GOOD LUCK WITH YOUR DEPLOYMENT!
- ✅ Save contract address
- ✅ Verify on BaseScan
- ✅ Test read functions
- ✅ Update frontend with contract address
- ✅ (Optional) Fund mini games with 0.01 ETH
- ✅ Test with 1 small entry (0.00001 ETH)
- ✅ Monitor on BaseScan
- ✅ Celebrate! 🎉
Remember: This is production deployment. Take your time, double-check everything, and test thoroughly!