diff --git a/apps/remix-ide/src/app/plugins/solidity-script.tsx b/apps/remix-ide/src/app/plugins/solidity-script.tsx index 4da5425a34..36a287689e 100644 --- a/apps/remix-ide/src/app/plugins/solidity-script.tsx +++ b/apps/remix-ide/src/app/plugins/solidity-script.tsx @@ -73,13 +73,13 @@ export class SolidityScript extends Plugin { from: accounts[0], data: bytecode } - const receipt = await web3.eth.sendTransaction(tx) + const receipt = await web3.eth.sendTransaction(tx, null, { checkRevertBeforeSending: false, ignoreGasPricing: true }) tx = { from: accounts[0], to: receipt.contractAddress, data: '0x69d4394b' // function remixRun() public } - const receiptCall = await web3.eth.sendTransaction(tx) + const receiptCall = await web3.eth.sendTransaction(tx, null, { checkRevertBeforeSending: false, ignoreGasPricing: true }) const hhlogs = await web3.remix.getHHLogsForTx(receiptCall.transactionHash) diff --git a/apps/remix-ide/src/blockchain/execution-context.js b/apps/remix-ide/src/blockchain/execution-context.js index 7a37c0aac6..7c33bb4f27 100644 --- a/apps/remix-ide/src/blockchain/execution-context.js +++ b/apps/remix-ide/src/blockchain/execution-context.js @@ -7,7 +7,7 @@ const _paq = window._paq = window._paq || [] let web3 -const config = { defaultTransactionType: '0x0', ignoreGasPricing: true } +const config = { defaultTransactionType: '0x0' } if (typeof window !== 'undefined' && typeof window.ethereum !== 'undefined') { var injectedProvider = window.ethereum web3 = new Web3(injectedProvider) diff --git a/apps/remix-ide/src/blockchain/providers/vm.ts b/apps/remix-ide/src/blockchain/providers/vm.ts index 913bfad2a8..3ae7f6a154 100644 --- a/apps/remix-ide/src/blockchain/providers/vm.ts +++ b/apps/remix-ide/src/blockchain/providers/vm.ts @@ -62,6 +62,7 @@ export class VMProvider { } } this.web3 = new Web3(this.provider as LegacySendAsyncProvider) + this.web3.setConfig({ defaultTransactionType: '0x0' }) extend(this.web3) this.executionContext.setWeb3(this.executionContext.getProvider(), this.web3) resolve({}) diff --git a/libs/ghaction-helper/src/methods.ts b/libs/ghaction-helper/src/methods.ts index 16c5a5f2d4..9bfa470033 100644 --- a/libs/ghaction-helper/src/methods.ts +++ b/libs/ghaction-helper/src/methods.ts @@ -11,7 +11,7 @@ const providerConfig = { blockNumber: global.blockNumber || null } -const config = { defaultTransactionType: '0x0', ignoreGasPricing: true } +const config = { defaultTransactionType: '0x0' } global.remixProvider = new Provider(providerConfig) global.remixProvider.init() global.web3Provider = new ethers.providers.Web3Provider(global.remixProvider) diff --git a/libs/remix-debug/test/vmCall.ts b/libs/remix-debug/test/vmCall.ts index b00a506983..e9d6e28012 100644 --- a/libs/remix-debug/test/vmCall.ts +++ b/libs/remix-debug/test/vmCall.ts @@ -23,7 +23,7 @@ async function sendTx (web3, from, to, value, data, cb) { value, data, gas: 7000000 - }) + }, null, { checkRevertBeforeSending: false, ignoreGasPricing: true }) cb(null, receipt.transactionHash) return receipt.transactionHash } catch (e) { diff --git a/libs/remix-lib/src/execution/txRunnerWeb3.ts b/libs/remix-lib/src/execution/txRunnerWeb3.ts index a7f1cce7ac..02d343b475 100644 --- a/libs/remix-lib/src/execution/txRunnerWeb3.ts +++ b/libs/remix-lib/src/execution/txRunnerWeb3.ts @@ -65,7 +65,7 @@ export class TxRunnerWeb3 { promptCb( async (value) => { try { - const res = await (this.getWeb3() as any).eth.personal.sendTransaction({...tx, value}) + const res = await (this.getWeb3() as any).eth.personal.sendTransaction({...tx, value}, { checkRevertBeforeSending: false, ignoreGasPricing: true }) cb(null, res.transactionHash) } catch (e) { console.log(`Send transaction failed: ${e.message} . if you use an injected provider, please check it is properly unlocked. `) @@ -81,7 +81,7 @@ export class TxRunnerWeb3 { ) } else { try { - const res = await this.getWeb3().eth.sendTransaction(tx, null, { checkRevertBeforeSending: false }) + const res = await this.getWeb3().eth.sendTransaction(tx, null, { checkRevertBeforeSending: false, ignoreGasPricing: true}) cb(null, res.transactionHash) } catch (e) { console.log(`Send transaction failed: ${e.message} . if you use an injected provider, please check it is properly unlocked. `) diff --git a/libs/remix-simulator/src/VmProxy.ts b/libs/remix-simulator/src/VmProxy.ts index d0a5e634e2..99f102023f 100644 --- a/libs/remix-simulator/src/VmProxy.ts +++ b/libs/remix-simulator/src/VmProxy.ts @@ -123,6 +123,7 @@ export class VmProxy { this.stateCopy = await this.vm.stateManager.copy() this.incr++ this.processingHash = bufferToHex(data.hash()) + console.log('txWillProcess', this.processingHash ) this.vmTraces[this.processingHash] = { gas: '0x0', return: '0x0', @@ -158,6 +159,7 @@ export class VmProxy { } async txProcessed (data: AfterTxEvent) { + console.log('txProcessed', this.processingHash) if (this.flagDoNotRecordEVMSteps) { this.flagDoNotRecordEVMSteps = false return @@ -260,6 +262,7 @@ export class VmProxy { this.vmTraces[this.processingHash].structLogs.push(step) // Track hardhat console.log call if (step.op === 'STATICCALL' && toHexPaddedString(step.stack[step.stack.length - 2]) === '0x000000000000000000000000000000000000000000636f6e736f6c652e6c6f67') { + console.log('STATICCALL', this.processingHash) const payloadStart = parseInt(toHexPaddedString(step.stack[step.stack.length - 3]), 16) const memory = formatMemory(data.memory) const memoryStr = memory.join('')