Skip to content

Commit a6e3ad0

Browse files
authored
Merge pull request #4216 from ethereum/remix_beta_fix_bsc
Remix beta: fix bsc
2 parents 5bf8a96 + 0f48079 commit a6e3ad0

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

apps/remix-ide/src/blockchain/execution-context.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ const _paq = window._paq = window._paq || []
77

88
let web3
99

10+
const config = { defaultTransactionType: '0x0' }
1011
if (typeof window !== 'undefined' && typeof window.ethereum !== 'undefined') {
1112
var injectedProvider = window.ethereum
1213
web3 = new Web3(injectedProvider)
1314
} else {
1415
web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'))
1516
}
17+
web3.eth.setConfig(config)
1618

1719
/*
1820
trigger contextChanged, web3EndpointChanged
@@ -59,6 +61,7 @@ export class ExecutionContext {
5961
}
6062

6163
setWeb3 (context, web3) {
64+
web3.setConfig(config)
6265
this.customWeb3[context] = web3
6366
}
6467

libs/ghaction-helper/src/methods.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ const providerConfig = {
1111
blockNumber: global.blockNumber || null
1212
}
1313

14+
const config = { defaultTransactionType: '0x0' }
1415
global.remixProvider = new Provider(providerConfig)
1516
global.remixProvider.init()
1617
global.web3Provider = new ethers.providers.Web3Provider(global.remixProvider)
1718
global.provider = global.web3Provider
1819
global.ethereum = global.web3Provider
1920
global.web3 = new Web3(global.web3Provider)
21+
global.web3.eth.setConfig(config)
2022

2123
const isFactoryOptions = (signerOrOptions: any) => {
2224
if (!signerOrOptions || signerOrOptions === undefined || signerOrOptions instanceof ethers.Signer) return false

libs/remix-lib/src/execution/txRunnerWeb3.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class TxRunnerWeb3 {
2323
// this is to avoid the following issue: https://github.com/MetaMask/metamask-extension/issues/11824
2424
tx.type = '0x2'
2525
} else {
26-
tx.type = '0x1'
26+
// tx.type = '0x1'
2727
}
2828
if (txFee) {
2929
if (txFee.baseFeePerGas) {
@@ -81,7 +81,7 @@ export class TxRunnerWeb3 {
8181
)
8282
} else {
8383
try {
84-
const res = await this.getWeb3().eth.sendTransaction(tx)
84+
const res = await this.getWeb3().eth.sendTransaction(tx, null, { checkRevertBeforeSending: false })
8585
cb(null, res.transactionHash)
8686
} catch (e) {
8787
console.log(`Send transaction failed: ${e.message} . if you use an injected provider, please check it is properly unlocked. `)

libs/remix-ui/terminal/src/lib/components/Table.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ const showTable = (opts, showTableHash) => {
7575
<FormattedMessage id="terminal.blockNumber" />
7676
</td>
7777
<td className="remix_ui_terminal_td" data-id={`txLoggerTableContractAddress${opts.hash}`} data-shared={`pair_${opts.hash}`}>
78-
{opts.blockNumber}
79-
<CopyToClipboard content={opts.blockNumber} />
78+
{opts.blockNumber.toString()}
79+
<CopyToClipboard content={opts.blockNumber.toString()} />
8080
</td>
8181
</tr>
8282
) : null}

0 commit comments

Comments
 (0)