-
Deploy Contracts (if not already deployed):
cd contracts npx hardhat run scripts/deploy_all.ts --network qieTestnet -
Configure Environment Variables: Add to
frontend/.env.local:NEXT_PUBLIC_STAKING_CONTRACT_ADDRESS=0xYourStakingAddress NEXT_PUBLIC_NCRD_TOKEN_ADDRESS=0xYourNCRDTokenAddress
-
Get NCRD Tokens:
- Create NCRD token via QIEDex, OR
- Deploy MockERC20 for testing
- Transfer some tokens to your wallet
-
Navigate to Staking Page:
- Go to http://localhost:3000/stake
- Or click "Stake NCRD" from the dashboard
-
Connect Wallet:
- Click "Connect Wallet" button
- Approve connection in MetaMask/QIE Wallet
- Ensure you're on QIE Testnet (Chain ID: 1983)
-
View Current Status:
- Current Tier: Shows your staking tier (None, Bronze, Silver, Gold)
- Staked Amount: How much NCRD you've staked
- NCRD Balance: Your available NCRD tokens
- Score Boost: Bonus points added to your credit score
-
Stake Tokens:
- Enter amount of NCRD to stake
- Click "Stake" button
- Approve token spending (first time only)
- Confirm transaction in wallet
- Wait for confirmation
-
Unstake Tokens:
- Enter amount to unstake
- Click "Unstake" button
- Confirm transaction in wallet
- Wait for confirmation
- None (0 NCRD): No boost
- Bronze (500+ NCRD): +50 score boost
- Silver (2,000+ NCRD): +150 score boost
- Gold (10,000+ NCRD): +300 score boost
Cause: Staking contract not deployed or address not configured
Solution:
- Check
NEXT_PUBLIC_STAKING_CONTRACT_ADDRESSis set in.env.local - Verify contract is deployed at that address
- Ensure contract address is correct (42 characters, starts with 0x)
Cause: Contract doesn't exist at the specified address
Solution:
- Deploy the AETHER-SCOREStaking contract
- Update
.env.localwith the correct address - Restart frontend dev server
Cause: Not enough NCRD tokens in wallet
Solution:
- Get NCRD tokens (create via QIEDex or receive from test faucet)
- Ensure you have enough for staking + gas fees
✅ Fixed: Error handling for missing contracts ✅ Fixed: Graceful fallback when contracts aren't deployed ✅ Working: Staking page displays correctly even without contracts
The errors you saw were because the contracts aren't deployed yet. The page now handles this gracefully and shows helpful messages instead of crashing.