Skip to content

Commit 043a01c

Browse files
authored
Merge pull request #15 from Zondax/update-2083
2 parents 3ac3396 + fff5faf commit 043a01c

68 files changed

Lines changed: 21991 additions & 22013 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Please:
2828
- **Do not use in production**
2929
- **Do not use a Ledger device with funds for development purposes.**
3030
- **Have a separate and marked device that is used ONLY for development and testing**
31-
# Karura 1.2082.x
31+
# Karura 1.2083.x
3232

3333
## System
3434

@@ -454,7 +454,7 @@ Please:
454454
|Add liquidity | | :heavy_check_mark: | :heavy_check_mark: | `CurrencyId` currency_id_a <br/>`CurrencyId` currency_id_b <br/>`Compactu128` max_amount_a <br/>`Compactu128` max_amount_b <br/>`Compactu128` min_share_increment <br/>`bool` stake_increment_share <br/> |
455455
|Add provision | | :heavy_check_mark: | | `CurrencyId` currency_id_a <br/>`CurrencyId` currency_id_b <br/>`Compactu128` amount_a <br/>`Compactu128` amount_b <br/> |
456456
|Claim dex share | | :heavy_check_mark: | | `AccountId` owner <br/>`CurrencyId` currency_id_a <br/>`CurrencyId` currency_id_b <br/> |
457-
|Remove liquidity | | :heavy_check_mark: | | `CurrencyId` currency_id_a <br/>`CurrencyId` currency_id_b <br/>`Compactu128` remove_share <br/>`Compactu128` min_withdrawn_a <br/>`Compactu128` min_withdrawn_b <br/>`bool` by_unstake <br/> |
457+
|Remove liquidity | | :heavy_check_mark: | :heavy_check_mark: | `CurrencyId` currency_id_a <br/>`CurrencyId` currency_id_b <br/>`Compactu128` remove_share <br/>`Compactu128` min_withdrawn_a <br/>`Compactu128` min_withdrawn_b <br/>`bool` by_unstake <br/> |
458458
|List provisioning | | :heavy_check_mark: | | `CurrencyId` currency_id_a <br/>`CurrencyId` currency_id_b <br/>`Compactu128` min_contribution_a <br/>`Compactu128` min_contribution_b <br/>`Compactu128` target_provision_a <br/>`Compactu128` target_provision_b <br/>`Compactu32` not_before <br/> |
459459
|Update provisioning parameters | | :heavy_check_mark: | | `CurrencyId` currency_id_a <br/>`CurrencyId` currency_id_b <br/>`Compactu128` min_contribution_a <br/>`Compactu128` min_contribution_b <br/>`Compactu128` target_provision_a <br/>`Compactu128` target_provision_b <br/>`Compactu32` not_before <br/> |
460460
|End provisioning | | :heavy_check_mark: | | `CurrencyId` currency_id_a <br/>`CurrencyId` currency_id_b <br/> |
@@ -534,23 +534,24 @@ Please:
534534

535535
| Name | Light | XL | Nesting | Arguments |
536536
| :---------- |:------------:|:--------:|:--------:|:--------|
537+
|Set bridged stable coin address | | :heavy_check_mark: | | `EvmAddress` address <br/> |
537538
|To bridged | | :heavy_check_mark: | | `Compactu128` amount <br/> |
538539
|From bridged | | :heavy_check_mark: | | `Compactu128` amount <br/> |
539540

540541
## Homa
541542

