clear cache

pull/5370/head
yann300 3 years ago
parent bf21d38fbc
commit 55683f2ad9
  1. 5
      apps/debugger/src/app/debugger-api.ts
  2. 10
      libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts

@ -127,6 +127,11 @@ export const DebuggerApiMixin = (Base) => class extends Base {
}
debug (hash, web3?) {
try {
this.call('fetchAndCompile', 'clearCache')
} catch (e) {
console.error(e)
}
this.debugHash = hash
if (web3) this._web3 = web3
else this._web3 = this.initialWeb3

@ -8,7 +8,7 @@ import { fetchContractFromSourcify } from './helpers/fetch-sourcify'
const profile = {
name: 'fetchAndCompile',
methods: ['resolve'],
methods: ['resolve', 'clearCache'],
version: '0.0.1'
}
@ -21,6 +21,14 @@ export class FetchAndCompile extends Plugin {
this.sourceVerifierNetWork = ['Main', 'Rinkeby', 'Ropsten', 'Goerli']
}
/**
* Clear the cache
*
*/
async clearCache () {
this.unresolvedAddresses = []
}
/**
* Fetch compiliation metadata from source-Verify from a given @arg contractAddress - https://github.com/ethereum/source-verify
* Put the artifacts in the file explorer

Loading…
Cancel
Save