-
Notifications
You must be signed in to change notification settings - Fork 925
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
216 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import React from "react"; | ||
import Link from "next/link"; | ||
import { useRouter } from "next/router"; | ||
import { BugAntIcon, MagnifyingGlassIcon, SparklesIcon } from "@heroicons/react/24/outline"; | ||
|
||
interface HeaderMenuLink { | ||
label: string; | ||
href: string; | ||
icon?: React.ReactNode; | ||
} | ||
|
||
export const menuLinks: HeaderMenuLink[] = [ | ||
{ | ||
label: "Home", | ||
href: "/", | ||
}, | ||
{ | ||
label: "Debug Contracts", | ||
href: "/debug", | ||
icon: <BugAntIcon className="h-4 w-4" />, | ||
}, | ||
{ | ||
label: "Example UI", | ||
href: "/example-ui", | ||
icon: <SparklesIcon className="h-4 w-4" />, | ||
}, | ||
{ | ||
label: "Block Explorer", | ||
href: "/blockexplorer", | ||
icon: <MagnifyingGlassIcon className="h-4 w-4" />, | ||
}, | ||
]; | ||
|
||
export const HeaderMenuLinks = () => { | ||
const router = useRouter(); | ||
|
||
return ( | ||
<> | ||
{menuLinks.map(({ label, href, icon }) => { | ||
const isActive = router.pathname === href; | ||
return ( | ||
<li key={href}> | ||
<Link | ||
href={href} | ||
passHref | ||
className={`${ | ||
isActive ? "bg-secondary shadow-md" : "" | ||
} hover:bg-secondary hover:shadow-md focus:!bg-secondary active:!text-neutral py-1.5 px-3 text-sm rounded-full gap-2 grid grid-flow-col`} | ||
> | ||
{icon} | ||
<span>{label}</span> | ||
</Link> | ||
</li> | ||
); | ||
})} | ||
</> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,154 @@ | ||
const deployedContracts = null; | ||
const contracts = { | ||
31337: [ | ||
{ | ||
chainId: "31337", | ||
name: "localhost", | ||
contracts: { | ||
YourContract: { | ||
address: "0x5FbDB2315678afecb367f032d93F642f64180aa3", | ||
abi: [ | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "address", | ||
name: "_owner", | ||
type: "address", | ||
}, | ||
], | ||
stateMutability: "nonpayable", | ||
type: "constructor", | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ | ||
indexed: true, | ||
internalType: "address", | ||
name: "greetingSetter", | ||
type: "address", | ||
}, | ||
{ | ||
indexed: false, | ||
internalType: "string", | ||
name: "newGreeting", | ||
type: "string", | ||
}, | ||
{ | ||
indexed: false, | ||
internalType: "bool", | ||
name: "premium", | ||
type: "bool", | ||
}, | ||
{ | ||
indexed: false, | ||
internalType: "uint256", | ||
name: "value", | ||
type: "uint256", | ||
}, | ||
], | ||
name: "GreetingChange", | ||
type: "event", | ||
}, | ||
{ | ||
inputs: [], | ||
name: "greeting", | ||
outputs: [ | ||
{ | ||
internalType: "string", | ||
name: "", | ||
type: "string", | ||
}, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [], | ||
name: "owner", | ||
outputs: [ | ||
{ | ||
internalType: "address", | ||
name: "", | ||
type: "address", | ||
}, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [], | ||
name: "premium", | ||
outputs: [ | ||
{ | ||
internalType: "bool", | ||
name: "", | ||
type: "bool", | ||
}, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "string", | ||
name: "_newGreeting", | ||
type: "string", | ||
}, | ||
], | ||
name: "setGreeting", | ||
outputs: [], | ||
stateMutability: "payable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [], | ||
name: "totalCounter", | ||
outputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "", | ||
type: "uint256", | ||
}, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "address", | ||
name: "", | ||
type: "address", | ||
}, | ||
], | ||
name: "userGreetingCounter", | ||
outputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "", | ||
type: "uint256", | ||
}, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [], | ||
name: "withdraw", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
stateMutability: "payable", | ||
type: "receive", | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
], | ||
} as const; | ||
|
||
export default deployedContracts; | ||
export default contracts; |