Skip to content

Commit 67abb33

Browse files
authored
ownable 2-step transfer note (#328)
* ownable note * typo
1 parent 6e9f32e commit 67abb33

File tree

1 file changed

+11
-1
lines changed
  • packages/access/ownable/src

1 file changed

+11
-1
lines changed

packages/access/ownable/src/lib.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Ownable Contract Module.
1+
//! # Ownable Contract Module.
22
//!
33
//! This module introduces a simple access control mechanism where a contract
44
//! has an account (owner) that can be granted exclusive access to specific
@@ -19,6 +19,16 @@
1919
//! ```
2020
//!
2121
//! See `examples/ownable/src/contract.rs` for a working example.
22+
//!
23+
//! ## Note
24+
//!
25+
//! The ownership transfer is processed in 2 steps:
26+
//!
27+
//! 1. Initiating the ownership transfer by the current owner
28+
//! 2. Accepting the ownership by the designated owner
29+
//!
30+
//! Not providing a direct ownership transfer is a deliberate design decision to
31+
//! help avoid mistakes by transferring to a wrong address.
2232
2333
#![no_std]
2434

0 commit comments

Comments
 (0)