Skip to content

Commit

Permalink
Enable London for hardhat network (gnosis/gp-v2-contracts#774)
Browse files Browse the repository at this point in the history
* Bump hardhat from 2.5.0 to 2.6.0

Bumps [hardhat](https://github.com/nomiclabs/hardhat) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/nomiclabs/hardhat/releases)
- [Commits](NomicFoundation/hardhat@hardhat-core-v2.5.0...hardhat-core-v2.6.0)

---
updated-dependencies:
- dependency-name: hardhat
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update tests to work in London

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
fedgiac and dependabot[bot] authored Aug 9, 2021
1 parent 5fb191c commit 9858385
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 182 deletions.
5 changes: 5 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ if (["rinkeby", "mainnet"].includes(argv.network) && INFURA_KEY === undefined) {
}

const mocha: MochaOptions = {};
let initialBaseFeePerGas: number | undefined = undefined;
switch (MOCHA_CONF) {
case undefined:
break;
Expand All @@ -53,6 +54,9 @@ switch (MOCHA_CONF) {
// - coverage compiles without optimizer and, unlike Waffle, hardhat-deploy
// strictly enforces the contract size limits from EIP-170
mocha.grep = /^(?!E2E|Task)/;
// Note: unit is Wei, not GWei. This is a workaround to make the coverage
// tool work with the London hardfork.
initialBaseFeePerGas = 1;
break;
case "ignored in coverage":
mocha.grep = /^E2E|Task/;
Expand Down Expand Up @@ -91,6 +95,7 @@ export default {
networks: {
hardhat: {
blockGasLimit: 12.5e6,
initialBaseFeePerGas,
},
mainnet: {
...sharedNetworkConfig,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"ethereum-waffle": "^3.4.0",
"ethers": "^5.4.4",
"globby": "^11.0.4",
"hardhat": "^2.5.0",
"hardhat": "^2.6.0",
"hardhat-deploy": "^0.7.3",
"hardhat-gas-reporter": "^1.0.4",
"prettier": "^2.3.2",
Expand Down
7 changes: 7 additions & 0 deletions src/ts/settlement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ export interface TradeExecution {

/**
* Order refund data.
*
* Note: after the London hardfork (specifically the introduction of EIP-3529)
* order refunds have become meaningless as the refunded amount is less than the
* gas cost of triggering the refund. The logic surrounding this feature is kept
* in order to keep full test coverage and in case the value of a refund will be
* increased again in the future. However, order refunds should not be used in
* an actual settlement.
*/
export interface OrderRefunds {
/** Refund storage used for order filled amount */
Expand Down
172 changes: 0 additions & 172 deletions test/e2e/orderRefunds.test.ts

This file was deleted.

18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@
"@ethereumjs/common" "^2.4.0"
ethereumjs-util "^7.1.0"

"@ethereumjs/vm@^5.5.0":
version "5.5.0"
resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-5.5.0.tgz#d389c5792320ef28c51366a643b8ab9d64e10a31"
integrity sha512-h6Kr6WqKUP8nVuEzCWPWEPrC63v7HFwt3gRuK7CJiyg9S0iWSBKUA/YVD4YgaSVACuxUfWaOBbwV5uGVupm5PQ==
"@ethereumjs/vm@^5.5.2":
version "5.5.2"
resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-5.5.2.tgz#918a2c1000aaa9fdbe6007a4fdc2c62833122adf"
integrity sha512-AydZ4wfvZAsBuFzs3xVSA2iU0hxhL8anXco3UW3oh9maVC34kTEytOfjHf06LTEfN0MF9LDQ4ciLa7If6ZN/sg==
dependencies:
"@ethereumjs/block" "^3.4.0"
"@ethereumjs/blockchain" "^5.4.0"
Expand Down Expand Up @@ -5500,16 +5500,16 @@ hardhat-gas-reporter@^1.0.4:
eth-gas-reporter "^0.2.20"
sha1 "^1.1.1"

hardhat@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.5.0.tgz#0a10bf85d9b2c3c7c12cfa4e35454296c670c054"
integrity sha512-S5CWcmiFZlFF2qFGyf5LlgVnJDXwTs5UBKU3GPQCjsUD3NAIWzXr/4xDSij3YWdg751axgLiKAJM01cHcxGb7A==
hardhat@^2.6.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.6.0.tgz#a00a44d36559a880c170dca6363cc33f7545364b"
integrity sha512-NEM2pe11QXWXB7k49heOLQA9vxihG4DJ0712KjMT9NYSZgLOMcWswJ3tvn+/ND6vzLn6Z4pqr2x/kWSfllWFuw==
dependencies:
"@ethereumjs/block" "^3.4.0"
"@ethereumjs/blockchain" "^5.4.0"
"@ethereumjs/common" "^2.4.0"
"@ethereumjs/tx" "^3.3.0"
"@ethereumjs/vm" "^5.5.0"
"@ethereumjs/vm" "^5.5.2"
"@ethersproject/abi" "^5.1.2"
"@sentry/node" "^5.18.1"
"@solidity-parser/parser" "^0.11.0"
Expand Down

0 comments on commit 9858385

Please sign in to comment.