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

Upgrade dependency: ganache-core@2.5.5 #1924

Merged
merged 10 commits into from
Apr 23, 2019
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ language: node_js
before_install:
- sudo add-apt-repository --yes ppa:ethereum/ethereum
- sudo apt-get update
- sudo apt-get install -y dpkg solc
- sudo apt-get install -y dpkg
- npm list -g lerna --depth=0 || npm install -g lerna
- npm install -g yarn

Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-artifactor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"license": "MIT",
"devDependencies": {
"chai": "4.2.0",
"ganache-core": "2.5.1",
"ganache-core": "2.5.5",
"mocha": "5.2.0",
"require-nocache": "^1.0.0",
"solc": "0.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-contract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"browserify": "^14.0.0",
"chai": "4.2.0",
"debug": "^4.1.0",
"ganache-core": "2.5.1",
"ganache-core": "2.5.5",
"mocha": "5.2.0",
"solc": "0.5.0",
"temp": "^0.8.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/truffle-contract/test/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe("Deployments", function() {
await Example.new(2001); // Triggers error with a normal reason string
assert.fail();
} catch (error) {
assert(error.message.includes("exceeds gas limit"));
assert(error.message.includes("check your gas limit"));
assert(error.message.includes("reasonstring"));
assert(error.receipt === undefined, "Expected no receipt");
assert(error.reason === "reasonstring");
Expand All @@ -168,7 +168,7 @@ describe("Deployments", function() {
await Example.new(20001); // Triggers error with a long reason string
assert.fail();
} catch (error) {
assert(error.message.includes("exceeds gas limit"));
assert(error.message.includes("check your gas limit"));
assert(
error.message.includes(
"solidity storage is a fun lesson in endianness"
Expand Down
11 changes: 4 additions & 7 deletions packages/truffle-contract/test/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("Client appends errors (vmErrorsOnRPCResponse)", function() {
.catch(() => null);
});

it("should error w/gas limit error if constructor reverts", async function() {
it("should error w/ revert error if constructor reverts", async function() {
try {
await Example.new(13); // 13 fails a constructor require gate
assert.fail();
Expand All @@ -42,10 +42,7 @@ describe("Client appends errors (vmErrorsOnRPCResponse)", function() {
!e.message.includes("Reason"),
"Should not include reason message"
);
assert(
e.message.includes("exceeds gas limit"),
"Error should be gas limit err"
);
assert(e.message.includes("revert"), "Should include revert message");
}
});

Expand All @@ -63,8 +60,8 @@ describe("Client appends errors (vmErrorsOnRPCResponse)", function() {
"Error message should include reason"
);
assert(
e.message.includes("exceeds gas limit"),
"Error should be gas limit err"
e.message.includes("revert reasonstring"),
"Error should be revert w/ reason"
);
}
});
Expand Down
20 changes: 14 additions & 6 deletions packages/truffle-contract/test/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,16 +465,18 @@ describe("Methods", function() {
});
});

describe("revert with reason (ganache only)", function() {
it("errors with receipt and revert message", async function() {
describe("error with reason (ganache only)", function() {
it("errors with receipt and revert reason", async function() {
const example = await Example.new(1);
try {
await example.triggerRequireWithReasonError();
assert.fail();
} catch (e) {
assert(e.reason === "reasonstring");
assert(e.message.includes("reasonstring"));
assert(e.message.includes("revert"));
assert(
e.message.includes("consuming all gas"),
"Triggered require should consume all gas"
);
assert(e.receipt.status === false);
}
});
Expand Down Expand Up @@ -516,7 +518,10 @@ describe("Methods", function() {
const example = await Example.new(1);
const triggered = await example.fallbackTriggered();

assert(triggered === false, "Fallback should not have been triggered yet");
assert(
triggered === false,
"Fallback should not have been triggered yet"
);

await example.sendTransaction({
value: web3.utils.toWei("1", "ether")
Expand All @@ -533,7 +538,10 @@ describe("Methods", function() {
const example = await Example.new(1);
const triggered = await example.fallbackTriggered();

assert(triggered === false, "Fallback should not have been triggered yet");
assert(
triggered === false,
"Fallback should not have been triggered yet"
);

await example.send(web3.utils.toWei("1", "ether"));

Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"ethpm": "0.0.16",
"ethpm-registry": "0.1.0-next.2",
"fs-extra": "6.0.1",
"ganache-core": "2.5.1",
"ganache-core": "2.5.5",
"hdkey": "^1.1.0",
"lodash": "4.17.11",
"mkdirp": "^0.5.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-debugger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"express": "^4.16.2",
"faker": "^4.1.0",
"fs-extra": "6.0.1",
"ganache-core": "2.5.1",
"ganache-core": "2.5.5",
"istanbul-instrumenter-loader": "^3.0.1",
"mocha": "5.2.0",
"mocha-webpack": "^1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-deployer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"truffle-expect": "^0.0.7"
},
"devDependencies": {
"ganache-core": "2.5.1",
"ganache-core": "2.5.5",
"mocha": "5.2.0",
"truffle-reporters": "^1.0.9",
"truffle-workflow-compile": "^2.0.11",
Expand Down
22 changes: 13 additions & 9 deletions packages/truffle-deployer/test/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ describe("Error cases", function() {
assert.fail();
} catch (err) {
assert(err.message.includes("UsesExample"));
assert(err.message.includes("out of gas"));
assert(err.message.includes("value you set"));
assert(err.message.includes("Block limit"));
assert(err.message.includes("Gas sent"));
Expand All @@ -193,8 +194,8 @@ describe("Error cases", function() {
assert.fail();
} catch (err) {
assert(err.message.includes("Loops"));
assert(err.message.includes("out of gas"));
assert(err.message.includes("constructor"));
assert(err.message.includes("code couldn't be stored"));
assert(err.message.includes("check your gas limit"));
}
});

Expand All @@ -212,13 +213,12 @@ describe("Error cases", function() {
assert.fail();
} catch (err) {
assert(err.message.includes("Loops"));
assert(err.message.includes("out of gas"));
assert(err.message.includes("Gas sent"));
assert(err.message.includes("Block limit"));
assert(err.message.includes("code couldn't be stored"));
assert(err.message.includes("check your gas limit"));
}
});

it("revert", async function() {
it("constructor revert", async function() {
migrate = function() {
deployer.deploy(ExampleRevert);
};
Expand All @@ -229,11 +229,13 @@ describe("Error cases", function() {
await deployer.start();
assert.fail();
} catch (err) {
assert(err.message.includes("revert"));
assert(err.message.includes("ExampleRevert"));
assert(err.message.includes("code couldn't be stored"));
assert(err.message.includes("check your gas limit"));
}
});

it("assert", async function() {
it("failing constructor assert", async function() {
migrate = function() {
deployer.deploy(ExampleAssert);
};
Expand All @@ -244,7 +246,9 @@ describe("Error cases", function() {
await deployer.start();
assert.fail();
} catch (err) {
assert(err.message.includes("invalid opcode"));
assert(err.message.includes("ExampleAssert"));
assert(err.message.includes("code couldn't be stored"));
assert(err.message.includes("check your gas limit"));
}
});

Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-hdwallet-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"ethereumjs-tx": "^1.3.7",
"ethereumjs-util": "^5.2.0",
"ethereumjs-wallet": "^0.6.2",
"ganache-core": "2.5.1",
"ganache-core": "2.5.5",
"js-scrypt": "^0.2.0",
"mocha": "^5.1.1",
"web3": "1.0.0-beta.37",
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-interface-adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@types/bn.js": "^4.11.4",
"@types/mocha": "^5.2.6",
"@types/web3": "^1.0.18",
"ganache-core": "2.5.1",
"ganache-core": "2.5.5",
"mocha": "^6.0.2",
"ts-node": "^8.0.3",
"typescript": "^3.3.3333"
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"web3": "1.0.0-beta.37"
},
"devDependencies": {
"ganache-core": "2.5.1",
"ganache-core": "2.5.5",
"mocha": "5.2.0"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/truffle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"copy-webpack-plugin": "^4.0.1",
"eslint": "^5.7.0",
"fs-extra": "6.0.1",
"ganache-core": "2.5.1",
"ganache-core": "2.5.5",
"glob": "^7.1.2",
"go-ipfs-dep": "^0.4.17",
"husky": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ elif [ "$GETH" = true ]; then
elif [ "$PACKAGES" = true ]; then

docker pull ethereum/solc:0.4.22
sudo apt-get install -y snapd
sudo apt-get install -y snapd solc
export PATH=$PATH:/snap/bin
sudo snap install vyper --beta --devmode
lerna run --scope truffle-* test --stream --concurrency=1

elif [ "$COVERAGE" = true ]; then

docker pull ethereum/solc:0.4.22
sudo apt-get install -y jq snapd
sudo apt-get install -y jq snapd solc
export PATH=$PATH:/snap/bin
sudo snap install vyper --beta --devmode
cd packages/truffle-debugger && npm run test:coverage && \
Expand Down
11 changes: 6 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4938,7 +4938,7 @@ ethereumjs-vm@2.3.4:
rustbn.js "~0.1.1"
safe-buffer "^5.1.1"

ethereumjs-vm@^2.0.2, ethereumjs-vm@^2.1.0, ethereumjs-vm@^2.3.4, ethereumjs-vm@^2.6.0:
ethereumjs-vm@2.6.0, ethereumjs-vm@^2.0.2, ethereumjs-vm@^2.1.0, ethereumjs-vm@^2.3.4:
version "2.6.0"
resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz#76243ed8de031b408793ac33907fb3407fe400c6"
dependencies:
Expand Down Expand Up @@ -5777,9 +5777,10 @@ functional-red-black-tree@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"

ganache-core@2.5.1:
version "2.5.1"
resolved "https://registry.yarnpkg.com/ganache-core/-/ganache-core-2.5.1.tgz#731e88db70c12ac8a7c2b56a055483338523b739"
ganache-core@2.5.5:
version "2.5.5"
resolved "https://registry.yarnpkg.com/ganache-core/-/ganache-core-2.5.5.tgz#84da56de1957b6200a2d02934853fe7af89d260b"
integrity sha512-mrvPCtDjFLWmqygCx6LngWfA1hv6DH+iisEVYxRmCujstcMgzqi5UQdcKprxoO2Jx9st1fWVvDLi/tc6WHPGoA==
dependencies:
abstract-leveldown "3.0.0"
async "2.6.1"
Expand All @@ -5795,7 +5796,7 @@ ganache-core@2.5.1:
ethereumjs-block "2.1.0"
ethereumjs-tx "1.3.7"
ethereumjs-util "5.2.0"
ethereumjs-vm "^2.6.0"
ethereumjs-vm "2.6.0"
heap "0.2.6"
level-sublevel "6.6.4"
levelup "3.1.1"
Expand Down