|
299 | 299 |
|
300 | 300 | #endregion
|
301 | 301 |
|
302 |
| -#region ERC20 Smart Wallet - Base USDC |
| 302 | +#region TokenPaymaster - Celo CUSD |
| 303 | + |
| 304 | +// var chainId = 42220; // celo |
| 305 | + |
| 306 | +// var erc20SmartWallet = await SmartWallet.Create(personalWallet: privateKeyWallet, chainId: chainId, tokenPaymaster: TokenPaymaster.CELO_CUSD); |
303 | 307 |
|
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 | 308 | // var erc20SmartWalletAddress = await erc20SmartWallet.GetAddress();
|
313 | 309 | // Console.WriteLine($"ERC20 Smart Wallet address: {erc20SmartWalletAddress}");
|
314 | 310 |
|
315 |
| -// var selfTransfer = await ThirdwebTransaction.Create(wallet: erc20SmartWallet, txInput: new ThirdwebTransactionInput(chainId: 8453, to: erc20SmartWalletAddress, value: 0, data: "0x")); |
| 311 | +// var receipt = await erc20SmartWallet.Transfer(chainId: chainId, toAddress: erc20SmartWalletAddress, weiAmount: 0); |
| 312 | +// Console.WriteLine($"Receipt: {JsonConvert.SerializeObject(receipt, Formatting.Indented)}"); |
316 | 313 |
|
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(); |
| 314 | +#endregion |
| 315 | + |
| 316 | +#region TokenPaymaster - Base USDC |
| 317 | + |
| 318 | +// var chainId = 8453; // base |
| 319 | + |
| 320 | +// var erc20SmartWallet = await SmartWallet.Create(personalWallet: privateKeyWallet, chainId: chainId, tokenPaymaster: TokenPaymaster.BASE_USDC); |
| 321 | + |
| 322 | +// var erc20SmartWalletAddress = await erc20SmartWallet.GetAddress(); |
| 323 | +// Console.WriteLine($"ERC20 Smart Wallet address: {erc20SmartWalletAddress}"); |
| 324 | + |
| 325 | +// var receipt = await erc20SmartWallet.Transfer(chainId: chainId, toAddress: erc20SmartWalletAddress, weiAmount: 0); |
| 326 | +// Console.WriteLine($"Receipt: {JsonConvert.SerializeObject(receipt, Formatting.Indented)}"); |
| 327 | + |
| 328 | +#endregion |
| 329 | + |
| 330 | +#region TokenPaymaster - Lisk LSK |
| 331 | + |
| 332 | +// var chainId = 1135; // lisk |
| 333 | + |
| 334 | +// var erc20SmartWallet = await SmartWallet.Create(personalWallet: privateKeyWallet, chainId: chainId, tokenPaymaster: TokenPaymaster.LISK_LSK); |
| 335 | + |
| 336 | +// var erc20SmartWalletAddress = await erc20SmartWallet.GetAddress(); |
| 337 | +// Console.WriteLine($"ERC20 Smart Wallet address: {erc20SmartWalletAddress}"); |
321 | 338 |
|
322 |
| -// var receipt = await ThirdwebTransaction.SendAndWaitForTransactionReceipt(selfTransfer); |
323 |
| -// Console.WriteLine($"Self transfer receipt: {JsonConvert.SerializeObject(receipt, Formatting.Indented)}"); |
| 339 | +// var receipt = await erc20SmartWallet.Transfer(chainId: chainId, toAddress: erc20SmartWalletAddress, weiAmount: 0); |
| 340 | +// Console.WriteLine($"Receipt: {JsonConvert.SerializeObject(receipt, Formatting.Indented)}"); |
324 | 341 |
|
325 | 342 | #endregion
|
326 | 343 |
|
|
349 | 366 |
|
350 | 367 | #region InAppWallet - OAuth
|
351 | 368 |
|
352 |
| -// var inAppWalletOAuth = await InAppWallet.Create(client: client, authProvider: AuthProvider.Twitch); |
| 369 | +// var inAppWalletOAuth = await InAppWallet.Create(client: client, authProvider: AuthProvider.Google); |
353 | 370 | // if (!await inAppWalletOAuth.IsConnected())
|
354 | 371 | // {
|
355 | 372 | // _ = await inAppWalletOAuth.LoginWithOauth(
|
|
0 commit comments