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: expose extrinsics operations as a library #1181

Merged
merged 5 commits into from
Jul 4, 2023

Conversation

tareknaser
Copy link
Contributor

Description

This pull request introduces a library that exposes extrinsics operations as a reusable component. This makes it easier to integrate and reuse these operations in various projects.

Fixes #1140

Notes to Reviewers:

  • Most of the changes in this PR involve reorganizing existing code. No new code has been added.
  • The runtime_api module has been moved to the new crate to avoid cyclic dependencies.
  • The types CodeHash, Balance, and Client have been defined in the new crate for the same reason.
  • The documentation for the extrinsics has been moved to the readme of the crate itself.

@cla-bot-2021
Copy link

cla-bot-2021 bot commented Jun 27, 2023

User @tareknaser360, please sign the CLA here.

crates/extrinsics/src/lib.rs Outdated Show resolved Hide resolved
crates/extrinsics/LICENSE Outdated Show resolved Hide resolved
crates/extrinsics/src/call.rs Outdated Show resolved Hide resolved
crates/extrinsics/src/instantiate.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@ascjones ascjones left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@ascjones
Copy link
Collaborator

ascjones commented Jul 3, 2023

Hey @tareknaser360, some of the tests e.g. for transcoder are failing, which is why the CI is red. Can you resolve those issues then we can merge this.

This commit introduces a library that exposes extrinsics operations as a reusable component.
This makes it easier to integrate and reuse these operations in various projects.

Signed-off-by: Tarek <tareknaser360@gmail.com>
This commit refines the code to avoid exposing the entire  module

Signed-off-by: Tarek <tareknaser360@gmail.com>
This commit exposes DenominatedBalance and UnitPrefix.

This commit also refactors 3 docs examples to initialize BalanceVariant from string because its fields are private

Signed-off-by: Tarek <tareknaser360@gmail.com>
Signed-off-by: Tarek <tareknaser360@gmail.com>
@tareknaser
Copy link
Contributor Author

Hey @tareknaser360, some of the tests e.g. for transcoder are failing, which is why the CI is red. Can you resolve those issues then we can merge this.

I looked into the failing tests in the CI environment and made the following updates:

  • Updated the examples in the new crates' documentation to resolve the test failures.
  • Modified the examples to initialize BalanceVariant instances using strings, which is the most suitable method at the moment.

I also rebased on top of master.

Signed-off-by: Tarek <tareknaser360@gmail.com>
@ascjones ascjones merged commit dd24e25 into use-ink:master Jul 4, 2023
10 checks passed
@tareknaser tareknaser deleted the extrinsics-crate branch July 6, 2023 19:25
This was referenced Jul 26, 2023
@smiasojed smiasojed mentioned this pull request Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[client library] decouple extrinsics related ability as library
2 participants