calculateCreateProxyWithNonceAddress method

  1. @override
Future<SafeContractEncodedCall> calculateCreateProxyWithNonceAddress({
  1. required ETHAddress singleton,
  2. required List<int> initializer,
  3. required BigInt saltNonce,
})
override

Allows getting the address for a new proxy contract created via createProxyWithNonce. This method is only meant for address calculation purposes when you use an initializer that would revert. Therefore, the response is returned with a revert. When calling this method, set from to the address of the proxy factory.

singleton Address of the master copy. initializer Payload for the message call sent to the new proxy contract. saltNonce Nonce that will be used to generate the salt to calculate the address of the new proxy contract.

Implementation

@override
Future<SafeContractEncodedCall> calculateCreateProxyWithNonceAddress({
  required ETHAddress singleton,
  required List<int> initializer,
  required BigInt saltNonce,
}) async {
  final params = [singleton, initializer, saltNonce];
  return encodeTransactionCall(
    functionName: SafeContractFunction.calculateCreateProxyWithNonceAddress,
    params: params,
  );
}