diff --git a/apps/remix-ide/src/app/tabs/web3-provider.js b/apps/remix-ide/src/app/tabs/web3-provider.js index 89b7528739..1489e8e37a 100644 --- a/apps/remix-ide/src/app/tabs/web3-provider.js +++ b/apps/remix-ide/src/app/tabs/web3-provider.js @@ -1,6 +1,7 @@ import { Plugin } from '@remixproject/engine' import * as packageJson from '../../../../../package.json' import {isBigInt} from 'web3-validator' +import { addressToString } from "@remix-ui/helper" export const profile = { name: 'web3Provider', @@ -55,7 +56,11 @@ export class Web3ProviderModule extends Plugin { return } const contractData = await this.call('compilerArtefacts', 'getContractDataFromAddress', receipt.contractAddress) - if (contractData) this.call('udapp', 'addInstance', receipt.contractAddress, contractData.contract.abi, contractData.name) + if (contractData) { + this.call('udapp', 'addInstance', receipt.contractAddress, contractData.contract.abi, contractData.name) + const data = await this.call('compilerArtefacts', 'getCompilerAbstract', contractData.file) + await this.call('compilerArtefacts', 'addResolvedContract', addressToString(receipt.contractAddress), data) + } }, 50) } } diff --git a/libs/remix-simulator/src/methods/accounts.ts b/libs/remix-simulator/src/methods/accounts.ts index 49be664d19..62a8411a0d 100644 --- a/libs/remix-simulator/src/methods/accounts.ts +++ b/libs/remix-simulator/src/methods/accounts.ts @@ -106,6 +106,6 @@ export class Web3Accounts { } eth_chainId (_payload, cb) { - return cb(null, 1337) + return cb(null, '0x539') // 0x539 is hex of 1337 } }