Skip to content

Instantly share code, notes, and snippets.

@isaac-martin
Created March 14, 2024 23:32
Show Gist options
  • Select an option

  • Save isaac-martin/5d630b206b8e823f9b4d9823a2da41f7 to your computer and use it in GitHub Desktop.

Select an option

Save isaac-martin/5d630b206b8e823f9b4d9823a2da41f7 to your computer and use it in GitHub Desktop.

Revisions

  1. isaac-martin created this gist Mar 14, 2024.
    28 changes: 28 additions & 0 deletions .ts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    export const buildPaywallConfig = (
    address: string,
    memberLevel: MembershipLevel,
    metaData: Array<Record<any, any>> | null,
    endingCallToAction = "Go to profile"
    ) => {
    const lockAddress = contractAddresses[memberLevel];
    return {
    icon: "https://www.bestdishever.nyc/bde-logomark.png",
    locks: {
    [lockAddress]: {
    network: 43114,
    skipRecipient: true,
    },
    },
    title: `Best Dish Ever ${memberLevel.charAt(0).toUpperCase() + memberLevel.slice(1)} Membership`,
    referrer: "",
    skipSelect: true,
    hideSoldOut: false,
    pessimistic: true,
    messageToSign: "",
    skipRecipient: true,
    endingCallToAction,
    expectedAddress: address,
    persistentCheckout: false,
    metadataInputs: metaData && metaData,
    };
    };