SmartWallet constructor
SmartWallet({
- required String abi,
- required String scwAddress,
- dynamic provider,
- required EntryPointWithoutSigner entryPointContract,
- required String entryPointAddress,
- required String? ownerAddress,
- required int? salt,
- required String bundlerURL,
- required String rpcURL,
- required List<
String> ? modules, - dynamic usePaymaster,
- dynamic batch,
- 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));
}