File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ sub_templates = [
77 " contract" ,
88 " atomics-contract" ,
99 " stack-reorder-contract" ,
10- " add-debugger-contract "
10+ " add-debugger" ,
1111 # Dependency crate templates
1212 " c-wrapper-crate" ,
1313 " x64-simulator-crate" ,
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ generate:
123123 sed ' /@@INSERTION_POINT@@/s/$$/\n "$(DESTINATION)\/$(CRATE)",/' Cargo.toml > Cargo.toml.new; \
124124 mv Cargo.toml.new Cargo.toml; \
125125 fi ; \
126- if [ " $( ALSO_ADD_DEBUGGER) " = " true" ]; then \
126+ if [ " $( ALSO_ADD_DEBUGGER) " = " true" ] && [ " $( TEMPLATE ) " = " contract " ] ; then \
127127 make -C ./ add-debugger; \
128128 fi ;
129129
Original file line number Diff line number Diff line change 5252
5353CONTRACT_CRATE=$( echo " $CONTRACT_NAME " | tr ' -' ' _' )
5454
55+ cargo generate $2 $3 add-debugger -n $CONTRACT_NAME -dbg --destination contracts/$CONTRACT_NAME -d contract_name=$CONTRACT_NAME -d contract_crate_name=$CONTRACT_CRATE
5556cd contracts/$CONTRACT_NAME
56- cargo generate $2 $3 add-debugger -n $CONTRACT_NAME -dbg -d contract_name=$CONTRACT_NAME -d contract_crate_name=$CONTRACT_CRATE
5757mv $CONTRACT_NAME -dbg/src/contract-lib.rs src/lib.rs
5858echo " Finally, you need to add a feature to the contract's Cargo.toml:"
5959echo " simulator = [" ckb-std/simulator" ]"
You can’t perform that action at this time.
0 commit comments