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

validate metadata for communities with owner token #541

Merged
merged 12 commits into from
Mar 26, 2024

Conversation

felicio
Copy link
Collaborator

@felicio felicio commented Mar 19, 2024

No description provided.

Copy link

changeset-bot bot commented Mar 19, 2024

🦋 Changeset detected

Latest commit: cbe8806

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

This PR includes changesets to release 1 package
Name Type
@status-im/js Minor

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 Mar 19, 2024

@felicio is attempting to deploy a commit to the Status Team on Vercel.

A member of the Team first needs to authorize it.

@felicio
Copy link
Collaborator Author

felicio commented Mar 19, 2024

@felicio felicio changed the title draft: handle metadata for communities with owner token handle metadata for communities with owner token Mar 20, 2024
['function getEntry(address _communityAddress) view returns (address)'],
this.#provider
)
const ownerContractAddress = await registryContract.getEntry(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

['function signerPublicKey() view returns (bytes)'],
this.#provider
)
const owner = await ownerContract.signerPublicKey()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

note: % cast call --rpc-url https://optimism-mainnet.infura.io/v3/<INFURA_API_KEY> 0x9eDc11E5932372387E76ff3dcF66DB5465893823 "signerPublicKey()" 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004104953f5f0d355b37c39d1d6460a31ed1114455f8263b3fd1b84406c5f12c9eb7dfb76ba7513b92186010928254984fe98aee069b4c7e20f9ea3da497c3ae76947700000000000000000000000000000000000000000000000000000000000000

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The result should match message.signerPublicKey to consider the waku payload valid.

@felicio felicio changed the title handle metadata for communities with owner token validate metadata for communities with owner token Mar 20, 2024
@felicio felicio requested review from a team, jkbktl, prichodko and marcelines March 20, 2024 08:24
@felicio
Copy link
Collaborator Author

felicio commented Mar 21, 2024

@status-im/web ping

// return
// }
} else if (publicKey !== signerPublicKey) {
// todo?: zod
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is not coming from protobufs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What isn't?

The protobufs fields are optional by design.

@felicio
Copy link
Collaborator Author

felicio commented Mar 25, 2024

@status-im/web ping

@felicio felicio self-assigned this Mar 25, 2024
@@ -132,7 +132,7 @@ class Client {
}

static async start(options: ClientOptions): Promise<Client> {
const { environment = 'test' } = options
// const { environment = 'development' } = options
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@felicio felicio merged commit 195e3f9 into status-im:main Mar 26, 2024
2 of 4 checks passed
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.

3 participants