SmartWallet constructor
SmartWallet({})
Implementation
SmartWallet({
required this.abi,
required String scwAddress,
required String rpcURL,
provider,
required this.isInitialized,
required this.ownerAddress,
required this.salt,
required this.bundlerURL,
required this.factoryAddress,
required this.signer,
// required flutter_web3.Web3Provider web3provider,
}) {
// this.web3Provider = web3provider;
// TODO: on alreadty initialized contract verify if the proxy has same entrypoint and owner
isVerified = true;
initCode = isInitialized
? ""
: factoryAddress +
_getInitCodeData(
ownerAddress, entryPointContract.contract.address, salt);
this.entryPointContract = EntryPoint(signer: signer);
this.contract = flutter_web3.Contract(scwAddress, abi, signer);
this.deployedContract = DeployedContract(
ContractAbi.fromJson(abi, "SmartWallet"),
EthereumAddress.fromHex(scwAddress));
}