542543
| Name | Light | XL | Nesting | Arguments |
543544
| :---------- |:------------:|:--------:|:--------:|:--------|
544-
|Mint | | :heavy_check_mark: | | `Compactu128` amount <br/> |
545-
|Request redeem | | :heavy_check_mark: | | `Compactu128` amount <br/>`bool` allow_fast_match <br/> |
546-
|Fast match redeems | | :heavy_check_mark: | | `VecAccountId` redeemer_list <br/> |
545+
|Mint | | :heavy_check_mark: | :heavy_check_mark: | `Compactu128` amount <br/> |
546+
|Request redeem | | :heavy_check_mark: | :heavy_check_mark: | `Compactu128` amount <br/>`bool` allow_fast_match <br/> |
547+
|Fast match redeems | | :heavy_check_mark: | :heavy_check_mark: | `VecAccountId` redeemer_list <br/> |
547548
|Claim redemption | | :heavy_check_mark: | | `AccountId` redeemer <br/> |
548549
|Update homa params | | | | `OptionBalance` soft_bonded_cap_per_sub_account <br/>`OptionRate` estimated_reward_rate_per_era <br/>`OptionRate` commission_rate <br/>`OptionRate` fast_match_fee_rate <br/> |
549550
|Update bump era params | | | | `OptionBlockNumber` last_era_bumped_block <br/>`OptionBlockNumber` frequency <br/> |
550551
|Reset ledgers | | | | `VecTupleu16OptionBalanceOptionVecUnlockChunk` updates <br/> |
551552
|Reset current era | | :heavy_check_mark: | | `EraIndex` era_index <br/> |
552553
|Force bump current era | | :heavy_check_mark: | | `EraIndex` bump_amount <br/> |
553-
|Fast match redeems completely | | :heavy_check_mark: | | `VecAccountId` redeemer_list <br/> |
554+
|Fast match redeems completely | | :heavy_check_mark: | :heavy_check_mark: | `VecAccountId` redeemer_list <br/> |
554555

555556
## XcmInterface
556557

app/Makefile.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This is the `transaction_version` field of `Runtime`
22
APPVERSION_M=1
33
# This is the `spec_version` field of `Runtime`
4-
APPVERSION_N=2082
4+
APPVERSION_N=2083
55
# This is the patch version of this release
66
APPVERSION_P=0

app/glyphs/icon_app.gif

9 Bytes
Loading

app/nanos_icon.gif

9 Bytes
Loading

app/nanox_icon.gif

8 Bytes
Loading

