Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #179 from Zondax/update-9340
Browse files Browse the repository at this point in the history
update to spec 9340
  • Loading branch information
ftheirs authored Dec 8, 2022
2 parents cb8a76c + 2a4f279 commit 9bb3a58
Show file tree
Hide file tree
Showing 37 changed files with 62,574 additions and 79,806 deletions.
35 changes: 23 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,20 @@ 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**
# Kusama 16.9330.x
# Kusama 17.9340.x

## System

| Name | Nano S | Nano S XL | Nano SP/X | Nesting | Arguments |
| ----------------------- | ------ | ------------------ | ------------------ | ------------------ | --------------------------------- |
| Fill block | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `Perbill`ratio<br/> |
| Remark | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `Vecu8`remark<br/> |
| 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 without checks | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `Vecu8`code<br/> |
| Set storage | | | | | `VecKeyValue`items<br/> |
| Kill storage | | | | | `VecKey`keys<br/> |
| Kill prefix | | | | | `Key`prefix<br/>`u32`subkeys<br/> |
| Remark with event | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `Vecu8`remark<br/> |
| Remark with event | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | `Bytes`remark<br/> |

## Babe

Expand Down Expand Up @@ -290,6 +289,7 @@ Please:
| Batch all | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `VecCall`calls<br/> |
| Dispatch as | | | | | `BoxPalletsOrigin`as_origin<br/>`Call`call<br/> |
| Force batch | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | `VecCall`calls<br/> |
| With weight | | :heavy_check_mark: | :heavy_check_mark: | | `Call`call<br/>`Weight`weight<br/> |

## Identity

Expand Down Expand Up @@ -443,14 +443,25 @@ Please:
| Submit | | | | | `BoxRawSolutionSolutionOfMinerConfig`raw_solution<br/> |
| Governance fallback | | | | | `Optionu32`maybe_max_voters<br/>`Optionu32`maybe_max_targets<br/> |

## Gilt

| Name | Nano S | Nano S XL | Nano SP/X | Nesting | Arguments |
| ----------- | ------ | ------------------ | ------------------ | ------- | --------------------------------------------- |
| Place bid | | :heavy_check_mark: | :heavy_check_mark: | | `CompactBalance`amount<br/>`u32`duration<br/> |
| Retract bid | | :heavy_check_mark: | :heavy_check_mark: | | `CompactBalance`amount<br/>`u32`duration<br/> |
| Set target | | :heavy_check_mark: | :heavy_check_mark: | | `Compactu64`target<br/> |
| Thaw | | :heavy_check_mark: | :heavy_check_mark: | | `Compactu32`index<br/> |
## Nis

| Name | Nano S | Nano S XL | Nano SP/X | Nesting | Arguments |
| ------------ | ------ | ------------------ | ------------------ | ------- | ---------------------------------------------- |
| Place bid | | :heavy_check_mark: | :heavy_check_mark: | | `Compactu128`amount<br/>`u32`duration<br/> |
| Retract bid | | :heavy_check_mark: | :heavy_check_mark: | | `Compactu128`amount<br/>`u32`duration<br/> |
| Fund deficit | | :heavy_check_mark: | :heavy_check_mark: | | |
| Thaw | | :heavy_check_mark: | :heavy_check_mark: | | `Compactu32`index<br/>`Optionu128`portion<br/> |

## NisCounterpartBalances

| Name | Nano S | Nano S XL | Nano SP/X | Nesting | Arguments |
| ------------------- | ------ | ------------------ | ------------------ | ------- | ------------------------------------------------------------------------------------ |
| Transfer | | :heavy_check_mark: | :heavy_check_mark: | | `AccountIdLookupOfT`dest<br/>`Compactu128`amount<br/> |
| Set balance | | :heavy_check_mark: | :heavy_check_mark: | | `AccountIdLookupOfT`who<br/>`Compactu128`new_free<br/>`Compactu128`new_reserved<br/> |
| Force transfer | | :heavy_check_mark: | :heavy_check_mark: | | `AccountIdLookupOfT`source<br/>`AccountIdLookupOfT`dest<br/>`Compactu128`amount<br/> |
| Transfer keep alive | | :heavy_check_mark: | :heavy_check_mark: | | `AccountIdLookupOfT`dest<br/>`Compactu128`amount<br/> |
| Transfer all | | :heavy_check_mark: | :heavy_check_mark: | | `AccountIdLookupOfT`dest<br/>`bool`keep_alive<br/> |
| Force unreserve | | :heavy_check_mark: | :heavy_check_mark: | | `AccountIdLookupOfT`who<br/>`Balance`amount<br/> |

