SmartWallet constructor

SmartWallet({
  1. required String abi,
  2. required String scwAddress,
  3. required String rpcURL,
  4. dynamic provider,
  5. required bool isInitialized,
  6. required String ownerAddress,
  7. required int salt,
  8. required String bundlerURL,
  9. required String factoryAddress,
  10. required Signer<_SignerImpl> signer,
})

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));
}