New crate: multiversx-sc-abi#2288
Merged
andrei-marinica merged 11 commits intofeat/abi-cratefrom Mar 3, 2026
Merged
Conversation
|
Contract comparison - from 09410a4 to a610bc8
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new multiversx-sc-abi crate by extracting ABI-related types and logic from the multiversx-sc framework base into a standalone crate. This enables the ABI functionality to be used independently of the full smart contract framework.
Changes:
- New crates:
multiversx-sc-abi,multiversx-sc-abi-derive, andmultiversx-sc-abi-derive-commonare introduced underdata/ - The
TypeAbiderive logic is refactored into a sharedabi-derive-commoncrate, supporting bothmultiversx-scandmultiversx-sc-abiimport contexts BuildInfoAbigains a newabifield tracking the ABI crate version, and adummy()constructor replaces inline struct construction in tests
Reviewed changes
Copilot reviewed 47 out of 53 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
data/abi/Cargo.toml |
New crate manifest for multiversx-sc-abi |
data/abi/src/lib.rs |
Root of the new ABI crate |
data/abi/src/types.rs |
Module re-exporting type ABI definitions |
data/abi/src/types/type_names.rs |
TypeName and TypeNames definitions moved here |
data/abi-derive/Cargo.toml |
New crate manifest for multiversx-sc-abi-derive |
data/abi-derive/src/lib.rs |
Proc-macro entry point for the standalone ABI derive crate |
data/abi-derive-common/Cargo.toml |
New shared crate for common derive logic |
data/abi-derive-common/src/lib.rs |
Shared derive logic entry point |
data/abi-derive-common/src/parse.rs |
Parse utilities module |
framework/derive/src/type_abi_derive.rs |
Refactored to use TypeAbiImportCrate context enum, now lives in abi-derive-common |
framework/derive/src/lib.rs |
Updated to delegate to abi-derive-common |
framework/derive/Cargo.toml |
Added multiversx-sc-abi-derive-common dependency; cleaned up syn features |
framework/base/src/lib.rs |
Re-exports multiversx-sc-abi as abi module; adds framework_build_abi() |
framework/base/src/abi.rs |
Removed (content moved to new crate) |
framework/base/src/abi/build_info_abi.rs |
Added abi field and dummy() constructor |
framework/base/src/abi/contract_abi.rs |
Updated imports after module restructure |
framework/base/Cargo.toml |
Added multiversx-sc-abi dependency |
framework/meta/Cargo.toml |
Version spec for common-path changed |
framework/derive/src/generate/abi_gen.rs |
Updated to populate new abi field in BuildInfoAbi |
framework/meta-lib/src/abi_json/build_info_abi_json.rs |
Added serialization for the new abi field |
contracts/examples/multisig/Cargo.toml |
Version bumped down to 0.0.0 |
chain/core/Cargo.toml |
Relaxed multiversx-sc-codec version constraint |
Cargo.toml |
Added new crates to workspace |
| Various ABI JSON fixtures | Updated to include new abi build info field |
Comments suppressed due to low confidence (2)
framework/base/src/lib.rs:1
- The
// TEMPcomment indicates this is a temporary workaround, but there is no tracking issue reference or explanation of what the final state should be. This makes it unclear when and how this will be resolved. Consider adding a TODO with an issue reference, or resolving the import adjustment in this PR.
data/codec/Cargo.toml:1 - A
publish = false # TEMPmarker has been added tomultiversx-sc-codec, which is an existing published crate. This could accidentally prevent the codec crate from being published in a release. If this is intentional for the current development phase, a tracking issue reference should be added and the marker should be removed before any release.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull request overview
This PR introduces a new
multiversx-sc-abicrate by extracting ABI-related types and logic from themultiversx-scframework base into a standalone crate. This enables the ABI functionality to be used independently of the full smart contract framework.Changes:
multiversx-sc-abi,multiversx-sc-abi-derive, andmultiversx-sc-abi-derive-commonare introduced underdata/TypeAbiderive logic is refactored into a sharedabi-derive-commoncrate, supporting bothmultiversx-scandmultiversx-sc-abiimport contextsBuildInfoAbigains a newabifield tracking the ABI crate version, and adummy()constructor replaces inline struct construction in tests