Skip to content

Commit

Permalink
set 0x0 as defaultTransactionType
Browse files Browse the repository at this point in the history
  • Loading branch information
yann300 committed Nov 8, 2023
1 parent 6e393ea commit 33cf6a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/remix-ide/src/blockchain/execution-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -59,6 +61,7 @@ export class ExecutionContext {
}

setWeb3 (context, web3) {
web3.setConfig(config)
this.customWeb3[context] = web3
}

Expand Down
2 changes: 2 additions & 0 deletions libs/ghaction-helper/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 33cf6a6

Please sign in to comment.