Skip to content

Commit

Permalink
Mainnet update (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
abenso authored Jul 23, 2024
1 parent dfb753d commit adade83
Show file tree
Hide file tree
Showing 58 changed files with 12,579 additions and 11,331 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ ifeq ($(BOLOS_SDK),)

ZXLIB_COMPILE_STAX ?= 1
SUBSTRATE_PARSER_FULL ?= 1
PRODUCTION_BUILD ?= 1
include $(CURDIR)/deps/ledger-zxlib/dockerized_build.mk

else
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ Please:
- **Do not use in production**
- **Do not use a Ledger device with funds for development purposes.**
- **Have a separate and marked device that is used ONLY for development and testing**
# Avail 1.30.x
# Avail 1.35.x

## System

| Name | Nano S | Nano S XL | Nano SP/X - Stax | Nesting | Arguments |
| -------------------------------- | ------ | ------------------ | ------------------ | ------------------ | --------------------------------- |
| Remark | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `Bytes`remark<br/> |
| Set heap pages | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `u64`pages<br/> |
| Set code | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `Vecu8`code<br/> |
| Set code | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `Bytes`code<br/> |
| Set code without checks | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `Vecu8`code<br/> |
| Set storage | | | | | `VecKeyValue`items<br/> |
| Kill storage | | | | | `VecKey`keys<br/> |
Expand Down Expand Up @@ -213,6 +213,7 @@ Please:
| Submit data | | :heavy_check_mark: | :heavy_check_mark: | | `AppData`data<br/> |
| Submit block length proposal | | :heavy_check_mark: | :heavy_check_mark: | | `u32`rows<br/>`u32`cols<br/> |
| Set application key | | :heavy_check_mark: | :heavy_check_mark: | | `AppKey`old_key<br/>`AppKey`new_key<br/> |
| Set submit data fee modifier | | | | | `DispatchFeeModifier`modifier<br/> |

## Preimage

Expand Down
12 changes: 12 additions & 0 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,20 @@ include $(CURDIR)/../deps/ledger-zxlib/makefiles/Makefile.installer_script

include $(BOLOS_SDK)/Makefile.defines

# Set the default value for PRODUCTION_BUILD to 1 if not already defined
PRODUCTION_BUILD ?= 1

$(info ************ TARGET_NAME = [$(TARGET_NAME)])

# Display whether this is a production build or for internal use
ifeq ($(PRODUCTION_BUILD), 1)
$(info ************ PRODUCTION_BUILD = [PRODUCTION BUILD])
else
$(info ************ PRODUCTION_BUILD = [INTERNAL USE])
endif
# Add the PRODUCTION_BUILD definition to the compiler flags
DEFINES += PRODUCTION_BUILD=$(PRODUCTION_BUILD)

include $(CURDIR)/../deps/ledger-zxlib/makefiles/Makefile.app_testing

ifeq ($(SUPPORT_SR25519),1)
Expand Down
2 changes: 1 addition & 1 deletion app/Makefile.version
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is the `transaction_version` field of `Runtime`
APPVERSION_M=1
# This is the `spec_version` field of `Runtime`
APPVERSION_N=30
APPVERSION_N=35
# This is the patch version of this release
APPVERSION_P=0
1 change: 1 addition & 0 deletions app/src/parser_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ extern "C" {
#define GEN_DEF_TOSTRING_ARRAY(SIZE) \
CLEAN_AND_CHECK(); \
if ((SIZE) == 0) { \
*pageCount = 1; \
snprintf(outValue, outValueLen, "Empty"); \
return parser_ok; \
} \
Expand Down
2 changes: 1 addition & 1 deletion app/src/substrate/substrate_coin.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ typedef enum {

#define COIN_AMOUNT_DECIMAL_PLACES 18

#define COIN_GENESIS_HASH "d3d2f3a3495dc597434a99d7d449ebad6616db45e4e4f178f31cc6fa14378b70"
#define COIN_GENESIS_HASH "b91746b45e0346cc2f815a520b9c6cb4d5c0902af848db0a80f85932d2e8276a"
#define COIN_NAME "Avail"
#define COIN_TICKER "AVAIL "

Expand Down
4 changes: 2 additions & 2 deletions app/src/substrate/substrate_dispatch_V1.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ __Z_INLINE parser_error_t _readMethod_system_set_heap_pages_V1(
__Z_INLINE parser_error_t _readMethod_system_set_code_V1(
parser_context_t* c, pd_system_set_code_V1_t* m)
{
CHECK_ERROR(_readVecu8(c, &m->code))
CHECK_ERROR(_readBytes(c, &m->code))
return parser_ok;
}

Expand Down Expand Up @@ -2285,7 +2285,7 @@ parser_error_t _getMethod_ItemValue_V1(
case 2: /* module 0 call 2 */
switch (itemIdx) {
case 0: /* system_set_code_V1 - code */;
return _toStringVecu8(
return _toStringBytes(
&m->nested.system_set_code_V1.code,
outValue, outValueLen,
pageIdx, pageCount);
Expand Down
2 changes: 1 addition & 1 deletion app/src/substrate/substrate_methods_V1.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ typedef struct {

#define PD_CALL_SYSTEM_SET_CODE_V1 2
typedef struct {
pd_Vecu8_t code;
pd_Bytes_t code;
} pd_system_set_code_V1_t;

#define PD_CALL_SYSTEM_SET_CODE_WITHOUT_CHECKS_V1 3
Expand Down
Loading

0 comments on commit adade83

Please sign in to comment.