Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions near-plugins/src/ownable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ pub trait Ownable {
fn owner_set(&mut self, owner: Option<AccountId>);

/// Return true if the predecessor account id is the owner of the contract.
///
/// # View calls
///
/// This method fails in view calls since getting the predecessor account id is [not allowed] in
/// view calls. A workaround is using [`Self::owner_get`] and checking the returned account id.
///
/// [not allowed]: https://nomicon.io/Proposals/view-change-method
fn owner_is(&self) -> bool;
}

Expand Down