forked from flowerpowerdao/power-equalizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
55 lines (55 loc) · 5.33 KB
/
package.json
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
{
"directories": {
"test": "test"
},
"scripts": {
"start": "npm run replica && npm run deploy-local && npm run mint",
"replica": "dfx stop && rm -rf .dfx && dfx start --clean --background && npm run create-canisters",
"replica:no-delay": "dfx stop && rm -rf .dfx && dfx start --clean --background --artificial-delay 0 && npm run create-canisters",
"create-canisters": "dfx canister create staging --specified-id rrkah-fqaaa-aaaaa-aaaaq-cai && dfx canister create ledger --specified-id ryjl3-tyaaa-aaaaa-aaaba-cai && dfx canister create test --specified-id r7inp-6aaaa-aaaaa-aaabq-cai && dfx canister create assets --specified-id e2ezq-2aaaa-aaaal-aafwa-cai",
"build": "",
"deploy-local": "npm run deploy:ledger && npm run deploy:staging && dfx deploy assets",
"deploy-test": "npm run reinstall:ledger -- -qq && npm run reinstall:test -- -qq",
"deploy:staging": "dfx canister create staging && DFX_MOC_PATH=\"$(vessel bin)/moc\" dfx deploy staging --argument \"$(cat initArgs.local.did)\"",
"reinstall:staging": "dfx canister create staging && DFX_MOC_PATH=\"$(vessel bin)/moc\" dfx deploy staging --mode reinstall -y --argument \"$(cat initArgs.local.did)\"",
"reinstall:test": "DFX_MOC_PATH=\"$(vessel bin)/moc\" dfx deploy test --mode reinstall -y --argument \"$(cat test/e2e/initArgs.did)\"",
"upgrade:staging": "dfx canister stop staging && DFX_MOC_PATH=\"$(vessel bin)/moc\" dfx deploy staging --upgrade-unchanged --argument \"$(cat initArgs.local.did)\" && dfx canister start staging",
"deploy:ledger": "npm run private-dids && dfx canister create ledger && DFX_MOC_PATH=\"$(vessel bin)/moc\" dfx deploy ledger --argument '(record {minting_account = \"e82226d3101bd8525111e2c6501a79365f2484d82d3f2be96269b78fe200eeaa\"; initial_values = vec { record { \"'${WALLET_ADDRESS:-8b61ff722d7e6321eb99bb607ab0cf323b3c64b43d6a13c245c8a4e197f7b38b}'\"; record { e8s=1_000_000_000_000_000 } }; }; send_whitelist = vec {}})' && npm run public-dids",
"reinstall:ledger": "npm run private-dids && dfx canister create ledger && DFX_MOC_PATH=\"$(vessel bin)/moc\" dfx deploy ledger --mode reinstall -y --argument '(record {minting_account = \"e82226d3101bd8525111e2c6501a79365f2484d82d3f2be96269b78fe200eeaa\"; initial_values = vec { record { \"'${WALLET_ADDRESS:-8b61ff722d7e6321eb99bb607ab0cf323b3c64b43d6a13c245c8a4e197f7b38b}'\"; record { e8s=1_000_000_000_000_000 } }; }; send_whitelist = vec {}})' && npm run public-dids",
"public-dids": "perl -i -pe 's|declarations/ledger/ledger\\.private\\.did|declarations/ledger/ledger\\.public\\.did|g' dfx.json",
"private-dids": "perl -i -pe 's|declarations/ledger/ledger\\.public\\.did|declarations/ledger/ledger\\.private\\.did|g' dfx.json",
"mint": "dfx canister call staging addAsset '(record {name = \"privat\";payload = record {ctype = \"text/html\"; data = vec {blob \"hello world!\"} } })' && dfx canister call staging initMint && dfx canister call staging shuffleTokensForSale && dfx canister call staging enableSale",
"mint-2": "dfx canister call staging addAsset '(record {name = \"privat0\";payload = record {ctype = \"text/html\"; data = vec {blob \"hello world0!\"} } })' && dfx canister call staging addAsset '(record {name = \"privat1\";payload = record {ctype = \"text/html\"; data = vec {blob \"hello world1!\"} } })' && dfx canister call staging initMint && dfx canister call staging shuffleTokensForSale && dfx canister call staging enableSale",
"mint:test": "dfx canister call test addAsset '(record {name = \"privat\";payload = record {ctype = \"text/html\"; data = vec {blob \"hello world!\"} } })' && dfx canister call test initMint && dfx canister call test shuffleTokensForSale && dfx canister call test enableSale",
"mint:test-2": "dfx canister call test addAsset '(record {name = \"privat0\";payload = record {ctype = \"text/html\"; data = vec {blob \"hello world0!\"} } })' && dfx canister call test addAsset '(record {name = \"privat1\";payload = record {ctype = \"text/html\"; data = vec {blob \"hello world1!\"} } })' && dfx canister call test initMint && dfx canister call test shuffleTokensForSale && dfx canister call test enableSale",
"vitest": "vitest run --threads false --isolate false",
"vitest:watch": "vitest watch",
"env": "tsx ./test/e2e/apply-env.ts",
"test:e2e": "dfx build staging && vitest run --threads false --isolate false --reporter verbose --bail 1",
"test:unit": "mops test",
"test": "npm run test:unit && npm run test:e2e",
"backup": "tsx ./backup/backup.ts",
"restore": "tsx ./backup/restore.ts",
"test-br": "npm run deploy-test && tsx ./backup/test.ts",
"test-br-assets": "tsx ./backup/test-assets.ts",
"deploy": "tsx ./deploy/deploy.ts",
"upgrade-production": "dfx canister --network ic stop production && DFX_MOC_PATH=\"$(vessel bin)/moc\" dfx deploy --network ic production --upgrade-unchanged --argument \"$(cat initArgs.did)\" && dfx canister --network ic start production",
"": ""
},
"devDependencies": {
"@dfinity/agent": "^0.15.0",
"@dfinity/identity": "^0.15.0",
"@dfinity/identity-secp256k1": "^0.15.4",
"@dfinity/nns": "^0.10.0",
"@dfinity/principal": "^0.15.0",
"@types/node": "^18.15.0",
"chalk": "^5.2.0",
"chunk": "^0.0.3",
"minimist": "^1.2.8",
"pem-file": "^1.0.1",
"tsx": "^3.12.7",
"typescript": "^4.9.4",
"vite": "^4.3.9",
"vitest": "^0.31.1"
}
}