Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tests proxy #27

Merged
merged 37 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a733dec
initial test-proxy announce
Raj-RR1 Nov 19, 2023
addcc09
fix call index and case id
Raj-RR1 Nov 19, 2023
8bcf8c9
prepend the keyword proxy
Raj-RR1 Nov 19, 2023
472b676
fix null module value.
Raj-RR1 Nov 20, 2023
c63d680
more test cases-proxy announce
Raj-RR1 Nov 21, 2023
449d63b
initial test-proxy anonymous
Raj-RR1 Nov 21, 2023
eb5c69a
test different proxy type value
Raj-RR1 Nov 21, 2023
a540dfb
more test proxy anonymous
Raj-RR1 Nov 21, 2023
0a8b9b1
initial-test_kill-anonymous
Raj-RR1 Nov 21, 2023
9107abd
more tests kill anonymous proxy
Raj-RR1 Nov 22, 2023
017d60f
initial test proxy proxy
Raj-RR1 Nov 22, 2023
93ea90e
fix initial test and add more test
Raj-RR1 Nov 23, 2023
be1f0b9
minor fix
Raj-RR1 Nov 23, 2023
3b509eb
proxy test with staking
Raj-RR1 Nov 23, 2023
71e6a72
second last test - proxy proxy
Raj-RR1 Nov 23, 2023
7280978
force proxy type to staking
Raj-RR1 Nov 23, 2023
fc50bdb
change test non transfer to staking
Raj-RR1 Nov 23, 2023
d833906
final test proxy proxy
Raj-RR1 Nov 24, 2023
5d0f65c
change force proxy type to governance
Raj-RR1 Nov 24, 2023
86b1dad
test a call which supports nesting
Raj-RR1 Nov 26, 2023
9ec8f67
proxy with council subcall
Raj-RR1 Nov 26, 2023
36775e9
change real account
Raj-RR1 Nov 26, 2023
71f730c
add nesting call for proxy test
Raj-RR1 Nov 26, 2023
7087ec3
remove additional tip
Raj-RR1 Nov 26, 2023
da404d9
inital test-proxy announced
Raj-RR1 Nov 27, 2023
0626242
test proxy announced with non transfer type
Raj-RR1 Nov 27, 2023
7838197
remove space
Raj-RR1 Nov 27, 2023
b01a240
fix casing and add new test
Raj-RR1 Nov 27, 2023
df28e92
minor fix
Raj-RR1 Nov 27, 2023
e0dad89
test with force proxy type as staking
Raj-RR1 Nov 27, 2023
b897e57
set force proxy type as none
Raj-RR1 Nov 27, 2023
7ef0d56
add test proxy remove announcement
Raj-RR1 Nov 27, 2023
277192b
swap case numbers and module idx
Raj-RR1 Nov 27, 2023
8f1245f
minor fix
Raj-RR1 Nov 27, 2023
6f2f12a
add test for remove proxies
Raj-RR1 Nov 27, 2023
1bf4b8f
initial test remove proxy
Raj-RR1 Nov 27, 2023
6c0851d
final test remove proxy
Raj-RR1 Nov 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 60 additions & 60 deletions app/src/substrate_dispatch_V2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1744,34 +1744,34 @@ parser_error_t _readMethod_V2(
case 7182: /* module 28 call 14 */
CHECK_ERROR(_readMethod_identity_quit_sub_V2(c, &method->basic.identity_quit_sub_V2))
break;
case 7424: /* module 29 call 0 */
case 6912: /* module 27 call 0 */
CHECK_ERROR(_readMethod_proxy_proxy_V2(c, &method->nested.proxy_proxy_V2))
break;
case 7425: /* module 29 call 1 */
case 6913: /* module 27 call 1 */
CHECK_ERROR(_readMethod_proxy_add_proxy_V2(c, &method->basic.proxy_add_proxy_V2))
break;
case 7426: /* module 29 call 2 */
case 6914: /* module 27 call 2 */
CHECK_ERROR(_readMethod_proxy_remove_proxy_V2(c, &method->basic.proxy_remove_proxy_V2))
break;
case 7427: /* module 29 call 3 */
case 6915: /* module 27 call 3 */
CHECK_ERROR(_readMethod_proxy_remove_proxies_V2(c, &method->basic.proxy_remove_proxies_V2))
break;
case 7428: /* module 29 call 4 */
case 6916: /* module 27 call 4 */
CHECK_ERROR(_readMethod_proxy_anonymous_V2(c, &method->basic.proxy_anonymous_V2))
break;
case 7429: /* module 29 call 5 */
case 6917: /* module 27 call 5 */
CHECK_ERROR(_readMethod_proxy_kill_anonymous_V2(c, &method->basic.proxy_kill_anonymous_V2))
break;
case 7430: /* module 29 call 6 */
case 6918: /* module 27 call 6 */
CHECK_ERROR(_readMethod_proxy_announce_V2(c, &method->basic.proxy_announce_V2))
break;
case 7431: /* module 29 call 7 */
case 6920: /* module 27 call 8 */
CHECK_ERROR(_readMethod_proxy_reject_announcement_V2(c, &method->basic.proxy_reject_announcement_V2))
break;
case 7432: /* module 29 call 8 */
case 6919: /* module 27 call 7 */
CHECK_ERROR(_readMethod_proxy_remove_announcement_V2(c, &method->basic.proxy_remove_announcement_V2))
break;
case 7433: /* module 29 call 9 */
case 6921: /* module 27 call 9 */
CHECK_ERROR(_readMethod_proxy_proxy_announced_V2(c, &method->basic.proxy_proxy_announced_V2))
break;
case 7680: /* module 30 call 0 */
Expand Down Expand Up @@ -1977,7 +1977,7 @@ const char *_getMethod_ModuleName_V2(uint8_t moduleIdx)
return STR_MO_RECOVERY;
case 28:
return STR_MO_IDENTITY;
case 29:
case 27:
return STR_MO_PROXY;
case 30:
return STR_MO_MULTISIG;
Expand Down Expand Up @@ -2252,25 +2252,25 @@ const char *_getMethod_Name_V2_ParserFull(uint16_t callPrivIdx)
return STR_ME_REMOVE_SUB;
case 7182: /* module 28 call 14 */
return STR_ME_QUIT_SUB;
case 7424: /* module 29 call 0 */
case 6912: /* module 27 call 0 */
return STR_ME_PROXY;
case 7425: /* module 29 call 1 */
case 6913: /* module 27 call 1 */
return STR_ME_ADD_PROXY;
case 7426: /* module 29 call 2 */
case 6914: /* module 27 call 2 */
return STR_ME_REMOVE_PROXY;
case 7427: /* module 29 call 3 */
case 6915: /* module 27 call 3 */
return STR_ME_REMOVE_PROXIES;
case 7428: /* module 29 call 4 */
case 6916: /* module 27 call 4 */
return STR_ME_ANONYMOUS;
case 7429: /* module 29 call 5 */
case 6917: /* module 27 call 5 */
return STR_ME_KILL_ANONYMOUS;
case 7430: /* module 29 call 6 */
case 6918: /* module 27 call 6 */
return STR_ME_ANNOUNCE;
case 7431: /* module 29 call 7 */
case 6920: /* module 27 call 8 */
return STR_ME_REJECT_ANNOUNCEMENT;
case 7432: /* module 29 call 8 */
case 6919: /* module 27 call 7 */
return STR_ME_REMOVE_ANNOUNCEMENT;
case 7433: /* module 29 call 9 */
case 6921: /* module 27 call 9 */
return STR_ME_PROXY_ANNOUNCED;
case 7680: /* module 30 call 0 */
return STR_ME_AS_MULTI_THRESHOLD_1;
Expand Down Expand Up @@ -2620,25 +2620,25 @@ uint8_t _getMethod_NumItems_V2(uint8_t moduleIdx, uint8_t callIdx)
return 1;
case 7182: /* module 28 call 14 */
return 0;
case 7424: /* module 29 call 0 */
case 6912: /* module 27 call 0 */
return 3;
case 7425: /* module 29 call 1 */
case 6913: /* module 27 call 1 */
return 3;
case 7426: /* module 29 call 2 */
case 6914: /* module 27 call 2 */
return 3;
case 7427: /* module 29 call 3 */
case 6915: /* module 27 call 3 */
return 0;
case 7428: /* module 29 call 4 */
case 6916: /* module 27 call 4 */
return 3;
case 7429: /* module 29 call 5 */
case 6917: /* module 27 call 5 */
return 5;
case 7430: /* module 29 call 6 */
case 6918: /* module 27 call 6 */
return 2;
case 7431: /* module 29 call 7 */
case 6920: /* module 27 call 8 */
return 2;
case 7432: /* module 29 call 8 */
case 6919: /* module 27 call 7 */
return 2;
case 7433: /* module 29 call 9 */
case 6921: /* module 27 call 9 */
return 4;
case 7680: /* module 30 call 0 */
return 2;
Expand Down Expand Up @@ -3768,7 +3768,7 @@ const char *_getMethod_ItemName_V2(uint8_t moduleIdx, uint8_t callIdx, uint8_t i
default:
return NULL;
}
case 7424: /* module 29 call 0 */
case 6912: /* module 27 call 0 */
switch (itemIdx)
{
case 0:
Expand All @@ -3780,7 +3780,7 @@ const char *_getMethod_ItemName_V2(uint8_t moduleIdx, uint8_t callIdx, uint8_t i
default:
return NULL;
}
case 7425: /* module 29 call 1 */
case 6913: /* module 27 call 1 */
switch (itemIdx)
{
case 0:
Expand All @@ -3792,7 +3792,7 @@ const char *_getMethod_ItemName_V2(uint8_t moduleIdx, uint8_t callIdx, uint8_t i
default:
return NULL;
}
case 7426: /* module 29 call 2 */
case 6914: /* module 27 call 2 */
switch (itemIdx)
{
case 0:
Expand All @@ -3804,13 +3804,13 @@ const char *_getMethod_ItemName_V2(uint8_t moduleIdx, uint8_t callIdx, uint8_t i
default:
return NULL;
}
case 7427: /* module 29 call 3 */
case 6915: /* module 27 call 3 */
switch (itemIdx)
{
default:
return NULL;
}
case 7428: /* module 29 call 4 */
case 6916: /* module 27 call 4 */
switch (itemIdx)
{
case 0:
Expand All @@ -3822,7 +3822,7 @@ const char *_getMethod_ItemName_V2(uint8_t moduleIdx, uint8_t callIdx, uint8_t i
default:
return NULL;
}
case 7429: /* module 29 call 5 */
case 6917: /* module 27 call 5 */
switch (itemIdx)
{
case 0:
Expand All @@ -3838,7 +3838,7 @@ const char *_getMethod_ItemName_V2(uint8_t moduleIdx, uint8_t callIdx, uint8_t i
default:
return NULL;
}
case 7430: /* module 29 call 6 */
case 6918: /* module 27 call 6 */
switch (itemIdx)
{
case 0:
Expand All @@ -3848,7 +3848,7 @@ const char *_getMethod_ItemName_V2(uint8_t moduleIdx, uint8_t callIdx, uint8_t i
default:
return NULL;
}
case 7431: /* module 29 call 7 */
case 6920: /* module 27 call 8 */
switch (itemIdx)
{
case 0:
Expand All @@ -3858,7 +3858,7 @@ const char *_getMethod_ItemName_V2(uint8_t moduleIdx, uint8_t callIdx, uint8_t i
default:
return NULL;
}
case 7432: /* module 29 call 8 */
case 6919: /* module 27 call 7 */
switch (itemIdx)
{
case 0:
Expand All @@ -3868,7 +3868,7 @@ const char *_getMethod_ItemName_V2(uint8_t moduleIdx, uint8_t callIdx, uint8_t i
default:
return NULL;
}
case 7433: /* module 29 call 9 */
case 6921: /* module 27 call 9 */
switch (itemIdx)
{
case 0:
Expand Down Expand Up @@ -5947,7 +5947,7 @@ parser_error_t _getMethod_ItemValue_V2(
default:
return parser_no_data;
}
case 7424: /* module 29 call 0 */
case 6912: /* module 27 call 0 */
switch (itemIdx)
{
case 0: /* proxy_proxy_V2 - real */;
Expand All @@ -5968,7 +5968,7 @@ parser_error_t _getMethod_ItemValue_V2(
default:
return parser_no_data;
}
case 7425: /* module 29 call 1 */
case 6913: /* module 27 call 1 */
switch (itemIdx)
{
case 0: /* proxy_add_proxy_V2 - delegate */;
Expand All @@ -5989,7 +5989,7 @@ parser_error_t _getMethod_ItemValue_V2(
default:
return parser_no_data;
}
case 7426: /* module 29 call 2 */
case 6914: /* module 27 call 2 */
switch (itemIdx)
{
case 0: /* proxy_remove_proxy_V2 - delegate */;
Expand All @@ -6010,13 +6010,13 @@ parser_error_t _getMethod_ItemValue_V2(
default:
return parser_no_data;
}
case 7427: /* module 29 call 3 */
case 6915: /* module 27 call 3 */
switch (itemIdx)
{
default:
return parser_no_data;
}
case 7428: /* module 29 call 4 */
case 6916: /* module 27 call 4 */
switch (itemIdx)
{
case 0: /* proxy_anonymous_V2 - proxy_type */;
Expand All @@ -6037,7 +6037,7 @@ parser_error_t _getMethod_ItemValue_V2(
default:
return parser_no_data;
}
case 7429: /* module 29 call 5 */
case 6917: /* module 27 call 5 */
switch (itemIdx)
{
case 0: /* proxy_kill_anonymous_V2 - spawner */;
Expand Down Expand Up @@ -6068,7 +6068,7 @@ parser_error_t _getMethod_ItemValue_V2(
default:
return parser_no_data;
}
case 7430: /* module 29 call 6 */
case 6918: /* module 27 call 6 */
switch (itemIdx)
{
case 0: /* proxy_announce_V2 - real */;
Expand All @@ -6084,7 +6084,7 @@ parser_error_t _getMethod_ItemValue_V2(
default:
return parser_no_data;
}
case 7431: /* module 29 call 7 */
case 6920: /* module 27 call 8 */
switch (itemIdx)
{
case 0: /* proxy_reject_announcement_V2 - delegate */;
Expand All @@ -6100,7 +6100,7 @@ parser_error_t _getMethod_ItemValue_V2(
default:
return parser_no_data;
}
case 7432: /* module 29 call 8 */
case 6919: /* module 27 call 7 */
switch (itemIdx)
{
case 0: /* proxy_remove_announcement_V2 - real */;
Expand All @@ -6116,7 +6116,7 @@ parser_error_t _getMethod_ItemValue_V2(
default:
return parser_no_data;
}
case 7433: /* module 29 call 9 */
case 6921: /* module 27 call 9 */
switch (itemIdx)
{
case 0: /* proxy_proxy_announced_V2 - delegate */;
Expand Down Expand Up @@ -7224,15 +7224,15 @@ bool _getMethod_IsNestingSupported_V2(uint8_t moduleIdx, uint8_t callIdx)
case 7178: // Identity:Kill identity
case 7181: // Identity:Remove sub
case 7182: // Identity:Quit sub
case 7425: // Proxy:Add proxy
case 7426: // Proxy:Remove proxy
case 7427: // Proxy:Remove proxies
case 7428: // Proxy:Anonymous
case 7429: // Proxy:Kill anonymous
case 7430: // Proxy:announce
case 7431: // Proxy: Reject announcement
case 7432: // Proxy: Remove announcement
case 7433: // Proxy:Proxy announced
case 6913: // Proxy:Add proxy
case 6914: // Proxy:Remove proxy
case 6915: // Proxy:Remove proxies
case 6916: // Proxy:Anonymous
case 6917: // Proxy:Kill anonymous
case 6918: // Proxy:announce
case 6920: // Proxy: Reject announcement
case 6919: // Proxy: Remove announcement
case 6921: // Proxy:Proxy announced
case 8192: // TreasuryReward:Set current payout
case 8193: // TreasuryReward:Set minting interval
case 9472: // Bounties:Propose bounty
Expand Down
6 changes: 3 additions & 3 deletions app/src/substrate_methods_V2.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ extern "C" {
#define PD_CALL_VESTING_V2 25
#define PD_CALL_RECOVERY_V22 24
#define PD_CALL_IDENTITY_V2 28
#define PD_CALL_PROXY_V2 29
#define PD_CALL_PROXY_V2 27
#define PD_CALL_MULTISIG_V2 30
#define PD_CALL_TREASURYREWARD_V2 32
#define PD_CALL_BOUNTIES_V2 37
Expand Down Expand Up @@ -852,13 +852,13 @@ typedef struct {
pd_CallHashOf_V2_t call_hash;
} pd_proxy_announce_V2_t;

#define PD_CALL_PROXY_REJECT_ANNOUNCEMENT_V2 7
#define PD_CALL_PROXY_REJECT_ANNOUNCEMENT_V2 8
typedef struct {
pd_AccountId_V2_t delegate;
pd_CallHashOf_V2_t call_hash;
} pd_proxy_reject_announcement_V2_t;

#define PD_CALL_PROXY_REMOVE_ANNOUNCEMENT_V2 8
#define PD_CALL_PROXY_REMOVE_ANNOUNCEMENT_V2 7
typedef struct {
pd_AccountId_V2_t real;
pd_CallHashOf_V2_t call_hash;
Expand Down
Loading
Loading