.NET 0.4.0 - ZkSync Managed Account Abstraction

Firekeeper

The .NET SDK 0.4.0 brings you an enhanced version of ZkSync AA.

In a recent release, we announced ZkSync (DIY) Account Abstraction support, where you had to deal with the paymaster contract and inputs yourself.

With this release, we bring you an amazing alternative provided by thirdweb infrastructure.

Instantiating a Smart Wallet using the SDK will now automatically have all the paymaster infra ready for you, so all you have to do is send transactions!

Here's how easy it is to achieve:

// Create your smart wallet as usual
var zkSmartWallet = await SmartWallet.Create(
client: client,
personalWallet: privateKeyWallet,
chainId: 324,
gasless: true
);
Console.WriteLine($"Smart wallet address: {await zkSmartWallet.GetAddress()}");
// This also works with Contract.Prepare or raw ThirdwebTransaction
var zkTxHash = await zkSmartWallet.SendTransaction(
// simple self-transfer of 0 value
new ThirdwebTransactionInput()
{
From = await zkSmartWallet.GetAddress(),
To = await zkSmartWallet.GetAddress(),
}
);
Console.WriteLine($"Transaction hash: {zkTxHash}");

Smart Wallets created on zksync chains will now... just work!