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: add advanced contract condition for gated-content #555

Conversation

zannis
Copy link
Collaborator

@zannis zannis commented Oct 2, 2023

No description provided.

@height
Copy link

height bot commented Oct 2, 2023

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@changeset-bot
Copy link

changeset-bot bot commented Oct 2, 2023

⚠️ No Changeset found

Latest commit: a9b46b5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link

vercel bot commented Oct 2, 2023

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

Name Status Preview Updated (UTC)
lens-sdk-example-web-wagmi ✅ Ready (Inspect) Visit Preview Oct 6, 2023 2:49pm

Copy link
Member

Choose a reason for hiding this comment

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

Are all these changes intentional?

The peer dependencies are meant to be satisfied by the @lens-protocol/client (and later by the @lens-protocol/react) packages as this package is not a standalone public package.

value: ':userAddress',
...overrides,
};
}
Copy link
Member

Choose a reason for hiding this comment

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

I see this helper but not use of it, was a test suite meant to be checked-in?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah tests are still WIP, will push them soon

);

// for bool, array, tuple results we only allow equal/not equal
if (['bool', 'array', 'tuple'].includes(fn.outputs[0].baseType)) {
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be codified in the type and validation within the @lens-protocol/metadata package.

contract: toRawNetworkAddress(gqlCondition.contract),
abi: gqlCondition.abi,
functionName: gqlCondition.functionName,
params: gqlCondition.params as string[],
Copy link
Member

Choose a reason for hiding this comment

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

is this because of a readonly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah, open to suggestions to clean this up

@cesarenaldi cesarenaldi force-pushed the T-14357/token-gated-pub-v3 branch 2 times, most recently from d1e3dde to 24d2c0e Compare October 3, 2023 07:57
Base automatically changed from T-14357/token-gated-pub-v3 to lens-v2 October 3, 2023 14:59
@zannis zannis force-pushed the T-14262/support-full-spectrum-of-lit-protocol-access-control branch from ad4cc0a to a9b46b5 Compare October 6, 2023 14:48
@@ -194,6 +196,19 @@ function toRawSimpleCondition(gqlCondition: gql.ThirdTierCondition): raw.SimpleC
follow: raw.toProfileId(gqlCondition.follow),
});

case 'AdvancedContractCondition':
return {
Copy link
Member

Choose a reason for hiding this comment

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

use the new raw.advancedContractCondition builder, it should reduce the boilerplate code here. Don't know if it can solve the readonly. Minor thing anyway.

@@ -45,6 +45,9 @@
},
"license": "MIT",
"dependencies": {
"@ethersproject/abi": "^5.7.0",
"@ethersproject/address": "^5.7.0",
"@ethersproject/bignumber": "^5.7.0",
Copy link
Member

Choose a reason for hiding this comment

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

Unless something is changed these should stay as peer dependency only. Maybe there is an issue somewhere else, can you please clarify what made you make this change?

@cesarenaldi
Copy link
Member

Merged here: #707

@cesarenaldi cesarenaldi deleted the T-14262/support-full-spectrum-of-lit-protocol-access-control branch February 15, 2024 07:22
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