Skip to content

Commit

Permalink
ref: Made events consistent add description for required events(ref: O…
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkLord017 committed Jan 21, 2025
1 parent 697e2ca commit eeacf7e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
11 changes: 5 additions & 6 deletions contracts/src/access/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ impl AccessControl {
///
/// # Errors
///
/// If [`msg::sender`] has not been granted `role`, then the error
/// [`Error::UnauthorizedAccount`] is returned.
/// * [`Error::UnauthorizedAccount`] - If [`msg::sender`] has not been
/// granted `role`.
pub fn only_role(&self, role: B256) -> Result<(), Error> {
self._check_role(role, msg::sender())
}
Expand Down Expand Up @@ -182,8 +182,8 @@ impl AccessControl {
///
/// # Errors
///
/// If [`msg::sender`] has not been granted `role`, then the error
/// [`Error::UnauthorizedAccount`] is returned.
/// * [`Error::UnauthorizedAccount`] - If [`msg::sender`] has not been
/// granted `role`.
///
/// # Events
///
Expand Down Expand Up @@ -256,8 +256,7 @@ impl AccessControl {
///
/// # Events
///
/// * If the calling account has its `role` revoked, emits a [`RoleRevoked`]
/// event.
/// * [`RoleRevoked`] - If the calling account has its `role` revoked.
pub fn renounce_role(
&mut self,
role: B256,
Expand Down
8 changes: 4 additions & 4 deletions contracts/src/finance/vesting_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ pub trait IVestingWallet {
///
/// # Events
///
/// * Emits an [`ownable::OwnershipTransferred`] event.
/// * [`ownable::OwnershipTransferred`]
fn transfer_ownership(
&mut self,
new_owner: Address,
Expand All @@ -195,7 +195,7 @@ pub trait IVestingWallet {
///
/// # Events
///
/// * Emits an [`ownable::OwnershipTransferred`] event.
/// * [`ownable::OwnershipTransferred`]
fn renounce_ownership(&mut self) -> Result<(), Self::Error>;

/// The contract should be able to receive Ether.
Expand Down Expand Up @@ -290,7 +290,7 @@ pub trait IVestingWallet {
///
/// # Events
///
/// * Emits an [`EtherReleased`] event.
/// * [`EtherReleased`]
///
/// # Panics
///
Expand All @@ -315,7 +315,7 @@ pub trait IVestingWallet {
///
/// # Events
///
/// * Emits an [`ERC20Released`] event.
/// * [`ERC20Released`]
///
/// # Panics
///
Expand Down
4 changes: 2 additions & 2 deletions contracts/src/token/erc1155/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ pub trait IErc1155 {
///
/// # Events
///
/// * [`TransferSingle`] or a [`TransferBatch`] - depending on the length of
/// the array arguments.
/// * [`TransferSingle`] - if the arrays contain one element.
/// * [`TransferBatch`] - if the arrays contain multiple elements.
fn safe_batch_transfer_from(
&mut self,
from: Address,
Expand Down
4 changes: 4 additions & 0 deletions contracts/src/token/erc1155/receiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ sol_interface! {
/// this must return [`super::SINGLE_TRANSFER_FN_SELECTOR`],
/// or its own function selector.
///
/// # Arguments
///
/// * `operator` - The address which initiated the transfer.
/// * `from` - The address which previously owned the token.
/// * `id` - The ID of the token being transferred.
Expand All @@ -42,6 +44,8 @@ sol_interface! {
/// this must return [`super::BATCH_TRANSFER_FN_SELECTOR`],
/// or its own function selector.
///
/// # Arguments
///
/// * `operator` - The address which initiated the batch transfer.
/// * `from` - The address which previously owned the token.
/// * `ids` - An array containing ids of each token being transferred
Expand Down

0 comments on commit eeacf7e

Please sign in to comment.