createSimpleAccount method
override
Creates a new wallet address using counterfactual deployment.
This method generates a new wallet address based on the provided salt value.
The wallet may not actually be deployed, and deployed should be used to check deployment status.
An initCode
will be attached on the first transaction.
salt
: The salt for the wallet.index
: The index of the wallet (optional).
Implementation
@override
Future createSimpleAccount(Uint256 salt, {int? index}) async {
EthereumAddress signer = EthereumAddress.fromHex(
plugin<MultiSignerInterface>('signer').getAddress());
_initCode = hexlify(_getInitCode('createAccount', [signer, salt.value]));
getSimpleAccountAddress(signer, salt)
.then((value) => {_walletAddress = value});
}