Skip to content

Commit 72f04a1

Browse files
committed
Add Creator Testnet ZkSync Chain
1 parent a6f202a commit 72f04a1

File tree

3 files changed

+26
-9
lines changed

3 files changed

+26
-9
lines changed

Thirdweb.Console/Program.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,22 @@
5555

5656
#endregion
5757

58-
#region AA ZkSync (Abstract)
58+
// #region AA ZkSync
5959

60-
// var smartWalletAbstract = await SmartWallet.Create(personalWallet: privateKeyWallet, chainId: 11124, gasless: true);
60+
// var zkSmartWallet = await SmartWallet.Create(personalWallet: privateKeyWallet, chainId: 4654, gasless: true);
6161

62-
// var receipt = await smartWalletAbstract.ExecuteTransaction(
63-
// new ThirdwebTransactionInput(11124)
62+
// var hash = await zkSmartWallet.SendTransaction(
63+
// new ThirdwebTransactionInput(4654)
6464
// {
65-
// To = await smartWalletAbstract.GetAddress(),
65+
// To = await zkSmartWallet.GetAddress(),
6666
// Value = new HexBigInteger(BigInteger.Zero),
67-
// Data = "0x"
67+
// Data = "0x",
6868
// }
6969
// );
7070

71-
// Console.WriteLine($"Transaction hash: {receipt}");
71+
// Console.WriteLine($"Transaction hash: {hash}");
7272

73-
#endregion
73+
// #endregion
7474

7575
#region Ecosystem Wallet
7676

Thirdweb.Tests/Thirdweb.Transactions/Thirdweb.ZkSmartWallet.Tests.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,23 @@ public async Task SendGaslessZkTx_Abstract_Success()
119119
Assert.True(hash.Length == 66);
120120
}
121121

122+
[Fact(Timeout = 120000)]
123+
public async Task SendGaslessZkTx_Creator_Success()
124+
{
125+
var account = await this.GetSmartAccount(zkChainId: 4654);
126+
var hash = await account.SendTransaction(
127+
new ThirdwebTransactionInput(4654)
128+
{
129+
From = await account.GetAddress(),
130+
To = await account.GetAddress(),
131+
Value = new Nethereum.Hex.HexTypes.HexBigInteger(0),
132+
Data = "0x"
133+
}
134+
);
135+
Assert.NotNull(hash);
136+
Assert.True(hash.Length == 66);
137+
}
138+
122139
[Fact(Timeout = 120000)]
123140
public async Task ZkSync_Switch()
124141
{

Thirdweb/Thirdweb.Utils/Utils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ public static string GenerateSIWE(LoginPayloadData loginPayloadData)
293293
/// <returns>True if it is a zkSync chain ID, otherwise false.</returns>
294294
public static bool IsZkSync(BigInteger chainId)
295295
{
296-
return chainId.Equals(324) || chainId.Equals(300) || chainId.Equals(302) || chainId.Equals(11124);
296+
return chainId.Equals(324) || chainId.Equals(300) || chainId.Equals(302) || chainId.Equals(11124) || chainId.Equals(4654);
297297
}
298298

299299
/// <summary>

0 commit comments

Comments
 (0)