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(world): allow transferring ownership of namespaces #1274

Merged
merged 12 commits into from
Sep 1, 2023

Conversation

johngrantuk
Copy link
Contributor

@johngrantuk johngrantuk commented Aug 10, 2023

fixes #1016

  • Add new transferOwner function to AccessManagementSystem
    • Sets new owner using NamespaceOwner.set
    • Grants access to new owner using ResourceAccess.set
    • Revokes access to previous owner using ResourceAccess.deleteRecord
  • Register transferOwner to CoreModule functionSelectors
  • Add test in World.t.sol

@changeset-bot
Copy link

changeset-bot bot commented Aug 10, 2023

🦋 Changeset detected

Latest commit: c98846f

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

This PR includes changesets to release 27 packages
Name Type
@latticexyz/world Major
@latticexyz/cli Major
@latticexyz/dev-tools Major
@latticexyz/store-sync Major
@latticexyz/store-indexer Major
@latticexyz/block-logs-stream Major
@latticexyz/common Major
@latticexyz/config Major
create-mud Major
@latticexyz/ecs-browser Major
@latticexyz/gas-report Major
@latticexyz/network Major
@latticexyz/noise Major
@latticexyz/phaserx Major
@latticexyz/protocol-parser Major
@latticexyz/react Major
@latticexyz/recs Major
@latticexyz/schema-type Major
@latticexyz/services Major
@latticexyz/solecs Major
solhint-config-mud Major
solhint-plugin-mud Major
@latticexyz/std-client Major
@latticexyz/std-contracts Major
@latticexyz/store-cache Major
@latticexyz/store Major
@latticexyz/utils Major

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

holic
holic previously approved these changes Aug 10, 2023
Copy link
Member

@holic holic left a comment

Choose a reason for hiding this comment

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

Other than naming, looks good to me! Will defer to @alvrs in case he's got other API ideas for this.

@johngrantuk johngrantuk requested a review from alvrs August 11, 2023 14:43
@alvrs
Copy link
Member

alvrs commented Aug 14, 2023

Should we add one test for the transfer reverting if the caller is not the owner?

alvrs
alvrs previously approved these changes Sep 1, 2023
Copy link
Member

@alvrs alvrs left a comment

Choose a reason for hiding this comment

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

thank you!

@alvrs alvrs changed the title feat: allow transferring ownership of namespaces feat(world): allow transferring ownership of namespaces Sep 1, 2023
@alvrs alvrs merged commit c583f3c into latticexyz:main Sep 1, 2023
@github-actions github-actions bot mentioned this pull request Sep 1, 2023
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.

allow transferring ownership of namespaces
3 participants