Skip to content

Commit

Permalink
Merge pull request #27 from scaffold-eth/weekly-backmerge-upstream
Browse files Browse the repository at this point in the history
Weekly cli backmerge upstream
  • Loading branch information
technophile-04 committed May 14, 2024
2 parents a93a09b + 7dd7be8 commit 510a3ba
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 56 deletions.
5 changes: 5 additions & 0 deletions .changeset/beige-steaks-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-eth": patch
---

- AddressInfoModal fix copy icon size on bigger fonts (scaffold-eth#836)
5 changes: 5 additions & 0 deletions .changeset/long-sloths-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-eth": patch
---

bump burner-connector version (scaffold-eth#842)
5 changes: 5 additions & 0 deletions .changeset/metal-flies-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-eth": patch
---

export useWatchBalance & useTargetNetwork form hooks index file (scaffold-eth#840)
5 changes: 5 additions & 0 deletions .changeset/shiny-jars-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-eth": patch
---

Improve meta handling (scaffold-eth#811)
5 changes: 5 additions & 0 deletions .changeset/tough-bears-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-eth": patch
---

fix: useScaffoldWatchContractEvent logs args types (scaffold-eth#837)
47 changes: 5 additions & 42 deletions templates/base/packages/nextjs/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,50 +1,13 @@
import "@rainbow-me/rainbowkit/styles.css";
import { Metadata } from "next";
import { ScaffoldEthAppWithProviders } from "~~/components/ScaffoldEthAppWithProviders";
import { ThemeProvider } from "~~/components/ThemeProvider";
import "~~/styles/globals.css";
import { getMetadata } from "~~/utils/scaffold-eth/getMetadata";

const baseUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: `http://localhost:${process.env.PORT || 3000}`;
const imageUrl = `${baseUrl}/thumbnail.jpg`;

const title = "Scaffold-ETH 2 App";
const titleTemplate = "%s | Scaffold-ETH 2";
const description = "Built with 🏗 Scaffold-ETH 2";

export const metadata: Metadata = {
metadataBase: new URL(baseUrl),
title: {
default: title,
template: titleTemplate,
},
description,
openGraph: {
title: {
default: title,
template: titleTemplate,
},
description,
images: [
{
url: imageUrl,
},
],
},
twitter: {
card: "summary_large_image",
images: [imageUrl],
title: {
default: title,
template: titleTemplate,
},
description,
},
icons: {
icon: [{ url: "/favicon.png", sizes: "32x32", type: "image/png" }],
},
};
export const metadata = getMetadata({
title: "Scaffold-ETH 2 App",
description: "Built with 🏗 Scaffold-ETH 2",
});

const ScaffoldEthApp = ({ children }: { children: React.ReactNode }) => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const AddressQRCodeModal = ({ address, modalId }: AddressQRCodeModalProps
</label>
<div className="space-y-3 py-6">
<div className="flex space-x-4 flex-col items-center gap-6">
<div className="flex flex-col items-center gap-6">
<QRCodeSVG value={address} size={256} />
<Address address={address} format="long" disableAddressLink />
</div>
Expand Down
10 changes: 6 additions & 4 deletions templates/base/packages/nextjs/hooks/scaffold-eth/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
export * from "./useAnimationConfig";
export * from "./useBurnerWallet";
export * from "./useContractLogs";
export * from "./useDeployedContractInfo";
export * from "./useFetchBlocks";
export * from "./useNativeCurrencyPrice";
export * from "./useNetworkColor";
export * from "./useOutsideClick";
export * from "./useScaffoldContract";
export * from "./useScaffoldEventHistory";
export * from "./useScaffoldReadContract";
export * from "./useScaffoldWriteContract";
export * from "./useScaffoldWatchContractEvent";
export * from "./useScaffoldEventHistory";
export * from "./useScaffoldWriteContract";
export * from "./useTargetNetwork";
export * from "./useTransactor";
export * from "./useFetchBlocks";
export * from "./useContractLogs";
export * from "./useWatchBalance";
2 changes: 1 addition & 1 deletion templates/base/packages/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@uniswap/sdk-core": "~4.0.1",
"@uniswap/v2-sdk": "~3.0.1",
"blo": "~1.0.1",
"burner-connector": "^0.0.3",
"burner-connector": "~0.0.5",
"daisyui": "4.5.0",
"next": "~14.0.4",
"next-themes": "~0.2.1",
Expand Down
5 changes: 3 additions & 2 deletions templates/base/packages/nextjs/utils/scaffold-eth/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,9 @@ export type UseScaffoldEventConfig<
>,
> = {
contractName: TContractName;
eventName: TEventName;
} & IsContractDeclarationMissing<
Omit<UseWatchContractEventParameters, "onLogs" | "address" | "abi"> & {
Omit<UseWatchContractEventParameters, "onLogs" | "address" | "abi" | "eventName"> & {
onLogs: (
logs: Simplify<
Omit<Log<bigint, number, any>, "args" | "eventName"> & {
Expand All @@ -225,7 +226,7 @@ export type UseScaffoldEventConfig<
>[],
) => void;
},
Omit<UseWatchContractEventParameters<ContractAbi<TContractName>>, "onLogs" | "address" | "abi"> & {
Omit<UseWatchContractEventParameters<ContractAbi<TContractName>>, "onLogs" | "address" | "abi" | "eventName"> & {
onLogs: (
logs: Simplify<
Omit<Log<bigint, number, false, TEvent, false, [TEvent], TEventName>, "args"> & {
Expand Down
24 changes: 18 additions & 6 deletions templates/base/packages/nextjs/utils/scaffold-eth/getMetadata.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import type { Metadata } from "next";

const baseUrl = process.env.VERCEL_PROJECT_PRODUCTION_URL
? `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`
: `http://localhost:${process.env.PORT || 3000}`;
const titleTemplate = "%s | Scaffold-ETH 2";

export const getMetadata = ({
title,
description,
Expand All @@ -9,15 +14,19 @@ export const getMetadata = ({
description: string;
imageRelativePath?: string;
}): Metadata => {
const baseUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: `http://localhost:${process.env.PORT || 3000}`;
const imageUrl = `${baseUrl}${imageRelativePath}`;

return {
title: title,
title: {
default: title,
template: titleTemplate,
},
description: description,
openGraph: {
title: title,
title: {
default: title,
template: titleTemplate,
},
description: description,
images: [
{
Expand All @@ -26,7 +35,10 @@ export const getMetadata = ({
],
},
twitter: {
title: title,
title: {
default: title,
template: titleTemplate,
},
description: description,
images: [imageUrl],
},
Expand Down

0 comments on commit 510a3ba

Please sign in to comment.