-
Notifications
You must be signed in to change notification settings - Fork 120
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
Generate metadata for sub-contracts in multi contract workspace #60
Comments
@ascjones hi, I would like to know if this issue is solved. Because I'm working on multiple contracts and I'll have some trouble if I can't generate abi for sub-contracts. |
It's not solved yet. It should still work if you run |
When I try to execute
It can get a wasm file, but cannot generate abi. Using |
My mistake, I thought it would have worked. I'll look at implementing this soon. |
Following on from #58, we should support generating of metadata for the non-root contract in a multi contract workspace.
For example, the
delegator
example hosts multiple contracts which are dependencies of the main contract.Proposal
target
directory of the workspace root, with the file name the same as the contract module name e.g.delegator.json
,incrementer.json
etc.cargo contract generate-metadata
in the root workspace dir generates just the metadata for the root contract (in this case thedelegator
cd adder && cargo contract generate-metadata
generates just the metadata for that sub contract.cargo contract generate-metadata -p adder
from the root does the same, mirroringcargo
functionality.cargo contract generate-metadata --all
will generate metadata files for all contracts in the workspace, e.g.delegator.json, adder.json, subber.json
Implementation notes
ink-as-dependency
feature in the root workspace manifest for the sub contractsThe text was updated successfully, but these errors were encountered: