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

feat: Use local getRegistry functions #48

Merged
merged 7 commits into from
Jan 21, 2021
Merged

Conversation

emostov
Copy link
Contributor

@emostov emostov commented Jan 20, 2021

Closes #47, Closes #46, Closes #45

  • Transition packages to use their own getRegistry function in order to decrease deps and supply chain waits for types.
  • Add a chain builder example for how to create local getRegistry.
  • Remove apps-config dep for txwrapper-orml to reduce package size; replaced with acala types as a dev dep. I chose to use the acala types over orml because it is helpful for the decode function tests to be associated with the specific runtime of a chain.

Closes #47, Closes #46, Closes #45
- Transition packages to use their own getRegistry function in order to decrease deps and supply chain waits for types
- Add a chain builder example for how to create local getRegistry
- remove apps-config dep for txwrapper-orml to reduce package size; replaced with acala types as a dev dep

/**
* `ChainProperties` for networks that txwrapper-polkadot supports. These are normally returned
* by `system_properties` call, but since they don't change much, it's pretty safe to hardcode them.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When would the chain properties change? Is that something we would have to take into account in the future?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far the only time chain properties has changed on polkadot/ kusama is when Polkadot did a re-denomination from 12 to 10 decimals. I imagine the most common change would be if a chain supported multiple currencies, that might affect the chain properties, just a guess though.

The more I think about this though, I think I should pull this from here and just update the example to fetch the chain properties.

Copy link
Member

@TarikGul TarikGul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, few grammar suggestions, and a clarity question, but good job!

Co-authored-by: Tarik Gul <47201679+TarikGul@users.noreply.github.com>
Copy link
Contributor

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

CHAIN_BUILDER.md Outdated Show resolved Hide resolved
CHAIN_BUILDER.md Outdated Show resolved Hide resolved
CHAIN_BUILDER.md Outdated Show resolved Hide resolved
@emostov emostov merged commit 4c430ba into main Jan 21, 2021
@emostov emostov deleted the zeke-decouple-type-deps branch January 21, 2021 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants