SmartWallet constructor

SmartWallet({
  1. required String abi,
  2. required String scwAddress,
  3. required String entryPointAddress,
  4. required String? ownerAddress,
  5. required int? salt,
  6. required String bundlerURL,
  7. required Signer<_SignerImpl> signer,
  8. required List<String>? plugins,
  9. required bool usePaymaster,
  10. dynamic batch,
  11. PaymasterConfig? paymasterConfig,
})

Implementation

SmartWallet({
  required this.abi,
  required this.scwAddress,
  required this.entryPointAddress,
  required this.ownerAddress,
  required this.salt,
  required this.bundlerURL,
  required this.signer,
  required this.plugins,
  required this.usePaymaster,
  batch,
  PaymasterConfig? paymasterConfig,
}) {
  this.contract = Contract(scwAddress, abi, signer);
  this.factoryAddress = OctacoreSmartAccountFactory().contractAddress;
  if (paymasterConfig != null) {
    this.paymasterConfig = paymasterConfig;
  }
  // this.usePaymaster = usePaymaster;
  if (batch != null) {
    this.batch = batch;
  } else {
    this.batch = {};
  }
  this.isInitialized = null;
  isVerified = true;
  this.deployedContract = DeployedContract(
      ContractAbi.fromJson(abi, "SmartWallet"),
      EthereumAddress.fromHex(scwAddress));

  this.entryPointContract = EntryPoint(
      signer: this.signer, entryPointAddress: this.entryPointAddress);
}