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

chore: rename ganache-core to ganache #1044

Merged
merged 1 commit into from
Aug 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
- recommendation: use [nvm](https://github.com/nvm-sh/nvm) on Linux and macOS, and [nvm-windows](https://github.com/coreybutler/nvm-windows) on
Windows, to configure your node version.
- On Linux and macOS, if you have `nvm` installed, just run `nvm use` to switch to Node.js v10.13.0.
- `git clone [email protected]:trufflesuite/ganache-core.git`
- `cd ganache-core`
- `git clone [email protected]:trufflesuite/ganache.git`
- `cd ganache`
- `npm install` (use npm v6)
- On Linux and macOS: run `source completions.sh` to enable autocomplete for npm scripts.

Expand Down Expand Up @@ -169,7 +169,7 @@ These are guidelines, not rules. :-)
support, and make sure it's absolutely necessary.
- Pin all dependencies, even dev dependencies.
- Use npm; do not use yarn.
- Don't use web3, ethers, etc in ganache-core core code. (Tests are fine)
- Don't use web3, ethers, etc in ganache core code. (Tests are fine)
- Ensure a smooth development experience on Windows, Mac, and Linux.
- Do not use bash scripts for critical development or configuration.
- Do not use CLI commands in npm scripts or build scripts that aren't available by default on supported platforms.
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-docs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ function renderTag(method: Method, tag: Tag, i: number) {

function renderSource(method: Method) {
const source = method.sources[0];
return `<a href="https://github.com/trufflesuite/ganache-core/blob/next/src/${source.fileName}#L${source.line}" target="_blank" rel="noopener">source</a>`;
return `<a href="https://github.com/trufflesuite/ganache/blob/next/src/${source.fileName}#L${source.line}" target="_blank" rel="noopener">source</a>`;
}

function renderTags(method: Method) {
Expand Down
6 changes: 3 additions & 3 deletions scripts/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ process.stdout.write(`${COLORS.Reset}`);
version,
description: "",
author: packageAuthor || rootPackageJson.author,
homepage: `https://github.com/trufflesuite/ganache-core/tree/develop/src/${location}/${folderName}#readme`,
homepage: `https://github.com/trufflesuite/ganache/tree/develop/src/${location}/${folderName}#readme`,
license: "MIT",
main: "lib/index.js",
typings: "typings",
Expand All @@ -159,7 +159,7 @@ process.stdout.write(`${COLORS.Reset}`);
files: ["lib", "typings"],
repository: {
type: "git",
url: "https://github.com/trufflesuite/ganache-core.git",
url: "https://github.com/trufflesuite/ganache.git",
directory: `src/${location}/${folderName}`
},
scripts: {
Expand All @@ -169,7 +169,7 @@ process.stdout.write(`${COLORS.Reset}`);
"cross-env TS_NODE_COMPILER=ttypescript TS_NODE_FILES=true mocha --exit --check-leaks --throw-deprecation --trace-warnings --require ts-node/register 'tests/**/*.test.ts'"
},
bugs: {
url: "https://github.com/trufflesuite/ganache-core/issues"
url: "https://github.com/trufflesuite/ganache/issues"
},
keywords: [
"ganache",
Expand Down
6 changes: 3 additions & 3 deletions src/chains/ethereum/address/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version": "0.1.1-canary.1336",
"description": "",
"author": "David Murdoch",
"homepage": "https://github.com/trufflesuite/ganache-core/tree/develop/src/chains/ethereum/address#readme",
"homepage": "https://github.com/trufflesuite/ganache/tree/develop/src/chains/ethereum/address#readme",
"license": "MIT",
"main": "lib/index.js",
"typings": "typings",
Expand All @@ -21,7 +21,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/trufflesuite/ganache-core.git",
"url": "https://github.com/trufflesuite/ganache.git",
"directory": "src/chains/ethereum/address"
},
"scripts": {
Expand All @@ -30,7 +30,7 @@
"mocha": "cross-env TS_NODE_COMPILER=ttypescript TS_NODE_FILES=true mocha --exit --check-leaks --throw-deprecation --trace-warnings --require ts-node/register 'tests/**/*.test.ts'"
},
"bugs": {
"url": "https://github.com/trufflesuite/ganache-core/issues"
"url": "https://github.com/trufflesuite/ganache/issues"
},
"keywords": [
"ganache",
Expand Down
6 changes: 3 additions & 3 deletions src/chains/ethereum/block/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version": "0.1.1-canary.1336",
"description": "",
"author": "David Murdoch",
"homepage": "https://github.com/trufflesuite/ganache-core/tree/develop/src/chains/ethereum/block#readme",
"homepage": "https://github.com/trufflesuite/ganache/tree/develop/src/chains/ethereum/block#readme",
"license": "MIT",
"main": "lib/index.js",
"typings": "typings",
Expand All @@ -21,7 +21,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/trufflesuite/ganache-core.git",
"url": "https://github.com/trufflesuite/ganache.git",
"directory": "src/chains/ethereum/block"
},
"scripts": {
Expand All @@ -30,7 +30,7 @@
"mocha": "cross-env TS_NODE_COMPILER=ttypescript TS_NODE_FILES=true mocha --exit --check-leaks --throw-deprecation --trace-warnings --require ts-node/register 'tests/**/*.test.ts'"
},
"bugs": {
"url": "https://github.com/trufflesuite/ganache-core/issues"
"url": "https://github.com/trufflesuite/ganache/issues"
},
"keywords": [
"ganache",
Expand Down
2 changes: 1 addition & 1 deletion src/chains/ethereum/block/src/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class Block {
this._raw = deserialized[0];
this._rawTransactions = deserialized[1] || [];
// TODO: support actual uncle data (needed for forking!)
// Issue: https://github.com/trufflesuite/ganache-core/issues/786
// Issue: https://github.com/trufflesuite/ganache/issues/786
// const uncles = deserialized[2];
const totalDifficulty = deserialized[3];
this.header = makeHeader(this._raw, totalDifficulty);
Expand Down
6 changes: 3 additions & 3 deletions src/chains/ethereum/ethereum/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version": "0.1.1-canary.1336",
"description": "Ganache's Ethereum client implementation",
"author": "David Murdoch <[email protected]> (https://davidmurdoch.com)",
"homepage": "https://github.com/trufflesuite/ganache-core/tree/develop/src/ethereum/ethereum#readme",
"homepage": "https://github.com/trufflesuite/ganache/tree/develop/src/ethereum/ethereum#readme",
"license": "MIT",
"main": "lib/index.js",
"typings": "typings",
Expand All @@ -21,7 +21,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/trufflesuite/ganache-core.git",
"url": "https://github.com/trufflesuite/ganache.git",
"directory": "src/chains/ethereum/ethereum"
},
"scripts": {
Expand All @@ -33,7 +33,7 @@
"mocha": "cross-env TS_NODE_COMPILER=ttypescript TS_NODE_FILES=true mocha -s 0 -t 0 --exit --check-leaks --throw-deprecation --trace-warnings --require ts-node/register 'tests/**/*.test.ts'"
},
"bugs": {
"url": "https://github.com/trufflesuite/ganache-core/issues"
"url": "https://github.com/trufflesuite/ganache/issues"
},
"keywords": [
"ganache",
Expand Down
2 changes: 1 addition & 1 deletion src/chains/ethereum/ethereum/src/blockchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@ export default class Blockchain extends Emittery.Typed<
// #2 - Set state root of original block
//
// TODO: Forking needs the forked block number passed during this step:
// https://github.com/trufflesuite/ganache-core/blob/develop/lib/blockchain_double.js#L917
// https://github.com/trufflesuite/ganache/blob/develop/lib/blockchain_double.js#L917
const trie = this.trie.copy();
trie.setContext(
parentBlock.header.stateRoot.toBuffer(),
Expand Down
2 changes: 1 addition & 1 deletion src/chains/ethereum/ethereum/src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import sub from "subleveldown";
import encode from "encoding-down";

setGracefulCleanup();
const tmpOptions = { prefix: "ganache-core_", unsafeCleanup: true };
const tmpOptions = { prefix: "ganache_", unsafeCleanup: true };
const noop = () => Promise.resolve();

export default class Database extends Emittery {
Expand Down
2 changes: 1 addition & 1 deletion src/chains/ethereum/ethereum/tests/temp-tests.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ describe("Random tests that are temporary!", () => {
});

describe("options:account_keys_path", () => {
const fileName = join(os.tmpdir(), "/ganache-core-test-accounts.json");
const fileName = join(os.tmpdir(), "/ganache-test-accounts.json");

function cleanUp() {
try {
Expand Down
6 changes: 3 additions & 3 deletions src/chains/ethereum/options/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version": "0.1.1-canary.1336",
"description": "",
"author": "David Murdoch <[email protected]> (https://davidmurdoch.com)",
"homepage": "https://github.com/trufflesuite/ganache-core/tree/develop/src/chains/ethereum/options#readme",
"homepage": "https://github.com/trufflesuite/ganache/tree/develop/src/chains/ethereum/options#readme",
"license": "MIT",
"main": "lib/index.js",
"typings": "typings",
Expand All @@ -21,7 +21,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/trufflesuite/ganache-core.git",
"url": "https://github.com/trufflesuite/ganache.git",
"directory": "src/chains/ethereum/options"
},
"scripts": {
Expand All @@ -30,7 +30,7 @@
"mocha": "cross-env TS_NODE_COMPILER=ttypescript TS_NODE_FILES=true mocha --exit --check-leaks --throw-deprecation --trace-warnings --require ts-node/register 'tests/**/*.test.ts'"
},
"bugs": {
"url": "https://github.com/trufflesuite/ganache-core/issues"
"url": "https://github.com/trufflesuite/ganache/issues"
},
"keywords": [
"ganache",
Expand Down
6 changes: 3 additions & 3 deletions src/chains/ethereum/transaction/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version": "0.1.1-canary.1336",
"description": "",
"author": "David Murdoch",
"homepage": "https://github.com/trufflesuite/ganache-core/tree/develop/src/chains/ethereum/transaction#readme",
"homepage": "https://github.com/trufflesuite/ganache/tree/develop/src/chains/ethereum/transaction#readme",
"license": "MIT",
"main": "lib/index.js",
"typings": "typings",
Expand All @@ -21,7 +21,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/trufflesuite/ganache-core.git",
"url": "https://github.com/trufflesuite/ganache.git",
"directory": "src/chains/ethereum/transaction"
},
"scripts": {
Expand All @@ -30,7 +30,7 @@
"mocha": "cross-env TS_NODE_COMPILER=ttypescript TS_NODE_FILES=true mocha --exit --check-leaks --throw-deprecation --trace-warnings --require ts-node/register 'tests/**/*.test.ts'"
},
"bugs": {
"url": "https://github.com/trufflesuite/ganache-core/issues"
"url": "https://github.com/trufflesuite/ganache/issues"
},
"keywords": [
"ganache",
Expand Down
6 changes: 3 additions & 3 deletions src/chains/ethereum/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version": "0.1.1-canary.1336",
"description": "",
"author": "David Murdoch <[email protected]> (https://davidmurdoch.com)",
"homepage": "https://github.com/trufflesuite/ganache-core/tree/develop/src/chains/ethereum/utils#readme",
"homepage": "https://github.com/trufflesuite/ganache/tree/develop/src/chains/ethereum/utils#readme",
"license": "MIT",
"main": "lib/index.js",
"typings": "typings",
Expand All @@ -21,7 +21,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/trufflesuite/ganache-core.git",
"url": "https://github.com/trufflesuite/ganache.git",
"directory": "src/chains/ethereum/utils"
},
"scripts": {
Expand All @@ -30,7 +30,7 @@
"mocha": "cross-env TS_NODE_COMPILER=ttypescript TS_NODE_FILES=true mocha --exit --check-leaks --throw-deprecation --trace-warnings --require ts-node/register 'tests/**/*.test.ts'"
},
"bugs": {
"url": "https://github.com/trufflesuite/ganache-core/issues"
"url": "https://github.com/trufflesuite/ganache/issues"
},
"keywords": [
"ganache",
Expand Down
2 changes: 1 addition & 1 deletion src/chains/ethereum/utils/src/errors/runtime-error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class RuntimeError extends CodedError {
) {
try {
// it is possible for the `returnValue` to be gibberish that can't be
// decoded. See: https://github.com/trufflesuite/ganache-core/pull/452
// decoded. See: https://github.com/trufflesuite/ganache/pull/452
reason = rawDecode(["bytes"], returnValue.slice(4))[0].toString();
message += " " + reason;
} catch {
Expand Down
6 changes: 3 additions & 3 deletions src/chains/filecoin/filecoin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version": "0.1.1-canary.1336",
"description": "Ganache's Filecoin client implementation",
"author": "Tim Coulter",
"homepage": "https://github.com/trufflesuite/ganache-core/tree/develop/src/filecoin#readme",
"homepage": "https://github.com/trufflesuite/ganache/tree/develop/src/filecoin#readme",
"license": "MIT",
"engines": {
"node": ">=12.13.0 <=14.14.0",
Expand All @@ -24,7 +24,7 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/trufflesuite/ganache-core.git",
"url": "git+https://github.com/trufflesuite/ganache.git",
"directory": "src/chains/filecoin"
},
"scripts": {
Expand All @@ -34,7 +34,7 @@
"mocha": "ts-node ../../../../scripts/skip-if-less-than-node-12.ts || cross-env TS_NODE_COMPILER=ttypescript TS_NODE_FILES=true TS_NODE_PROJECT=tsconfig.test.json mocha --timeout 60000 --no-parallel --exit --check-leaks --throw-deprecation --trace-warnings --require ts-node/register 'tests/**/*.test.ts'"
},
"bugs": {
"url": "https://github.com/trufflesuite/ganache-core/issues"
"url": "https://github.com/trufflesuite/ganache/issues"
},
"keywords": [
"ganache",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default class AccountManager extends Manager<Account, AccountConfig> {
this.#database = database;
}

// TODO(perf): (Issue ganache-core#876) There's probably a bit of
// TODO(perf): (Issue ganache#876) There's probably a bit of
// performance optimizations that could be done here. putAccount
// is called whenever the account changes (balance, nonce,
// private key)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { RootCID, SerializedRootCID } from "../things/root-cid";
const NOTFOUND = 404;

/**
* TODO: (Issue ganache-core#868) This loads all Deal CIDs and
* TODO: (Issue ganache#868) This loads all Deal CIDs and
* then all the deals themselves into memory. The downstream
* consumers of this manager then filters them at every time
* it's used (i.e. filters them by DealInfo.State).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class PrivateKeyManager {
if (!this.#addressesWithPrivateKeys.includes(address)) {
this.#addressesWithPrivateKeys.push(address);

// TODO(perf): (Issue ganache-core#875) If the number of private
// TODO(perf): (Issue ganache#875) If the number of private
// keys becomes very large (a highly unlikely event), this would
// kill performance whenever accounts were created
this.base.put(
Expand All @@ -89,7 +89,7 @@ export default class PrivateKeyManager {
);
this.base.del(Buffer.from(address));

// TODO(perf): (Issue ganache-core#875) If the number of private
// TODO(perf): (Issue ganache#875) If the number of private
// keys becomes very large (a highly unlikely event), this would
// kill performance whenever accounts were created
await this.base.put(
Expand All @@ -107,7 +107,7 @@ export default class PrivateKeyManager {
);
this.#addressesWithPrivateKeys.unshift(address);

// TODO(perf): (Issue ganache-core#875) If the number of private
// TODO(perf): (Issue ganache#875) If the number of private
// keys becomes very large (a highly unlikely event), this would
// kill performance whenever accounts were created
await this.base.put(
Expand Down
2 changes: 1 addition & 1 deletion src/chains/filecoin/filecoin/src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const sub = require("subleveldown");
const encode = require("encoding-down");

setGracefulCleanup();
const tmpOptions = { prefix: "ganache-core_", unsafeCleanup: true };
const tmpOptions = { prefix: "ganache_", unsafeCleanup: true };
const noop = () => Promise.resolve();

export default class Database extends Emittery {
Expand Down
2 changes: 1 addition & 1 deletion src/chains/filecoin/filecoin/src/things/address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class Address extends SerializableLiteral<AddressConfig> {

async signMessage(message: Message): Promise<Buffer> {
if (this.#privateKey) {
// TODO (Issue ganache-core#867): From the code at https://git.io/Jtud2,
// TODO (Issue ganache#867): From the code at https://git.io/Jtud2,
// it appears that messages are signed using the CID. However there are
// two issues here that I spent too much time trying to figure out:
// 1. We don't generate an identical CID
Expand Down
6 changes: 3 additions & 3 deletions src/chains/filecoin/options/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version": "0.1.1-canary.1336",
"description": "",
"author": "Tim Coulter",
"homepage": "https://github.com/trufflesuite/ganache-core/tree/develop/src/chains/filecoin/options#readme",
"homepage": "https://github.com/trufflesuite/ganache/tree/develop/src/chains/filecoin/options#readme",
"license": "MIT",
"main": "lib/index.js",
"typings": "lib/src/index.d.ts",
Expand All @@ -22,7 +22,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/trufflesuite/ganache-core.git",
"url": "https://github.com/trufflesuite/ganache.git",
"directory": "src/chains/filecoin/options"
},
"scripts": {
Expand All @@ -32,7 +32,7 @@
"mocha": "cross-env TS_NODE_COMPILER=ttypescript TS_NODE_FILES=true mocha --exit --check-leaks --throw-deprecation --trace-warnings --require ts-node/register 'tests/**/*.test.ts'"
},
"bugs": {
"url": "https://github.com/trufflesuite/ganache-core/issues"
"url": "https://github.com/trufflesuite/ganache/issues"
},
"keywords": [
"ganache",
Expand Down
Loading