From 549093d578333f6464fefa01bdc9de01e7033f67 Mon Sep 17 00:00:00 2001 From: 0xFirekeeper <0xFirekeeper@gmail.com> Date: Wed, 22 May 2024 00:52:13 +0300 Subject: [PATCH] cleanup, move params to ThirdwebTransactionInput next --- .../ThirdwebTransaction.cs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/Thirdweb/Thirdweb.Transactions/ThirdwebTransaction.cs b/Thirdweb/Thirdweb.Transactions/ThirdwebTransaction.cs index e7dafd9..b98c469 100644 --- a/Thirdweb/Thirdweb.Transactions/ThirdwebTransaction.cs +++ b/Thirdweb/Thirdweb.Transactions/ThirdwebTransaction.cs @@ -207,30 +207,15 @@ public static async Task Send(ThirdwebTransaction transaction, string zk var isZkAA = zkSyncPaymaster != null && zkSyncPaymasterInput != null; if (isZkAA && (transaction.Input.ChainId.Value.Equals(324) || transaction.Input.ChainId.Value.Equals(300))) { - // Field name Type - // txType uint256 - // from uint256 - // to uint256 - // gasLimit uint256 - // gasPerPubdataByteLimit uint256 - // maxFeePerGas uint256 - // maxPriorityFeePerGas uint256 - // paymaster uint256 - // nonce uint256 - // value uint256 - // data bytes - // factoryDeps bytes32[] - // paymasterInput bytes var zkTx = new AccountAbstraction.ZkSyncAATransaction { - TxType = 0x71, // 712 can't be used as it has to be one byte long + TxType = 0x71, From = new HexBigInteger(transaction.Input.From).Value, To = new HexBigInteger(transaction.Input.To).Value, GasLimit = transaction.Input.Gas.Value, GasPerPubdataByteLimit = 50000, MaxFeePerGas = transaction.Input.MaxFeePerGas?.Value ?? transaction.Input.GasPrice.Value, MaxPriorityFeePerGas = transaction.Input.MaxPriorityFeePerGas?.Value ?? transaction.Input.GasPrice.Value, - // unsigned bigint of paymaster hex string Paymaster = new HexBigInteger(zkSyncPaymaster).Value, Nonce = transaction.Input.Nonce ?? new HexBigInteger(await rpc.SendRequestAsync("eth_getTransactionCount", transaction.Input.From, "latest")), Value = transaction.Input.Value.Value,