Skip to content

Commit

Permalink
test bounties-approve bounty
Browse files Browse the repository at this point in the history
  • Loading branch information
Raj-RR1 committed Sep 12, 2023
1 parent a46985d commit 983ffa7
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/src/substrate_dispatch_V2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ __Z_INLINE parser_error_t _readMethod_bounties_propose_bounty_V2(
__Z_INLINE parser_error_t _readMethod_bounties_approve_bounty_V2(
parser_context_t *c, pd_bounties_approve_bounty_V2_t *m)
{
CHECK_ERROR(_readCompactu32(c, &m->bounty_id))
CHECK_ERROR(_readCompactBountyIndex_V2(c, &m->bounty_id))
return parser_ok;
}

Expand Down Expand Up @@ -6293,7 +6293,7 @@ parser_error_t _getMethod_ItemValue_V2(
switch (itemIdx)
{
case 0: /* bounties_approve_bounty_V2 - bounty_id */;
return _toStringCompactu32(
return _toStringCompactBountyIndex_V2(
&m->basic.bounties_approve_bounty_V2.bounty_id,
outValue, outValueLen,
pageIdx, pageCount);
Expand Down
8 changes: 8 additions & 0 deletions app/src/substrate_functions_V2.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ parser_error_t _readschedulePeriodBlockNumber_V2(parser_context_t* c, pd_schedul
parser_error_t _readschedulePriority_V2(parser_context_t* c, pd_schedulePriority_V2_t* v);
parser_error_t _readAccountIdLookupOfT_V2(parser_context_t* c, pd_AccountIdLookupOfT_V2_t* v);
parser_error_t _readOptionCompactu128_V2(parser_context_t* c, pd_OptionCompactu128_V2_t* v);
parser_error_t _readCompactBountyIndex_V2(parser_context_t* c, pd_CompactBountyIndex_V2_t* v);

// toString functions
parser_error_t _toStringAccountId_V2(
Expand Down Expand Up @@ -158,6 +159,13 @@ parser_error_t _toStringAccountVote_V2(
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringCompactBountyIndex_V2(
const pd_CompactBountyIndex_V2_t* v,
char* outValue,
uint16_t outValueLen,
uint8_t pageIdx,
uint8_t* pageCount);

parser_error_t _toStringAuthorityIdasRuntimeAppPublicSignature_V2(
const pd_AuthorityIdasRuntimeAppPublicSignature_V2_t* v,
char* outValue,
Expand Down
2 changes: 1 addition & 1 deletion app/src/substrate_methods_V2.h
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ typedef struct {

#define PD_CALL_BOUNTIES_APPROVE_BOUNTY_V2 1
typedef struct {
pd_Compactu32_t bounty_id;
pd_CompactBountyIndex_V2_t bounty_id;
} pd_bounties_approve_bounty_V2_t;

#define PD_CALL_BOUNTIES_PROPOSE_CURATOR_V2 2
Expand Down
15 changes: 15 additions & 0 deletions app/src/substrate_types_V2.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ parser_error_t _readAccountVoteStandard_V2(parser_context_t* c, pd_AccountVoteSt
return parser_ok;
}

parser_error_t _readCompactBountyIndex_V2(parser_context_t* c, pd_CompactBountyIndex_V2_t* v)
{
return _readCompactInt(c, v);
}

parser_error_t _readAccountVote_V2(parser_context_t* c, pd_AccountVote_V2_t* v)
{
CHECK_INPUT()
Expand Down Expand Up @@ -1340,6 +1345,16 @@ parser_error_t _toStringLookupSource_V2(
return parser_ok;
}

parser_error_t _toStringCompactBountyIndex_V2(
const pd_CompactBountyIndex_V2_t* v,
char* outValue,
uint16_t outValueLen,
uint8_t pageIdx,
uint8_t* pageCount)
{
return _toStringCompactInt(v, 0, "", "", outValue, outValueLen, pageIdx, pageCount);
}

parser_error_t _toStringLeasePeriodOfT_V2(
const pd_LeasePeriodOfT_V2_t* v,
char* outValue,
Expand Down
2 changes: 2 additions & 0 deletions app/src/substrate_types_V2.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ typedef struct {
const uint8_t* _ptr;
} pd_AccountId_V2_t;

typedef compactInt_t pd_CompactBountyIndex_V2_t;

typedef struct {
uint8_t value;
union {
Expand Down

0 comments on commit 983ffa7

Please sign in to comment.