-
Notifications
You must be signed in to change notification settings - Fork 6
Update WebUI navigation, footer, and brand assets #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,7 @@ | |
| 61: "0x016eed9c27848d9ba152fe2d45dd2949f3f4780d", // Ethereum Classic (Placeholder) | ||
| 8453: "0x016eed9c27848d9ba152fe2d45dd2949f3f4780d", // Base Mainnet (Placeholder) | ||
| }; | ||
| const FALLBACK_ADDRESS = "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512"; | ||
|
|
||
| function getContractAddress(chainId?: number): `0x${string}` | undefined { | ||
| if (!chainId) return undefined; | ||
|
|
@@ -231,7 +231,7 @@ | |
| <div className="rounded-2xl border border-[#e7dac4] bg-white shadow-[0_4px_24px_rgba(15,23,42,0.07)] overflow-hidden flex flex-col"> | ||
| {/* header */} | ||
| <div className="px-6 pt-6 pb-4 text-center border-b border-[#f0ece4]"> | ||
| <p className="text-[10px] font-black tracking-[0.2em] text-amber-500 uppercase mb-1">{tDetail("stablecoin")}</p> | ||
| <p className="text-sm font-black tracking-[0.15em] text-amber-500 mb-1 [font-variant:small-caps]">{tDetail("stablecoin")}</p> | ||
| <p className="text-3xl font-black text-[#1a1a1a]">{d.stablecoin}</p> | ||
| </div> | ||
|
|
||
|
|
@@ -320,7 +320,7 @@ | |
| <div className="rounded-2xl border border-[#e7dac4] bg-white shadow-[0_4px_24px_rgba(15,23,42,0.07)] overflow-hidden flex flex-col"> | ||
| {/* header */} | ||
| <div className="px-6 pt-6 pb-4 text-center border-b border-[#f0ece4]"> | ||
| <p className="text-[10px] font-black tracking-[0.2em] text-violet-500 uppercase mb-1">{tDetail("equityCoin")}</p> | ||
| <p className="text-sm font-black tracking-[0.15em] text-violet-500 mb-1 [font-variant:small-caps]">{tDetail("equityCoin")}</p> | ||
| <p className="text-3xl font-black text-[#1a1a1a]">{d.equityCoin}</p> | ||
| </div> | ||
|
|
||
|
|
@@ -582,17 +582,19 @@ | |
| <div className="pointer-events-none absolute right-0 top-10 h-44 w-44 rounded-full bg-orange-200/30 blur-3xl" /> | ||
| <div className="relative mx-auto max-w-5xl px-2 pt-4 pb-0 md:px-6"> | ||
| <div className="grid gap-10 md:grid-cols-[1.25fr_1fr_1fr_1fr] md:gap-12"> | ||
| <div className="max-w-sm"> | ||
| <div className="logo-hover-wrap mb-4 flex items-center gap-3 text-slate-900"> | ||
| <Image src={`${process.env.NEXT_PUBLIC_BASE_PATH ?? ""}/Logo.svg`} alt="Tectonic logo" width={140} height={40} className="logo-hover-zoom h-8 w-auto object-contain" /> | ||
| <span className="text-lg font-black tracking-[0.22em]">TECTONIC</span> | ||
| <div className="max-w-sm flex flex-col items-start"> | ||
| <div className="flex flex-col items-center text-center"> | ||
| <div className="logo-hover-wrap mb-4 flex flex-col items-center gap-3 text-slate-900"> | ||
| <Image src={`${process.env.NEXT_PUBLIC_BASE_PATH ?? ""}/Logo.svg`} alt="Tectonic logo" width={72} height={72} className="logo-hover-zoom h-16 w-auto object-contain" /> | ||
| <span className="text-2xl font-black tracking-[0.04em] bg-gradient-to-b from-[#c38b44] to-[#7e4420] bg-clip-text text-transparent drop-shadow-[0_2px_4px_rgba(0,0,0,0.4)] leading-none">TECTONIC</span> | ||
| </div> | ||
| <p className="max-w-xs text-sm leading-6 text-slate-600">{tFooter("desc")}</p> | ||
| </div> | ||
| <p className="max-w-xs text-sm leading-6 text-slate-600">{tFooter("desc")}</p> | ||
| </div> | ||
| {[ | ||
| { title: tFooter("protocol"), links: [["Docs","#"],["Contracts","#"],["GitHub","https://github.com/StabilityNexus/Tectonic-EVM-WebUI"]] }, | ||
| { title: tFooter("community"), links: [["Discord","https://discord.com/channels/995968619034984528/1503320626096635935"],["Twitter","#"]] }, | ||
| { title: tFooter("resources"), links: [[tFooter("technicalPaper"),"#"]] }, | ||
| { title: tFooter("community"), links: [["Discord","https://discord.gg/YzDKeEfWtS"],["Telegram","https://t.me/StabilityNexus"]] }, | ||
| { title: tFooter("resources"), links: [[tFooter("technicalPaper"),"#"], ["KYA / Terms", "#"]] }, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Replace the placeholder
As per path instructions: “User-visible strings should be externalized to resource files (i18n).” 🤖 Prompt for AI AgentsSource: Path instructions |
||
| ].map(col => ( | ||
| <div key={col.title}> | ||
| <h4 className="mb-4 text-sm font-semibold uppercase tracking-[0.22em] text-amber-700">{col.title}</h4> | ||
|
|
@@ -613,9 +615,13 @@ | |
| </div> | ||
| ))} | ||
| </div> | ||
| <div className="mt-16 border-t border-amber-200/80 pt-6"> | ||
| <p className="text-center text-sm text-slate-600">{tFooter("rights")}</p> | ||
| </div> | ||
|
|
||
| <div className="mt-16 flex flex-col md:flex-row items-center justify-between gap-4 border-t border-amber-200/80 pt-6 w-full"> | ||
| <p className="text-sm text-slate-600 text-center md:text-left">{tFooter("rights")}</p> | ||
| <a href="https://stability.nexus/" target="_blank" rel="noopener noreferrer" className="inline-block hover:opacity-90 transition-opacity"> | ||
| <Image src={`${process.env.NEXT_PUBLIC_BASE_PATH ?? ""}/logo-animated.gif`} alt="Stability Nexus Badge" width={180} height={50} className="w-auto h-12 rounded-lg" unoptimized /> | ||
| </a> | ||
| </div> | ||
| </footer> | ||
| </> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,7 @@ export interface Deployment { | |
| export const DEPLOYMENTS: Deployment[] = [ | ||
| { id:"tusd-local", name:"TUSD on Local (Anvil)", chain:"Hardhat", chainShort:"LOCAL",chainColor:"#f3f3f3", chainTextColor:"text-[#1a1a1a]", chainId:31337, isPlaceholder:false, stablecoin:"TUSD", equityCoin:"TEQT", reserveRatio:325, totalReserve:"$14.82M", stableSupply:"1.2M", equitySupply:"45K", equityLeverage:"3.25×", equityYield:6.2, tvl:"$4.56M", status:"healthy", reserveAsset:"ETH", pegAsset:"USD" }, | ||
| { id:"tusd-sepolia",name:"TUSD on Sepolia", chain:"Sepolia", chainShort:"SEP", chainColor:"#cfb53b", chainTextColor:"text-white", chainId:11155111, isPlaceholder:false, stablecoin:"TUSD", equityCoin:"TEQT", reserveRatio:410, totalReserve:"$13.28M", stableSupply:"850K", equitySupply:"22K", equityLeverage:"4.1×", equityYield:5.8, tvl:"$3.24M", status:"healthy", reserveAsset:"ETH", pegAsset:"USD" }, | ||
| { id:"usdp-amoy", name:"USDP on Polygon Amoy", chain:"Polygon", chainShort:"AMOY", chainColor:"#8247e5", chainTextColor:"text-white", chainId:80002, isPlaceholder:true, stablecoin:"USDP", equityCoin:"PEQT", reserveRatio:155, totalReserve:"$3.19M", stableSupply:"2.1M", equitySupply:"18K", equityLeverage:"1.55×", equityYield:4.1, tvl:"$2.06M", status:"warning", reserveAsset:"MATIC",pegAsset:"USD" }, | ||
| { id:"usdp-amoy", name:"USDP on Polygon Amoy", chain:"Polygon", chainShort:"AMOY", chainColor:"#8247e5", chainTextColor:"text-white", chainId:80002, isPlaceholder:false, stablecoin:"USDP", equityCoin:"PEQT", reserveRatio:155, totalReserve:"$3.19M", stableSupply:"2.1M", equitySupply:"18K", equityLeverage:"1.55×", equityYield:4.1, tvl:"$2.06M", status:"warning", reserveAsset:"POL",pegAsset:"USD" }, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n -C 8 \
'getContractAddress|useChainId|isMismatch|useReadContract|MintRedeemForm|usdp-amoy|80002' \
--glob '*.{ts,tsx}' .Repository: StabilityNexus/Tectonic-EVM-WebUI Length of output: 26435 🏁 Script executed: #!/bin/bash
set -euo pipefail
file='app/deployments/[id]/DeploymentDetailClient.tsx'
printf '%s\n' '--- contract reads and mismatch handling ---'
sed -n '388,505p' "$file"
printf '%s\n' '--- form submission and write path ---'
sed -n '60,205p' "$file"
printf '%s\n' '--- chain configuration references ---'
rg -n -C 5 'WagmiProvider|createConfig|chains:|80002|CONTRACT_ADDRESSES' --glob '*.{ts,tsx}' .Repository: StabilityNexus/Tectonic-EVM-WebUI Length of output: 16531 🏁 Script executed: #!/bin/bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
import re
data = Path("lib/deployments-data.ts").read_text()
client = Path("app/deployments/[id]/DeploymentDetailClient.tsx").read_text()
amoy = re.search(r'id:"usdp-amoy".*?chainId:(\d+).*?isPlaceholder:(\w+)', data)
assert amoy, "usdp-amoy record not found"
deployment_chain = int(amoy.group(1))
is_placeholder = amoy.group(2) == "true"
read_blocks = re.findall(
r'useReadContract\(\{.*?query: \{ enabled: ([^}]+) \}',
client,
re.S,
)
assert len(read_blocks) == 5, f"expected five reads, found {len(read_blocks)}"
assert all(expr.strip() == "!d?.isPlaceholder" for expr in read_blocks)
mismatch_expr = re.search(r'const isMismatch = ([^;]+);', client)
assert mismatch_expr and mismatch_expr.group(1).strip() == "chainId !== d.chainId"
supported_chain = 11155111
assert supported_chain != deployment_chain
reads_enabled = not is_placeholder
mismatch = supported_chain != deployment_chain
print({
"deployment_chain": deployment_chain,
"supported_connected_chain": supported_chain,
"reads_enabled": reads_enabled,
"isMismatch": mismatch,
"five_reads_run_before_mismatch_check": True,
"transaction_button_disabled_on_mismatch": "isMismatch ?" in client,
})
PYRepository: StabilityNexus/Tectonic-EVM-WebUI Length of output: 376 Gate Amoy contract reads by deployment chain. For 🤖 Prompt for AI Agents🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n -C 8 \
'MintRedeemForm|reserveAsset|inputAsset|outputToken|\bMATIC\b|\bPOL\b' \
--glob '*.{ts,tsx}' .Repository: StabilityNexus/Tectonic-EVM-WebUI Length of output: 26959 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- DeploymentDetailClient structure ---'
ast-grep outline 'app/deployments/[id]/DeploymentDetailClient.tsx'
printf '%s\n' '--- Transaction and asset handling ---'
sed -n '1,230p' 'app/deployments/[id]/DeploymentDetailClient.tsx'
printf '%s\n' '--- Contract address and ABI definitions ---'
rg -n -C 6 'CONTRACT_ADDRESSES|tectonicAbi|balanceOf|allowance|approve|mint|redeem|parseUnits|writeContract|readContract' \
--glob '*.{ts,tsx}' lib app components hooks
printf '%s\n' '--- All POL and MATIC references ---'
rg -n -C 4 '\bPOL\b|\bMATIC\b' --glob '*.{ts,tsx,json}' .Repository: StabilityNexus/Tectonic-EVM-WebUI Length of output: 43883 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- Deployment and network gating ---'
sed -n '389,475p' 'app/deployments/[id]/DeploymentDetailClient.tsx'
printf '%s\n' '--- Exact asset and transaction references ---'
python3 - <<'PY'
from pathlib import Path
paths = [
Path("app/deployments/[id]/DeploymentDetailClient.tsx"),
Path("lib/abi/Tectonic.ts"),
]
terms = ("reserveAsset", "inputAsset", "outputToken", "MATIC", "POL",
"balanceOf", "allowance", "approve", "functionName", "value", "args")
for path in paths:
print(f"FILE {path}")
for number, line in enumerate(path.read_text().splitlines(), 1):
if any(term in line for term in terms):
print(f"{number}: {line.strip()}")
PY
printf '%s\n' '--- Static transaction-path invariant ---'
python3 - <<'PY'
from pathlib import Path
detail = Path("app/deployments/[id]/DeploymentDetailClient.tsx").read_text()
abi = Path("lib/abi/Tectonic.ts").read_text()
assert 'reserveAsset' in detail
assert 'inputAsset={tab === "mint" ? d.reserveAsset' in detail
assert 'outputToken={tab === "mint" ? d.stablecoin : d.reserveAsset}' in detail
assert 'balanceOf' not in detail and 'allowance' not in detail and 'approve' not in detail
assert '"MATIC"' not in detail and '"POL"' not in detail
assert 'value: weiAmount' in detail
assert 'args: [weiAmount]' in detail
assert 'name: "mint"' in abi and 'name: "mintEquityCoins"' in abi
assert 'name: "redeem"' in abi and 'name: "redeemEquityCoins"' in abi
print("reserveAsset is used for form labels/outputs only.")
print("No asset lookup, balance, allowance, approval, or MATIC/POL branch exists.")
print("Mint writes use native value; redeem writes pass only the amount.")
PYRepository: StabilityNexus/Tectonic-EVM-WebUI Length of output: 5062 Gate contract reads on the deployment network. The reads use the connected chain’s contract address while 🤖 Prompt for AI Agents |
||
| { id:"tusd-classic",name:"TUSD on Ethereum Classic", chain:"Classic", chainShort:"ETC", chainColor:"#34fa99", chainTextColor:"text-[#1a1a1a]", chainId:61, isPlaceholder:true, stablecoin:"TUSD", equityCoin:"TEQT", reserveRatio:280, totalReserve:"$5.12M", stableSupply:"600K", equitySupply:"15K", equityLeverage:"2.8×", equityYield:7.4, tvl:"$2.15M", status:"healthy", reserveAsset:"ETC", pegAsset:"USD" }, | ||
| { id:"tusd-base", name:"TUSD on Base", chain:"Base", chainShort:"BASE", chainColor:"#0052ff", chainTextColor:"text-white", chainId:8453, isPlaceholder:true, stablecoin:"TUSD", equityCoin:"TEQT", reserveRatio:315, totalReserve:"$8.45M", stableSupply:"2.6M", equitySupply:"85K", equityLeverage:"3.15×", equityYield:5.2, tvl:"$6.21M", status:"healthy", reserveAsset:"ETH", pegAsset:"USD" }, | ||
| ]; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Use explicit types for footer link data.
The nested
linksarrays are inferred from positional string values. DefineFooterLinkandFooterColumntypes, use{ label, href }objects, and render named fields. This makes the footer data contract explicit.Suggested type shape
As per coding guidelines: “Use explicit types or interfaces for data structures in TypeScript code.”
As per path instructions: “Avoid ‘any’, use explicit types.”
🤖 Prompt for AI Agents
Sources: Coding guidelines, Path instructions