Skip to content

feat: expose extrinsics operations as a library#1181

Merged
ascjones merged 5 commits into
use-ink:masterfrom
tareknaser:extrinsics-crate
Jul 4, 2023
Merged

feat: expose extrinsics operations as a library#1181
ascjones merged 5 commits into
use-ink:masterfrom
tareknaser:extrinsics-crate

Conversation

@tareknaser
Copy link
Copy Markdown
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
Copy Markdown

cla-bot-2021 Bot commented Jun 27, 2023

User @tareknaser360, please sign the CLA here.

Comment thread crates/extrinsics/src/lib.rs Outdated
Comment thread crates/extrinsics/LICENSE
Comment thread crates/extrinsics/src/call.rs Outdated
Comment thread crates/extrinsics/src/instantiate.rs Outdated
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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