|
360 | 360 |
|
361 | 361 | #region EIP-7702 |
362 | 362 |
|
363 | | -// var chain = 11155111; // sepolia |
| 363 | +// var chain = 11155111; // 7702-compatible chain |
364 | 364 |
|
365 | 365 | // // Connect to EOA |
366 | | -// var smartEoa = await InAppWallet.Create(client, authProvider: AuthProvider.Google, executionMode: ExecutionMode.EIP7702Sponsored); |
| 366 | +// var smartEoa = await InAppWallet.Create(client, authProvider: AuthProvider.Guest, executionMode: ExecutionMode.EIP7702Sponsored); |
367 | 367 | // if (!await smartEoa.IsConnected()) |
368 | 368 | // { |
369 | | -// _ = await smartEoa.LoginWithOauth( |
370 | | -// isMobile: false, |
371 | | -// (url) => |
372 | | -// { |
373 | | -// var psi = new ProcessStartInfo { FileName = url, UseShellExecute = true }; |
374 | | -// _ = Process.Start(psi); |
375 | | -// } |
376 | | -// ); |
| 369 | +// _ = await smartEoa.LoginWithGuest(defaultSessionIdOverride: new Guid().ToString()); |
377 | 370 | // } |
378 | 371 | // var smartEoaAddress = await smartEoa.GetAddress(); |
379 | 372 | // Console.WriteLine($"User Wallet address: {await smartEoa.GetAddress()}"); |
|
389 | 382 | // Console.WriteLine($"Is delegated: {isDelegated}"); |
390 | 383 |
|
391 | 384 | // // Create a session key |
392 | | -// var sessionKeyReceipt = await smartEoa.CreateSessionKey( |
393 | | -// chain, |
394 | | -// new SessionSpec() |
395 | | -// { |
396 | | -// Signer = await Utils.GetAddressFromENS(client, "0xfirekeeper.eth"), |
397 | | -// IsWildcard = true, |
398 | | -// ExpiresAt = Utils.GetUnixTimeStampNow() + 86400, // 1 day |
399 | | -// CallPolicies = new List<CallSpec>(), |
400 | | -// TransferPolicies = new List<TransferSpec>(), |
401 | | -// Uid = Guid.NewGuid().ToByteArray().PadTo32Bytes() |
402 | | -// } |
403 | | -// ); |
| 385 | +// var sessionKeyReceipt = await smartEoa.CreateSessionKey(chainId: chain, signerAddress: await Utils.GetAddressFromENS(client, "vitalik.eth"), durationInSeconds: 86400, grantFullPermissions: true); |
404 | 386 | // Console.WriteLine($"Session key receipt: {sessionKeyReceipt.TransactionHash}"); |
405 | 387 |
|
406 | 388 | #endregion |
|
0 commit comments