Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 2794eba

Browse files
committed
Replace ganache-cli with ganache
1 parent 5866c8c commit 2794eba

File tree

6 files changed

+3105
-5736
lines changed

6 files changed

+3105
-5736
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ coverage/
88
coverage.json
99
src/ethers
1010
src/web3
11-
ganache-cli/
11+
ganache/
1212
dist/
1313
.vscode/
1414
.env

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM trufflesuite/ganache-cli
1+
FROM trufflesuite/ganache
22

33
WORKDIR /app
44
COPY data/ /app/data
55

6-
CMD ["ganache-cli", "--db", "data/", "-h", "0.0.0.0", "-p", "8545"]
6+
CMD ["ganache", "--database.dbPath", "data/", "--server.host", "0.0.0.0", "--server.port", "8545"]

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
"generate-types": "npm run generate-types:ethers",
2929
"generate-types:ethers": "npx typechain \"build/contracts/*\" --target=ethers-v5 --out-dir src/ethers",
3030
"test": "echo \\\\\\\"Error: no test specified\\\\\\\" && exit 1",
31-
"deploy:local:1": "concurrently --raw --kill-others --success first \"ganache-cli --chainId 1337 -d --db data/ --m 'black toward wish jar twin produce remember fluid always confirm bacon slush' \" \"truffle migrate --network test\"",
32-
"deploy:local:2": "concurrently --raw --kill-others --success first \"ganache-cli --chainId 1338 -d --db data/ --m 'black toward wish jar twin produce remember fluid always confirm bacon slush' \" \"truffle migrate --network test2\""
31+
"deploy:local:1": "concurrently --raw --kill-others --success first \"ganache --chain.chainId 1337 --database.dbPath data/ --wallet.mnemonic 'black toward wish jar twin produce remember fluid always confirm bacon slush' \" \"truffle migrate --network test\"",
32+
"deploy:local:2": "concurrently --raw --kill-others --success first \"ganache --chain.chainId 1338 --database.dbPath data/ --wallet.mnemonic 'black toward wish jar twin produce remember fluid always confirm bacon slush' \" \"truffle migrate --network test2\""
3333
},
3434
"author": "Sygma",
3535
"license": "BUSL-1.1",
@@ -49,19 +49,19 @@
4949
"eth-sig-util": "^3.0.1",
5050
"ethereumjs-wallet": "^1.0.2",
5151
"ethers": "^5.5.4",
52-
"ganache-cli": "^6.12.2",
52+
"ganache": "^7.7.2",
5353
"lodash.template": "^4.5.0",
54+
"minimist": "^1.2.7",
5455
"rimraf": "^3.0.2",
5556
"rollup": "^2.67.2",
5657
"rollup-plugin-node-polyfills": "^0.2.1",
5758
"rollup-plugin-peer-deps-external": "^2.2.4",
5859
"rollup-plugin-typescript2": "^0.31.2",
5960
"solidity-coverage": "^0.7.20",
60-
"truffle": "^5.4.32",
61+
"truffle": "^5.6.9",
6162
"truffle-assertions": "^0.9.2",
6263
"typechain": "^7.0.0",
63-
"typescript": "^4.5.5",
64-
"minimist": "^1.2.7"
64+
"typescript": "^4.5.5"
6565
},
6666
"peerDependencies": {
6767
"ethers": ">= 5.0.0"

scripts/install_deps.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ else
1414
(set -x; npm install --global truffle)
1515
fi
1616

17-
if [ -x "$(command -v ganache-cli)" ]
17+
if [ -x "$(command -v ganache)" ]
1818
then
19-
echo "ganache-cli found, skipping install"
19+
echo "ganache found, skipping install"
2020
else
21-
(set -x; npm install --global ganache-cli)
21+
(set -x; npm install --global ganache)
2222
fi
2323

2424
if [ -x "$(command -v abigen)" ]
@@ -42,4 +42,3 @@ else
4242
echo "Operating system not supported, please manually install: https://geth.ethereum.org/docs/install-and-build/installing-geth"
4343
esac
4444
fi
45-

scripts/start_ganache.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ PORT=${PORT:-8545}
1010

1111
echo "Running ganache..."
1212
if [[ $SILENT ]]; then
13-
ganache-cli -q -p $PORT --account "0x000000000000000000000000000000000000000000000000000000616c696365,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000000626f62,100000000000000000000" --account "0x00000000000000000000000000000000000000000000000000636861726c6965,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000064617665,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000000657665,100000000000000000000" &
13+
ganache -q -p $PORT --database.dbPath data/ --chain.vmErrorsOnRPCResponse=true --wallet.accounts "0x000000000000000000000000000000000000000000000000000000616c696365,100000000000000000000" --wallet.accounts "0x0000000000000000000000000000000000000000000000000000000000626f62,100000000000000000000" --wallet.accounts "0x00000000000000000000000000000000000000000000000000636861726c6965,100000000000000000000" --wallet.accounts "0x0000000000000000000000000000000000000000000000000000000064617665,100000000000000000000" --wallet.accounts "0x0000000000000000000000000000000000000000000000000000000000657665,100000000000000000000" &
1414
# Otherwise CI will run tests before ganache has started
1515
sleep 3
1616
else
17-
ganache-cli -p $PORT --account "0x000000000000000000000000000000000000000000000000000000616c696365,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000000626f62,100000000000000000000" --account "0x00000000000000000000000000000000000000000000000000636861726c6965,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000064617665,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000000657665,100000000000000000000"
18-
fi
17+
ganache -p $PORT --database.dbPath data/ --chain.vmErrorsOnRPCResponse=true --wallet.accounts "0x000000000000000000000000000000000000000000000000000000616c696365,100000000000000000000" --wallet.accounts "0x0000000000000000000000000000000000000000000000000000000000626f62,100000000000000000000" --wallet.accounts "0x00000000000000000000000000000000000000000000000000636861726c6965,100000000000000000000" --wallet.accounts "0x0000000000000000000000000000000000000000000000000000000064617665,100000000000000000000" --wallet.accounts "0x0000000000000000000000000000000000000000000000000000000000657665,100000000000000000000"
18+
fi

0 commit comments

Comments
 (0)