SignTransaction constructor

SignTransaction({
  1. required String fromAddress,
  2. required String chainId,
  3. String? toAddress,
  4. BigInt? weiValue,
  5. String? data,
  6. int? nonce,
  7. BigInt? gasPriceInWei,
  8. BigInt? maxFeePerGas,
  9. BigInt? maxPriorityFeePerGas,
  10. BigInt? gasLimit,
})

Implementation

SignTransaction({
  required String fromAddress,
  required String chainId,
  String? toAddress,
  BigInt? weiValue,
  String? data,
  int? nonce,
  BigInt? gasPriceInWei,
  BigInt? maxFeePerGas,
  BigInt? maxPriorityFeePerGas,
  BigInt? gasLimit,
}) : super(
        method: 'eth_signTransaction',
        paramsJson: jsonEncode({
          'fromAddress': fromAddress,
          'chainId': chainId,
          if (toAddress != null) 'toAddress': toAddress,
          if (weiValue != null) 'weiValue': weiValue.toString(),
          if (data != null) 'data': data,
          if (nonce != null) 'nonce': nonce,
          if (gasPriceInWei != null)
            'gasPriceInWei': gasPriceInWei.toString(),
          if (maxFeePerGas != null) 'maxFeePerGas': maxFeePerGas.toString(),
          if (maxPriorityFeePerGas != null)
            'maxPriorityFeePerGas': maxPriorityFeePerGas.toString(),
          if (gasLimit != null) 'gasLimit': gasLimit.toString(),
        }),
      );