From 80016d2a22bb0547dd30c9da62cd58e8916bcfed Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 30 Jul 2024 20:03:17 +0530 Subject: [PATCH] send userop --- libs/remix-lib/src/execution/txRunnerWeb3.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/remix-lib/src/execution/txRunnerWeb3.ts b/libs/remix-lib/src/execution/txRunnerWeb3.ts index 6fc301f3fe6..732c0f92c56 100644 --- a/libs/remix-lib/src/execution/txRunnerWeb3.ts +++ b/libs/remix-lib/src/execution/txRunnerWeb3.ts @@ -79,6 +79,7 @@ export class TxRunnerWeb3 { ) } else { try { + if (tx.fromSmartAccount) await sendUserOp(tx) const res = await this.getWeb3().eth.sendTransaction(tx, null, { checkRevertBeforeSending: false, ignoreGasPricing: true }) cb(null, res.transactionHash) } catch (e) { @@ -102,9 +103,8 @@ export class TxRunnerWeb3 { } runInNode (from, fromSmartAccount, to, data, value, gasLimit, useCall, timestamp, confirmCb, gasEstimationForceSend, promptCb, callback) { - const tx = { from: from, to: to, data: data, value: value } + const tx = { from: from, fromSmartAccount, to: to, data: data, value: value } if (!from) return callback('the value of "from" is not defined. Please make sure an account is selected.') - if (fromSmartAccount) return callback('from address is from a smart account') if (useCall) { if (this._api && this._api.isVM()) { (this.getWeb3() as any).remix.registerCallId(timestamp) @@ -186,6 +186,10 @@ export class TxRunnerWeb3 { } } +const sendUserOp = async (tx) => { + console.log('sendUserOp--tx-->', tx) +} + async function tryTillReceiptAvailable (txhash: string, web3: Web3) { try { const receipt = await web3.eth.getTransactionReceipt(txhash)