Skip to content

Commit

Permalink
Merge pull request #133 from Zondax/polkadot_9.19
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosala authored Apr 22, 2022
2 parents 4e79245 + b3a95ff commit cdda1e7
Show file tree
Hide file tree
Showing 36 changed files with 20,598 additions and 28,752 deletions.
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Ledger Polkadot app

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![GithubActions](https://github.com/zondax/ledger-polkadot/actions/workflows/main.yml/badge.svg)](https://github.com/Zondax/ledger-polkadot/blob/main/.github/workflows/main.yaml)

-------------------
---

![zondax_light](docs/zondax_light.png#gh-light-mode-only)
![zondax_dark](docs/zondax_dark.png#gh-dark-mode-only)

_Please visit our website at [zondax.ch](https://www.zondax.ch)_

------------------
---

This project contains the Polkadot app (https://polkadot.network/) for Ledger Nano S and X.

- Ledger Nano S/X BOLOS app
Expand All @@ -26,7 +28,7 @@ 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**
# Polkadot 12.9180.x
# Polkadot 12.9190.x

## System

Expand Down Expand Up @@ -161,7 +163,7 @@ Please:
| :---------- |:------------:|:--------:|:--------:|:--------|
|Propose | | | | `Hash` proposal_hash <br/>`Compactu128` amount <br/> |
|Second | | :heavy_check_mark: | | `Compactu32` proposal <br/>`Compactu32` seconds_upper_bound <br/> |
|Vote | | | | `Compactu32` ref_index <br/>`AccountVoteBalanceOf` vote <br/> |
|Vote | | | | `Compactu32` ref_index <br/>`AccountVote` vote <br/> |
|Emergency cancel | | :heavy_check_mark: | | `ReferendumIndex` ref_index <br/> |
|External propose | | :heavy_check_mark: | | `Hash` proposal_hash <br/> |
|External propose majority | | :heavy_check_mark: | | `Hash` proposal_hash <br/> |
Expand Down Expand Up @@ -190,8 +192,8 @@ Please:
| Name | Light | XL | Nesting | Arguments |
| :---------- |:------------:|:--------:|:--------:|:--------|
|Set members | | | | `VecAccountId` new_members <br/>`OptionAccountId` prime <br/>`MemberCount` old_count <br/> |
|Execute | | | | `BoxTasConfigIProposal` proposal <br/>`Compactu32` length_bound <br/> |
|Propose | | | | `Compactu32` threshold <br/>`BoxTasConfigIProposal` proposal <br/>`Compactu32` length_bound <br/> |
|Execute | | | | `Proposal` proposal <br/>`Compactu32` length_bound <br/> |
|Propose | | | | `Compactu32` threshold <br/>`Proposal` proposal <br/>`Compactu32` length_bound <br/> |
|Vote | | :heavy_check_mark: | | `Hash` proposal <br/>`Compactu32` index <br/>`bool` approve <br/> |
|Close | | :heavy_check_mark: | | `Hash` proposal_hash <br/>`Compactu32` index <br/>`Compactu64` proposal_weight_bound <br/>`Compactu32` length_bound <br/> |
|Disapprove proposal | | :heavy_check_mark: | | `Hash` proposal_hash <br/> |
Expand All @@ -201,8 +203,8 @@ Please:
| Name | Light | XL | Nesting | Arguments |
| :---------- |:------------:|:--------:|:--------:|:--------|
|Set members | | | | `VecAccountId` new_members <br/>`OptionAccountId` prime <br/>`MemberCount` old_count <br/> |
|Execute | | | | `BoxTasConfigIProposal` proposal <br/>`Compactu32` length_bound <br/> |
|Propose | | | | `Compactu32` threshold <br/>`BoxTasConfigIProposal` proposal <br/>`Compactu32` length_bound <br/> |
|Execute | | | | `Proposal` proposal <br/>`Compactu32` length_bound <br/> |
|Propose | | | | `Compactu32` threshold <br/>`Proposal` proposal <br/>`Compactu32` length_bound <br/> |
|Vote | | :heavy_check_mark: | | `Hash` proposal <br/>`Compactu32` index <br/>`bool` approve <br/> |
|Close | | :heavy_check_mark: | | `Hash` proposal_hash <br/>`Compactu32` index <br/>`Compactu64` proposal_weight_bound <br/>`Compactu32` length_bound <br/> |
|Disapprove proposal | | :heavy_check_mark: | | `Hash` proposal_hash <br/> |
Expand Down Expand Up @@ -325,6 +327,18 @@ Please:
|Close bounty | | :heavy_check_mark: | | `Compactu32` bounty_id <br/> |
|Extend bounty expiry | | :heavy_check_mark: | | `Compactu32` bounty_id <br/>`Bytes` remark <br/> |

## ChildBounties

| Name | Light | XL | Nesting | Arguments |
| :---------- |:------------:|:--------:|:--------:|:--------|
|Add child bounty | | :heavy_check_mark: | | `Compactu32` parent_bounty_id <br/>`CompactBalance` amount <br/>`Vecu8` description <br/> |
|Propose curator | | :heavy_check_mark: | | `Compactu32` parent_bounty_id <br/>`Compactu32` child_bounty_id <br/>`LookupasStaticLookupSource` curator <br/>`CompactBalance` fee <br/> |
|Accept curator | | :heavy_check_mark: | | `Compactu32` parent_bounty_id <br/>`Compactu32` child_bounty_id <br/> |
|Unassign curator | | :heavy_check_mark: | | `Compactu32` parent_bounty_id <br/>`Compactu32` child_bounty_id <br/> |
|Award child bounty | | :heavy_check_mark: | | `Compactu32` parent_bounty_id <br/>`Compactu32` child_bounty_id <br/>`LookupasStaticLookupSource` beneficiary <br/> |
|Claim child bounty | | :heavy_check_mark: | | `Compactu32` parent_bounty_id <br/>`Compactu32` child_bounty_id <br/> |
|Close child bounty | | :heavy_check_mark: | | `Compactu32` parent_bounty_id <br/>`Compactu32` child_bounty_id <br/> |

## Tips

| Name | Light | XL | Nesting | Arguments |
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=12
# This is the `spec_version` field of `Runtime`
APPVERSION_N=9180
APPVERSION_N=9190
# This is the patch version of this release
APPVERSION_P=1
APPVERSION_P=0
17 changes: 0 additions & 17 deletions app/src/substrate/substrate_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ parser_error_t _readMethod(
switch (c->tx_obj->transactionVersion) {
case 12:
return _readMethod_V12(c, moduleIdx, callIdx, &method->V12);
case 11:
return _readMethod_V11(c, moduleIdx, callIdx, &method->V11);
default:
return parser_tx_version_not_supported;
}
Expand All @@ -40,8 +38,6 @@ uint8_t _getMethod_NumItems(uint32_t transactionVersion, uint8_t moduleIdx, uint
switch (transactionVersion) {
case 12:
return _getMethod_NumItems_V12(moduleIdx, callIdx);
case 11:
return _getMethod_NumItems_V11(moduleIdx, callIdx);
default:
return parser_tx_version_not_supported;
}
Expand All @@ -52,8 +48,6 @@ const char* _getMethod_ModuleName(uint32_t transactionVersion, uint8_t moduleIdx
switch (transactionVersion) {
case 12:
return _getMethod_ModuleName_V12(moduleIdx);
case 11:
return _getMethod_ModuleName_V11(moduleIdx);
default:
return NULL;
}
Expand All @@ -64,8 +58,6 @@ const char* _getMethod_Name(uint32_t transactionVersion, uint8_t moduleIdx, uint
switch (transactionVersion) {
case 12:
return _getMethod_Name_V12(moduleIdx, callIdx);
case 11:
return _getMethod_Name_V11(moduleIdx, callIdx);
default:
return 0;
}
Expand All @@ -76,8 +68,6 @@ const char* _getMethod_ItemName(uint32_t transactionVersion, uint8_t moduleIdx,
switch (transactionVersion) {
case 12:
return _getMethod_ItemName_V12(moduleIdx, callIdx, itemIdx);
case 11:
return _getMethod_ItemName_V11(moduleIdx, callIdx, itemIdx);
default:
return NULL;
}
Expand All @@ -91,9 +81,6 @@ parser_error_t _getMethod_ItemValue(uint32_t transactionVersion, pd_Method_t* m,
case 12:
return _getMethod_ItemValue_V12(&m->V12, moduleIdx, callIdx, itemIdx, outValue,
outValueLen, pageIdx, pageCount);
case 11:
return _getMethod_ItemValue_V11(&m->V11, moduleIdx, callIdx, itemIdx, outValue,
outValueLen, pageIdx, pageCount);
default:
return parser_tx_version_not_supported;
}
Expand All @@ -104,8 +91,6 @@ bool _getMethod_ItemIsExpert(uint32_t transactionVersion, uint8_t moduleIdx, uin
switch (transactionVersion) {
case 12:
return _getMethod_ItemIsExpert_V12(moduleIdx, callIdx, itemIdx);
case 11:
return _getMethod_ItemIsExpert_V11(moduleIdx, callIdx, itemIdx);
default:
return false;
}
Expand All @@ -116,8 +101,6 @@ bool _getMethod_IsNestingSupported(uint32_t transactionVersion, uint8_t moduleId
switch (transactionVersion) {
case 12:
return _getMethod_IsNestingSupported_V12(moduleIdx, callIdx);
case 11:
return _getMethod_IsNestingSupported_V11(moduleIdx, callIdx);
default:
return false;
}
Expand Down
4 changes: 0 additions & 4 deletions app/src/substrate/substrate_dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ extern "C" {

#include "parser_common.h"
#include "stdbool.h"
#include "substrate_dispatch_V11.h"
#include "substrate_dispatch_V12.h"
#include <stddef.h>
#include <stdint.h>
Expand All @@ -36,9 +35,6 @@ extern "C" {
case 12: \
return PD_CALL_##CALL##_V12; \
\
case 11: \
return PD_CALL_##CALL##_V11; \
\
default: \
return 0; \
} \
Expand Down
Loading

0 comments on commit cdda1e7

Please sign in to comment.