Skip to content

Commit

Permalink
Merge branch 'master' into validator-manager-docs
Browse files Browse the repository at this point in the history
Signed-off-by: Owen <owenwahlgren@gmail.com>
  • Loading branch information
owenwahlgren authored Nov 5, 2024
2 parents c0b7862 + 732354e commit 55e2ec1
Show file tree
Hide file tree
Showing 7 changed files with 139 additions and 9 deletions.
84 changes: 83 additions & 1 deletion app/(home)/page.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import React, {
Fragment,
type ReactElement,
} from 'react';
import { IndentDecrease, Layers, MailIcon, MonitorCheck, Settings, SproutIcon, SquareGanttChart, TerminalIcon, Webhook, HomeIcon, BadgeDollarSign, CpuIcon, Files, Folder, Globe, Link, FolderCode } from 'lucide-react';
import { IndentDecrease, Layers, MailIcon, MonitorCheck, Settings, SproutIcon, SquareGanttChart, TerminalIcon, Webhook, HomeIcon, BadgeDollarSign, CpuIcon, Files, Folder, Globe, Link, SquareIcon, ArrowLeftRight, Coins, SquareCode, SquareStackIcon, Triangle, ChevronDownIcon } from 'lucide-react';
import { RootToggle } from 'fumadocs-ui/components/layout/root-toggle';
import { Menu, Transition } from '@headlessui/react'


export function DeployBlockchainAnimation(): React.ReactElement {
const installCmd = 'avalanche blockchain deploy myblockchain';
Expand Down Expand Up @@ -168,3 +170,83 @@ export function HamburgerMenu(): React.ReactElement {
/>
)
}

interface Option {
title: string
description: string
icon: React.ReactNode
url: string
}

interface AcademyDropdownProps {
width?: string
}

const options: Option[] = [
{
title: 'Academy',
description: '',
icon: <></>,
url: '/',
},
{
title: 'Blockchain Fundamentals',
description: 'Understand fundamental blockchain concepts.',
icon: <SquareIcon className="w-5 h-5" />,
url: 'https://academy.avax.network/course/blockchain-fundamentals',
},
{
title: 'Avalanche Fundamentals',
description: 'Overview of Avalanche Consensus, L1s, and VMs.',
icon: <Triangle className="w-5 h-5" />,
url: 'https://academy.avax.network/course/avalanche-fundamentals',
},
{
title: "Multi-Chain Architecture",
description: 'Deploy your own blockchain with multi-chain architecture.',
icon: <SquareStackIcon className="w-5 h-5" />,
url: 'https://academy.avax.network/course/multi-chain-architecture',
},
{
title: "Interchain Messaging",
description: 'Build cross-chain dApps on Avalanche.',
icon: <MailIcon className="w-5 h-5" />,
url: 'https://academy.avax.network/course/interchain-messaging',
},
{
title: "Interchain Token Transfer",
description: 'Transfer assets between Avalanche blockchains.',
icon: <ArrowLeftRight className="w-5 h-5" />,
url: 'https://academy.avax.network/course/interchain-token-transfer',
},
{
title: "Customizing the EVM",
description: 'Add custom precompiles to the EVM.',
icon: <SquareCode className="w-5 h-5" />,
url: 'https://academy.avax.network/course/customizing-evm',
},
{
title: "Layer 1 Tokenomics",
description: 'Design tokenomics for your Avalanche L1.',
icon: <Coins className="w-5 h-5" />,
url: 'https://academy.avax.network/course/l1-tokenomics',
},
{
title: "AvaCloud APIs",
description: 'Use AvaCloud APIs to build web apps.',
icon: <Webhook className="w-5 h-5" />,
url: 'https://academy.avax.network/course/avacloudapis',
},
{
title: "HyperSDK",
description: 'Build high-performance blockchains with HyperSDK.',
icon: <TerminalIcon className="w-5 h-5" />,
url: 'https://academy.avax.network/course/hypersdk',
}
]

export function AcademyDropdown({ width = 'w-72' }: AcademyDropdownProps) {
return (
<RootToggle options={options} />
)
}
9 changes: 5 additions & 4 deletions app/layout.client.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';
import type { ReactNode } from 'react';
import { HamburgerMenu } from './(home)/page.client';
import { AcademyDropdown, HamburgerMenu } from './(home)/page.client';

const svgCode = `<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="100%" viewBox="0 0 220 190" enable-background="new 0 0 220 190" xml:space="preserve">
Expand Down Expand Up @@ -62,9 +62,10 @@ export function HomeTitle(): React.ReactElement {
return (
<>
<img width="80" height="80" src={`data:image/svg+xml;utf8,${encodeURIComponent(svgCode)}`} className="size-7" alt="logo" />
<span style={{fontSize: "large"}}>Documentation</span>
<div className="pl-4">
<span style={{fontSize: "large"}}>Developer Hub</span>
<div className="flex items-center pl-4 space-x-4">
<HamburgerMenu />
<AcademyDropdown />
</div>
</>
);
Expand All @@ -74,7 +75,7 @@ export function Title(): React.ReactElement {
return (
<>
<img width="80" height="80" src={`data:image/svg+xml;utf8,${encodeURIComponent(svgCode)}`} className="size-7" alt="logo" />
<span style={{fontSize: "large"}}>Documentation</span>
<span style={{fontSize: "large"}}>Developer Hub</span>
</>
);
}
Expand Down
4 changes: 0 additions & 4 deletions app/layout.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ export const homebaseOptions: BaseLayoutProps = {
transparentMode: 'top',
},
links: [
{
text: 'Academy',
url: 'https://academy.avax.network',
},
{
text: 'Guides',
url: 'https://academy.avax.network/guide',
Expand Down
51 changes: 51 additions & 0 deletions content/docs/dapps/verify-contract/explorer.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: Using Explorer
description: Learn how to verify a smart contract using the official Avalanche Explorer.
---

This document outlines the process of verifying a Smart Contract deployed on the Avalanche Network using the official explorer.

## Contract Deployment

1. Compile the smart contract using the tooling of your choice.

2. Deploy the compiled smart contract to the Avalanche network.
- This can be done on either the mainnet or testnet (depending on your RPC configuration)

3. Upon successful deployment, you will receive:
- A transaction hash
- A contract address

<Callout title="Note">
Ensure you save the contract address as it will be required for the verification process.
</Callout>

## Contract Verification

1. Navigate to the official [Avalanche Explorer](https://subnets.avax.network/) and click on **Tools** dropdown menu to select **Smart Contract Verification** interface. You may need to open the [Testnet Explorer](https://subnets-test.avax.network/) in case the contract is deployed on Fuji Testnet.

![](/images/verification-portal.png)

2. Prepare the following files:
- The contract's Solidity file (`.sol`)
- The `metadata.json` file containing the ABI and metadata

3. Upload the required files:
- Upload the contract's Solidity file
- Upload the `metadata.json` file

4. Enter the contract address:
- Paste the contract address obtained from the deployment step into the designated input field.

![](/images/contract-addr-input.png)

5. Initiate verification:
- Click on the **Submit Contract** button to start the verification process.

## Next Steps

After submitting the contract for verification, your request will be processed shortly and you will see the below message.

![](/images/verification-success.png)

For any issues during deployment or verification, please reach out to the DevRel/Support team on Discord/Telegram/Slack.
Binary file added public/images/contract-addr-input.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/verification-portal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/verification-success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 55e2ec1

Please sign in to comment.