Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions app/deployments/[id]/DeploymentDetailClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
61: "0x016eed9c27848d9ba152fe2d45dd2949f3f4780d", // Ethereum Classic (Placeholder)
8453: "0x016eed9c27848d9ba152fe2d45dd2949f3f4780d", // Base Mainnet (Placeholder)
};
const FALLBACK_ADDRESS = "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512";

Check warning on line 29 in app/deployments/[id]/DeploymentDetailClient.tsx

View workflow job for this annotation

GitHub Actions / build (20.x)

'FALLBACK_ADDRESS' is assigned a value but never used

function getContractAddress(chainId?: number): `0x${string}` | undefined {
if (!chainId) return undefined;
Expand Down Expand Up @@ -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>

Expand Down Expand Up @@ -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>

Expand Down Expand Up @@ -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", "#"]] },
Comment on lines 594 to +597

Copy link
Copy Markdown

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 links arrays are inferred from positional string values. Define FooterLink and FooterColumn types, use { label, href } objects, and render named fields. This makes the footer data contract explicit.

Suggested type shape
+type FooterLink = {
+  label: string;
+  href: string;
+};
+
+type FooterColumn = {
+  title: string;
+  links: FooterLink[];
+};
+
-                  {col.links.map(([label, href]) => (
+                  {col.links.map(({ label, href }) => (

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
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/deployments/`[id]/DeploymentDetailClient.tsx around lines 594 - 597,
Define explicit FooterLink and FooterColumn types near the footer data in
DeploymentDetailClient, then convert each column’s positional links arrays into
{ label, href } objects. Update the footer rendering logic to read link.label
and link.href while preserving the existing translated labels and destinations.

Sources: Coding guidelines, Path instructions

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Replace the placeholder KYA / Terms link.

href="#" only moves the user to the top of the current page. It does not provide the terms document. Use the real route or external URL, and add a footer translation key for the label.

As per path instructions: “User-visible strings should be externalized to resource files (i18n).”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/deployments/`[id]/DeploymentDetailClient.tsx at line 597, Replace the
placeholder KYA / Terms href in the footer links of DeploymentDetailClient with
the actual terms route or external URL, and replace the hardcoded label with a
new footer i18n key. Add the corresponding translation to the resource files and
use that key alongside the existing tFooter entries.

Source: 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>
Expand All @@ -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>
</>
Expand Down
28 changes: 16 additions & 12 deletions app/deployments/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
];

/* ─── Site card wrapper ─── */
function SiteCard({ children, className = "" }: { children: React.ReactNode; className?: string }) {

Check warning on line 36 in app/deployments/page.tsx

View workflow job for this annotation

GitHub Actions / build (20.x)

'SiteCard' is defined but never used
return (
<div className={`rounded-xl border border-[#e7dac4] bg-white shadow-sm ${className}`}>
{children}
Expand Down Expand Up @@ -131,11 +131,11 @@
MAIN PAGE
───────────────────────────────────────────────────────────────────────────── */
export default function DeploymentsPage() {
const tDeploy = useTranslations("deployments");

Check warning on line 134 in app/deployments/page.tsx

View workflow job for this annotation

GitHub Actions / build (20.x)

'tDeploy' is assigned a value but never used
const [activeChain, setActiveChain] = useState("all");
const [activePeg, setActivePeg] = useState("all");
const [search, setSearch] = useState("");
const [tvl, setTvl] = useState(0);

Check warning on line 138 in app/deployments/page.tsx

View workflow job for this annotation

GitHub Actions / build (20.x)

'tvl' is assigned a value but never used
const countDone = useRef(false);

useEffect(() => {
Expand Down Expand Up @@ -271,12 +271,14 @@
<div className="relative mx-auto max-w-7xl 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">
{/* brand */}
<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={160} height={44} className="logo-hover-zoom h-9 w-auto object-contain" />
<span className="text-xl 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">Next-generation stablecoin protocol.</p>
</div>
<p className="max-w-xs text-sm leading-6 text-slate-600">Next-generation stablecoin protocol.</p>
</div>

{/* Protocol */}
Expand All @@ -293,26 +295,28 @@
<div>
<h4 className="mb-4 text-sm font-semibold uppercase tracking-[0.22em] text-amber-700">Community</h4>
<ul className="space-y-3 text-sm text-slate-700">
{["Discord","Twitter"].map(l=>(
<li key={l}><a href={l==="Discord"?"https://discord.com/channels/995968619034984528/1503320626096635935":"#"} target={l==="Discord"?"_blank":undefined} rel={l==="Discord"?"noopener noreferrer":undefined} className="transition hover:text-amber-700 hover:underline hover:underline-offset-4">{l}</a></li>
))}
<li><a href="https://discord.gg/YzDKeEfWtS" target="_blank" rel="noopener noreferrer" className="transition hover:text-amber-700 hover:underline hover:underline-offset-4">Discord</a></li>
<li><a href="https://t.me/StabilityNexus" target="_blank" rel="noopener noreferrer" className="transition hover:text-amber-700 hover:underline hover:underline-offset-4">Telegram</a></li>
</ul>
</div>

{/* Resources */}
<div>
<h4 className="mb-4 text-sm font-semibold uppercase tracking-[0.22em] text-amber-700">Resources</h4>
<ul className="space-y-3 text-sm text-slate-700">
{["Technical Paper"].map(l=>(
{["Technical Paper", "KYA / Terms"].map(l=>(
<li key={l}><a href="#" className="transition hover:text-amber-700 hover:underline hover:underline-offset-4">{l}</a></li>
))}
</ul>
</div>
</div>
</div>

<div className="mt-24 border-t border-amber-200/80 pt-6">
<p className="text-center text-sm text-slate-600">© 2026 Tectonic Protocol. All rights reserved.</p>
</div>
<div className="mt-24 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">© 2026 Tectonic Protocol. All rights reserved.</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>
</>
Expand Down
50 changes: 25 additions & 25 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
const tFooter = useTranslations("footer");

// Features data and reveal animation refs
const features = [

Check warning on line 142 in app/page.tsx

View workflow job for this annotation

GitHub Actions / build (20.x)

'features' is assigned a value but never used
{
title: tHome("whyTectonicFeatures.triggerRedemptions.title"),
emoji: '⚡',
Expand Down Expand Up @@ -556,21 +556,21 @@

<div className="flex justify-center md:justify-end">
<div className="inline-flex flex-col gap-4 rounded-3xl bg-white p-3 shadow-lg">
<a href="#" className="btn-primary flex items-center gap-3 px-4 py-3">
<a href="https://discord.gg/YzDKeEfWtS" target="_blank" rel="noopener noreferrer" className="btn-primary flex items-center gap-3 px-4 py-3">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden>
<path d="M20 3H4a1 1 0 00-1 1v16l4-4h13a1 1 0 001-1V4a1 1 0 00-1-1z" fill="currentColor" />
</svg>
DISCORD
</a>

<a href="#" className="btn-secondary flex items-center gap-3 px-4 py-3">
<a href="https://t.me/StabilityNexus" target="_blank" rel="noopener noreferrer" className="btn-secondary flex items-center gap-3 px-4 py-3">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden>
<path d="M22 5.92a8.3 8.3 0 01-2.36.65A4.1 4.1 0 0021.4 4c-.8.48-1.68.82-2.62 1A4.13 4.13 0 0012 8.4v.5A11.7 11.7 0 013 6.16a4.03 4.03 0 001.28 5.48 4.08 4.08 0 01-1.86-.51v.05c0 1.9 1.34 3.5 3.12 3.87a4.1 4.1 0 01-1.85.07 4.12 4.12 0 003.85 2.86A8.3 8.3 0 012 19.54 11.68 11.68 0 008.29 21c7.55 0 11.68-6.26 11.68-11.68l-.01-.53A8.18 8.18 0 0022 5.92z" fill="currentColor"/>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69.01-.03.01-.14-.07-.19-.08-.05-.19-.02-.27 0-.11.03-1.84 1.18-5.18 3.44-.49.33-.93.5-1.33.49-.44-.01-1.28-.24-1.9-.45-.77-.25-1.38-.39-1.33-.82.03-.22.34-.44.93-.68 3.63-1.58 6.05-2.62 7.25-3.12 3.45-1.43 4.16-1.68 4.63-1.69.1 0 .33.02.46.12.11.08.14.2.15.28.01.1-.01.23-.03.32z" fill="currentColor"/>
</svg>
TWITTER
TELEGRAM
</a>

<a href="#" className="btn-secondary flex items-center gap-3 px-4 py-3">
<a href="https://github.com/StabilityNexus/Tectonic-EVM-WebUI" target="_blank" rel="noopener noreferrer" className="btn-secondary flex items-center gap-3 px-4 py-3">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden>
<path d="M12 .5C5.7.5.5 5.7.5 12c0 5.1 3.3 9.4 7.9 10.9.6.1.8-.3.8-.6v-2.2c-3.2.7-3.9-1.4-3.9-1.4-.5-1.2-1.1-1.5-1.1-1.5-.9-.6.1-.6.1-.6 1 .1 1.6 1 1.6 1 .9 1.6 2.4 1.1 3 .8.1-.6.4-1.1.7-1.4-2.6-.3-5.3-1.3-5.3-5.8 0-1.3.5-2.4 1.2-3.3-.1-.3-.5-1.6.1-3.3 0 0 1-.3 3.3 1.2a11.5 11.5 0 016 0c2.3-1.5 3.3-1.2 3.3-1.2.6 1.7.2 3 .1 3.3.7.9 1.2 2 1.2 3.3 0 4.5-2.7 5.4-5.3 5.8.4.4.8 1 1 2v3c0 .3.2.7.8.6A10.5 10.5 0 0023.5 12C23.5 5.7 18.3.5 12 .5z" fill="currentColor"/>
</svg>
Expand All @@ -590,20 +590,16 @@

<div className="relative mx-auto max-w-7xl 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={160}
height={44}
className="logo-hover-zoom h-9 w-auto object-contain"
/>
<span className="text-xl 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>

<div>
Expand All @@ -618,24 +614,28 @@
<div>
<h4 className="mb-4 text-sm font-semibold uppercase tracking-[0.22em] text-amber-700">{tFooter("community")}</h4>
<ul className="space-y-3 text-sm text-slate-700">
<li><a href="https://discord.com/channels/995968619034984528/1503320626096635935" target="_blank" rel="noopener noreferrer" className="transition hover:text-amber-700 hover:underline hover:underline-offset-4">Discord</a></li>
<li><a href="#" className="transition hover:text-amber-700 hover:underline hover:underline-offset-4">Twitter</a></li>
<li><a href="https://discord.gg/YzDKeEfWtS" target="_blank" rel="noopener noreferrer" className="transition hover:text-amber-700 hover:underline hover:underline-offset-4">Discord</a></li>
<li><a href="https://t.me/StabilityNexus" target="_blank" rel="noopener noreferrer" className="transition hover:text-amber-700 hover:underline hover:underline-offset-4">Telegram</a></li>
</ul>
</div>

<div>
<h4 className="mb-4 text-sm font-semibold uppercase tracking-[0.22em] text-amber-700">{tFooter("resources")}</h4>
<ul className="space-y-3 text-sm text-slate-700">
<li><a href="#" className="transition hover:text-amber-700 hover:underline hover:underline-offset-4">{tFooter("technicalPaper")}</a></li>
<li><a href="#" className="transition hover:text-amber-700 hover:underline hover:underline-offset-4">KYA / Terms</a></li>
</ul>
</div>
</div>
</div>

<div className="mt-24 border-t border-amber-200/80 pt-6">
<p className="text-center text-sm text-slate-600">
{tFooter("rights")}
</p>
</div>
<div className="mt-24 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>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export default function Navbar() {
className="logo-hover-zoom h-9 w-auto object-contain sm:h-10"
priority
/>
<span className="hidden text-xl leading-none font-extrabold tracking-[0.22em] text-slate-900 sm:block">
<span className="hidden text-xl leading-none 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)] sm:block">
TECTONIC
</span>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion lib/deployments-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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,
})
PY

Repository: StabilityNexus/Tectonic-EVM-WebUI

Length of output: 376


Gate Amoy contract reads by deployment chain.

For usdp-amoy, all five reads remain enabled when the wallet is on another supported chain, such as Sepolia. The page can display that chain’s prices and ratio for the Amoy deployment and passes its contract address to MintRedeemForm. Add chainId === d.chainId to each read’s enabled condition or target reads to d.chainId.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/deployments-data.ts` at line 33, Update the five contract-read
configurations for the usdp-amoy deployment to require chainId === d.chainId in
each enabled condition, ensuring reads and MintRedeemForm data are only active
on Amoy while preserving existing conditions.

🗄️ 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.")
PY

Repository: 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 enabled checks only isPlaceholder. A wallet connected to Sepolia can therefore display Sepolia data for the active Amoy deployment. Disable reads when chainId !== d.chainId or resolve the deployment’s own address. POL is used only for labels; no asset lookup or allowance logic is required.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/deployments-data.ts` at line 33, Update the deployment contract-read
enablement logic to require both !d.isPlaceholder and a connected chainId equal
to d.chainId, preventing reads for deployments on other networks. Keep POL as a
display-only reserveAsset label and do not add asset lookup or allowance
handling.

{ 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" },
];
Loading
Loading