Skip to content

Commit 95ba860

Browse files
committed
feat: migrate to using ZetaChain CLI
1 parent 69bd3f9 commit 95ba860

File tree

3 files changed

+212
-126
lines changed

3 files changed

+212
-126
lines changed

examples/hello/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@
5858
"@solana/web3.js": "^1.95.8",
5959
"@zetachain/protocol-contracts": "13.0.0",
6060
"@zetachain/toolkit": "^16.0.0",
61-
"zetachain": "^3.0.0"
61+
"zetachain": "^6.0.0"
6262
}
6363
}

examples/hello/scripts/localnet.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,27 @@ set -e
44
set -x
55
set -o pipefail
66

7-
yarn zetachain localnet start --force-kill --skip sui ton solana --exit-on-error &
7+
yarn zetachain localnet start --force-kill --exit-on-error &
88

99
while [ ! -f "localnet.json" ]; do sleep 1; done
1010

1111
npx hardhat compile --force --quiet
1212

13-
GATEWAY_ETHEREUM=$(jq -r '.addresses[] | select(.type=="gatewayEVM" and .chain=="ethereum") | .address' localnet.json)
14-
GATEWAY_ZETACHAIN=$(jq -r '.addresses[] | select(.type=="gatewayZEVM" and .chain=="zetachain") | .address' localnet.json)
13+
GATEWAY_ZETACHAIN=$(jq -r '.addresses[] | select(.type=="gateway" and .chain=="zetachain") | .address' localnet.json)
1514

1615
CONTRACT_ZETACHAIN=$(npx hardhat deploy --name Universal --network localhost --gateway "$GATEWAY_ZETACHAIN" --json | jq -r '.contractAddress')
1716
echo -e "\n🚀 Deployed contract on ZetaChain: $CONTRACT_ZETACHAIN"
1817

19-
npx hardhat evm-call \
20-
--gateway-evm "$GATEWAY_ETHEREUM" \
18+
PRIVATE_KEY=$(jq -r '.private_keys[0]' ~/.zetachain/localnet/anvil.json)
19+
20+
yarn zetachain evm call \
21+
--gateway "$GATEWAY_ZETACHAIN" \
2122
--receiver "$CONTRACT_ZETACHAIN" \
22-
--network localhost \
23-
--types '["string"]' alice
23+
--rpc http://localhost:8545 \
24+
--types string \
25+
--values alice \
26+
--yes \
27+
--private-key "$PRIVATE_KEY"
2428

2529
yarn zetachain localnet check
2630

0 commit comments

Comments
 (0)