Regenerate types and update @polkadot dependencies #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #2.
What I did
yarn update-metadata
to update the local metadata files. This command will run this script which by default queries the metadata from Foucoco. This is okay as we generally assume that Foucoco receives the updates first which are later rolled out also on the other chains. So by choosing Foucoco, we'll always have the very latest metadata and thus type info available.yarn build
to try and generate the new types based on the new metadata. This command fails at first because we manually need to change something afterward. The error message will tell us what conflicts we need to solve.In this case, we get the following errors:
This is because the types we define for the vault registry here are not matching the rest of the metadata anymore as they don't contain the new 'Token' type. That's why we follow this note in the README and copy the generated values from the lookup file here back into
vaultRegistry.ts
. The type issue is now fixed and we can runyarn build
again to rebuild also the rest of the files.