SmartWallet constructor

SmartWallet({
  1. required String abi,
  2. required String scwAddress,
  3. dynamic provider,
  4. required EntryPointWithoutSigner entryPointContract,
  5. required String entryPointAddress,
  6. required String? ownerAddress,
  7. required int? salt,
  8. required String bundlerURL,
  9. required String rpcURL,
  10. required List<String>? modules,
  11. dynamic usePaymaster,
  12. dynamic batch,
  13. PaymasterConfig? paymasterConfig,
})

Implementation

SmartWallet({
  required this.abi,
  required this.scwAddress,
  provider,
  required this.entryPointContract,
  required this.entryPointAddress,
  required this.ownerAddress,
  required this.salt,
  required this.bundlerURL,
  // required this.factoryAddress,
  required this.rpcURL,
  // List<String>? modules,
  required this.modules,
  usePaymaster,
  batch,
  PaymasterConfig? paymasterConfig,
}) {
  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.web3Client = Web3Client(rpcURL, http.Client());
  this.deployedContract = DeployedContract(
      ContractAbi.fromJson(abi, "SmartWallet"),
      EthereumAddress.fromHex(scwAddress));
}