Presale
AIWXS AUTOMATED PRESALE
STARTS ON 1/1/2027.
Connect MetaMask • Buy AIWXS • Claim or Lock Your Tokens
1. Connect Your Wallet
2. Live Contract Information
3. Select Your Payment
USDC – Optimism USDT – Optimism ETH – OptimismEnter your USDC payment amount.
4. Choose Your Purchase Option
The contract should transfer purchased AIWXS directly to your connected wallet after a successful transaction.
The contract records your allocation and holds the tokens until its release conditions are satisfied.
5. My AIWXS Account
All purchases are submitted through your own connected wallet. Check the network, payment currency, amount and token quote before confirming transactions in MetaMask.
Locked tokens are subject to the release conditions configured in the AIWXS smart contract. An exchange listing does not automatically trigger a smart-contract release.
AIWXS Optimism Mainnet contract: View contract on Etherscan
(function(){ "use strict"; const ROOT = document.getElementById("aiwxs-live-presale"); if (!ROOT || ROOT.dataset.initialized) return; ROOT.dataset.initialized = "1"; const CONTRACT_ADDRESS = "0x36A3Cc671242Ecc79D059409B6D229fAF317f881"; const CHAIN_ID = 10; const EXPLORER = "https://optimistic.etherscan.io/tx/"; const ABI = [ "function name() view returns (string)", "function symbol() view returns (string)", "function decimals() view returns (uint8)", "function USDC_ADDRESS() view returns (address)", "function USDT_ADDRESS() view returns (address)", "function presaleActive() view returns (bool)", "function paused() view returns (bool)", "function presaleStats() view returns (uint256 sold,uint256 cap,uint256 remaining,uint256 progress,bool active,uint256 priceUsdE6,uint64 unlockTime)", "function remainingPresaleTokens() view returns (uint256)", "function tokenInventory() view returns (uint256)", "function launchTime() view returns (uint64)", "function currentUnlockTime() view returns (uint64)", "function lockStillOpen() view returns (bool)", "function buyAndClaim(address paymentToken,uint256 paymentAmount,uint256 minTokensOut)", "function buyAndClaimETH(uint256 minTokensOut) payable", "function buyAndLock(address paymentToken,uint256 paymentAmount,uint256 minTokensOut)", "function buyAndLockETH(uint256 minTokensOut) payable", "function lockedTokens(address buyer) view returns (uint256)", "function claimableNow(address buyer) view returns (uint256)", "function claimLockedTokens()", "function balanceOf(address account) view returns (uint256)", "function quoteTokensForStablecoin(uint256 paymentAmount) view returns (uint256)", "function quoteTokensForETH(uint256 ethAmount) view returns (uint256 usdValueE6,uint256 tokenAmount)" ]; const ERC20_ABI = [ "function decimals() view returns (uint8)", "function allowance(address owner,address spender) view returns (uint256)", "function approve(address spender,uint256 amount) returns (bool)" ]; let provider = null; let signer = null; let contract = null; let account = null; let tokenDecimals = 18; let currentQuote = null; const $ = id => ROOT.querySelector("#"+id); function message(text,type) { const el = $("aw-message"); el.textContent = text; el.className = "status " + (type || ""); } function fmt(value,decimals=18) { return Number(ethers.formatUnits(value,decimals)) .toLocaleString(undefined,{maximumFractionDigits:4}); } function shortAddress(a) { return a ? a.slice(0,6)+"..."+a.slice(-4) : ""; } function dateText(timestamp) { if (!timestamp || Number(timestamp)===0) return "Not set"; return new Date(Number(timestamp)*1000).toLocaleString(); } async function ensureEthers() { if (window.ethers) return; await new Promise((resolve,reject)=>{ const script=document.createElement("script"); script.src="https://cdn.jsdelivr.net/npm/ethers@6.13.5/dist/ethers.umd.min.js"; script.onload=resolve; script.onerror=()=>reject(new Error("Could not load ethers library.")); document.head.appendChild(script); }); } async function connect() { if (!window.ethereum) { throw new Error("MetaMask was not detected. Please install MetaMask."); } await ensureEthers(); provider = new ethers.BrowserProvider(window.ethereum); let network = await provider.getNetwork(); if (Number(network.chainId)!==CHAIN_ID) { try { await window.ethereum.request({ method:"wallet_switchEthereumChain", params:[{chainId:"0xa"}] }); } catch(e) { if (e.code===4902) { await window.ethereum.request({ method:"wallet_addEthereumChain", params:[{ chainId:"0xa", chainName:"OP Mainnet", nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18}, rpcUrls:["https://mainnet.optimism.io"], blockExplorerUrls:["https://optimistic.etherscan.io"] }] }); } else { throw e; } } provider = new ethers.BrowserProvider(window.ethereum); } const accounts = await window.ethereum.request({ method:"eth_requestAccounts" }); account = accounts[0]; signer = await provider.getSigner(); contract = new ethers.Contract(CONTRACT_ADDRESS,ABI,signer); tokenDecimals = Number(await contract.decimals()); $("aw-wallet").textContent="Connected: "+shortAddress(account); $("aw-wallet").className="status good"; $("aw-network").textContent="Connected to Optimism Mainnet"; $("aw-network").className="status good"; await refreshAll(); } async function refreshAll() { if (!contract || !account) { throw new Error("Connect MetaMask first."); } const [ stats,active,paused,inventory, balance,locked,claimable,unlock, tokenName,tokenSymbol ] = await Promise.all([ contract.presaleStats(), contract.presaleActive(), contract.paused(), contract.tokenInventory(), contract.balanceOf(account), contract.lockedTokens(account), contract.claimableNow(account), contract.currentUnlockTime(), contract.name(), contract.symbol() ]); $("aw-sale-status").textContent = paused ? "PAUSED" : (active ? "ACTIVE" : "INACTIVE"); $("aw-sale-status").style.color = (!paused && active) ? "#48e6ad" : "#ff7167"; $("aw-progress").textContent = (Number(stats.progress)/100).toFixed(2)+"%"; $("aw-sold").textContent=fmt(stats.sold,tokenDecimals); $("aw-remaining").textContent=fmt(stats.remaining,tokenDecimals); $("aw-price").textContent= "$"+(Number(stats.priceUsdE6)/1000000).toFixed(4); $("aw-unlock").textContent=dateText(unlock); $("aw-balance").textContent=fmt(balance,tokenDecimals)+" "+tokenSymbol; $("aw-locked").textContent=fmt(locked,tokenDecimals)+" "+tokenSymbol; $("aw-claimable").textContent=fmt(claimable,tokenDecimals)+" "+tokenSymbol; $("aw-inventory").textContent=fmt(inventory,tokenDecimals)+" "+tokenSymbol; $("aw-claim").disabled=(claimable===0n); $("aw-buy-now").disabled=paused || !active; $("aw-buy-lock").disabled=paused || !active; $("aw-quote-note").textContent=tokenName+" ("+tokenSymbol+")"; } async function tokenAddress(asset) { if (asset==="USDC") return await contract.USDC_ADDRESS(); if (asset==="USDT") return await contract.USDT_ADDRESS(); return null; } async function getPaymentAmount() { const asset=$("aw-asset").value; const raw=$("aw-amount").value; if (!raw || !Number.isFinite(Number(raw)) || Number(raw)<=0) { throw new Error("Enter a valid payment amount."); } if (asset==="ETH") { return ethers.parseEther(raw); } const address=await tokenAddress(asset); if (!address || address===ethers.ZeroAddress) { throw new Error(asset+" is not configured in the contract."); } const token=new ethers.Contract(address,ERC20_ABI,provider); const decimals=Number(await token.decimals()); return ethers.parseUnits(raw,decimals); } async function calculateQuote() { if (!contract) throw new Error("Connect MetaMask first."); const asset=$("aw-asset").value; const amount=await getPaymentAmount(); let quote; if (asset==="ETH") { const result=await contract.quoteTokensForETH(amount); quote=result.tokenAmount; } else { quote=await contract.quoteTokensForStablecoin(amount); } if (quote===0n) throw new Error("The contract returned a zero token quote."); currentQuote=quote; $("aw-quote-result").textContent= fmt(quote,tokenDecimals)+" AIWXS"; $("aw-quote-note").textContent= "Estimated quote. Final execution is subject to contract checks."; return {asset,amount,quote}; } async function buy(locked) { try { if (!contract) await connect(); const network=await provider.getNetwork(); if (Number(network.chainId)!==CHAIN_ID) { throw new Error("Please switch MetaMask to Optimism Mainnet."); } const isPaused=await contract.paused(); const active=await contract.presaleActive(); if (isPaused) throw new Error("The contract is paused."); if (!active) throw new Error("The presale is not currently active."); if (locked && !(await contract.lockStillOpen())) { throw new Error("The contract is not accepting new locked purchases."); } const {asset,amount,quote}=await calculateQuote(); const minOut=quote*9950n/10000n; const confirmed=window.confirm( "Purchase "+fmt(quote,tokenDecimals)+" AIWXS using "+ fmt(amount,asset==="ETH"?18:6)+" "+asset+ (locked?" and LOCK the allocation?":" and CLAIM immediately?")+ "nnConfirm the amount and currency before continuing." ); if (!confirmed) return; let tx; if (asset==="ETH") { message("Please confirm the ETH purchase in MetaMask."); tx=locked ? await contract.buyAndLockETH(minOut,{value:amount}) : await contract.buyAndClaimETH(minOut,{value:amount}); } else { const address=await tokenAddress(asset); const paymentToken=new ethers.Contract(address,ERC20_ABI,signer); const allowance=await paymentToken.allowance(account,CONTRACT_ADDRESS); if (allowance{ try { await connect(); message("Wallet connected successfully.","good"); } catch(e){message(e.message || "Connection failed.","bad");} }); $("aw-refresh").addEventListener("click",async()=>{ try { await refreshAll(); message("Contract information refreshed.","good"); } catch(e){message(e.message || "Refresh failed.","bad");} }); $("aw-quote").addEventListener("click",async()=>{ try { await calculateQuote(); message("Quote calculated.","good"); } catch(e){message(e.message || "Unable to calculate quote.","bad");} }); $("aw-buy-now").addEventListener("click",()=>buy(false)); $("aw-buy-lock").addEventListener("click",()=>buy(true)); $("aw-claim").addEventListener("click",claim); $("aw-asset").addEventListener("change",()=>{ const asset=$("aw-asset").value; $("aw-amount-help").textContent= asset==="ETH" ? "Enter the amount in ETH." : "Enter the amount in "+asset+"."; currentQuote=null; $("aw-quote-result").textContent="0 AIWXS"; }); $("aw-amount").addEventListener("input",()=>{ currentQuote=null; }); if (window.ethereum) { window.ethereum.on("accountsChanged",()=>{ account=null;signer=null;contract=null; $("aw-wallet").textContent="Wallet changed. Reconnect MetaMask."; $("aw-wallet").className="status"; }); window.ethereum.on("chainChanged",()=>{ window.location.reload(); }); } })();🛡️ AIWXS • TRUST • SECURITY • INNOVATION
Building a smarter digital asset future through AI-powered security, intelligent wallet technology and blockchain innovation.
🔐 DIGITAL ASSET SECURITY DISCLAIMER
Cryptocurrency and digital assets involve significant risks, including potential loss of capital. AIWXS does not guarantee investment returns or absolute security. AIWXS ecosystem features are subject to development and availability. Always conduct your own research before participating.
© 2026 AIWXS Smart Wallet • All Rights Reserved