Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6169 from trufflesuite/ganache-and-node-forward
Browse files Browse the repository at this point in the history
Update Ganache to 7.9.1; turn off Node 14 and turn on Node 20 (and fix a bad type)
  • Loading branch information
haltman-at committed Aug 25, 2023
2 parents e10de93 + 2882277 commit cc26d74
Show file tree
Hide file tree
Showing 39 changed files with 779 additions and 994 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest]
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x, 20.x]
env: [GETH=true, PACKAGES=true, INTEGRATION=true]
runs-on: ${{ matrix.platform }}

Expand Down
2 changes: 1 addition & 1 deletion packages/artifactor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@types/node": "~12.12.0",
"chai": "^4.2.0",
"debug": "^4.3.1",
"ganache": "7.9.0",
"ganache": "7.9.1",
"mocha": "10.1.0",
"require-nocache": "^1.0.0",
"sinon": "^9.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/compile-solidity/src/shims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const formatLinkReferences = (
*/
linkReferences: {
[sourcePath: string]: {
[libraryName: string]: Array<{ start: 0; length: 20 }>;
[libraryName: string]: Array<{ start: number; length: 20 }>;
};
}
): Common.LinkReference[] => {
Expand Down
2 changes: 1 addition & 1 deletion packages/contract-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"bignumber.js": "^7.2.1",
"chai": "^4.2.0",
"debug": "^4.3.1",
"ganache": "7.9.0",
"ganache": "7.9.1",
"mocha": "10.1.0",
"sinon": "^9.0.2",
"web3": "1.10.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"del": "^2.2.0",
"ethereum-cryptography": "1.1.2",
"fs-extra": "^9.1.0",
"ganache": "7.9.0",
"ganache": "7.9.1",
"get-port": "^5.1.1",
"get-random-values": "^1.2.2",
"glob": "^7.1.6",
Expand Down
4 changes: 2 additions & 2 deletions packages/dashboard-hardhat-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
"@types/mocha": "^5.2.6",
"@types/node": "^18.14.1",
"chai": "^4.2.0",
"hardhat": "^2.0.0",
"hardhat": "^2.17.1",
"mocha": "10.1.0",
"mocha-suppress-logs": "^0.3.1",
"ts-node": "^8.1.0",
"typescript": "^4.9.5"
},
"peerDependencies": {
"hardhat": "^2.0.0"
"hardhat": "^2.17.1"
},
"dependencies": {
"@truffle/config": "^1.3.59",
Expand Down
2 changes: 1 addition & 1 deletion packages/dashboard-message-bus-e2e-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"test": "test"
},
"devDependencies": {
"@ganache/ethereum": "^0.1.5",
"@truffle/dashboard": "^0.4.2",
"@truffle/dashboard-message-bus": "^0.1.11",
"@truffle/dashboard-message-bus-client": "^0.1.11",
Expand All @@ -33,6 +32,7 @@
"@types/node": "~12.12.0",
"@types/web3": "1.0.20",
"ethers": "^5.6.2",
"ganache": "7.9.1",
"jest": "29.1.2",
"ts-jest": "29.0.3"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe("DashboardServer", () => {
let clientOptions: DashboardMessageBusClientOptions;

beforeAll(async () => {
ganacheProvider = Ganache.provider<"ethereum">({
ganacheProvider = Ganache.provider({
logging: { quiet: true }
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"debug": "^4.3.2",
"ethers": "^5.6.9",
"express": "^4.17.1",
"ganache": "7.9.0",
"ganache": "7.9.1",
"get-port": "^5.1.1",
"highlightjs-solidity": "^2.0.6",
"idb": "^7.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"@types/web3": "1.0.20",
"change-case": "3.0.2",
"fast-check": "3.1.1",
"ganache": "7.9.0",
"ganache": "7.9.1",
"hkts": "^0.3.1",
"jest": "29.1.2",
"madge": "^5.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/debugger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"change-case": "3.0.2",
"faker": "5.5.3",
"fs-extra": "^9.1.0",
"ganache": "7.9.0",
"ganache": "7.9.1",
"mocha": "10.1.0",
"mochapack": "^2.1.2",
"nyc": "^13.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/decoder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@types/debug": "^4.1.5",
"@types/web3": "1.0.20",
"chai": "^4.2.0",
"ganache": "7.9.0",
"ganache": "7.9.1",
"lodash": "^4.17.21",
"mocha": "10.1.0",
"sinon": "^9.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/deployer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@truffle/config": "^1.3.59",
"@truffle/environment": "^0.2.157",
"@truffle/workflow-compile": "^4.0.68",
"ganache": "7.9.0",
"ganache": "7.9.1",
"mocha": "10.1.0",
"sinon": "^9.0.2",
"web3": "1.10.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/encoder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"chai": "^4.2.0",
"fast-check": "3.1.1",
"fs-extra": "^9.1.0",
"ganache": "7.9.0",
"ganache": "7.9.1",
"jest": "29.1.2",
"jest-transform-stealthy-require": "^1.0.0",
"ts-jest": "29.0.3",
Expand Down
15 changes: 6 additions & 9 deletions packages/encoder/test/address.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import type { ContractObject as Artifact } from "@truffle/contract-schema/spec";
import type TruffleConfig from "@truffle/config";
import * as Abi from "@truffle/abi-utils";
import Ganache from "ganache";
import type { Provider } from "web3/providers";

import { prepareContracts } from "./helpers";

Expand All @@ -26,21 +25,19 @@ const addresses: { [name: string]: string } = {
beforeAll(async () => {
//prepare contracts and artifacts

// need to ts-ignore due to a strict-null-checks issue in Ganache
// (https://github.com/trufflesuite/ganache/issues/2125)
// remove this ts-ignore once that issue is fixed
// @ts-ignore
const provider: Provider = Ganache.provider({
seed: "encoder",
gasLimit: 7000000,
const provider = Ganache.provider({
logging: {
quiet: true
},
wallet: {
seed: "encoder"
},
miner: {
//note: we should ideally set strict here, but that causes a test
//failure in the ENS testing; we should figure out what's up with
//that so we can set strict
instamine: "eager"
instamine: "eager",
blockGasLimit: 7000000
}
});

Expand Down
15 changes: 6 additions & 9 deletions packages/encoder/test/array.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import * as Codec from "@truffle/codec";
import type { ContractObject as Artifact } from "@truffle/contract-schema/spec";
import * as Abi from "@truffle/abi-utils";
import Ganache from "ganache";
import type { Provider } from "web3/providers";

import BN from "bn.js";

Expand All @@ -25,21 +24,19 @@ const addresses: { [name: string]: string } = {
beforeAll(async () => {
//prepare contracts and artifacts

// need to ts-ignore due to a strict-null-checks issue in Ganache
// (https://github.com/trufflesuite/ganache/issues/2125)
// remove this ts-ignore once that issue is fixed
// @ts-ignore
const provider: Provider = Ganache.provider({
seed: "encoder",
gasLimit: 7000000,
const provider = Ganache.provider({
logging: {
quiet: true
},
wallet: {
seed: "encoder"
},
miner: {
//note: we should ideally set strict here, but that causes a test
//failure in the ENS testing; we should figure out what's up with
//that so we can set strict
instamine: "eager"
instamine: "eager",
blockGasLimit: 7000000
}
});

Expand Down
15 changes: 6 additions & 9 deletions packages/encoder/test/bool.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import * as Codec from "@truffle/codec";
import type { ContractObject as Artifact } from "@truffle/contract-schema/spec";
import * as Abi from "@truffle/abi-utils";
import Ganache from "ganache";
import type { Provider } from "web3/providers";

import BN from "bn.js";

Expand All @@ -25,21 +24,19 @@ const addresses: { [name: string]: string } = {
beforeAll(async () => {
//prepare contracts and artifacts

// need to ts-ignore due to a strict-null-checks issue in Ganache
// (https://github.com/trufflesuite/ganache/issues/2125)
// remove this ts-ignore once that issue is fixed
// @ts-ignore
const provider: Provider = Ganache.provider({
seed: "encoder",
gasLimit: 7000000,
const provider = Ganache.provider({
logging: {
quiet: true
},
wallet: {
seed: "encoder"
},
miner: {
//note: we should ideally set strict here, but that causes a test
//failure in the ENS testing; we should figure out what's up with
//that so we can set strict
instamine: "eager"
instamine: "eager",
blockGasLimit: 7000000
}
});

Expand Down
15 changes: 6 additions & 9 deletions packages/encoder/test/bytes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import * as Codec from "@truffle/codec";
import type { ContractObject as Artifact } from "@truffle/contract-schema/spec";
import * as Abi from "@truffle/abi-utils";
import Ganache from "ganache";
import type { Provider } from "web3/providers";

import BN from "bn.js";
import Big from "big.js";
Expand All @@ -30,21 +29,19 @@ const addresses: { [name: string]: string } = {
beforeAll(async () => {
//prepare contracts and artifacts

// need to ts-ignore due to a strict-null-checks issue in Ganache
// (https://github.com/trufflesuite/ganache/issues/2125)
// remove this ts-ignore once that issue is fixed
// @ts-ignore
const provider: Provider = Ganache.provider({
seed: "encoder",
gasLimit: 7000000,
const provider = Ganache.provider({
logging: {
quiet: true
},
wallet: {
seed: "encoder"
},
miner: {
//note: we should ideally set strict here, but that causes a test
//failure in the ENS testing; we should figure out what's up with
//that so we can set strict
instamine: "eager"
instamine: "eager",
blockGasLimit: 7000000
}
});

Expand Down
15 changes: 6 additions & 9 deletions packages/encoder/test/constructor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import * as Codec from "@truffle/codec";
import { Shims } from "@truffle/compile-common";
import type { ContractObject as Artifact } from "@truffle/contract-schema/spec";
import Ganache from "ganache";
import type { Provider } from "web3/providers";

import { prepareContracts } from "./helpers";

Expand All @@ -23,21 +22,19 @@ const addresses: { [name: string]: string } = {
beforeAll(async () => {
//prepare contracts and artifacts

// need to ts-ignore due to a strict-null-checks issue in Ganache
// (https://github.com/trufflesuite/ganache/issues/2125)
// remove this ts-ignore once that issue is fixed
// @ts-ignore
const provider: Provider = Ganache.provider({
seed: "encoder",
gasLimit: 7000000,
const provider = Ganache.provider({
logging: {
quiet: true
},
wallet: {
seed: "encoder"
},
miner: {
//note: we should ideally set strict here, but that causes a test
//failure in the ENS testing; we should figure out what's up with
//that so we can set strict
instamine: "eager"
instamine: "eager",
blockGasLimit: 7000000
}
});

Expand Down
15 changes: 6 additions & 9 deletions packages/encoder/test/decimal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import * as Codec from "@truffle/codec";
import type { ContractObject as Artifact } from "@truffle/contract-schema/spec";
import * as Abi from "@truffle/abi-utils";
import Ganache from "ganache";
import type { Provider } from "web3/providers";

import BN from "bn.js";
import BigNumber from "bignumber.js";
Expand All @@ -31,21 +30,19 @@ const addresses: { [name: string]: string } = {
beforeAll(async () => {
//prepare contracts and artifacts

// need to ts-ignore due to a strict-null-checks issue in Ganache
// (https://github.com/trufflesuite/ganache/issues/2125)
// remove this ts-ignore once that issue is fixed
// @ts-ignore
const provider: Provider = Ganache.provider({
seed: "encoder",
gasLimit: 7000000,
const provider = Ganache.provider({
logging: {
quiet: true
},
wallet: {
seed: "encoder"
},
miner: {
//note: we should ideally set strict here, but that causes a test
//failure in the ENS testing; we should figure out what's up with
//that so we can set strict
instamine: "eager"
instamine: "eager",
blockGasLimit: 7000000
}
});

Expand Down
15 changes: 6 additions & 9 deletions packages/encoder/test/function.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import * as Codec from "@truffle/codec";
import type { ContractObject as Artifact } from "@truffle/contract-schema/spec";
import * as Abi from "@truffle/abi-utils";
import Ganache from "ganache";
import type { Provider } from "web3/providers";

import { prepareContracts } from "./helpers";

Expand All @@ -23,21 +22,19 @@ const addresses: { [name: string]: string } = {
beforeAll(async () => {
//prepare contracts and artifacts

// need to ts-ignore due to a strict-null-checks issue in Ganache
// (https://github.com/trufflesuite/ganache/issues/2125)
// remove this ts-ignore once that issue is fixed
// @ts-ignore
const provider: Provider = Ganache.provider({
seed: "encoder",
gasLimit: 7000000,
const provider = Ganache.provider({
logging: {
quiet: true
},
wallet: {
seed: "encoder"
},
miner: {
//note: we should ideally set strict here, but that causes a test
//failure in the ENS testing; we should figure out what's up with
//that so we can set strict
instamine: "eager"
instamine: "eager",
blockGasLimit: 7000000
}
});

Expand Down

0 comments on commit cc26d74

Please sign in to comment.