Skip to content

Commit

Permalink
Implement a hotfix for ethers
Browse files Browse the repository at this point in the history
  • Loading branch information
alcuadrado committed Oct 3, 2020
1 parent 1974956 commit cb0edd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/buidler-ethers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nomiclabs/buidler-ethers",
"version": "2.0.0",
"version": "2.0.1",
"description": "Buidler plugin for ethers",
"homepage": "https://github.com/nomiclabs/buidler/tree/master/packages/buidler-ethers",
"repository": "github:nomiclabs/buidler",
Expand Down
3 changes: 2 additions & 1 deletion packages/buidler-ethers/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ function addGasToAbiMethodsIfNecessary(
// OOG errors, as people may set the default gas to the same value as the
// block gas limit, especially on Buidler EVM.
// To avoid this, we substract 21000.
// HOTFIX: We substract 1M for now. See: https://github.com/ethers-io/ethers.js/issues/1058#issuecomment-703175279
const gasLimit = ethers.BigNumber.from(networkConfig.gas)
.sub(21000)
.sub(1000000)
.toHexString();

const modifiedAbi: any[] = [];
Expand Down

0 comments on commit cb0edd5

Please sign in to comment.