-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-cli.sh
More file actions
57 lines (31 loc) · 1.41 KB
/
deploy-cli.sh
File metadata and controls
57 lines (31 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
echo "Create account"
npx 0xweb accounts new -n tester --pin test --login
echo "Fund tester"
npx 0xweb hardhat setBalance tester 2ether --pin test
echo "Compile Upgradeable — used later in api test"
npx 0xweb compile ./contracts/AppVersionManagerUpgradeable.sol
echo "Deploy contract"
npx 0xweb deploy ./contracts/AppVersionManager.sol --chain hardhat --pin test
echo "Update title"
npx 0xweb c write AppVersionManager updateInfo --newTitle MySuperApp --pin test
echo "Update package"
npx 0xweb c write AppVersionManager updatePackage --arg0 'load(./data/package.json)' --pin test
echo "Read title"
npx 0xweb c read AppVersionManager title
echo "Execute TypesScript test script"
npx ts-node test/check.ts --pin test
echo "➡️ Change generation to JavaScript"
npx 0xweb config --set "settings.generate.target=mjs"
echo "Create contracts JavaScript client"
npx 0xweb install ./contracts/AppVersionManager.sol --name AppVersionManager --chain hardhat
echo "Execute JavaScript test script"
npx node test/check.mjs --pin test
echo "➡️ Change generation to JavaScript with CommonJS module"
npx 0xweb config --set "settings.generate.target=cjs"
echo "Create contracts JavaScript client"
npx 0xweb install ./contracts/AppVersionManager.sol --name AppVersionManager --chain hardhat
echo "Execute CJS script to get block"
npx node test/check.js --pin test
echo "Execute API script "
npx node test/api.mjs