set 0x0 as defaultTransactionType

pull/4215/head
yann300 1 year ago
parent fa88415dfb
commit a8a10036d3
  1. 3
      apps/remix-ide/src/blockchain/execution-context.js
  2. 2
      libs/ghaction-helper/src/methods.ts

@ -7,12 +7,14 @@ const _paq = window._paq = window._paq || []
let web3
const config = { defaultTransactionType: '0x0' }
if (typeof window !== 'undefined' && typeof window.ethereum !== 'undefined') {
var injectedProvider = window.ethereum
web3 = new Web3(injectedProvider)
} else {
web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'))
}
web3.eth.setConfig(config)
/*
trigger contextChanged, web3EndpointChanged
@ -59,6 +61,7 @@ export class ExecutionContext {
}
setWeb3 (context, web3) {
web3.setConfig(config)
this.customWeb3[context] = web3
}

@ -11,12 +11,14 @@ const providerConfig = {
blockNumber: global.blockNumber || null
}
const config = { defaultTransactionType: '0x0' }
global.remixProvider = new Provider(providerConfig)
global.remixProvider.init()
global.web3Provider = new ethers.providers.Web3Provider(global.remixProvider)
global.provider = global.web3Provider
global.ethereum = global.web3Provider
global.web3 = new Web3(global.web3Provider)
global.web3.eth.setConfig(config)
const isFactoryOptions = (signerOrOptions: any) => {
if (!signerOrOptions || signerOrOptions === undefined || signerOrOptions instanceof ethers.Signer) return false

Loading…
Cancel
Save