File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
app/(dashboard)/(chain)/[chain_id]/[contractAddress]/sources
components/contract-components/contract-deploy-form Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ interface VerificationResult {
3434 error ?: string ;
3535}
3636
37- async function verifyContract ( contract : ThirdwebContract ) {
37+ export async function verifyContract ( contract : ThirdwebContract ) {
3838 try {
3939 const response = await fetch (
4040 "https://contract.thirdweb.com/verify/contract" ,
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import {
1818 FormControl ,
1919} from "@chakra-ui/react" ;
2020import { useMutation , useQuery } from "@tanstack/react-query" ;
21+ import { verifyContract } from "app/(dashboard)/(chain)/[chain_id]/[contractAddress]/sources/ContractSourcesPage" ;
2122import { NetworkSelectorButton } from "components/selects/NetworkSelectorButton" ;
2223import { SolidityInput } from "contract-ui/components/solidity-inputs" ;
2324import { useTrack } from "hooks/analytics/useTrack" ;
@@ -537,6 +538,13 @@ export const CustomContractForm: React.FC<CustomContractFormProps> = ({
537538 // do the actual deployment
538539 const contractAddr = await deployMutation . mutateAsync ( formData ) ;
539540
541+ // send verification request - no need to await
542+ verifyContract ( {
543+ address : contractAddr ,
544+ chain : walletChain ,
545+ client : thirdwebClient ,
546+ } ) ;
547+
540548 trackEvent ( {
541549 category : "custom-contract" ,
542550 action : "deploy" ,
You can’t perform that action at this time.
0 commit comments