Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 4 additions & 22 deletions Thirdweb.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -360,20 +360,13 @@

#region EIP-7702

// var chain = 11155111; // sepolia
// var chain = 11155111; // 7702-compatible chain

// // Connect to EOA
// var smartEoa = await InAppWallet.Create(client, authProvider: AuthProvider.Google, executionMode: ExecutionMode.EIP7702Sponsored);
// var smartEoa = await InAppWallet.Create(client, authProvider: AuthProvider.Guest, executionMode: ExecutionMode.EIP7702Sponsored);
// if (!await smartEoa.IsConnected())
// {
// _ = await smartEoa.LoginWithOauth(
// isMobile: false,
// (url) =>
// {
// var psi = new ProcessStartInfo { FileName = url, UseShellExecute = true };
// _ = Process.Start(psi);
// }
// );
// _ = await smartEoa.LoginWithGuest(defaultSessionIdOverride: new Guid().ToString());
// }
// var smartEoaAddress = await smartEoa.GetAddress();
// Console.WriteLine($"User Wallet address: {await smartEoa.GetAddress()}");
Expand All @@ -389,18 +382,7 @@
// Console.WriteLine($"Is delegated: {isDelegated}");

// // Create a session key
// var sessionKeyReceipt = await smartEoa.CreateSessionKey(
// chain,
// new SessionSpec()
// {
// Signer = await Utils.GetAddressFromENS(client, "0xfirekeeper.eth"),
// IsWildcard = true,
// ExpiresAt = Utils.GetUnixTimeStampNow() + 86400, // 1 day
// CallPolicies = new List<CallSpec>(),
// TransferPolicies = new List<TransferSpec>(),
// Uid = Guid.NewGuid().ToByteArray().PadTo32Bytes()
// }
// );
// var sessionKeyReceipt = await smartEoa.CreateSessionKey(chainId: chain, signerAddress: await Utils.GetAddressFromENS(client, "vitalik.eth"), durationInSeconds: 86400, grantFullPermissions: true);
// Console.WriteLine($"Session key receipt: {sessionKeyReceipt.TransactionHash}");

#endregion
Expand Down
Loading