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: As a developer, I or portal owner should be able to revoke or replace the attestation #547

Conversation

satyajeetkolhapure
Copy link
Collaborator

@satyajeetkolhapure satyajeetkolhapure commented Jan 24, 2024

What does this PR do?

Along with the portal owner, an attester who attested the attestation should be able to revoke or replace his attestation too.

Related ticket

Fixes #546

Type of change

  • Chore
  • Bug fix
  • New feature
  • Documentation update

Check list

  • Unit tests for any smart contract change
  • Contracts and functions are documented

Copy link
Contributor

@github-actions github-actions bot temporarily deployed to pull request January 24, 2024 13:22 Inactive
*/
function bulkReplace(
bytes32[] calldata attestationIds,
AttestationPayload[] calldata attestationPayloads,
address attester
address replacer
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will this introduce breaking changes for existing portals?

*/
function revoke(bytes32 attestationId) public {
function revoke(bytes32 attestationId, address revoker) public {
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the revoker argument is being specified by the contract calling this method, then surely it can be spoofed? Am I wrong?

Copy link
Collaborator Author

@satyajeetkolhapure satyajeetkolhapure Jan 24, 2024

Choose a reason for hiding this comment

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

Actually, the Attestation registry will always be called from the portal that has implemented the abstract portal. The abstract portal has revoke and replace methods that cannot be overridden. The abstract portal has getAttester method which returns msg sender.

As it is recommended not to use tx origin, the best way is to get the attester from the Abstract portal.

I will still have a look if there is any possibility of it.

@alainncls alainncls force-pushed the dev branch 4 times, most recently from 581c2b6 to f607329 Compare March 23, 2024 10:27
@alainncls
Copy link
Collaborator

Stale

@alainncls alainncls closed this Jun 7, 2024
@alainncls alainncls deleted the feat/as-a-developer-i-or-portal-owner-should-be-able-to-revoke-or-replace-the-attestation branch August 19, 2024 12:52
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.

[US] As a developer, I or portal owner should be able to revoke or replace the attestation
4 participants