removeOwner method

  1. @override
Future<SafeContractEncodedCall> removeOwner({
  1. required ETHAddress prevOwner,
  2. required ETHAddress owner,
  3. required BigInt threshold,
})
override

"stateMutability": "nonpayable", Removes the specified owner from the Safe and updates the signature threshold.

This operation can only be performed through a Safe transaction.

Parameters:

  • prevOwner: The owner address that precedes the owner to be removed in the internal linked list of owners. If the owner to remove is the first (or only) element in the list, prevOwner must be set to the sentinel address 0x1 (referred to as SENTINEL_OWNERS in the implementation).
  • owner: The owner address to remove from the Safe.
  • threshold: The new threshold value to apply after the removal.

Implementation

@override
Future<SafeContractEncodedCall> removeOwner({
  required ETHAddress prevOwner,
  required ETHAddress owner,
  required BigInt threshold,
}) async {
  final params = [prevOwner, owner, threshold];
  return encodeTransactionCall(
    functionName: SafeContractFunction.removeOwner,
    params: params,
  );
}