You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The onramp flow will return a link for you to display/open as you please. You may poll the status of that onramp by its ID.
135
+
In some cases, you may receive an additional set of onchain steps required to get to your destination token post on-ramp, in such cases, you may use our extension `IsSwapRequiredPostOnramp` to check, and if a swap is indeed required, you may use our `Execute` extensions to execute the transactions, or manually execute them by going through each `Step`.
136
+
137
+
```csharp
138
+
// Onramp - Get a quote for buying crypto with Fiat
139
+
varpreparedOnramp=awaitbridge.Onramp_Prepare(
140
+
onramp: OnrampProvider.Coinbase,
141
+
chainId: 8453,
142
+
tokenAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // USDC on Base
Integrates `authorizationList` for any transactions.
10
10
This EIP essentially allows you to set code to an EOA, unlocking a world of possibilities to enhance their functionality.
11
-
12
-
The best way to understand it outside of reading the EIP is looking at the example below; to preface it: we sign an authorization using the wallet we want to set code to. Another wallet sends a transaction with said authorization passed in, essentially activating it. The authority wallet now has code set to it pointing to an (insecure) [Delegation](https://thirdweb.com/odyssey-911867/0x654F42b74885EE6803F403f077bc0409f1066c58) contract in this case, which allows any wallet to execute any call through it on behalf of the authority. In this example, we call the wallet executing both the authorization and the claim transaction afterwards, the exectuor.
13
-
14
11
An authority may execute its own authorization, the only difference is internal whereby the authorization nonce is incremented by 1.
You almost never need to use this API directly, but it's available for low-level access. Use higher level [Account Abstraction](/dotnet/wallets/providers/account-abstraction) APIs instead.
The method returns an `EIP7702Authorization` object that can be passed to our `ThirdwebTransaction`/`ThirdwebTransactionInput` related APIs and broadcast as such.
99
40
100
-
_Note that for the time being this only works on 7702-enabled chains such as [Odyssey](https://thirdweb.com/odyssey-911867) and the feature has only been integrated with `PrivateKeyWallet`._
With the recent Ethereum upgrade Pectra, EIP-7702 allows you to upgrade your EOA and get SmartWallet-like functionality with:
12
+
- Much cheaper gas costs, batching functionality
13
+
- No account separation - your wallet address does not change, not even on zksync chains (once they implement EIP-7702)
14
+
- Much faster execution, with the option of paying for gas yourself or having thirdweb manage gas sponsorship, similar to SmartWallet.
15
+
16
+
The API is also drastically simplified!
17
+
18
+
### ExecutionMode.EIP7702Sponsored
19
+
Upgrade to an EIP7702 smart account, unlocking all functionality of 4337 without the downsides, and thirdweb handles the execution and gas sponsorship for you!
20
+
```csharp
21
+
varsmartEoa=awaitInAppWallet.Create(
22
+
client: thirdwebClient,
23
+
authProvider: AuthProvider.Google,
24
+
executionMode: ExecutionMode.EIP7702Sponsored
25
+
);
26
+
```
27
+
28
+
### ExecutionMode.EIP7702
29
+
Upgrade to an EIP7702 smart account, unlocking all functionality of 4337 without the downsides, but sponsoring gas yourself.
30
+
```csharp
31
+
varsmartEoa=awaitInAppWallet.Create(
32
+
client: thirdwebClient,
33
+
authProvider: AuthProvider.Google,
34
+
executionMode: ExecutionMode.EIP7702
35
+
);
36
+
```
37
+
38
+
### ExecutionMode.EOA
39
+
"Normal" EOA Execution, no smart account functionality
40
+
```csharp
41
+
varbasicEoa=awaitInAppWallet.Create(
42
+
client: thirdwebClient,
43
+
authProvider: AuthProvider.Google,
44
+
// does not need to be explicitly passed, is the default but we're showing it here
45
+
executionMode: ExecutionMode.EOA
46
+
);
47
+
```
48
+
49
+
_When using EIP-7702 execution modes - 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._
50
+
51
+
# SmartWallet (via EIP-4337 Bundlers)
10
52
11
53
Instantiate a `SmartWallet` to enable advanced blockchain interactions, including gasless transactions through account abstraction. This wallet type is especially useful for creating a user-friendly experience in decentralized applications.
Native Account Abstraction is a system that allows you to set code to an EOA, unlocking a world of possibilities to enhance their functionality. It is available since the Pectra upgrade on various chains.
12
+
13
+
Enabling it is as simple as creating an `InAppWallet` and passing the `ExecutionMode.EIP7702Sponsored` flag during creation.
Instantiate or upgrade any other wallet to a `SmartWallet` to enable advanced blockchain interactions, including gasless transactions through Account Abstraction (ERC4337 as well as ZkSync Native AA).
0 commit comments