Skip to content

New crate: multiversx-sc-abi#2288

Merged
andrei-marinica merged 11 commits intofeat/abi-cratefrom
abi-crate
Mar 3, 2026
Merged

New crate: multiversx-sc-abi#2288
andrei-marinica merged 11 commits intofeat/abi-cratefrom
abi-crate

Conversation

@andrei-marinica
Copy link
Copy Markdown
Contributor

@andrei-marinica andrei-marinica commented Feb 16, 2026

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, and multiversx-sc-abi-derive-common are introduced under data/
  • The TypeAbi derive logic is refactored into a shared abi-derive-common crate, supporting both multiversx-sc and multiversx-sc-abi import contexts
  • BuildInfoAbi gains a new abi field tracking the ABI crate version, and a dummy() constructor replaces inline struct construction in tests

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 20, 2026

Contract comparison - from 09410a4 to a610bc8

Path                                                                                             size                  has-allocator                     has-format
large-storage.wasm 1656 false None
vec-repeat.wasm 4872 false None
single-value-repeat.wasm 4253 false None
queue-repeat.wasm 5536 false None
linked-list-repeat.wasm 6838 false without message
map-repeat.wasm 7363 false without message
set-repeat.wasm 6511 false None
str-repeat.wasm 2733 false without message
str-repeat-mb-builder-cached.wasm 1109 false without message
str-repeat-mb-builder-basic.wasm 757 false None
send-tx-repeat.wasm 1292 false None
forwarder-queue-promises.wasm 13336 false without message
forwarder-queue.wasm 12712 false without message
recursive-caller.wasm 5163 false without message
local-esdt-and-nft.wasm 12568 false without message
forwarder-raw-init-async-call.wasm 2374 false None
forwarder-raw-init-sync-call.wasm 2958 false None
forwarder-raw.wasm 13081 false None
vault-upgrade.wasm 708 false None
vault.wasm 8950 false None
forwarder.wasm 49169 false without message
proxy-test-second.wasm 2327 false without message
parent.wasm 1999 false None
child.wasm 3982 false without message
transfer-role-features.wasm 8605 false without message
first-contract.wasm 3450 false None
second-contract.wasm 1158 false None
proxy-test-first.wasm 5702 false without message
builtin-func-features.wasm 3828 false None
forwarder-legacy.wasm 33533 ➡️ 33570 🔴 (+37) false without message
basic-features.wasm 85770 ➡️ 85769 🟢 (-1) false without message
basic-features-storage-bytes.wasm 541 false None
abi-tester.wasm 8607 true without message
abi-tester-ev.wasm 760 false None
rust-snippets-generator-test.wasm 4708 false None
formatted-message-features.wasm 3613 false without message
use-module-view.wasm 736 false None
use-module.wasm 32364 ➡️ 32362 🟢 (-2) false without message
payable-features.wasm 6046 false None
exchange-features.wasm 1514 false None
forbidden-opcodes.wasm 842 false None
scenario-tester.wasm 1374 false None
std-contract.wasm 3469 true without message
big-float-features.wasm 6373 false without message
rust-testing-framework-tester.wasm 8584 false None
multi-contract-alt-impl.wasm 353 false None
multi-contract-features.wasm 681 false None
multi-contract-example-feature.wasm 680 false None
multi-contract-features-view.wasm 1113 false None
panic-message-features.wasm 12838 false with message
panic-message-std.wasm 15886 false with message
erc1155-user-mock.wasm 1229 false None
lottery-erc20.wasm 12886 false without message
erc721.wasm 2232 false None
crowdfunding-erc20.wasm 4909 false without message
erc1155-marketplace.wasm 10603 false without message
erc1155.wasm 11969 false without message
erc20.wasm 1887 false None
esdt-system-sc-mock.wasm 4556 false None
alloc-features.wasm 23168 false without message
alloc-mem-fail.wasm 17720 true without message
alloc-mem-leaking.wasm 23325 false without message
multiversx-wegld-swap-sc.wasm 4304 false None
multiversx-price-aggregator-sc.wasm 17896 false without message
ping-pong-egld.wasm 6397 false None
multisig-full.wasm 15108 ➡️ 15109 🔴 (+1) false without message
multisig-view.wasm 5590 false None
multisig.wasm 13606 false without message
bonding-curve-contract.wasm 14011 false None
kitty-genetic-alg.wasm 3494 false without message
kitty-auction.wasm 9394 false without message
kitty-ownership.wasm 12953 false without message
check-pause.wasm 1240 false None
digital-cash.wasm 9730 false None
fractional-nfts.wasm 8302 false without message
adder.wasm 699 false None
order-book-pair.wasm 14098 false None
order-book-factory.wasm 3401 false None
empty.wasm 244 false None
esdt-transfer-with-fee.wasm 7505 false without message
nft-subscription.wasm 8725 false without message
proxy-pause.wasm 4165 false None
seed-nft-minter.wasm 14189 false without message
crowdfunding.wasm 3574 false None
nft-storage-prepay.wasm 2609 false None
crypto-bubbles.wasm 2561 false None
crypto-zombies.wasm 9276 false without message
nft-minter.wasm 9726 false without message
lottery-esdt.wasm 10580 false without message
factorial.wasm 579 false None
rewards-distribution.wasm 9449 false without message
token-release.wasm 6948 false without message

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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, and multiversx-sc-abi-derive-common are introduced under data/
  • The TypeAbi derive logic is refactored into a shared abi-derive-common crate, supporting both multiversx-sc and multiversx-sc-abi import contexts
  • BuildInfoAbi gains a new abi field tracking the ABI crate version, and a dummy() 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 // TEMP comment 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 # TEMP marker has been added to multiversx-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.

Comment thread data/abi/Cargo.toml Outdated
Comment thread data/abi-derive-common/Cargo.toml Outdated
Comment thread contracts/examples/multisig/Cargo.toml
@andrei-marinica andrei-marinica marked this pull request as ready for review March 3, 2026 10:46
@andrei-marinica andrei-marinica merged commit b76eab1 into feat/abi-crate Mar 3, 2026
22 of 23 checks passed
@andrei-marinica andrei-marinica deleted the abi-crate branch March 3, 2026 10:46
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.

2 participants