Skip to content

Commit df32a20

Browse files
authored
Merge pull request #16 from Zondax/updates
2 parents cda7593 + 3933f71 commit df32a20

35 files changed

Lines changed: 19860 additions & 19053 deletions

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ file(GLOB_RECURSE LIB_SRC
115115
####
116116
${CMAKE_CURRENT_SOURCE_DIR}/app/src/crypto_helper.c
117117
${CMAKE_CURRENT_SOURCE_DIR}/app/src/parser.c
118+
${CMAKE_CURRENT_SOURCE_DIR}/app/src/parser_impl_common.c
118119
${CMAKE_CURRENT_SOURCE_DIR}/app/src/parser_impl.c
119120
${CMAKE_CURRENT_SOURCE_DIR}/app/src/parser_txdef.c
120121
${CMAKE_CURRENT_SOURCE_DIR}/app/src/substrate/substrate*.c

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Please:
2828
- **Do not use in production**
2929
- **Do not use a Ledger device with funds for development purposes.**
3030
- **Have a separate and marked device that is used ONLY for development and testing**
31-
# xx network 1.202.x
31+
# xx network 1.203.x
3232

3333
## System
3434

@@ -151,7 +151,7 @@ Please:
151151

152152
| Name | Light | XL | Nesting | Arguments |
153153
| :---------- |:------------:|:--------:|:--------:|:--------|
154-
|Propose | | | | `Hash` proposal_hash <br/>`Compactu128` amount <br/> |
154+
|Propose | | | | `Hash` proposal_hash <br/>`CompactBalance` amount <br/> |
155155
|Second | | | | `Compactu32` proposal <br/>`Compactu32` seconds_upper_bound <br/> |
156156
|Vote | | | | `Compactu32` ref_index <br/>`AccountVote` vote <br/> |
157157
|Emergency cancel | | | | `ReferendumIndex` ref_index <br/> |
@@ -182,8 +182,8 @@ Please:
182182
| Name | Light | XL | Nesting | Arguments |
183183
| :---------- |:------------:|:--------:|:--------:|:--------|
184184
|Set members | | :heavy_check_mark: | | `VecAccountId` new_members <br/>`OptionAccountId` prime <br/>`MemberCount` old_count <br/> |
185-
|Execute | | | | `BoxTasConfigIProposal` proposal <br/>`Compactu32` length_bound <br/> |
186-
|Propose | | | | `Compactu32` threshold <br/>`BoxTasConfigIProposal` proposal <br/>`Compactu32` length_bound <br/> |
185+
|Execute | | | | `Proposal` proposal <br/>`Compactu32` length_bound <br/> |
186+
|Propose | | | | `Compactu32` threshold <br/>`Proposal` proposal <br/>`Compactu32` length_bound <br/> |
187187
|Vote | | :heavy_check_mark: | | `Hash` proposal <br/>`Compactu32` index <br/>`bool` approve <br/> |
188188
|Close | | :heavy_check_mark: | | `Hash` proposal_hash <br/>`Compactu32` index <br/>`Compactu64` proposal_weight_bound <br/>`Compactu32` length_bound <br/> |
189189
|Disapprove proposal | | :heavy_check_mark: | | `Hash` proposal_hash <br/> |
@@ -193,8 +193,8 @@ Please:
193193
| Name | Light | XL | Nesting | Arguments |
194194
| :---------- |:------------:|:--------:|:--------:|:--------|
195195
|Set members | | :heavy_check_mark: | | `VecAccountId` new_members <br/>`OptionAccountId` prime <br/>`MemberCount` old_count <br/> |
196-
|Execute | | | | `BoxTasConfigIProposal` proposal <br/>`Compactu32` length_bound <br/> |
197-
|Propose | | | | `Compactu32` threshold <br/>`BoxTasConfigIProposal` proposal <br/>`Compactu32` length_bound <br/> |
196+
|Execute | | | | `Proposal` proposal <br/>`Compactu32` length_bound <br/> |
197+
|Propose | | | | `Compactu32` threshold <br/>`Proposal` proposal <br/>`Compactu32` length_bound <br/> |
198198
|Vote | | :heavy_check_mark: | | `Hash` proposal <br/>`Compactu32` index <br/>`bool` approve <br/> |
199199
|Close | | :heavy_check_mark: | | `Hash` proposal_hash <br/>`Compactu32` index <br/>`Compactu64` proposal_weight_bound <br/>`Compactu32` length_bound <br/> |
200200
|Disapprove proposal | | :heavy_check_mark: | | `Hash` proposal_hash <br/> |
@@ -246,17 +246,17 @@ Please:
246246
| :---------- |:------------:|:--------:|:--------:|:--------|
247247
|Vest | | :heavy_check_mark: | | |
248248
|Vest other | | :heavy_check_mark: | | `LookupasStaticLookupSource` target <br/> |
249-
|Vested transfer | | | | `LookupasStaticLookupSource` target <br/>`VestingInfoBalanceOfTBlockNumber` schedule <br/> |
250-
|Force vested transfer | | | | `LookupasStaticLookupSource` source <br/>`LookupasStaticLookupSource` target <br/>`VestingInfoBalanceOfTBlockNumber` schedule <br/> |
249+
|Vested transfer | | | | `LookupasStaticLookupSource` target <br/>`VestingInfo` schedule <br/> |
250+
|Force vested transfer | | | | `LookupasStaticLookupSource` source <br/>`LookupasStaticLookupSource` target <br/>`VestingInfo` schedule <br/> |
251251
|Merge schedules | | :heavy_check_mark: | | `u32` schedule1_index <br/>`u32` schedule2_index <br/> |
252252

253253
## Utility
254254

255255
| Name | Light | XL | Nesting | Arguments |
256256
| :---------- |:------------:|:--------:|:--------:|:--------|
257-
|Batch | | :heavy_check_mark: | | `VecCall` calls <br/> |
257+
|Batch | :heavy_check_mark: | :heavy_check_mark: | | `VecCall` calls <br/> |
258258
|As derivative | | | | `u16` index <br/>`Call` call <br/> |
259-
|Batch all | | :heavy_check_mark: | | `VecCall` calls <br/> |
259+
|Batch all | :heavy_check_mark: | :heavy_check_mark: | | `VecCall` calls <br/> |
260260
|Dispatch as | | | | `BoxPalletsOrigin` as_origin <br/>`Call` call <br/> |
261261

262262
## Identity
@@ -464,10 +464,10 @@ Please:
464464
|Approve transfer | | :heavy_check_mark: | | `Compactu32` class_ <br/>`Compactu32` instance <br/>`LookupasStaticLookupSource` delegate <br/> |
465465
|Cancel approval | | | | `Compactu32` class_ <br/>`Compactu32` instance <br/>`OptionLookupasStaticLookupSource` maybe_check_delegate <br/> |
466466
|Force asset status | | :heavy_check_mark: | | `Compactu32` class_ <br/>`LookupasStaticLookupSource` owner <br/>`LookupasStaticLookupSource` issuer <br/>`LookupasStaticLookupSource` admin <br/>`LookupasStaticLookupSource` freezer <br/>`bool` free_holding <br/>`bool` is_frozen <br/> |
467-
|Set attribute | | | | `Compactu32` class_ <br/>`OptionInstanceId` maybe_instance <br/>`BoundedVecu8KeyLimit` key <br/>`BoundedVecu8ValueLimit` value <br/> |
468-
|Clear attribute | | | | `Compactu32` class_ <br/>`OptionInstanceId` maybe_instance <br/>`BoundedVecu8KeyLimit` key <br/> |
469-
|Set metadata | | | | `Compactu32` class_ <br/>`Compactu32` instance <br/>`BoundedVecu8StringLimit` data <br/>`bool` is_frozen <br/> |
467+
|Set attribute | | | | `Compactu32` class_ <br/>`OptionInstanceId` maybe_instance <br/>`BoundedVecu8` key <br/>`BoundedVecu8` value <br/> |
468+
|Clear attribute | | | | `Compactu32` class_ <br/>`OptionInstanceId` maybe_instance <br/>`BoundedVecu8` key <br/> |
469+
|Set metadata | | | | `Compactu32` class_ <br/>`Compactu32` instance <br/>`BoundedVecu8` data <br/>`bool` is_frozen <br/> |
470470
|Clear metadata | | :heavy_check_mark: | | `Compactu32` class_ <br/>`Compactu32` instance <br/> |
471-
|Set class metadata | | | | `Compactu32` class_ <br/>`BoundedVecu8StringLimit` data <br/>`bool` is_frozen <br/> |
471+
|Set class metadata | | | | `Compactu32` class_ <br/>`BoundedVecu8` data <br/>`bool` is_frozen <br/> |
472472
|Clear class metadata | | :heavy_check_mark: | | `Compactu32` class_ <br/> |
473473

app/Makefile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ all: bin/app.elf
2727
@echo "APPNAME=\"${APPNAME}\"" >> $(OUTPUT_INSTALLER)
2828
@echo "APPVERSION=\"${APPVERSION}\"" >> $(OUTPUT_INSTALLER)
2929
@echo "APPPATH=\""${APPPATH}"\"" >> $(OUTPUT_INSTALLER)
30-
@echo "LOAD_PARAMS=\"${COMMON_LOAD_PARAMS}\"" >> $(OUTPUT_INSTALLER)
31-
@echo "DELETE_PARAMS=\"${COMMON_DELETE_PARAMS}\"" >> $(OUTPUT_INSTALLER)
30+
@echo "LOAD_PARAMS=\"${APP_LOAD_PARAMS}\"" >> $(OUTPUT_INSTALLER)
31+
@echo "DELETE_PARAMS=\"${APP_DELETE_PARAMS}\"" >> $(OUTPUT_INSTALLER)
3232
@echo "APPHEX=\"" >> $(OUTPUT_INSTALLER)
3333
@cat $(CURDIR)/bin/app.hex >> $(OUTPUT_INSTALLER)
3434
@echo "\"" >> $(OUTPUT_INSTALLER)
@@ -40,8 +40,6 @@ all: bin/app.elf
4040

4141
include $(BOLOS_SDK)/Makefile.defines
4242

43-
DEFINES += APP_SECRET_MODE_ENABLED
44-
4543
$(info ************ TARGET_NAME = [$(TARGET_NAME)])
4644

4745
ifeq ($(APP_TESTING),1)
@@ -75,7 +73,7 @@ DEFINES += APP_STANDARD
7573
ifneq ($(TARGET_NAME),TARGET_NANOS)
7674
DEFINES += SUBSTRATE_PARSER_FULL
7775
endif
78-
APPNAME = "xx_network"
76+
APPNAME = "xx network"
7977
APPPATH = "44'/1955'"
8078

8179
else ifeq ($(COIN),XX_XL)
@@ -86,16 +84,18 @@ APPPATH = "44'/1955'"
8684

8785
else
8886
define error_message
87+
88+
8989
COIN value not supported: [$(COIN)]
90+
91+
9092
endef
9193
$(error "$(error_message)")
9294
endif
9395

94-
ifneq (1,$(words [$(APPNAME)]))
95-
$(error APPNAME must not contain spaces)
96-
endif
97-
98-
APP_LOAD_PARAMS = --curve ed25519 --delete $(COMMON_LOAD_PARAMS) --path $(APPPATH)
96+
space := $(empty) $(empty)
97+
APP_LOAD_PARAMS = --curve ed25519 --delete $(subst $(APPNAME),$(subst $(space),_,$(APPNAME)),$(COMMON_LOAD_PARAMS)) --path $(APPPATH)
98+
APP_DELETE_PARAMS = $(subst $(APPNAME),$(subst $(space),_,$(APPNAME)),$(COMMON_DELETE_PARAMS))
9999

100100
ifeq ($(TARGET_NAME),TARGET_NANOS)
101101
APP_LOAD_PARAMS += --appFlags 0x000

app/Makefile.version

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This is the `transaction_version` field of `Runtime`
22
APPVERSION_M=1
33
# This is the `spec_version` field of `Runtime`
4-
APPVERSION_N=202
4+
APPVERSION_N=203
55
# This is the patch version of this release
6-
APPVERSION_P=1
6+
APPVERSION_P=0

app/src/common/parser_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* (c) 2019 Zondax GmbH
2+
* (c) 2019 - 2022 Zondax GmbH
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)