InternalTrait
Fully qualified path: openzeppelin_governance::multisig::multisig::MultisigComponent::InternalTrait
pub trait InternalTrait<TContractState, +HasComponent<TContractState>, +Drop<TContractState>>
Trait functions
initializer
Initializes the Multisig component with the initial quorum and signers.
This function must be called during contract initialization to set up the initial state.
Requirements:
quorummust be non-zero and less than or equal to the number ofsigners.
Emits a SignerAdded event for each signer added.
Emits a QuorumUpdated event.
Fully qualified path: openzeppelin_governance::multisig::multisig::MultisigComponent::InternalTrait::initializer
fn initializer(
ref self: ComponentState<TContractState>, quorum: u32, signers: Span<ContractAddress>,
)
resolve_tx_state
Resolves and returns the current state of the transaction with the given id.
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.Executed: the transaction has been executed.
Fully qualified path: openzeppelin_governance::multisig::multisig::MultisigComponent::InternalTrait::resolve_tx_state
fn resolve_tx_state(self: @ComponentState<TContractState>, id: felt252) -> TransactionState
assert_one_of_signers
Asserts that the caller is one of the registered signers.
Requirements:
- The
callermust be a registered signer.
Fully qualified path: openzeppelin_governance::multisig::multisig::MultisigComponent::InternalTrait::assert_one_of_signers
fn assert_one_of_signers(self: @ComponentState<TContractState>, caller: ContractAddress)
assert_tx_exists
Asserts that a transaction with the given id exists.
Requirements:
- The transaction with the given
idmust have been submitted.
Fully qualified path: openzeppelin_governance::multisig::multisig::MultisigComponent::InternalTrait::assert_tx_exists
fn assert_tx_exists(self: @ComponentState<TContractState>, id: felt252)
assert_only_self
Asserts that the caller is the contract itself.
Requirements:
- The caller must be the contract’s own address.
Fully qualified path: openzeppelin_governance::multisig::multisig::MultisigComponent::InternalTrait::assert_only_self
fn assert_only_self(self: @ComponentState<TContractState>)
_add_signers
Adds new signers and updates the quorum.
Requirements:
- Each signer address must be non-zero.
new_quorummust 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.
Fully qualified path: openzeppelin_governance::multisig::multisig::MultisigComponent::InternalTrait::_add_signers
fn _add_signers(
ref self: ComponentState<TContractState>,
new_quorum: u32,
signers_to_add: Span<ContractAddress>,
)
_remove_signers
Removes existing signers and updates the quorum.
Requirements:
new_quorummust 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.
Fully qualified path: openzeppelin_governance::multisig::multisig::MultisigComponent::InternalTrait::_remove_signers
fn _remove_signers(
ref self: ComponentState<TContractState>,
new_quorum: u32,
signers_to_remove: Span<ContractAddress>,
)
_replace_signer
Replaces an existing signer with a new signer.
Requirements:
signer_to_removemust be an existing signer.signer_to_addmust not be an existing signer.signer_to_addmust be a non-zero address.
Emits a SignerRemoved event for the removed signer.
Emits a SignerAdded event for the new signer.
Fully qualified path: openzeppelin_governance::multisig::multisig::MultisigComponent::InternalTrait::_replace_signer
fn _replace_signer(
ref self: ComponentState<TContractState>,
signer_to_remove: ContractAddress,
signer_to_add: ContractAddress,
)
_change_quorum
Updates the quorum value to new_quorum if it differs from the current quorum.
Requirements:
new_quorummust be non-zero.new_quorummust be less than or equal to the total number of signers.
Emits a QuorumUpdated event if the quorum changes.
Fully qualified path: openzeppelin_governance::multisig::multisig::MultisigComponent::InternalTrait::_change_quorum
fn _change_quorum(ref self: ComponentState<TContractState>, new_quorum: u32)