|
|
@ -75,8 +75,14 @@ export default class FetchAndCompile extends Plugin { |
|
|
|
|
|
|
|
|
|
|
|
let name = network.name.toLowerCase() |
|
|
|
let name = network.name.toLowerCase() |
|
|
|
name === 'main' ? 'mainnet' : name // source-verifier api expect "mainnet" and not "main"
|
|
|
|
name === 'main' ? 'mainnet' : name // source-verifier api expect "mainnet" and not "main"
|
|
|
|
await this.call('manager', 'activatePlugin', 'source-verification') |
|
|
|
let data |
|
|
|
const data = await this.call('source-verification', 'fetch', contractAddress, name.toLowerCase()) |
|
|
|
try { |
|
|
|
|
|
|
|
data = await this.call('source-verification', 'fetch', contractAddress, name.toLowerCase()) |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
setTimeout(_ => this.emit('sourceVerificationNotAvailable'), 0) |
|
|
|
|
|
|
|
this.unresolvedAddresses.push(contractAddress) |
|
|
|
|
|
|
|
return localCompilation() |
|
|
|
|
|
|
|
} |
|
|
|
if (!data || !data.metadata) { |
|
|
|
if (!data || !data.metadata) { |
|
|
|
setTimeout(_ => this.emit('notFound', contractAddress), 0) |
|
|
|
setTimeout(_ => this.emit('notFound', contractAddress), 0) |
|
|
|
this.unresolvedAddresses.push(contractAddress) |
|
|
|
this.unresolvedAddresses.push(contractAddress) |
|
|
|