## VoterList

Expand Down
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=16
APPVERSION_M=17
# This is the `spec_version` field of `Runtime`
APPVERSION_N=9330
APPVERSION_N=9340
# This is the patch version of this release
APPVERSION_P=0
36 changes: 24 additions & 12 deletions app/rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 16 additions & 33 deletions app/src/substrate/substrate_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ parser_error_t _readMethod(
pd_Method_t* method)
{
switch (c->tx_obj->transactionVersion) {
case 16:
return _readMethod_V16(c, moduleIdx, callIdx, &method->V16);
case 15:
return _readMethod_V15(c, moduleIdx, callIdx, &method->V15);
case 17:
return _readMethod_V17(c, moduleIdx, callIdx, &method->V17);
default:
return parser_tx_version_not_supported;
}
Expand All @@ -38,10 +36,8 @@ parser_error_t _readMethod(
uint8_t _getMethod_NumItems(uint32_t transactionVersion, uint8_t moduleIdx, uint8_t callIdx)
{
switch (transactionVersion) {
case 16:
return _getMethod_NumItems_V16(moduleIdx, callIdx);
case 15:
return _getMethod_NumItems_V15(moduleIdx, callIdx);
case 17:
return _getMethod_NumItems_V17(moduleIdx, callIdx);
default:
return parser_tx_version_not_supported;
}
Expand All @@ -50,10 +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 16:
return _getMethod_ModuleName_V16(moduleIdx);
case 15:
return _getMethod_ModuleName_V15(moduleIdx);
case 17:
return _getMethod_ModuleName_V17(moduleIdx);
default:
return NULL;
}
Expand All @@ -62,10 +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 16:
return _getMethod_Name_V16(moduleIdx, callIdx);
case 15:
return _getMethod_Name_V15(moduleIdx, callIdx);
case 17:
return _getMethod_Name_V17(moduleIdx, callIdx);
default:
return 0;
}
Expand All @@ -74,10 +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 16:
return _getMethod_ItemName_V16(moduleIdx, callIdx, itemIdx);
case 15:
return _getMethod_ItemName_V15(moduleIdx, callIdx, itemIdx);
case 17:
return _getMethod_ItemName_V17(moduleIdx, callIdx, itemIdx);
default:
return NULL;
}
Expand All @@ -88,11 +78,8 @@ parser_error_t _getMethod_ItemValue(uint32_t transactionVersion, pd_Method_t* m,
uint8_t pageIdx, uint8_t* pageCount)
{
switch (transactionVersion) {
case 16:
return _getMethod_ItemValue_V16(&m->V16, moduleIdx, callIdx, itemIdx, outValue,
outValueLen, pageIdx, pageCount);
case 15:
return _getMethod_ItemValue_V15(&m->V15, moduleIdx, callIdx, itemIdx, outValue,
case 17:
return _getMethod_ItemValue_V17(&m->V17, moduleIdx, callIdx, itemIdx, outValue,
outValueLen, pageIdx, pageCount);
default:
return parser_tx_version_not_supported;
Expand All @@ -102,10 +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 16:
return _getMethod_ItemIsExpert_V16(moduleIdx, callIdx, itemIdx);
case 15:
return _getMethod_ItemIsExpert_V15(moduleIdx, callIdx, itemIdx);
case 17:
return _getMethod_ItemIsExpert_V17(moduleIdx, callIdx, itemIdx);
default:
return false;
}
Expand All @@ -114,10 +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 16:
return _getMethod_IsNestingSupported_V16(moduleIdx, callIdx);
case 15:
return _getMethod_IsNestingSupported_V15(moduleIdx, callIdx);
case 17:
return _getMethod_IsNestingSupported_V17(moduleIdx, callIdx);
default:
return false;
}
Expand Down
10 changes: 3 additions & 7 deletions app/src/substrate/substrate_dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ extern "C" {

#include "parser_common.h"
#include "stdbool.h"
#include "substrate_dispatch_V15.h"
#include "substrate_dispatch_V16.h"
#include "substrate_dispatch_V17.h"
#include <stddef.h>
#include <stdint.h>

Expand All @@ -33,11 +32,8 @@ extern "C" {
{ \
switch (txVersion) { \
\
case 16: \
return PD_CALL_##CALL##_V16; \
\
case 15: \
return PD_CALL_##CALL##_V15; \
case 17: \
return PD_CALL_##CALL##_V17; \
\
default: \
return 0; \
Expand Down
Loading

0 comments on commit 9bb3a58

Please sign in to comment.