Skip to content

Commit

Permalink
Finished multiTokens
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardocustodio committed May 22, 2024
1 parent cf254b3 commit 1d7add6
Show file tree
Hide file tree
Showing 3 changed files with 379 additions and 1 deletion.
16 changes: 16 additions & 0 deletions app/src/substrate/substrate_dispatch_V7.c
Original file line number Diff line number Diff line change
Expand Up @@ -1714,36 +1714,52 @@ __Z_INLINE parser_error_t _readMethod_multitokens_force_transfer_V7(
__Z_INLINE parser_error_t _readMethod_multitokens_finish_claim_tokens_V7(
parser_context_t* c, pd_multitokens_finish_claim_tokens_V7_t* m)
{
CHECK_ERROR(_readAccountId(c, &m->destination))
CHECK_ERROR(_readEthereumAddress(c, &m->ethereum_address))
return parser_ok;
}

__Z_INLINE parser_error_t _readMethod_multitokens_force_create_ethereum_collection_V7(
parser_context_t* c, pd_multitokens_force_create_ethereum_collection_V7_t* m)
{
CHECK_ERROR(_readAccountId(c, &m->owner))
CHECK_ERROR(_readEthereumAddress(c, &m->claimer))
CHECK_ERROR(_readCompactCollectionId(c, &m->ethereum_collection_id))
CHECK_ERROR(_readCollectionDescriptor(c, &m->descriptor))
return parser_ok;
}

__Z_INLINE parser_error_t _readMethod_multitokens_force_set_ethereum_account_V7(
parser_context_t* c, pd_multitokens_force_set_ethereum_account_V7_t* m)
{
CHECK_ERROR(_readEthereumAddress(c, &m->address))
CHECK_ERROR(_readOptionVecu128(c, &m->value))
return parser_ok;
}

__Z_INLINE parser_error_t _readMethod_multitokens_force_set_ethereum_collection_id_V7(
parser_context_t* c, pd_multitokens_force_set_ethereum_collection_id_V7_t* m)
{
CHECK_ERROR(_readCompactCollectionId(c, &m->ethereum_collection_id))
CHECK_ERROR(_readOptionu128(c, &m->native_collection_id))
return parser_ok;
}

__Z_INLINE parser_error_t _readMethod_multitokens_force_set_ethereum_unmintable_token_ids_V7(
parser_context_t* c, pd_multitokens_force_set_ethereum_unmintable_token_ids_V7_t* m)
{
CHECK_ERROR(_readCompactCollectionId(c, &m->ethereum_collection_id))
CHECK_ERROR(_readCompactu64(c, &m->base_token_id))
CHECK_ERROR(_readCompactu64(c, &m->token_index))
return parser_ok;
}

__Z_INLINE parser_error_t _readMethod_multitokens_force_set_unmintable_token_ids_V7(
parser_context_t* c, pd_multitokens_force_set_unmintable_token_ids_V7_t* m)
{
CHECK_ERROR(_readCompactCollectionId(c, &m->collection_id))
CHECK_ERROR(_readCompactu64(c, &m->base_token_id))
CHECK_ERROR(_readCompactu64(c, &m->token_index))
return parser_ok;
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/substrate/substrate_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ parser_error_t _readDispatchRuleKind(parser_context_t* c, pd_DispatchRuleKind_t*
parser_error_t _readBoxPalletsProposalOrigin(parser_context_t* c, pd_BoxPalletsProposalOrigin_t* v);
parser_error_t _readVoteCurrency(parser_context_t* c, pd_VoteCurrency_t* v);
parser_error_t _readConfigOpu128(parser_context_t* c, pd_ConfigOpu128_t* v);
parser_error_t _readOptionVecu128(parser_context_t* c, pd_OptionVecu128_t* v);

// Common toString functions

parser_error_t _toStringu8(
const pd_u8_t* v,
char* outValue,
Expand Down
Loading

0 comments on commit 1d7add6

Please sign in to comment.