* feat: superchain farcaster frame * chore: frame images * chore: cleanup * chore: updates * chore: update plan image * chore: update pnpm lock yaml * chore: replace frame to be on superchain page
60 lines
1.2 KiB
TypeScript
60 lines
1.2 KiB
TypeScript
import { FrameMetadataType } from "@coinbase/onchainkit";
|
|
import { getAbsoluteUrl } from "./vercel-utils";
|
|
|
|
export const superchainFrameChains = {
|
|
optimism: {
|
|
name: "optimism",
|
|
frameContentText: "OP Mainnet",
|
|
},
|
|
base: {
|
|
name: "base",
|
|
frameContentText: "Base",
|
|
},
|
|
zora: {
|
|
name: "zora",
|
|
frameContentText: "Zora",
|
|
},
|
|
other: {
|
|
name: "other",
|
|
frameContentText: "Other",
|
|
},
|
|
};
|
|
|
|
export const growthPlanFrameMetaData = (
|
|
chainName: string,
|
|
): FrameMetadataType => {
|
|
return {
|
|
buttons: [
|
|
{
|
|
label: "$250",
|
|
action: `post`,
|
|
},
|
|
{
|
|
label: "$2,500",
|
|
action: `post`,
|
|
},
|
|
{
|
|
label: "$3,000",
|
|
action: `post`,
|
|
},
|
|
],
|
|
image: `${getAbsoluteUrl()}/assets/dashboard/growth.png`,
|
|
post_url: `${getAbsoluteUrl()}/api/frame/superchain?action=growth&chain=${chainName}`,
|
|
};
|
|
};
|
|
|
|
export const finalGrowthPlanFrameMetaData = (
|
|
imgUrl: string,
|
|
): FrameMetadataType => {
|
|
return {
|
|
buttons: [
|
|
{
|
|
label: "Apply for Superchain credits",
|
|
action: `post_redirect`,
|
|
},
|
|
],
|
|
image: imgUrl,
|
|
post_url: `${getAbsoluteUrl()}/api/frame/superchain?action=final`,
|
|
};
|
|
};
|