Skip to content

v2.21.0

Latest
Compare
Choose a tag to compare
@0xFirekeeper 0xFirekeeper released this 07 May 23:51
ea4d093

[Beta] Your In-App Wallets can now be upgraded directly to an EIP7702 Smart Account with a simple creation flag!

With the recent Ethereum upgrade Pectra, EIP-7702 allows you - on chains that support it - to upgrade your EOA and get SmartWallet-like functionality with:

  • Much cheaper gas costs, batching functionality
  • No account separation - your wallet address does not change, not even on zksync chains (once they implement EIP-7702)
  • Much faster execution, with the option of paying for gas yourself or having thirdweb manage gas sponsorship, similar to SmartWallet.

And here's how simple it is!

ExecutionMode.EIP7702Sponsored**

Upgrade to an EIP7702 smart account, unlocking all functionality of 4337 without the downsides, and thirdweb handles the execution and gas sponsorship for you!

var smartEoa = await InAppWallet.Create(
    client: thirdwebClient,
    authProvider: AuthProvider.Google,
    executionMode: ExecutionMode.EIP7702
);

ExecutionMode.EIP7702

Upgrade to an EIP7702 smart account, unlocking all functionality of 4337 without the downsides, but sponsoring gas yourself.

var smartEoa = await InAppWallet.Create(
    client: thirdwebClient,
    authProvider: AuthProvider.Google,
    executionMode: ExecutionMode.EIP7702
);

ExecutionMode.EOA

Normal" EOA Execution, no smart account functionality

var basicEoa = await InAppWallet.Create(
    client: thirdwebClient,
    authProvider: AuthProvider.Google,
    // does not need to be explicitly passed, is the default but we're showing it here
    executionMode: ExecutionMode.EOA
);

When using EIP-7702 execution modes, upon your first transaction - if not already delegated to a smart account - an EIP-7702 authorization will be signed and bundled with your first transaction, similar to how 4337 works with initcode, but without the large gas costs, slower execution and chain specific requirements.

We hope you enjoy not having to pass your signers to yet another SmartWallet class, dealing with entrypoint versions, bundlers, paymasters, slow execution and higher gas fees.

This Smart EOA contract also comes with granular session keys that we'll showcase in a later release!

More chains will have support for EIP-7702 very soon with various chain stacks upgrading to Pectra, and we will support each and every one of them.

Additional updates

  • InAppWallet and EcosystemWallet's SignAuthorization low level methods have been integrated.
  • Fixed an issue where using SmartWallet on Hedera or Hedera Testnet where HBAR (native token) is involved could cause silent revets.