Пост
Поделитесь своими знаниями.
Capability-Based Access Control
How does Move handle access control compared to Solidity’s onlyOwner?
- Move
Ответы
4Use capability resources; functions require the capability as an argument, ensuring only authorized accounts can execute privileged actions.
When you use meaningful resource URIs, implement HATEOAS, and follow HTTP status codes semantically RESTful will definitely turn out the best API for use.
Move handles access control through capabilities, which are first-class resources representing authority over specific actions or objects. Unlike Solidity’s onlyOwner modifier, which relies on runtime checks against a single owner address, Move enforces permissions at the type level: functions requiring sensitive operations must receive the appropriate capability as an argument, and only accounts or modules holding that capability can invoke them. This enables fine-grained, composable, and transferable permissions, supports delegation or revocation, and guarantees at compile time that unauthorized operations are impossible. By leveraging the type system and resource semantics, Move provides a more secure and flexible alternative to owner-based access control patterns.
You handle access control in Move through a capability-based system instead of global checks like Solidity’s onlyOwner
. In Move, special objects called capabilities (for example, MintCap
or BurnCap
) are created and given only to authorized accounts, and whoever holds that capability can perform the restricted action. This means you don’t rely on a single hardcoded address but on possession of a unique resource object that can be transferred, revoked, or stored safely. Because capabilities follow Move’s strict ownership rules, no one can copy or fake them, which makes access control both flexible and secure.
Знаете ответ?
Пожалуйста, войдите в систему и поделитесь им.
Sui is a Layer 1 protocol blockchain designed as the first internet-scale programmable blockchain platform.
Заработай свою долю из 1000 Sui
Зарабатывай очки репутации и получай награды за помощь в развитии сообщества Sui.

- 24p30p... SUI+2681
1
- Dpodium.js... SUI+2411
2
- Gifted.eth... SUI+2256
3
- ... SUIJeff+2205
- ... SUIJK spike+2175
- ... SUIcasey+2106
- ... SUIMatthardy+1777
- ... SUIjakodelarin+1040
- ... SUIChubbycheeks +898
- ... SUItolexwills47+783
- Почему BCS требует точного порядка полей для десериализации, когда структуры Move содержат именованные поля?65
- «Ошибки проверки нескольких источников» в публикациях модуля Sui Move — автоматическое устранение ошибок55
- Сбой транзакции Sui: объекты, зарезервированные для другой транзакции49
- Ошибка Sui Move — невозможно обработать транзакцию Не найдено действительных газовых монет для транзакции315
- Как максимизировать прибыль, держа SUI: стейкинг и ликвидный стейкинг212