Skip to content

Commit

Permalink
fix: onlyDelegatecall
Browse files Browse the repository at this point in the history
  • Loading branch information
yonadaa committed Jan 19, 2024
1 parent c7e270b commit eaea087
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ contract AccessManagementSystem is System, LimitedCallContext {
* @param namespaceId The ID of the namespace to transfer ownership.
* @param newOwner The address to which ownership should be transferred.
*/
function transferOwnership(ResourceId namespaceId, address newOwner) public virtual {
function transferOwnership(ResourceId namespaceId, address newOwner) public virtual onlyDelegatecall {
// Require the namespace ID to be a valid namespace
requireNamespace(namespaceId);

Expand All @@ -77,7 +77,7 @@ contract AccessManagementSystem is System, LimitedCallContext {
* @dev Requires the caller to own the namespace. Revoke ResourceAccess for previous owner
* @param namespaceId The ID of the namespace to transfer ownership.
*/
function renounceOwnership(ResourceId namespaceId) public virtual {
function renounceOwnership(ResourceId namespaceId) public virtual onlyDelegatecall {
// Require the namespace ID to be a valid namespace
requireNamespace(namespaceId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ contract WorldRegistrationSystem is System, IWorldErrors, LimitedCallContext {
* @dev Creates a new namespace resource with the given ID
* @param namespaceId The unique identifier for the new namespace
*/
function registerNamespace(ResourceId namespaceId) public virtual {
function registerNamespace(ResourceId namespaceId) public virtual onlyDelegatecall {
// Require namespace ID to be a valid namespace
requireNamespace(namespaceId);

Expand Down Expand Up @@ -289,7 +289,7 @@ contract WorldRegistrationSystem is System, IWorldErrors, LimitedCallContext {
* @dev Deletes the new delegation from the caller to the specified delegatee
* @param delegatee The address of the delegatee
*/
function unregisterDelegation(address delegatee) public {
function unregisterDelegation(address delegatee) public onlyDelegatecall {
// Delete the delegation control contract address
UserDelegationControl.deleteRecord({ delegator: _msgSender(), delegatee: delegatee });
}
Expand All @@ -305,7 +305,7 @@ contract WorldRegistrationSystem is System, IWorldErrors, LimitedCallContext {
ResourceId namespaceId,
ResourceId delegationControlId,
bytes memory initCallData
) public {
) public onlyDelegatecall {
// Require namespace ID to be a valid namespace
requireNamespace(namespaceId);

Expand Down Expand Up @@ -340,7 +340,7 @@ contract WorldRegistrationSystem is System, IWorldErrors, LimitedCallContext {
* @dev Deletes the delegation control for a specific namespace
* @param namespaceId The ID of the namespace
*/
function unregisterNamespaceDelegation(ResourceId namespaceId) public {
function unregisterNamespaceDelegation(ResourceId namespaceId) public onlyDelegatecall {
// Require namespace ID to be a valid namespace
requireNamespace(namespaceId);

Expand Down

0 comments on commit eaea087

Please sign in to comment.