SmartWallet constructor
SmartWallet({
- required String abi,
- required String scwAddress,
- required String entryPointAddress,
- required String? ownerAddress,
- required int? salt,
- required String bundlerURL,
- required Signer<
_SignerImpl> signer, - required List<
String> ? plugins, - required bool usePaymaster,
- dynamic batch,
- 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);
}