app/src/substrate/substrate_coin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ typedef enum {
5353
#define SUPPORTED_TX_VERSION_CURRENT LEDGER_MAJOR_VERSION
5454
#define SUPPORTED_TX_VERSION_PREVIOUS (LEDGER_MAJOR_VERSION - 1)
5555
#define SUPPORTED_SPEC_VERSION (LEDGER_MINOR_VERSION + 0)
56-
#define SUPPORTED_MINIMUM_SPEC_VERSION 2001
56+
#define SUPPORTED_MINIMUM_SPEC_VERSION 2083
5757

5858
#define COIN_AMOUNT_DECIMAL_PLACES 12
5959

app/src/substrate/substrate_dispatch_V1.c

Lines changed: 54 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,13 @@ __Z_INLINE parser_error_t _readMethod_honzon_transfer_debit_V1(
905905
return parser_ok;
906906
}
907907

908+
__Z_INLINE parser_error_t _readMethod_honzonbridge_set_bridged_stable_coin_address_V1(
909+
parser_context_t* c, pd_honzonbridge_set_bridged_stable_coin_address_V1_t* m)
910+
{
911+
CHECK_ERROR(_readEvmAddress_V1(c, &m->address))
912+
return parser_ok;
913+
}
914+
908915
__Z_INLINE parser_error_t _readMethod_honzonbridge_to_bridged_V1(
909916
parser_context_t* c, pd_honzonbridge_to_bridged_V1_t* m)
910917
{
@@ -1446,7 +1453,7 @@ parser_error_t _readMethod_V1(
14461453
CHECK_ERROR(_readMethod_dex_claim_dex_share_V1(c, &method->basic.dex_claim_dex_share_V1))
14471454
break;
14481455
case 23301: /* module 91 call 5 */
1449-
CHECK_ERROR(_readMethod_dex_remove_liquidity_V1(c, &method->basic.dex_remove_liquidity_V1))
1456+
CHECK_ERROR(_readMethod_dex_remove_liquidity_V1(c, &method->nested.dex_remove_liquidity_V1))
14501457
break;
14511458
case 23302: /* module 91 call 6 */
14521459
CHECK_ERROR(_readMethod_dex_list_provisioning_V1(c, &method->basic.dex_list_provisioning_V1))
@@ -1509,19 +1516,22 @@ parser_error_t _readMethod_V1(
15091516
CHECK_ERROR(_readMethod_honzon_transfer_debit_V1(c, &method->basic.honzon_transfer_debit_V1))
15101517
break;
15111518
case 27136: /* module 106 call 0 */
1512-
CHECK_ERROR(_readMethod_honzonbridge_to_bridged_V1(c, &method->basic.honzonbridge_to_bridged_V1))
1519+
CHECK_ERROR(_readMethod_honzonbridge_set_bridged_stable_coin_address_V1(c, &method->basic.honzonbridge_set_bridged_stable_coin_address_V1))
15131520
break;
15141521
case 27137: /* module 106 call 1 */
1522+
CHECK_ERROR(_readMethod_honzonbridge_to_bridged_V1(c, &method->basic.honzonbridge_to_bridged_V1))
1523+
break;
1524+
case 27138: /* module 106 call 2 */
15151525
CHECK_ERROR(_readMethod_honzonbridge_from_bridged_V1(c, &method->basic.honzonbridge_from_bridged_V1))
15161526
break;
15171527
case 29696: /* module 116 call 0 */
1518-
CHECK_ERROR(_readMethod_homa_mint_V1(c, &method->basic.homa_mint_V1))
1528+
CHECK_ERROR(_readMethod_homa_mint_V1(c, &method->nested.homa_mint_V1))
15191529
break;
15201530
case 29697: /* module 116 call 1 */
1521-
CHECK_ERROR(_readMethod_homa_request_redeem_V1(c, &method->basic.homa_request_redeem_V1))
1531+
CHECK_ERROR(_readMethod_homa_request_redeem_V1(c, &method->nested.homa_request_redeem_V1))
15221532
break;
15231533
case 29698: /* module 116 call 2 */
1524-
CHECK_ERROR(_readMethod_homa_fast_match_redeems_V1(c, &method->basic.homa_fast_match_redeems_V1))
1534+
CHECK_ERROR(_readMethod_homa_fast_match_redeems_V1(c, &method->nested.homa_fast_match_redeems_V1))
15251535
break;
15261536
case 29699: /* module 116 call 3 */
15271537
CHECK_ERROR(_readMethod_homa_claim_redemption_V1(c, &method->basic.homa_claim_redemption_V1))
@@ -1533,7 +1543,7 @@ parser_error_t _readMethod_V1(
15331543
CHECK_ERROR(_readMethod_homa_force_bump_current_era_V1(c, &method->basic.homa_force_bump_current_era_V1))
15341544
break;
15351545
case 29705: /* module 116 call 9 */
1536-
CHECK_ERROR(_readMethod_homa_fast_match_redeems_completely_V1(c, &method->basic.homa_fast_match_redeems_completely_V1))
1546+
CHECK_ERROR(_readMethod_homa_fast_match_redeems_completely_V1(c, &method->nested.homa_fast_match_redeems_completely_V1))
15371547
break;
15381548
case 30720: /* module 120 call 0 */
15391549
CHECK_ERROR(_readMethod_incentives_deposit_dex_share_V1(c, &method->basic.incentives_deposit_dex_share_V1))
@@ -1913,8 +1923,10 @@ const char* _getMethod_Name_V1_ParserFull(uint16_t callPrivIdx)
19131923
case 26121: /* module 102 call 9 */
19141924
return STR_ME_TRANSFER_DEBIT;
19151925
case 27136: /* module 106 call 0 */
1916-
return STR_ME_TO_BRIDGED;
1926+
return STR_ME_SET_BRIDGED_STABLE_COIN_ADDRESS;
19171927
case 27137: /* module 106 call 1 */
1928+
return STR_ME_TO_BRIDGED;
1929+
case 27138: /* module 106 call 2 */
19181930
return STR_ME_FROM_BRIDGED;
19191931
case 29696: /* module 116 call 0 */
19201932
return STR_ME_MINT;
@@ -2214,6 +2226,8 @@ uint8_t _getMethod_NumItems_V1(uint8_t moduleIdx, uint8_t callIdx)
22142226
return 1;
22152227
case 27137: /* module 106 call 1 */
22162228
return 1;
2229+
case 27138: /* module 106 call 2 */
2230+
return 1;
22172231
case 29696: /* module 116 call 0 */
22182232
return 1;
22192233
case 29697: /* module 116 call 1 */
@@ -3282,7 +3296,7 @@ const char* _getMethod_ItemName_V1(uint8_t moduleIdx, uint8_t callIdx, uint8_t i
32823296
case 27136: /* module 106 call 0 */
32833297
switch (itemIdx) {
32843298
case 0:
3285-
return STR_IT_amount;
3299+
return STR_IT_address;
32863300
default:
32873301
return NULL;
32883302
}
@@ -3293,6 +3307,13 @@ const char* _getMethod_ItemName_V1(uint8_t moduleIdx, uint8_t callIdx, uint8_t i
32933307
default:
32943308
return NULL;
32953309
}
3310+
case 27138: /* module 106 call 2 */
3311+
switch (itemIdx) {
3312+
case 0:
3313+
return STR_IT_amount;
3314+
default:
3315+
return NULL;
3316+
}
32963317
case 29696: /* module 116 call 0 */
32973318
switch (itemIdx) {
32983319
case 0:
@@ -4836,32 +4857,32 @@ parser_error_t _getMethod_ItemValue_V1(
48364857
switch (itemIdx) {
48374858
case 0: /* dex_remove_liquidity_V1 - currency_id_a */;
48384859
return _toStringCurrencyId_V1(
4839-
&m->basic.dex_remove_liquidity_V1.currency_id_a,
4860+
&m->nested.dex_remove_liquidity_V1.currency_id_a,
48404861
outValue, outValueLen,
48414862
pageIdx, pageCount);
48424863
case 1: /* dex_remove_liquidity_V1 - currency_id_b */;
48434864
return _toStringCurrencyId_V1(
4844-
&m->basic.dex_remove_liquidity_V1.currency_id_b,
4865+
&m->nested.dex_remove_liquidity_V1.currency_id_b,
48454866
outValue, outValueLen,
48464867
pageIdx, pageCount);
48474868
case 2: /* dex_remove_liquidity_V1 - remove_share */;
48484869
return _toStringCompactu128(
4849-
&m->basic.dex_remove_liquidity_V1.remove_share,
4870+
&m->nested.dex_remove_liquidity_V1.remove_share,
48504871
outValue, outValueLen,
48514872
pageIdx, pageCount);
48524873
case 3: /* dex_remove_liquidity_V1 - min_withdrawn_a */;
48534874
return _toStringCompactu128(
4854-
&m->basic.dex_remove_liquidity_V1.min_withdrawn_a,
4875+
&m->nested.dex_remove_liquidity_V1.min_withdrawn_a,
48554876
outValue, outValueLen,
48564877
pageIdx, pageCount);
48574878
case 4: /* dex_remove_liquidity_V1 - min_withdrawn_b */;
48584879
return _toStringCompactu128(
4859-
&m->basic.dex_remove_liquidity_V1.min_withdrawn_b,
4880+
&m->nested.dex_remove_liquidity_V1.min_withdrawn_b,
48604881
outValue, outValueLen,
48614882
pageIdx, pageCount);
48624883
case 5: /* dex_remove_liquidity_V1 - by_unstake */;
48634884
return _toStringbool(
4864-
&m->basic.dex_remove_liquidity_V1.by_unstake,
4885+
&m->nested.dex_remove_liquidity_V1.by_unstake,
48654886
outValue, outValueLen,
48664887
pageIdx, pageCount);
48674888
default:
@@ -5243,6 +5264,16 @@ parser_error_t _getMethod_ItemValue_V1(
52435264
return parser_no_data;
52445265
}
52455266
case 27136: /* module 106 call 0 */
5267+
switch (itemIdx) {
5268+
case 0: /* honzonbridge_set_bridged_stable_coin_address_V1 - address */;
5269+
return _toStringEvmAddress_V1(
5270+
&m->basic.honzonbridge_set_bridged_stable_coin_address_V1.address,
5271+
outValue, outValueLen,
5272+
pageIdx, pageCount);
5273+
default:
5274+
return parser_no_data;
5275+
}
5276+
case 27137: /* module 106 call 1 */
52465277
switch (itemIdx) {
52475278
case 0: /* honzonbridge_to_bridged_V1 - amount */;
52485279
return _toStringCompactu128(
@@ -5252,7 +5283,7 @@ parser_error_t _getMethod_ItemValue_V1(
52525283
default:
52535284
return parser_no_data;
52545285
}
5255-
case 27137: /* module 106 call 1 */
5286+
case 27138: /* module 106 call 2 */
52565287
switch (itemIdx) {
52575288
case 0: /* honzonbridge_from_bridged_V1 - amount */;
52585289
return _toStringCompactu128(
@@ -5266,7 +5297,7 @@ parser_error_t _getMethod_ItemValue_V1(
52665297
switch (itemIdx) {
52675298
case 0: /* homa_mint_V1 - amount */;
52685299
return _toStringCompactu128(
5269-
&m->basic.homa_mint_V1.amount,
5300+
&m->nested.homa_mint_V1.amount,
52705301
outValue, outValueLen,
52715302
pageIdx, pageCount);
52725303
default:
@@ -5276,12 +5307,12 @@ parser_error_t _getMethod_ItemValue_V1(
52765307
switch (itemIdx) {
52775308
case 0: /* homa_request_redeem_V1 - amount */;
52785309
return _toStringCompactu128(
5279-
&m->basic.homa_request_redeem_V1.amount,
5310+
&m->nested.homa_request_redeem_V1.amount,
52805311
outValue, outValueLen,
52815312
pageIdx, pageCount);
52825313
case 1: /* homa_request_redeem_V1 - allow_fast_match */;
52835314
return _toStringbool(
5284-
&m->basic.homa_request_redeem_V1.allow_fast_match,
5315+
&m->nested.homa_request_redeem_V1.allow_fast_match,
52855316
outValue, outValueLen,
52865317
pageIdx, pageCount);
52875318
default:
@@ -5291,7 +5322,7 @@ parser_error_t _getMethod_ItemValue_V1(
52915322
switch (itemIdx) {
52925323
case 0: /* homa_fast_match_redeems_V1 - redeemer_list */;
52935324
return _toStringVecAccountId_V1(
5294-
&m->basic.homa_fast_match_redeems_V1.redeemer_list,
5325+
&m->nested.homa_fast_match_redeems_V1.redeemer_list,
52955326
outValue, outValueLen,
52965327
pageIdx, pageCount);
52975328
default:
@@ -5331,7 +5362,7 @@ parser_error_t _getMethod_ItemValue_V1(
53315362
switch (itemIdx) {
53325363
case 0: /* homa_fast_match_redeems_completely_V1 - redeemer_list */;
53335364
return _toStringVecAccountId_V1(
5334-
&m->basic.homa_fast_match_redeems_completely_V1.redeemer_list,
5365+
&m->nested.homa_fast_match_redeems_completely_V1.redeemer_list,
53355366
outValue, outValueLen,
53365367
pageIdx, pageCount);
53375368
default:
@@ -5840,7 +5871,6 @@ bool _getMethod_IsNestingSupported_V1(uint8_t moduleIdx, uint8_t callIdx)
58405871
case 23297: // Dex:Swap with exact target
58415872
case 23299: // Dex:Add provision
58425873
case 23300: // Dex:Claim dex share
5843-
case 23301: // Dex:Remove liquidity
58445874
case 23302: // Dex:List provisioning
58455875
case 23303: // Dex:Update provisioning parameters
58465876
case 23304: // Dex:End provisioning
@@ -5857,15 +5887,12 @@ bool _getMethod_IsNestingSupported_V1(uint8_t moduleIdx, uint8_t callIdx)
58575887
case 26119: // Honzon:Shrink position debit
58585888
case 26120: // Honzon:Adjust loan by debit value
58595889
case 26121: // Honzon:Transfer debit
5860-
case 27136: // HonzonBridge:To bridged
5861-
case 27137: // HonzonBridge:From bridged
5862-
case 29696: // Homa:Mint
5863-
case 29697: // Homa:Request redeem
5864-
case 29698: // Homa:Fast match redeems
5890+
case 27136: // HonzonBridge:Set bridged stable coin address
5891+
case 27137: // HonzonBridge:To bridged
5892+
case 27138: // HonzonBridge:From bridged
58655893
case 29699: // Homa:Claim redemption
58665894
case 29703: // Homa:Reset current era
58675895
case 29704: // Homa:Force bump current era
5868-
case 29705: // Homa:Fast match redeems completely
58695896
case 30720: // Incentives:Deposit dex share
58705897
case 30722: // Incentives:Claim rewards
58715898
case 30978: // NFT:Transfer

0 commit comments

Comments
 (0)