-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
74 lines (64 loc) · 1.79 KB
/
Makefile
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# use `cargo nextest run` if cargo-nextest is installed
cargo_test = $(shell which cargo-nextest >/dev/null && echo "cargo nextest run" || echo "cargo test")
.PHONY: test
test:
${cargo_test} --all
.PHONY: build
build:
cargo build --release
.PHONY: build-runtime
build-runtime:
cargo build --release -p dbc-runtime
.PHONY: build-evm-tracing-runtime
build-evm-tracing-runtime:
cargo build --features evm-tracing --release -p dbc-runtime
.PHONY: build-try-runtime
build-try-runtime:
cargo build --features try-runtime --release -p dbc-runtime
.PHONY: fmt
fmt:
cargo +nightly-2023-09-20 fmt --all
.PHONY: run
run:
cargo run \
--features evm-tracing \
-- \
--dev \
-lruntime=debug,evm=trace \
--rpc-port=9944 \
--rpc-external \
--rpc-cors=all \
--rpc-methods=unsafe \
--pruning=archive \
--ethapi=debug,trace,txpool
#--wasm-runtime-overrides=./runtime-overrides
NODE_URI ?=wss://info1.dbcwallet.io:443
BLOCK_HASH ?=0xc4d4e9b1a2b8c44d7859a6004c43ad6eebb61c57b6173a53fe794a6aa479a49b
.PHONY: try-runtime-live
try-runtime-live: build-try-runtime
cargo run --features try-runtime -- \
try-runtime \
--runtime ./target/release/wbuild/dbc-runtime/dbc_runtime.compact.compressed.wasm \
--chain=mainnet \
on-runtime-upgrade \
live \
--uri ${NODE_URI} \
--at ${BLOCK_HASH}
.PHONY: try-runtime-snap
try-runtime-create-snap:
cargo run --features try-runtime -- \
try-runtime \
--runtime existing \
create-snapshot \
--uri ${NODE_URI} \
--at ${BLOCK_HASH} \
dbc-${BLOCK_HASH}.snap
.PHONY: try-runtime-upgrade-snap
try-runtime-upgrade-snap: build-try-runtime
cargo run --features try-runtime -- \
try-runtime \
--runtime ./target/release/wbuild/dbc-runtime/dbc_runtime.compact.compressed.wasm \
--chain=mainnet \
on-runtime-upgrade \
snap \
-s dbc-${BLOCK_HASH}.snap