Skip to content

Commit

Permalink
make zk pm pminput optional
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFirekeeper committed Aug 27, 2024
1 parent ad85a70 commit 259be1a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
15 changes: 4 additions & 11 deletions Thirdweb.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@

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

// var hash = await smartWalletAbstract.SendTransaction(
// new ThirdwebTransactionInput()
// var receipt = await smartWalletAbstract.ExecuteTransaction(
// new ThirdwebTransactionInput(11124)
// {
// To = await smartWalletAbstract.GetAddress(),
// Value = new HexBigInteger(BigInteger.Zero),
// Data = "0x"
// }
// );

// Console.WriteLine($"Transaction hash: {hash}");
// Console.WriteLine($"Transaction hash: {receipt}");

#endregion

Expand All @@ -98,14 +98,7 @@

// var zkRawTx = await ThirdwebTransaction.Create(
// wallet: zkRawWallet,
// txInput: new ThirdwebTransactionInput(
// chainId: chainId,
// from: zkRawAddy,
// to: zkRawAddy,
// value: 0,
// data: "0x",
// zkSync: new ZkSyncOptions(paymaster: null, paymasterInput: null, gasPerPubdataByteLimit: 50000)
// )
// txInput: new ThirdwebTransactionInput(chainId: chainId, from: zkRawAddy, to: zkRawAddy, value: 0, data: "0x", zkSync: new ZkSyncOptions(gasPerPubdataByteLimit: 50000))
// );

// zkRawTx = await ThirdwebTransaction.Prepare(zkRawTx);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,6 @@ public async Task Send_ZkSync_TransfersGaslessly()
{
var transaction = await this.CreateSampleTransaction();
_ = transaction.SetChainId(300);
_ = transaction.SetTo("0xbA226d47Cbb2731CBAA67C916c57d68484AA269F");
_ = transaction.SetValue(BigInteger.Zero);
_ = transaction.SetZkSyncOptions(
new ZkSyncOptions(
paymaster: "0xbA226d47Cbb2731CBAA67C916c57d68484AA269F",
Expand All @@ -239,8 +237,6 @@ public async Task Send_ZkSync_NoGasPerPubFactoryDepsTransfersGaslessly()
{
var transaction = await this.CreateSampleTransaction();
_ = transaction.SetChainId(300);
_ = transaction.SetTo("0xbA226d47Cbb2731CBAA67C916c57d68484AA269F");
_ = transaction.SetValue(BigInteger.Zero);
_ = transaction.SetZkSyncOptions(
new ZkSyncOptions(
paymaster: "0xbA226d47Cbb2731CBAA67C916c57d68484AA269F",
Expand Down
2 changes: 1 addition & 1 deletion Thirdweb/Thirdweb.Transactions/ThirdwebTransactionInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public struct ZkSyncOptions
/// <param name="paymasterInput">The paymaster input data.</param>
/// <param name="gasPerPubdataByteLimit">The gas limit per pubdata byte.</param>
/// <param name="factoryDeps">The factory dependencies.</param>
public ZkSyncOptions(string paymaster, string paymasterInput, BigInteger? gasPerPubdataByteLimit = null, List<byte[]> factoryDeps = null)
public ZkSyncOptions(string paymaster = null, string paymasterInput = null, BigInteger? gasPerPubdataByteLimit = null, List<byte[]> factoryDeps = null)
{
if (string.IsNullOrEmpty(paymaster) || string.IsNullOrEmpty(paymasterInput))
{
Expand Down

0 comments on commit 259be1a

Please sign in to comment.