cancelAsMultiMethod static method

Uint8List cancelAsMultiMethod({
  1. required ChainInfo chainInfo,
  2. required List<Uint8List> otherSignatories,
  3. required int threshold,
  4. required Uint8List callHash,
  5. required MultisigStorage? multiSigStorage,
})

Creates the approval method call for the multisig transaction.

Note: It does not submit the transaction to the chain.

Implementation

static Uint8List cancelAsMultiMethod(
    {required ChainInfo chainInfo,
    required List<Uint8List> otherSignatories,
    required int threshold,
    required Uint8List callHash,
    required MultisigStorage? multiSigStorage}) {
  final cancelArgument = MapEntry(
    'Multisig',
    MapEntry(
      'cancel_as_multi',
      {
        'threshold': threshold,
        'other_signatories': otherSignatories,
        'timepoint': multiSigStorage!.timePoint.toMap(),
        'call_hash': callHash,
      },
    ),
  );
  final ByteOutput output = ByteOutput();

  chainInfo.scaleCodec.registry.codecs['Call']!
      .encodeTo(cancelArgument, output);
  return output.toBytes();
}