clear cache

pull/2156/head
yann300 3 years ago
parent e30c246a9f
commit a6c69d4ec4
  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?) { debug (hash, web3?) {
try {
this.call('fetchAndCompile', 'clearCache')
} catch (e) {
console.error(e)
}
this.debugHash = hash this.debugHash = hash
if (web3) this._web3 = web3 if (web3) this._web3 = web3
else this._web3 = this.initialWeb3 else this._web3 = this.initialWeb3

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

Loading…
Cancel
Save