Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ganache-cli with ganache #92

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ coverage/
coverage.json
src/ethers
src/web3
ganache-cli/
ganache/
dist/
.vscode/
.env
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM trufflesuite/ganache-cli
FROM trufflesuite/ganache

WORKDIR /app
COPY data/ /app/data

CMD ["ganache-cli", "--db", "data/", "-h", "0.0.0.0", "-p", "8545"]
CMD ["ganache", "--database.dbPath", "data/", "--server.host", "0.0.0.0", "--server.port", "8545"]
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"generate-types": "npm run generate-types:ethers",
"generate-types:ethers": "npx typechain \"build/contracts/*\" --target=ethers-v5 --out-dir src/ethers",
"test": "echo \\\\\\\"Error: no test specified\\\\\\\" && exit 1",
"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\"",
"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\""
"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\"",
"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\""
},
"author": "Sygma",
"license": "BUSL-1.1",
Expand All @@ -49,19 +49,19 @@
"eth-sig-util": "^3.0.1",
"ethereumjs-wallet": "^1.0.2",
"ethers": "^5.5.4",
"ganache-cli": "^6.12.2",
"ganache": "^7.7.2",
"lodash.template": "^4.5.0",
"minimist": "^1.2.7",
"rimraf": "^3.0.2",
"rollup": "^2.67.2",
"rollup-plugin-node-polyfills": "^0.2.1",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-typescript2": "^0.31.2",
"solidity-coverage": "^0.7.20",
"truffle": "^5.4.32",
"truffle": "^5.6.9",
"truffle-assertions": "^0.9.2",
"typechain": "^7.0.0",
"typescript": "^4.5.5",
"minimist": "^1.2.7"
"typescript": "^4.5.5"
},
"peerDependencies": {
"ethers": ">= 5.0.0"
Expand Down
7 changes: 3 additions & 4 deletions scripts/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ else
(set -x; npm install --global truffle)
fi

if [ -x "$(command -v ganache-cli)" ]
if [ -x "$(command -v ganache)" ]
then
echo "ganache-cli found, skipping install"
echo "ganache found, skipping install"
else
(set -x; npm install --global ganache-cli)
(set -x; npm install --global ganache)
fi

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

6 changes: 3 additions & 3 deletions scripts/start_ganache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ PORT=${PORT:-8545}

echo "Running ganache..."
if [[ $SILENT ]]; then
ganache-cli -q -p $PORT --account "0x000000000000000000000000000000000000000000000000000000616c696365,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000000626f62,100000000000000000000" --account "0x00000000000000000000000000000000000000000000000000636861726c6965,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000064617665,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000000657665,100000000000000000000" &
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" &
# Otherwise CI will run tests before ganache has started
sleep 3
else
ganache-cli -p $PORT --account "0x000000000000000000000000000000000000000000000000000000616c696365,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000000626f62,100000000000000000000" --account "0x00000000000000000000000000000000000000000000000000636861726c6965,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000064617665,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000000657665,100000000000000000000"
fi
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"
fi
Loading