mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Use fallback verification if related sources causes Solidity bug.
This commit is contained in:
parent
45f882b401
commit
b3870cc107
|
@ -52,7 +52,7 @@ export const verifyContract = async (
|
|||
'[ETHERSCAN][WARNING] Delaying Etherscan verification due their API can not find newly deployed contracts'
|
||||
);
|
||||
const msDelay = 3000;
|
||||
const times = 15;
|
||||
const times = 4;
|
||||
// Write a temporal file to host complex parameters for buidler-etherscan https://github.com/nomiclabs/buidler/tree/development/packages/buidler-etherscan#complex-arguments
|
||||
const {fd, path, cleanup} = await file({
|
||||
prefix: 'verify-params-',
|
||||
|
@ -65,6 +65,7 @@ export const verifyContract = async (
|
|||
address: address,
|
||||
libraries,
|
||||
constructorArgs: path,
|
||||
relatedSources: true,
|
||||
};
|
||||
await runTaskWithRetry('verify', params, times, msDelay, cleanup);
|
||||
} catch (error) {}
|
||||
|
@ -81,7 +82,12 @@ export const runTaskWithRetry = async (
|
|||
await delay(msDelay);
|
||||
|
||||
try {
|
||||
if (times) {
|
||||
if (times > 1) {
|
||||
await DRE.run(task, params);
|
||||
cleanup();
|
||||
} else if (times === 1) {
|
||||
console.log('[ETHERSCAN][WARNING] Trying to verify via uploading all sources.');
|
||||
delete params.relatedSources;
|
||||
await DRE.run(task, params);
|
||||
cleanup();
|
||||
} else {
|
||||
|
|
8719
package-lock.json
generated
8719
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -92,7 +92,7 @@
|
|||
"prettier-plugin-solidity": "^1.0.0-alpha.53",
|
||||
"pretty-quick": "^2.0.1",
|
||||
"solidity-coverage": "0.7.10",
|
||||
"temp-hardhat-etherscan": "^2.0.0",
|
||||
"temp-hardhat-etherscan": "^2.0.1",
|
||||
"ts-generator": "0.0.8",
|
||||
"ts-node": "^8.10.2",
|
||||
"tslint": "^6.1.2",
|
||||
|
|
Loading…
Reference in New Issue
Block a user