|
299 | 299 |
|
300 | 300 | #endregion |
301 | 301 |
|
302 | | -#region ERC20 Smart Wallet - Base USDC |
| 302 | +#region TokenPaymaster - Lisk LSK |
303 | 303 |
|
304 | | -// var erc20SmartWallet = await SmartWallet.Create( |
305 | | -// personalWallet: privateKeyWallet, |
306 | | -// chainId: 8453, // base mainnet |
307 | | -// gasless: true, |
308 | | -// factoryAddress: "0xEc87d96E3F324Dcc828750b52994C6DC69C8162b", |
309 | | -// entryPoint: Constants.ENTRYPOINT_ADDRESS_V07, |
310 | | -// tokenPaymaster: TokenPaymaster.BASE_USDC |
311 | | -// ); |
312 | | -// var erc20SmartWalletAddress = await erc20SmartWallet.GetAddress(); |
313 | | -// Console.WriteLine($"ERC20 Smart Wallet address: {erc20SmartWalletAddress}"); |
| 304 | +var erc20SmartWallet = await SmartWallet.Create( |
| 305 | + personalWallet: privateKeyWallet, |
| 306 | + chainId: 1135, // lisk |
| 307 | + gasless: true, |
| 308 | + entryPoint: Constants.ENTRYPOINT_ADDRESS_V07, |
| 309 | + tokenPaymaster: TokenPaymaster.LISK_LSK |
| 310 | +); |
| 311 | +var erc20SmartWalletAddress = await erc20SmartWallet.GetAddress(); |
| 312 | +Console.WriteLine($"ERC20 Smart Wallet address: {erc20SmartWalletAddress}"); |
314 | 313 |
|
315 | | -// var selfTransfer = await ThirdwebTransaction.Create(wallet: erc20SmartWallet, txInput: new ThirdwebTransactionInput(chainId: 8453, to: erc20SmartWalletAddress, value: 0, data: "0x")); |
| 314 | +var selfTransfer = await ThirdwebTransaction.Create(wallet: erc20SmartWallet, txInput: new ThirdwebTransactionInput(chainId: 1135, to: erc20SmartWalletAddress, value: 0, data: "0x")); |
316 | 315 |
|
317 | | -// var estimateGas = await ThirdwebTransaction.EstimateGasCosts(selfTransfer); |
318 | | -// Console.WriteLine($"Self transfer gas estimate: {estimateGas.Ether}"); |
319 | | -// Console.WriteLine("Make sure you have enough USDC!"); |
320 | | -// Console.ReadLine(); |
| 316 | +var estimateGas = await ThirdwebTransaction.EstimateGasCosts(selfTransfer); |
| 317 | +Console.WriteLine($"Self transfer gas estimate: {estimateGas.Ether}"); |
| 318 | +Console.WriteLine("Make sure you have enough ERC20s!"); |
| 319 | +Console.ReadLine(); |
321 | 320 |
|
322 | | -// var receipt = await ThirdwebTransaction.SendAndWaitForTransactionReceipt(selfTransfer); |
323 | | -// Console.WriteLine($"Self transfer receipt: {JsonConvert.SerializeObject(receipt, Formatting.Indented)}"); |
| 321 | +var receipt = await ThirdwebTransaction.SendAndWaitForTransactionReceipt(selfTransfer); |
| 322 | +Console.WriteLine($"Receipt: {JsonConvert.SerializeObject(receipt, Formatting.Indented)}"); |
324 | 323 |
|
325 | 324 | #endregion |
326 | 325 |
|
|
349 | 348 |
|
350 | 349 | #region InAppWallet - OAuth |
351 | 350 |
|
352 | | -// var inAppWalletOAuth = await InAppWallet.Create(client: client, authProvider: AuthProvider.Twitch); |
| 351 | +// var inAppWalletOAuth = await InAppWallet.Create(client: client, authProvider: AuthProvider.Google); |
353 | 352 | // if (!await inAppWalletOAuth.IsConnected()) |
354 | 353 | // { |
355 | 354 | // _ = await inAppWalletOAuth.LoginWithOauth( |
|
0 commit comments