Skip to content

Commit

Permalink
Fixed Etherscan string change and enabled all tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jul 3, 2021
1 parent bde8614 commit a1f8d18
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion packages/providers/src.ts/etherscan-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function checkError(method: string, error: any, transaction: any): any {
});
}

if (message.match(/execution failed due to an exception/)) {
if (message.match(/execution failed due to an exception|execution reverted/)) {
logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {
error, method, transaction
});
Expand Down
16 changes: 1 addition & 15 deletions packages/tests/src.ts/test-providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -763,18 +763,6 @@ Object.keys(blockchainData).forEach((network) => {

return receipt;
}, test, (provider: string, network: string, test: TestDescription) => {

// @TODO: Remove once Etherscan fixes whatever makes this unhappy
if (provider === "EtherscanProvider") {
if (hash === "0x55c477790b105e69e98afadf0505cbda606414b0187356137132bf24945016ce") {
return true;
}

if (hash === "0xf724f1d6813f13fb523c5f6af6261d06d41138dd094fff723e09fb0f893f03e6") {
return true;
}
}

return false;
});
});
Expand All @@ -786,9 +774,7 @@ Object.keys(blockchainData).forEach((network) => {
name: `throws correct ${ code } error`,
networks: [ "ropsten" ],
checkSkip: (provider: string, network: string, test: TestDescription) => {
// @TODO: Remove once Etherscan supports EIP-1559
return (code === ethers.utils.Logger.errors.UNPREDICTABLE_GAS_LIMIT && provider === "EtherscanProvider");
//return false;
return false;
},
execute: async (provider: ethers.providers.Provider) => {
try {
Expand Down

0 comments on commit a1f8d18

Please sign in to comment.