Skip to content

Commit 33cf6a6

Browse files
committed
set 0x0 as defaultTransactionType
1 parent 6e393ea commit 33cf6a6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
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

0 commit comments

Comments
 (0)