fix pinning for contract deployed using scripts

pull/4629/head
aniket-engg 8 months ago committed by Aniket
parent c389b723f1
commit 494ac7000e
  1. 11
      apps/remix-ide/src/app/tabs/web3-provider.js

@ -58,8 +58,17 @@ export class Web3ProviderModule extends Plugin {
const contractAddressStr = addressToString(receipt.contractAddress)
const contractData = await this.call('compilerArtefacts', 'getContractDataFromAddress', contractAddressStr)
if (contractData) {
this.call('udapp', 'addInstance', contractAddressStr, contractData.contract.abi, contractData.name)
const data = await this.call('compilerArtefacts', 'getCompilerAbstract', contractData.file)
const contractObject = {
name: contractData.name,
abi: contractData.contract.abi,
compiler: data,
contract: {
file : contractData.file,
object: contractData.contract
}
}
this.call('udapp', 'addInstance', contractAddressStr, contractData.contract.abi, contractData.name, contractObject)
await this.call('compilerArtefacts', 'addResolvedContract', contractAddressStr, data)
}
}, 50)

Loading…
Cancel
Save