Repository: unionlabs/union
File: cosmwasm/access-managed/src/lib.rs (Rust)

Code before:
//! CosmWasm implementation of [OpenZeppelin][oz]'s [`AccessManaged.sol`][am].
//!
//! This contract module makes available a [`Restricted<T>`] wrapper. This should wrap the
//! `ExecuteMsg` for the contract. All entrypoints will be permissioned according to an "authority":
//! a contract like `access_manager` that follows the [`ExecuteMsg`][me]/[`QueryMsg`][mq] interface,
//! implementing a policy that allows certain callers to access certain functions.
//!
//! NOTE: The [`Restricted<T>`] wrapper will apply access control to *all* methods by default.
//! Internal methods can be marked as such by prefixing the json name with
//! [`Selector::INTERNAL_PREFIX`][access_manager_types::Selector::INTERNAL_PREFIX] with
//! `#[serde(rename)]`, however this will make the methods fully public to call and access must be
//! checked by the access managed contract itself.
//!
//! [me]: access_manager_types::manager::msg::ExecuteMsg
//! [mq]: access_manager_types::manager::msg::QueryMsg
//! [oz]: https://www.openzeppelin.com
//! [am]: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.4.0/contracts/access/manager/AccessManaged.sol
//! [et]: https://serde.rs/enum-representations.html#externally-tagged
//! [selector]: https://docs.soliditylang.org/en/latest/abi-spec.html#function-selector

#![warn(clippy::pedantic)]
#![allow(
    clippy::used_underscore_items,
    clippy::missing_errors_doc,
    clippy::enum_glob_use,
    clippy::doc_markdown
)]
#![cfg_attr(not(test), warn(clippy::unwrap_used))]
#![cfg_attr(test, allow(clippy::too_many_lines))]

use access_manager_types::managed::msg::{ExecuteMsg, InitMsg, MigrateMsg, QueryMsg};
use cosmwasm_std::{
    Binary, Deps, DepsMut, Env, MessageInfo, Reply, Response, StdError, to_json_binary,
};

Review comment (suggestion):
```suggestion
//! Internal methods can be marked as such by prefixing the JSON name with
```

Code after:
//! CosmWasm implementation of [OpenZeppelin][oz]'s [`AccessManaged.sol`][am].
//!
//! This contract module makes available a [`Restricted<T>`] wrapper. This should wrap the
//! `ExecuteMsg` for the contract. All entrypoints will be permissioned according to an "authority":
//! a contract like `access_manager` that follows the [`ExecuteMsg`][me]/[`QueryMsg`][mq] interface,
//! implementing a policy that allows certain callers to access certain functions.
//!
//! NOTE: The [`Restricted<T>`] wrapper will apply access control to *all* methods by default.
//! Internal methods can be marked as such by prefixing the JSON name with
//! [`Selector::INTERNAL_PREFIX`][access_manager_types::Selector::INTERNAL_PREFIX] with
//! `#[serde(rename)]`, however this will make the methods fully public to call and access must be
//! checked by the access managed contract itself.
//!
//! [me]: access_manager_types::manager::msg::ExecuteMsg
//! [mq]: access_manager_types::manager::msg::QueryMsg
//! [oz]: https://www.openzeppelin.com
//! [am]: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.4.0/contracts/access/manager/AccessManaged.sol
//! [et]: https://serde.rs/enum-representations.html#externally-tagged
//! [selector]: https://docs.soliditylang.org/en/latest/abi-spec.html#function-selector

#![warn(clippy::pedantic)]
#![allow(
    clippy::used_underscore_items,
    clippy::missing_errors_doc,
    clippy::enum_glob_use,
    clippy::doc_markdown
)]
#![cfg_attr(not(test), warn(clippy::unwrap_used))]
#![cfg_attr(test, allow(clippy::too_many_lines))]

use access_manager_types::managed::msg::{ExecuteMsg, InitMsg, MigrateMsg, QueryMsg};
use cosmwasm_std::{
    Binary, Deps, DepsMut, Env, MessageInfo, Reply, Response, StdError, to_json_binary,
};