Skip to content

Commit

Permalink
Run linter
Browse files Browse the repository at this point in the history
  • Loading branch information
immrsd committed Nov 7, 2024
1 parent ffa80fb commit f3c0f9d
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions packages/governance/src/multisig/multisig.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
///
/// Component that implements a multi-signature mechanism to enhance the security and governance
/// of smart contract transactions. It requires multiple registered signers to collectively approve
/// and execute transactions, ensuring that no single signer can perform critical actions unilaterally.
/// and execute transactions, ensuring that no single signer can perform critical actions
/// unilaterally.
///
/// By default, this component is self-administered, meaning modifications to signers or quorum must
/// be performed by the contract itself through the multisig approval process. Only registered signers
/// can submit, confirm, revoke, or execute transactions. A common use case is to secure important
/// operations by requiring multiple approvals, such as in fund management or protocol governance.
/// be performed by the contract itself through the multisig approval process. Only registered
/// signers can submit, confirm, revoke, or execute transactions. A common use case is to secure
/// important operations by requiring multiple approvals, such as in fund management or protocol
/// governance.
#[starknet::component]
pub mod MultisigComponent {
use core::hash::{HashStateTrait, HashStateExTrait};
Expand Down Expand Up @@ -165,7 +167,8 @@ pub mod MultisigComponent {
}
}

/// Returns whether the transaction with the given `id` has been confirmed by the specified `signer`.
/// Returns whether the transaction with the given `id` has been confirmed by the specified
/// `signer`.
fn is_confirmed_by(
self: @ComponentState<TContractState>, id: TransactionID, signer: ContractAddress
) -> bool {
Expand All @@ -182,7 +185,8 @@ pub mod MultisigComponent {
/// The possible states are:
/// - `NotFound`: The transaction does not exist.
/// - `Pending`: The transaction exists but hasn't reached the required confirmations.
/// - `Confirmed`: The transaction has reached the required confirmations but hasn't been executed.
/// - `Confirmed`: The transaction has reached the required confirmations but hasn't been
/// executed.
/// - `Executed`: The transaction has been executed.
fn get_transaction_state(
self: @ComponentState<TContractState>, id: TransactionID
Expand Down Expand Up @@ -456,7 +460,8 @@ pub mod MultisigComponent {
/// The possible states are:
/// - `NotFound`: The transaction does not exist.
/// - `Pending`: The transaction exists but hasn't reached the required confirmations.
/// - `Confirmed`: The transaction has reached the required confirmations but hasn't been executed.
/// - `Confirmed`: The transaction has reached the required confirmations but hasn't been
/// executed.
/// - `Executed`: The transaction has been executed.
fn resolve_tx_state(
self: @ComponentState<TContractState>, id: TransactionID
Expand Down Expand Up @@ -516,7 +521,8 @@ pub mod MultisigComponent {
/// Requirements:
///
/// - Each signer address must be non-zero.
/// - `new_quorum` must be non-zero and less than or equal to the total number of signers after addition.
/// - `new_quorum` must be non-zero and less than or equal to the total number of signers
/// after addition.
///
/// Emits a `SignerAdded` event for each new signer added.
/// Emits a `QuorumUpdated` event if the quorum changes.
Expand Down Expand Up @@ -550,7 +556,8 @@ pub mod MultisigComponent {
///
/// Requirements:
///
/// - `new_quorum` must be non-zero and less than or equal to the total number of signers after removal.
/// - `new_quorum` must be non-zero and less than or equal to the total number of signers
/// after removal.
///
/// Emits a `SignerRemoved` event for each signer removed.
/// Emits a `QuorumUpdated` event if the quorum changes.
Expand Down

0 comments on commit f3c0f9d

Please sign in to comment.