-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add decoded XCM data in
blocks
endpoint (#1364)
* feat: add decoded xcm data in blocks endpoint * add types to fix any lint errors * update copyright year * fix paraId filter for horizontal msgs * fix xcm decoding for moonbeam horizontal msg * add yarn.lock file * update docs * removed moonbeam package * adding back yarn.lock * changed variable to const * retrieved yarn.lock from master branch * added a test for decoding upward msg in polkadot block * added test for decoding horizontal msg in KAH block * updated cacheKey with query params of decodedXcmMsgs and paraId - updated docs in blocks controller comments * replaced mocked data of block 18207445 with those of block 18468942 - in block 18468942 we have 2 upward msgs from two different parachains so with the same mocked data we can add 2 tests - added a test to check the query param paraId is working as expected * replaced mocked data of block 5831776 with those of block 3356195 - in block 3356195 we have downward and horizontal msgs so with the same mocked data we can test two different directions * changed structure of decodedXcmMsgs response - changed structure of the decodedMsgs response so that it always returns three arrays (filled or empty), one for each direction. - removed an if statement as unnecessary in XCMDecoder - updated corresponding tests with the new structure of the response * reintroduced the if statement so that paraId query param works when connected to parachain * added test to check if query param paraId works correctly also in horizontal msgs * run linter * added the decodedXcmMsgs response for blockId endpoint - the response is a combination of Block and BlockXCM response with the use of allOf - added schema for Liquidity Pool because the swagger was complaining - changed the order of a hash field so that it aligns of it actually appears in the corresponding response * added decodedXcmMsgsArg and paraId in the options arg * added validation for paraId query param - changed type of paraId after validation - renamed boolean option for decodedXcmMsgs so it is shorter * XCMDecoder changes from Tarik's Amazing review - changes in imports - replaced class name with the keyword 'this' - replaced static with readonly for class properties - replaced static with private for class methods - changed specname to lowercase * reused mockApi's 'perClass' in the other mocked apis - added the 'type' keyword in more imports * run linter & refix imports * Update src/services/blocks/BlocksService.ts Co-authored-by: Tarik Gul <47201679+TarikGul@users.noreply.github.com> * fix on the perClass field --------- Co-authored-by: marshacb <cameron.marshall12@gmail.com> Co-authored-by: Tarik Gul <47201679+TarikGul@users.noreply.github.com>
- Loading branch information
1 parent
95987f5
commit 555817c
Showing
48 changed files
with
11,740 additions
and
89 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.