Skip to content

Commit

Permalink
Merge pull request #3 from Zondax/main
Browse files Browse the repository at this point in the history
Upgrade to v3.504.x
  • Loading branch information
bigspider authored Nov 26, 2021
2 parents 020261c + aadc856 commit 01bf61d
Show file tree
Hide file tree
Showing 72 changed files with 11,055 additions and 10,938 deletions.
272 changes: 130 additions & 142 deletions README.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions 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
APPVERSION_M=3
# This is the `spec_version` field of `Runtime`
APPVERSION_N=1
APPVERSION_N=504
# This is the patch version of this release
APPVERSION_P=6
APPVERSION_P=0
32 changes: 16 additions & 16 deletions app/src/substrate_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ parser_error_t _readMethod(
pd_Method_t* method)
{
switch (c->tx_obj->transactionVersion) {
case 1:
return _readMethod_V1(c, moduleIdx, callIdx, &method->V1);
case 3:
return _readMethod_V3(c, moduleIdx, callIdx, &method->V3);
default:
return parser_not_supported;
}
Expand All @@ -36,8 +36,8 @@ parser_error_t _readMethod(
uint8_t _getMethod_NumItems(uint32_t transactionVersion, uint8_t moduleIdx, uint8_t callIdx)
{
switch (transactionVersion) {
case 1:
return _getMethod_NumItems_V1(moduleIdx, callIdx);
case 3:
return _getMethod_NumItems_V3(moduleIdx, callIdx);
default:
return parser_not_supported;
}
Expand All @@ -46,8 +46,8 @@ uint8_t _getMethod_NumItems(uint32_t transactionVersion, uint8_t moduleIdx, uint
const char* _getMethod_ModuleName(uint32_t transactionVersion, uint8_t moduleIdx)
{
switch (transactionVersion) {
case 1:
return _getMethod_ModuleName_V1(moduleIdx);
case 3:
return _getMethod_ModuleName_V3(moduleIdx);
default:
return NULL;
}
Expand All @@ -56,8 +56,8 @@ const char* _getMethod_ModuleName(uint32_t transactionVersion, uint8_t moduleIdx
const char* _getMethod_Name(uint32_t transactionVersion, uint8_t moduleIdx, uint8_t callIdx)
{
switch (transactionVersion) {
case 1:
return _getMethod_Name_V1(moduleIdx, callIdx);
case 3:
return _getMethod_Name_V3(moduleIdx, callIdx);
default:
return 0;
}
Expand All @@ -66,8 +66,8 @@ const char* _getMethod_Name(uint32_t transactionVersion, uint8_t moduleIdx, uint
const char* _getMethod_ItemName(uint32_t transactionVersion, uint8_t moduleIdx, uint8_t callIdx, uint8_t itemIdx)
{
switch (transactionVersion) {
case 1:
return _getMethod_ItemName_V1(moduleIdx, callIdx, itemIdx);
case 3:
return _getMethod_ItemName_V3(moduleIdx, callIdx, itemIdx);
default:
return NULL;
}
Expand All @@ -78,8 +78,8 @@ parser_error_t _getMethod_ItemValue(uint32_t transactionVersion, pd_Method_t* m,
uint8_t pageIdx, uint8_t* pageCount)
{
switch (transactionVersion) {
case 1:
return _getMethod_ItemValue_V1(&m->V1, moduleIdx, callIdx, itemIdx, outValue,
case 3:
return _getMethod_ItemValue_V3(&m->V3, moduleIdx, callIdx, itemIdx, outValue,
outValueLen, pageIdx, pageCount);
default:
return parser_not_supported;
Expand All @@ -89,8 +89,8 @@ parser_error_t _getMethod_ItemValue(uint32_t transactionVersion, pd_Method_t* m,
bool _getMethod_ItemIsExpert(uint32_t transactionVersion, uint8_t moduleIdx, uint8_t callIdx, uint8_t itemIdx)
{
switch (transactionVersion) {
case 1:
return _getMethod_ItemIsExpert_V1(moduleIdx, callIdx, itemIdx);
case 3:
return _getMethod_ItemIsExpert_V3(moduleIdx, callIdx, itemIdx);
default:
return false;
}
Expand All @@ -99,8 +99,8 @@ bool _getMethod_ItemIsExpert(uint32_t transactionVersion, uint8_t moduleIdx, uin
bool _getMethod_IsNestingSupported(uint32_t transactionVersion, uint8_t moduleIdx, uint8_t callIdx)
{
switch (transactionVersion) {
case 1:
return _getMethod_IsNestingSupported_V1(moduleIdx, callIdx);
case 3:
return _getMethod_IsNestingSupported_V3(moduleIdx, callIdx);
default:
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions app/src/substrate_dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extern "C" {

#include "parser_common.h"
#include "stdbool.h"
#include "substrate_dispatch_V1.h"
#include "substrate_dispatch_V3.h"
#include <stddef.h>
#include <stdint.h>

Expand All @@ -32,8 +32,8 @@ extern "C" {
{ \
switch (txVersion) { \
\
case 1: \
return PD_CALL_##CALL##_V1; \
case 3: \
return PD_CALL_##CALL##_V3; \
\
default: \
return 0; \
Expand Down
Loading

0 comments on commit 01bf61d

Please sign in to comment.