Using starknet-compile command (Note: this is different than cairo-compile).
Questions:
How do we want to handling versioning? (This is the biggest TODO left probably)
Starknet - Cairo contracts do not have a ContractType, what should we do? Using the file name kind of works, but not sure how that may scale across bigger more complex projects that could potentially have duplicate file names (e.g. contracts/storage/storage.cairo and contracts/tokens/storage.cairo both being called storage).
Do we want to also support cairo-compile or do we want to focus only on Starknet?
How to verify it
cd tests
ape compile
Then, look at the resulting .build/__local__json and see if it makes sense.
Checklist
[ ] Passes all linting checks (pre-commit and CI jobs)
[ ] New test cases have been added and are passing
[ ] Documentation has been updated
[ ] PR title follows Conventional Commit standard (will be automatically included in the changelog)
What I did
Implement a cairo compiler plugin.
How I did it
Using
starknet-compile
command (Note: this is different thancairo-compile
).Questions:
ContractType
, what should we do? Using the file name kind of works, but not sure how that may scale across bigger more complex projects that could potentially have duplicate file names (e.g.contracts/storage/storage.cairo
andcontracts/tokens/storage.cairo
both being calledstorage
).cairo-compile
or do we want to focus only on Starknet?How to verify it
Then, look at the resulting
.build/__local__json
and see if it makes sense.Checklist