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
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface VerificationResult {
error?: string;
}

async function verifyContract(contract: ThirdwebContract) {
export async function verifyContract(contract: ThirdwebContract) {
try {
const response = await fetch(
"https://contract.thirdweb.com/verify/contract",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
FormControl,
} from "@chakra-ui/react";
import { useMutation, useQuery } from "@tanstack/react-query";
import { verifyContract } from "app/(dashboard)/(chain)/[chain_id]/[contractAddress]/sources/ContractSourcesPage";
import { NetworkSelectorButton } from "components/selects/NetworkSelectorButton";
import { SolidityInput } from "contract-ui/components/solidity-inputs";
import { useTrack } from "hooks/analytics/useTrack";
Expand Down Expand Up @@ -537,6 +538,13 @@ export const CustomContractForm: React.FC<CustomContractFormProps> = ({
// do the actual deployment
const contractAddr = await deployMutation.mutateAsync(formData);

// send verification request - no need to await
verifyContract({
address: contractAddr,
chain: walletChain,
client: thirdwebClient,
});

trackEvent({
category: "custom-contract",
action: "deploy",
Expand Down
Loading