Skip to content

Conversation

@AlexD10S
Copy link
Collaborator

@AlexD10S AlexD10S commented Jul 9, 2025

This PR introduces a new --metadata flag to the pop build command, allowing users to specify the contract metadata: ink! or solidity when building polkavm contracts. This flag is only available when the polkavm-contracts feature is enabled.

Test it locally

cargo install --path ./crates/pop-cli --locked --no-default-features -F polkavm-contracts,parachain

In the Cargo.toml of your contract include:

[package.metadata.ink-lang]
abi="sol"

Then, build the contract with the desired metadata format:

pop build --release --metadata solidity

Closes #549

Known Limitations

  • Integration testing is currently difficult, as the [package.metadata.ink-lang] abi = "sol" section must be manually added to Cargo.toml after generate the smart contract. Once the next cargo-contract release lands, new contracts will include this by default.
  • When running pop up, the CLI currently cannot deploy ink! contracts built with Solidity metadata.The approach now is: pop-cli will automatically rebuild the contract using the default ink! metadata before deployment.

@AlexD10S AlexD10S changed the title feat: sdd metadata specification flag to pop build for polkavm contracts feat: add metadata specification flag to pop build for polkavm contracts Jul 10, 2025
@AlexD10S AlexD10S marked this pull request as ready for review July 15, 2025 10:22
@codecov
Copy link

codecov bot commented Jul 15, 2025

Codecov Report

❌ Patch coverage is 0% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.31%. Comparing base (0780e9b) to head (a27921f).
⚠️ Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
crates/pop-cli/src/commands/build/contract.rs 0.00% 7 Missing ⚠️
crates/pop-cli/src/commands/call/contract.rs 0.00% 7 Missing ⚠️
crates/pop-cli/src/commands/up/contract.rs 0.00% 7 Missing ⚠️
crates/pop-contracts/src/build.rs 0.00% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main     #567      +/-   ##
==========================================
- Coverage   77.36%   77.31%   -0.06%     
==========================================
  Files         109      109              
  Lines       25228    25246      +18     
  Branches    25228    25246      +18     
==========================================
  Hits        19518    19518              
- Misses       3728     3746      +18     
  Partials     1982     1982              
Files with missing lines Coverage Δ
crates/pop-cli/src/commands/build/mod.rs 70.28% <ø> (ø)
crates/pop-contracts/src/build.rs 35.48% <0.00%> (-1.19%) ⬇️
crates/pop-cli/src/commands/build/contract.rs 0.00% <0.00%> (ø)
crates/pop-cli/src/commands/call/contract.rs 67.80% <0.00%> (-0.50%) ⬇️
crates/pop-cli/src/commands/up/contract.rs 13.46% <0.00%> (-0.24%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AlexD10S AlexD10S requested review from al3mart and chungquantin July 15, 2025 15:55
@AlexD10S AlexD10S marked this pull request as draft September 2, 2025 15:24
@AlexD10S
Copy link
Collaborator Author

Merged with #645

@AlexD10S AlexD10S closed this Oct 31, 2025
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.

Generate Solidity metadata for a Solidity ABI compatible ink! contract

2 participants