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

Commit 632a273

Browse files
committed
Update ganache
1 parent e94e3ac commit 632a273

36 files changed

+248
-206
lines changed

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", "--db", "data/", "-h", "0.0.0.0", "-p", "8545"]

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ install-deps:
77
.PHONY: test
88
test:
99
@echo " > \033[32mTesting contracts... \033[0m "
10-
npx truffle test
10+
truffle test --stacktrace
1111

1212
compile:
1313
@echo " > \033[32mCompiling contracts... \033[0m "
14-
npx truffle compile
14+
truffle compile
1515

1616
start-ganache:
1717
@echo " > \033[32mStarting ganache... \033[0m "

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"eth-sig-util": "^3.0.1",
5959
"ethereumjs-wallet": "^1.0.2",
6060
"ethers": "^5.5.4",
61-
"ganache-cli": "^6.12.2",
61+
"ganache": "^7.9.2",
6262
"lodash.template": "^4.5.0",
6363
"minimist": "^1.2.7",
6464
"prettier": "2.8.1",

scripts/install_deps.sh

Lines changed: 3 additions & 3 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)" ]

scripts/start_ganache.sh

Lines changed: 2 additions & 2 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 -k "merge" -q -p $PORT --account "0x000000000000000000000000000000000000000000000000000000616c696365,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000000626f62,100000000000000000000" --account "0x00000000000000000000000000000000000000000000000000636861726c6965,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000064617665,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000000657665,100000000000000000000" &
13+
ganache -k london --chain.asyncRequestProcessing false --chain.chainId 1 -q -p $PORT --account "0x000000000000000000000000000000000000000000000000000000616c696365,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000000626f62,100000000000000000000" --account "0x00000000000000000000000000000000000000000000000000636861726c6965,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000064617665,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000000657665,100000000000000000000" &
1414
# Otherwise CI will run tests before ganache has started
1515
sleep 3
1616
else
17-
ganache-cli -k "merge" -p $PORT --account "0x000000000000000000000000000000000000000000000000000000616c696365,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000000626f62,100000000000000000000" --account "0x00000000000000000000000000000000000000000000000000636861726c6965,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000064617665,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000000657665,100000000000000000000"
17+
ganache -k london --chain.asyncRequestProcessing false --chain.chainId 1 -p $PORT --account "0x000000000000000000000000000000000000000000000000000000616c696365,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000000626f62,100000000000000000000" --account "0x00000000000000000000000000000000000000000000000000636861726c6965,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000064617665,100000000000000000000" --account "0x0000000000000000000000000000000000000000000000000000000000657665,100000000000000000000"
1818
fi

test/contractBridge/admin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ contract("Bridge - [admin]", async (accounts) => {
262262
domainID
263263
);
264264

265-
await TruffleAssert.reverts(
265+
await Helpers.reverts(
266266
BridgeInstance.adminSetResource(
267267
ERC1155HandlerInstance.address,
268268
invalidResourceID,
@@ -427,7 +427,7 @@ contract("Bridge - [admin]", async (accounts) => {
427427
const currentNonce = 3;
428428
await BridgeInstance.adminSetDepositNonce(domainID, currentNonce);
429429
const newNonce = 2;
430-
await TruffleAssert.reverts(
430+
await Helpers.reverts(
431431
BridgeInstance.adminSetDepositNonce(domainID, newNonce),
432432
"Does not allow decrements of the nonce"
433433
);

test/contractBridge/depositERC20.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ contract("Bridge - [deposit - ERC20]", async (accounts) => {
225225
});
226226

227227
it("should revert if ERC20Safe contract call fails", async () => {
228-
await TruffleAssert.reverts(
228+
await Helpers.reverts(
229229
BridgeInstance.deposit(
230230
destinationDomainID,
231231
initialResourceIDs[1],

test/contractBridge/depositXC20.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ contract("Bridge - [deposit - XRC20]", async (accounts) => {
224224
});
225225

226226
it("should if XC20Safe contract call fails", async () => {
227-
await TruffleAssert.reverts(
227+
await Helpers.reverts(
228228
BridgeInstance.deposit(
229229
destinationDomainID,
230230
initialResourceIDs[1],

test/contractBridge/executeProposalERC20.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ contract("Bridge - [execute proposal - ERC20]", async (accounts) => {
132132
})
133133
);
134134

135-
await TruffleAssert.passes(
135+
await Helpers.passes(
136136
BridgeInstance.executeProposal(proposal, proposalSignedData, {
137137
from: relayer1Address,
138138
})

test/e2e/erc1155/differentChainsMock.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ contract("E2E ERC1155 - Two EVM Chains", async (accounts) => {
107107
await DestinationERC1155MintableInstance.MINTER_ROLE(),
108108
DestinationERC1155HandlerInstance.address
109109
),
110-
OriginBridgeInstance.adminSetResource(
110+
await OriginBridgeInstance.adminSetResource(
111111
OriginERC1155HandlerInstance.address,
112112
originResourceID,
113113
OriginERC1155MintableInstance.address,
114114
emptySetResourceData
115115
),
116-
DestinationBridgeInstance.adminSetResource(
116+
await DestinationBridgeInstance.adminSetResource(
117117
DestinationERC1155HandlerInstance.address,
118118
destinationResourceID,
119119
DestinationERC1155MintableInstance.address,

0 commit comments

Comments
 (0)