MultisigStorage class

Represents the on-chain storage state of a multisig transaction

This class decodes and manages the storage data for pending multisig transactions. It helps check approval status before submitting transactions to avoid wasting gas fees.

Example:

// Fetch storage for a pending transaction
final storage = await MultisigStorage.fetch(
  provider: provider,
  multisigAddress: signatories.multisigAddress,
  callHash: callHash,
  registry: chainInfo.registry,
);

if (storage == null) {
  print('No pending transaction found');
} else if (storage.hasApproved(alice.address)) {
  print('Alice already approved');
} else {
  print('Alice can approve');
}

Properties

approvals List<Uint8List>
The raw approval bytes for comparison
final
deposit BigInt
Amount deposited for storage (refunded on execution/cancel)
final
depositor Uint8List
Address of who initiated the transaction (gets deposit back)
final
hashCode int
The hash code for this object.
no setterinherited
props List<Object>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
when TimePoint
When the multisig transaction was initiated
final

Methods

getStatus({required int threshold, String? signerAddress}) MultisigStorageStatus
Create storage status summary
hasApproved(String address) bool
Check if an address has already approved
isComplete(int threshold) bool
Check if already fully approved
isDepositor(String address) bool
Check if this is the depositor (transaction initiator)
isFinalApproval(int threshold) bool
Check if this would be the final approval
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
progress(int threshold) → ({int current, int requiredApprovals})
Get approval progress
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fetch({required Provider provider, required Uint8List multisigPubkey, required Uint8List callHash}) Future<MultisigStorage?>
Fetch multisig storage from chain