Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: mod/client referrals #152

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

stephancill
Copy link
Contributor

@stephancill stephancill commented Jan 25, 2024

Change Summary

  • Deprecate ENS support in ModManifest's custodyAddress field
  • Append Mod custody address and client referral address to transactions created via Mod to allow for fee revenue sharing

Todo: Indexer and claiming site

Merge Checklist

  • PR has a changeset
  • PR includes documentation if necessary
  • PR updates the rich-embed examples if necessary
  • includes a parallel PR for Mod-starter and the gateway if necessary

Copy link

changeset-bot bot commented Jan 25, 2024

🦋 Changeset detected

Latest commit: 12a98ba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
@mod-protocol/react Minor
@mod-protocol/core Minor
@mods/infura-ipfs-upload Patch
@mods/chatgpt-shorten Patch
@mods/zora-nft-minter Patch
@mods/livepeer-video Patch
@mods/giphy-picker Patch
@mods/image-render Patch
@mods/imgur-upload Patch
@mods/video-render Patch
@mods/zora-create Patch
@mods/nft-minter Patch
@mods/url-render Patch
@mods/chatgpt Patch
@mods/dall-e Patch
web Patch
@mod-protocol/react-ui-shadcn Patch
api Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jan 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 29, 2024 8:40am
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 29, 2024 8:40am
example-nextjs-shadcn ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 29, 2024 8:40am

Copy link
Contributor

@davidfurlong davidfurlong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost there! We should probably also redeploy the example with the new env variable as well

@@ -217,6 +219,7 @@ export default function EditorExample() {
input={getText()}
embeds={getEmbeds()}
api={API_URL}
clientReferralAddress={CLIENT_REFERRAL_ADDRESS}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be changed in the docs as well

};
farcaster?: {
fid?: string;
};
};
clientReferralAddress?: `0x${string}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should have a comment above describing it further; on which chain? EOA required?

I think we should also call it appEthRewardsAddress or something instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will add a comment. I'm not too attached to the name, but I do prefer referring to the party implementing Mod as the client since app could be ambiguous

@@ -933,13 +934,27 @@ export class Renderer {
case "SENDETHTRANSACTION": {
const promise = new Promise<void>((resolve) => {
setTimeout(() => {
/* Populate attribution tags */
const zeroAddress = "0000000000000000000000000000000000000000";
const modTag = this.manifest.custodyAddress.startsWith("0x")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably check that this custodyAddress is valid in other ways, such as the length or characters. I have no idea what happens if you overflow the end of txData here but I don't want to find out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants