use current provider for running script

pull/4255/head
yann300 1 year ago
parent 13db0561b8
commit 4f65cb524f
  1. 2
      apps/remix-ide/src/app/plugins/solidity-script.tsx
  2. 2
      apps/remix-ide/src/blockchain/blockchain.tsx

@ -62,7 +62,7 @@ export class SolidityScript extends Plugin {
return
}
const bytecode = '0x' + contract.object.evm.bytecode.object
const web3 = await this.call('blockchain', 'web3VM')
const web3 = await this.call('blockchain', 'web3')
const accounts = await this.call('blockchain', 'getAccounts')
if (!accounts || accounts.length === 0) {
throw new Error('no account available')

@ -23,7 +23,7 @@ const profile = {
name: 'blockchain',
displayName: 'Blockchain',
description: 'Blockchain - Logic',
methods: ['getCode', 'getTransactionReceipt', 'addProvider', 'removeProvider', 'getCurrentFork', 'getAccounts', 'web3VM', 'getProvider'],
methods: ['getCode', 'getTransactionReceipt', 'addProvider', 'removeProvider', 'getCurrentFork', 'getAccounts', 'web3VM', 'web3', 'getProvider'],
version: packageJson.version
}

Loading…
Cancel
Save