Skip to content

Commit 259be1a

Browse files
committed
make zk pm pminput optional
1 parent ad85a70 commit 259be1a

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

Thirdweb.Console/Program.cs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@
7373

7474
// var smartWalletAbstract = await SmartWallet.Create(personalWallet: privateKeyWallet, chainId: 11124, gasless: true);
7575

76-
// var hash = await smartWalletAbstract.SendTransaction(
77-
// new ThirdwebTransactionInput()
76+
// var receipt = await smartWalletAbstract.ExecuteTransaction(
77+
// new ThirdwebTransactionInput(11124)
7878
// {
7979
// To = await smartWalletAbstract.GetAddress(),
8080
// Value = new HexBigInteger(BigInteger.Zero),
8181
// Data = "0x"
8282
// }
8383
// );
8484

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

8787
#endregion
8888

@@ -98,14 +98,7 @@
9898

9999
// var zkRawTx = await ThirdwebTransaction.Create(
100100
// wallet: zkRawWallet,
101-
// txInput: new ThirdwebTransactionInput(
102-
// chainId: chainId,
103-
// from: zkRawAddy,
104-
// to: zkRawAddy,
105-
// value: 0,
106-
// data: "0x",
107-
// zkSync: new ZkSyncOptions(paymaster: null, paymasterInput: null, gasPerPubdataByteLimit: 50000)
108-
// )
101+
// txInput: new ThirdwebTransactionInput(chainId: chainId, from: zkRawAddy, to: zkRawAddy, value: 0, data: "0x", zkSync: new ZkSyncOptions(gasPerPubdataByteLimit: 50000))
109102
// );
110103

111104
// zkRawTx = await ThirdwebTransaction.Prepare(zkRawTx);

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,6 @@ public async Task Send_ZkSync_TransfersGaslessly()
219219
{
220220
var transaction = await this.CreateSampleTransaction();
221221
_ = transaction.SetChainId(300);
222-
_ = transaction.SetTo("0xbA226d47Cbb2731CBAA67C916c57d68484AA269F");
223-
_ = transaction.SetValue(BigInteger.Zero);
224222
_ = transaction.SetZkSyncOptions(
225223
new ZkSyncOptions(
226224
paymaster: "0xbA226d47Cbb2731CBAA67C916c57d68484AA269F",
@@ -239,8 +237,6 @@ public async Task Send_ZkSync_NoGasPerPubFactoryDepsTransfersGaslessly()
239237
{
240238
var transaction = await this.CreateSampleTransaction();
241239
_ = transaction.SetChainId(300);
242-
_ = transaction.SetTo("0xbA226d47Cbb2731CBAA67C916c57d68484AA269F");
243-
_ = transaction.SetValue(BigInteger.Zero);
244240
_ = transaction.SetZkSyncOptions(
245241
new ZkSyncOptions(
246242
paymaster: "0xbA226d47Cbb2731CBAA67C916c57d68484AA269F",

Thirdweb/Thirdweb.Transactions/ThirdwebTransactionInput.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public struct ZkSyncOptions
161161
/// <param name="paymasterInput">The paymaster input data.</param>
162162
/// <param name="gasPerPubdataByteLimit">The gas limit per pubdata byte.</param>
163163
/// <param name="factoryDeps">The factory dependencies.</param>
164-
public ZkSyncOptions(string paymaster, string paymasterInput, BigInteger? gasPerPubdataByteLimit = null, List<byte[]> factoryDeps = null)
164+
public ZkSyncOptions(string paymaster = null, string paymasterInput = null, BigInteger? gasPerPubdataByteLimit = null, List<byte[]> factoryDeps = null)
165165
{
166166
if (string.IsNullOrEmpty(paymaster) || string.IsNullOrEmpty(paymasterInput))
167167
{

0 commit comments

Comments
 (0)