Skip to content

Commit

Permalink
Merge pull request #156 from Zondax/update-9290
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosala authored Sep 15, 2022
2 parents a605f68 + c1afee3 commit 0badaeb
Show file tree
Hide file tree
Showing 30 changed files with 24,689 additions and 11,109 deletions.
106 changes: 53 additions & 53 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 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=13
APPVERSION_M=14
# This is the `spec_version` field of `Runtime`
APPVERSION_N=9280
APPVERSION_N=9290
# This is the patch version of this release
APPVERSION_P=0
17 changes: 17 additions & 0 deletions app/src/substrate/substrate_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ parser_error_t _readMethod(
pd_Method_t* method)
{
switch (c->tx_obj->transactionVersion) {
case 14:
return _readMethod_V14(c, moduleIdx, callIdx, &method->V14);
case 13:
return _readMethod_V13(c, moduleIdx, callIdx, &method->V13);
default:
Expand All @@ -36,6 +38,8 @@ parser_error_t _readMethod(
uint8_t _getMethod_NumItems(uint32_t transactionVersion, uint8_t moduleIdx, uint8_t callIdx)
{
switch (transactionVersion) {
case 14:
return _getMethod_NumItems_V14(moduleIdx, callIdx);
case 13:
return _getMethod_NumItems_V13(moduleIdx, callIdx);
default:
Expand All @@ -46,6 +50,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 14:
return _getMethod_ModuleName_V14(moduleIdx);
case 13:
return _getMethod_ModuleName_V13(moduleIdx);
default:
Expand All @@ -56,6 +62,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 14:
return _getMethod_Name_V14(moduleIdx, callIdx);
case 13:
return _getMethod_Name_V13(moduleIdx, callIdx);
default:
Expand All @@ -66,6 +74,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 14:
return _getMethod_ItemName_V14(moduleIdx, callIdx, itemIdx);
case 13:
return _getMethod_ItemName_V13(moduleIdx, callIdx, itemIdx);
default:
Expand All @@ -78,6 +88,9 @@ parser_error_t _getMethod_ItemValue(uint32_t transactionVersion, pd_Method_t* m,
uint8_t pageIdx, uint8_t* pageCount)
{
switch (transactionVersion) {
case 14:
return _getMethod_ItemValue_V14(&m->V14, moduleIdx, callIdx, itemIdx, outValue,
outValueLen, pageIdx, pageCount);
case 13:
return _getMethod_ItemValue_V13(&m->V13, moduleIdx, callIdx, itemIdx, outValue,
outValueLen, pageIdx, pageCount);
Expand All @@ -89,6 +102,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 14:
return _getMethod_ItemIsExpert_V14(moduleIdx, callIdx, itemIdx);
case 13:
return _getMethod_ItemIsExpert_V13(moduleIdx, callIdx, itemIdx);
default:
Expand All @@ -99,6 +114,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 14:
return _getMethod_IsNestingSupported_V14(moduleIdx, callIdx);
case 13:
return _getMethod_IsNestingSupported_V13(moduleIdx, callIdx);
default:
Expand Down
4 changes: 4 additions & 0 deletions app/src/substrate/substrate_dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extern "C" {
#include "parser_common.h"
#include "stdbool.h"
#include "substrate_dispatch_V13.h"
#include "substrate_dispatch_V14.h"
#include <stddef.h>
#include <stdint.h>

Expand All @@ -32,6 +33,9 @@ extern "C" {
{ \
switch (txVersion) { \
\
case 14: \
return PD_CALL_##CALL##_V14; \
\
case 13: \
return PD_CALL_##CALL##_V13; \
\
Expand Down
Loading

0 comments on commit 0badaeb

Please sign in to comment.