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

add Primitive types #961

Merged
merged 22 commits into from
Jul 4, 2023
Merged

add Primitive types #961

merged 22 commits into from
Jul 4, 2023

Conversation

gitofdeepanshu
Copy link
Contributor

@gitofdeepanshu gitofdeepanshu commented Jun 20, 2023

Pull Request Summary

Introduce primitives types in a dedicated primitives crate to get rid of repeating primitive types definition across runtimes and collator:
Related to #959

Changes

  • merged xcm-primitives into astar-primitives
  • merged collator-primitives into astar-primitives
  • added astar-primitives in all runtimes, collator and pallets (dapps-staking and block-reward)

Check list

  • added or updated unit tests
  • updated Astar official documentation
  • added OnRuntimeUpgrade hook for precompile revert code registration
  • updated spec version
  • updated semver

@gitofdeepanshu gitofdeepanshu added runtime This PR/Issue is related to the topic “runtime”. other PR/issue is related to third-party, scripts or other things which don't have definite label. and removed runtime This PR/Issue is related to the topic “runtime”. labels Jun 20, 2023
@shaunxw
Copy link
Member

shaunxw commented Jun 21, 2023

We already have a primitives directory so it's best to use it.

IMO crate name could be astar-primitives. Polkadot uses polkadot-core-primitives bc it has another crate polkadot-primitives for parachain type definitions, but this is not the case for us.

@gitofdeepanshu gitofdeepanshu marked this pull request as ready for review June 23, 2023 07:43
pallets/block-reward/src/lib.rs Outdated Show resolved Hide resolved
pallets/block-reward/src/tests.rs Show resolved Hide resolved
pallets/dapps-staking/src/benchmarking.rs Outdated Show resolved Hide resolved
pallets/dapps-staking/src/testing_utils.rs Show resolved Hide resolved
Copy link
Member

@shaunxw shaunxw left a comment

Choose a reason for hiding this comment

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

LGTM

@shaunxw shaunxw requested a review from Dinonard June 28, 2023 12:09
@shaunxw
Copy link
Member

shaunxw commented Jun 29, 2023

Please merge the latest master branch for CI fix.

@github-actions
Copy link

github-actions bot commented Jul 4, 2023

Code Coverage

Package Line Rate Branch Rate Health
chain-extensions/pallet-assets/src 0% 0%
pallets/dapps-staking/src/pallet 87% 0%
chain-extensions/xvm/src 0% 0%
precompiles/xvm/src 61% 0%
chain-extensions/dapps-staking/src 0% 0%
precompiles/utils/macro/src 0% 0%
primitives/src 70% 0%
pallets/collator-selection/src 70% 0%
chain-extensions/types/dapps-staking/src 0% 0%
precompiles/utils/src 69% 0%
primitives/src/xcm 70% 0%
pallets/contracts-migration/src 0% 0%
precompiles/xcm/src 85% 0%
chain-extensions/types/assets/src 0% 0%
pallets/custom-signatures/src 52% 0%
pallets/block-reward/src 85% 0%
precompiles/assets-erc20/src 76% 0%
pallets/pallet-xvm/src 5% 0%
precompiles/dapps-staking/src 93% 0%
precompiles/sr25519/src 79% 0%
precompiles/substrate-ecdsa/src 78% 0%
pallets/pallet-xcm/src 54% 0%
pallets/xc-asset-config/src 54% 0%
chain-extensions/types/xvm/src 0% 0%
pallets/dapps-staking/src 82% 0%
pallets/pallet-xvm/src/pallet 8% 0%
Summary 55% (2196 / 3996) 0% (0 / 0)

Minimum allowed line rate is 50%

@shaunxw shaunxw merged commit 2e407f9 into master Jul 4, 2023
12 checks passed
@shaunxw shaunxw deleted the primitive-types branch July 4, 2023 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
other PR/issue is related to third-party, scripts or other things which don't have definite label.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants